You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Google's Gemma 3 models are released. It would enhance its utility and expand compatibility for users seeking to integrate the latest models into their applications.
The Solution
The node-llama-cpp cannot load model architecture of Gemma 3 now. The information about Gemma 3 gguf should be added.
Considered Alternatives
It just added new model to library, so I think there is no other ways to alternate the solution.
Additional Context
No response
Related Features to This Feature Request
Metal support
CUDA support
Vulkan support
Grammar
Function calling
Are you willing to resolve this issue by submitting a Pull Request?
There's currently an issue with the latest release of llama.cpp, so you can use release b4880 for now, which includes support for Gemma 3, but doesn't have the issue from the latest release.
Run this command inside your project directory to download this release and build it:
@briancullinan2 Do you use the latest version of node-llama-cpp? (version 3.6.0)
If you do, please run this command inside your project and attach its result so I can help you:
I believe I'm using the latest version. Other models work fine, but that's the first time I've tried that npx compile command.
OS: macOS 24.3.0 (arm64)
Node: 22.9.0 (arm64)
node-llama-cpp: 3.6.0
Metal: available
Metal device: Apple M1 Max
Metal used VRAM: 0% (64KB/48GB)
Metal free VRAM: 99.99% (48GB/48GB)
Metal unified memory: 48GB (100%)
CPU model: Apple M1 Max
Math cores: 8
Used RAM: 99.6% (63.75GB/64GB)
Free RAM: 0.39% (257.2MB/64GB)
Used swap: 97.6% (26.35GB/27GB)
Max swap size: dynamic
mmap: supported
Is there another version I could try other than --release b4880 that would narrow down if it is my machine/build process. I imagine the distributed pre-built binaries are working in my case since it didn't rebuild on install? Maybe it is a bug in the build process on Mac?
@briancullinan2 Your machine seems fine, so I'm not sure what's causing the issue you encountered.
The issue with the latest llama.cpp release I mentioned in my original comment has been resolved since then, so you can now use this command instead:
I'll release a new version today/tomorrow, so you can also wait for it if building still doesn't work for you, but I'd love to figure what's the issue you encountered so I can issue a fix for it if needed.
I have to delay the release a bit since there's currently an issue in llama.cpp that crashes the process when loading a LoRA.
Once this is fixed, the tests will pass and I'll release a new version.
For now, you can still build the latest release of llama.cpp yourself using this command, but note that using a LoRA can crash the process:
@aldovincenti Yes. Every release of node-llama-cpp includes that latest release of llama.cpp available at the time it's built, so the next release of node-llama-cpp will bring support for everything currently supported by llama.cpp.
Until then, you can use the command from my previous message to use the latest models with the current release of node-llama-cpp.
@polvallverdu I'll wait a few days for the LoRA issue to resolve at llama.cpp, and if it still persists, then I'll release a beta version and document it as a known issue, and release a stable version later whenever the issue is resolved.
I would have opened a PR to fix that issue myself, but I don't have enough time to continue debugging it at the moment.
Reacted by Quinn Chaffee, lin72h, Pol Vallverdu and Hyeonggeun Yun
Activity
giladgd commentedon Mar 13, 2025
I'll release a new version next week that will come with the latest
llama.cpprelease, which supports Gemma 3 models.You can always build the latest
llama.cpprelease innode-llama-cppto use the latest features, even before a new version ofnode-llama-cppis released.There's currently an issue with the latest release of
llama.cpp, so you can use releaseb4880for now, which includes support for Gemma 3, but doesn't have the issue from the latest release.Run this command inside your project directory to download this release and build it:
yhg8423 commentedon Mar 14, 2025
Oh, I see! Thanks! 👍
briancullinan2 commentedon Mar 16, 2025
Command looked promising! Not sure where to go from here:
giladgd commentedon Mar 16, 2025
@briancullinan2 Do you use the latest version of
node-llama-cpp? (version3.6.0)If you do, please run this command inside your project and attach its result so I can help you:
briancullinan2 commentedon Mar 16, 2025
I believe I'm using the latest version. Other models work fine, but that's the first time I've tried that npx compile command.
Is there another version I could try other than
--release b4880that would narrow down if it is my machine/build process. I imagine the distributed pre-built binaries are working in my case since it didn't rebuild on install? Maybe it is a bug in the build process on Mac?giladgd commentedon Mar 21, 2025
@briancullinan2 Your machine seems fine, so I'm not sure what's causing the issue you encountered.
The issue with the latest
llama.cpprelease I mentioned in my original comment has been resolved since then, so you can now use this command instead:npx --no node-llama-cpp source download --release latestI'll release a new version today/tomorrow, so you can also wait for it if building still doesn't work for you, but I'd love to figure what's the issue you encountered so I can issue a fix for it if needed.
briancullinan2 commentedon Mar 21, 2025
--release latest worked
giladgd commentedon Mar 22, 2025
I have to delay the release a bit since there's currently an issue in
llama.cppthat crashes the process when loading a LoRA.Once this is fixed, the tests will pass and I'll release a new version.
For now, you can still build the latest release of
llama.cppyourself using this command, but note that using a LoRA can crash the process:npx --no node-llama-cpp source download --release latestaldovincenti commentedon Mar 23, 2025
Will the new release also include support for the Phi-4-mini? Currently, it encounters an error while loading the model:
llama_model_load: error loading model: error loading model vocabulary: unknown pre-tokenizer type: 'gpt-4o'giladgd commentedon Mar 23, 2025
@aldovincenti Yes. Every release of
node-llama-cppincludes that latest release ofllama.cppavailable at the time it's built, so the next release ofnode-llama-cppwill bring support for everything currently supported byllama.cpp.Until then, you can use the command from my previous message to use the latest models with the current release of
node-llama-cpp.polvallverdu commentedon Mar 24, 2025
Hey! Is there any ETA on this, or we're still waiting on a new llama.cpp release? I'd love to add gemma 3 to BashBuddy
briancullinan2 commentedon Mar 24, 2025
Update using command
npx --no node-llama-cpp source download --release latestGemma 3 works. It's faster.giladgd commentedon Mar 24, 2025
@polvallverdu I'll wait a few days for the LoRA issue to resolve at
llama.cpp, and if it still persists, then I'll release a beta version and document it as a known issue, and release a stable version later whenever the issue is resolved.I would have opened a PR to fix that issue myself, but I don't have enough time to continue debugging it at the moment.
github-actions commentedon Mar 28, 2025
🎉 This issue has been resolved in version 3.7.0 🎉
The release is available on:
v3.7.0v3.7.0Your semantic-release bot 📦🚀