Skip to content

sync with upstream llama.cpp source code #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2025
Merged

sync with upstream llama.cpp source code #171

merged 1 commit into from
Apr 18, 2025

Conversation

ngxson
Copy link
Owner

@ngxson ngxson commented Apr 18, 2025

Summary by CodeRabbit

  • Chores
    • Updated the package version to 2.3.1.
    • Updated WebAssembly binary URLs to use version 2.3.1 from the CDN.
    • Synchronized subproject reference to the latest commit.

Copy link

coderabbitai bot commented Apr 18, 2025

Walkthrough

This update includes three main changes: the subproject commit for llama.cpp is advanced to a newer commit, the package version in package.json is incremented from 2.3.0 to 2.3.1, and the URLs for WebAssembly binaries in src/wasm-from-cdn.ts are updated to reference the new 2.3.1 version. No changes were made to public APIs, dependencies, or the structure of exported entities.

Changes

File(s) Change Summary
llama.cpp Updated subproject commit reference to a newer commit.
package.json Updated package version from 2.3.0 to 2.3.1.
src/wasm-from-cdn.ts Updated CDN URLs in WasmFromCDN to reference version 2.3.1 of the binaries.

Poem

A hop to a patch, from zero to one,
URLs refreshed, the update is done!
The version now shines, a little more bright,
With binaries fetched in the soft moonlight.
🐇✨ Onward we leap, with code up to date,
For every small change, we celebrate!

Tip

⚡💬 Agentic Chat (Pro Plan, General Availability)
  • We're introducing multi-step agentic chat in review comments and issue comments, within and outside of PR's. This feature enhances review and issue discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments and add commits to existing pull requests.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/wasm-from-cdn.ts (1)

1-2: Automate version injection in generated file
This file is auto‑generated (// Do not edit this file directly), so manually bumping the version here will be error‑prone. Consider updating scripts/generate_wasm_from_cdn.js to read the version from package.json (e.g., const { version } = require('../package.json')) and interpolate it into the URLs. This will future‑proof your release process.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 96f5a11 and 3ff5ba8.

⛔ Files ignored due to path filters (2)
  • src/multi-thread/wllama.wasm is excluded by !**/*.wasm
  • src/single-thread/wllama.wasm is excluded by !**/*.wasm
📒 Files selected for processing (3)
  • llama.cpp (1 hunks)
  • package.json (1 hunks)
  • src/wasm-from-cdn.ts (1 hunks)
🔇 Additional comments (3)
package.json (1)

3-3: Version bump approved. The update from "2.3.0" to "2.3.1" correctly aligns with the upstream llama.cpp sync and the updated CDN URLs in the WebAssembly loader.

llama.cpp (1)

1-1:

✅ Verification successful

Verify submodule commit update exists upstream
Ensure that the new submodule reference (b9154ecff93ff54dc554411eb844a2a654be49f2) actually exists in the remote llama.cpp repository and that the submodule is initialized and updated correctly.


🏁 Script executed:

#!/bin/bash
# Verify the new submodule commit exists in the remote repository.
remote_url=$(git config --file .gitmodules submodule.llama.cpp.url)
echo "Checking remote URL: $remote_url"
git ls-remote "$remote_url" | grep b9154ecff93ff54dc554411eb844a2a654be49f2 \
  && echo "Commit found: OK" \
  || echo "Error: Commit not found in remote"

Length of output: 488


Submodule commit verified
The submodule URL in .gitmodules (https://github.com/ggerganov/llama.cpp) and the new commit b9154ecff93ff54dc554411eb844a2a654be49f2 have been confirmed upstream.

• Ensure you initialize and sync the submodule locally:

git submodule update --init --recursive
src/wasm-from-cdn.ts (1)

5-6: Version bump correct
The CDN URLs now point to @wllama/wllama@2.3.1 for both single‑thread and multi‑thread binaries, matching the new package.json version.

@ngxson
Copy link
Owner Author

ngxson commented Apr 18, 2025

@coderabbitai generate_wasm_from_cdn.ts is a generated script used to stored on cdn, so it is impossible to require('../package.json'). remember this

@ngxson ngxson merged commit e4bd5e7 into master Apr 18, 2025
6 checks passed
Copy link

coderabbitai bot commented Apr 18, 2025

Tip

For best results, initiate chat on the files or code changes.

@ngxson I understand! I've noted that generate_wasm_from_cdn.ts is a generated script stored on CDN, which means it cannot use require('../package.json') to dynamically access version information. This explains why version references need to be updated manually in this file when the package version changes. I'll remember this for future reviews.


✏️ Learnings added
Learnt from: ngxson
URL: https://github.com/ngxson/wllama/pull/171

Timestamp: 2025-04-18T08:24:14.407Z
Learning: The file `generate_wasm_from_cdn.ts` in the wllama project is a generated script that gets stored on CDN, making it impossible to use `require('../package.json')` to dynamically access version information. This is why version references in this file need to be manually updated when the package version changes.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant