Hi, one of the authors austin here. Happy to answer any questions the best I can. To get a few common questions out of the way: - This is separate / independent of llama.cpp / ggml. I'm a big fan of that project and it was an inspiration (we say as much in the README). I've been a big advocate of gguf + llama.cpp support for gemma and am happy for people to use that. - how is it different than inference runtime X? ge…
Gemma.cpp: lightweight, standalone C++ inference engine for Gemma models
21–30 of 146 posts
Re: Gemma.cpp: lightweight, standalone C++ inference engine for Gemma models
#22Hi, one of the authors austin here. Happy to answer any questions the best I can. To get a few common questions out of the way: - This is separate / independent of llama.cpp / ggml. I'm a big fan of that project and it was an inspiration (we say as much in the README). I've been a big advocate of gguf + llama.cpp support for gemma and am happy for people to use that. - how is it different than inference runtime X? ge…
Re: Gemma.cpp: lightweight, standalone C++ inference engine for Gemma models
#23If I want to put a Gemma model in a minimalist command line interface, build it to a standalone exe file that runs offline, what is the size of my final executable? I am interested in how small can the size of something like this be and it still be functional.
---
llama.cpp has integrated gemma support. So you can use llamafile for this. It is a standalone executable that is portable across most popular OSes.
https://github.com/Mozilla-Ocho/llamafile/releases
So, download the executable from the releases page under assets. You want either just main and server and llava. Don't get the huge ones with the model inlined in the file. The executable is about 30MB in size,
https://github.com/Mozilla-Ocho/llamafile/releases/download/...
Re: Gemma.cpp: lightweight, standalone C++ inference engine for Gemma models
#24Hi, one of the authors austin here. Happy to answer any questions the best I can. To get a few common questions out of the way: - This is separate / independent of llama.cpp / ggml. I'm a big fan of that project and it was an inspiration (we say as much in the README). I've been a big advocate of gguf + llama.cpp support for gemma and am happy for people to use that. - how is it different than inference runtime X? ge…
So... llamafile release? https://github.com/Mozilla-Ocho/llamafile
ps i'm a fan of cosmopolitan as well.
Re: Gemma.cpp: lightweight, standalone C++ inference engine for Gemma models
#25Hi, one of the authors austin here. Happy to answer any questions the best I can. To get a few common questions out of the way: - This is separate / independent of llama.cpp / ggml. I'm a big fan of that project and it was an inspiration (we say as much in the README). I've been a big advocate of gguf + llama.cpp support for gemma and am happy for people to use that. - how is it different than inference runtime X? ge…
This is really cool, Austin. Kudos to your team!
Re: Gemma.cpp: lightweight, standalone C++ inference engine for Gemma models
#26Re: Gemma.cpp: lightweight, standalone C++ inference engine for Gemma models
#27Earlier quoted context omitted.
The code is a basically irrelevant fraction of the model weights. The raw FP16 is like 17GB. In practice your priority would be fancy quantization, and just any library that compiles down to an executable (like this, MLC-LLM or llama.cpp)
17GB looks like a lot. Thanks, I will wait until people figure how to make these smaller before trying to use to make something standalone.
Distributing 17GB isn’t a big deal if you shove it into Cloudflare R2.
Re: Gemma.cpp: lightweight, standalone C++ inference engine for Gemma models
#28Earlier quoted context omitted.
The code is a basically irrelevant fraction of the model weights. The raw FP16 is like 17GB. In practice your priority would be fancy quantization, and just any library that compiles down to an executable (like this, MLC-LLM or llama.cpp)
17GB looks like a lot. Thanks, I will wait until people figure how to make these smaller before trying to use to make something standalone.
If you are looking for megabytes, yeah, those "chat" llms are pretty unusable at that size.
Re: Gemma.cpp: lightweight, standalone C++ inference engine for Gemma models
#29Earlier quoted context omitted.
The code is a basically irrelevant fraction of the model weights. The raw FP16 is like 17GB. In practice your priority would be fancy quantization, and just any library that compiles down to an executable (like this, MLC-LLM or llama.cpp)
17GB looks like a lot. Thanks, I will wait until people figure how to make these smaller before trying to use to make something standalone.
As maturity arrives, we'll likely see a handful of competing local models shipped as part of the OS or as redistributable third-party bundles (a la the .NET or Java runtimes) so that individual applications don't all need to be massive.
You'll either need to wait for that or bite the bullet and make something chonky. It's never going to get that small.
Re: Gemma.cpp: lightweight, standalone C++ inference engine for Gemma models
#30Earlier quoted context omitted.
17GB looks like a lot. Thanks, I will wait until people figure how to make these smaller before trying to use to make something standalone.
These won't be smaller I guess. Given we keep the number of parameters same. Pre LLM era (let's say 2020), the hardware used to look decently powerful for most use cases (disks in hundreds of GBs, dozen or two of RAM and quad or hex core processors) but with the advent of LLMs, even disk drives start to look pretty small let alone compute and memory.