Technically a wrapper of a wrapper, though llama-cpp-python is quite excellent... TBH I would just recommend using that and all its under-the-radar features (like grammar, and built in function calling support with Functionary).
(edit: this is completely irrelevant remark. sorry) It's (1) written in Python, and (2) ollama appears nowhere in their Docker repo [1], and (3) it gets the models only from huggingface instead of the ollama repos. Thus maybe it is NOT a wrapper of ollama?
You can download any .gguf model (not just the ones in their examples) and run it locally (as long as you have the ram for it). I was running 7B models with ease on an old FX8350 and now 13B models on a 5600X (32GB RAM on both machines).
This wrapper spins up a local web server that runs a simple web frontend to use immediately with no code, but also exposes an OpenAI compatible API for dev work and alt frontends (like SillyTavern).
I wasn't really timing it, but it felt fine, especially since it prints out while generating. The 13B model on the 5600X is about 10 seconds. Tho once the conversation gets too long (about 10 replies) it will go sideways. I gotta play with the default settings. IIRC the 7B on the Fx8350 was closer to 25 seconds per response.
Llama.cpp is an inference engine. The author of llama.cpp designed gguf. Funcionary is a model that does function calling. You can download functionary weights in the gguf format and then run it using llama.cpp on low-end machines using CPU or GPU or a mix of both.
I read the original question as "is the 'Functionary' thing something that works with any LLM you can run in llama.cpp, not just only with the special 'Functionary' finetuned models?", to which the answer now is clearly no.
Very interesting question, as I also read top-level post as saying it's a llama-cpp-python feature, and therefore I could shove some random dolphin-mixtral or whatever I have on my hard drive at it, and it will work.
> TBH I would just recommend using that and all its under-the-radar features (like grammar, and built in function calling support with Functionary).
I never heard about Functionary, this comment seems to say “I would use llama.cpp plus Functionary”. Now, since llama.cpp allows to plug in several models, I was wondering if Functionary works with several models too, ie is Functionary a library that allows to add function calling to models?
The following answer to my comment helped clarifying that Functionary is not a lib, but a specific model, or that is what I understand from the answer. So the answer is “no, you can’t use functionary with many models (eg it’s not like llama.cpp that works with multiple models) because Functionary is a model itself”
I wonder what need they're fulfilling here. It's not really more useful than using llamacpp-python. This is not something old Google would even release.
You can also get exactly that same VM as a spot instance with a 10GB disk and external ip address in the us-west4 region for $142.04/month. (Spot instance prices vary dramatically from one region to another, but that one is very discounted in us-west4.)
Also, is this localllm kind of like a Google competitor to some aspects of ollama?
For $1000 you could basically build one today. 5950x (16c cpu) is $400, 128gb kit of ddr4 is $250-300, maybe enough budget left for mobo, ssd, psu, case, cooler if you bought used bits (may also need cheapest gpu on Craigslist depending on your needs). All new ~$1200. Aws/gcp prices are nuts compared to on prem, although hetzner and co would be much cheaper.
One thing I'm happy about is that the gguf file format is getting widely used, here endorsed by Google. I vastly prefer working with gguf and have adopted it for my project, hopefully it gets the critical mass to become a "native" format and we can stop with pytorch checkpoints.
It doesn't support everything other backends need (like certain quantization schemes). If it somehow does, then its not universally compatible and that's just going to create more confusion.
What do you mean "far from ideal"? It's literally just passing in your services URL rather than using the default when instantiating the client. Something you will need to do with any client you use.
Yes - at the same time it would similarly fit other tools where some form of working with LLMs is the main feature. And with time we might get more of these.
I mean, let’s say you picked say, “ghost pony”; ok, sure, it’s obviously a name.
But LLM? I mean, it’s not like you can get a lot more generic than that. If your tools name is “tool” and some else makes a tool called “tool”, you can’t really complain that much…
Google trying to ride the open source hype that Meta is blessed by, except google is a mean girl who regrets opening up the transformer without taxing it, so they're really sour about it and doing these tricks now to pretend to still support open-source.
LLM is now an ubiquitous term, not sure anyone can claim ownership of the keyword. It also looks like the package is a local install only, not pushed to PyPI. So unless you want to use this project, you'd never know.
This happened with one of my neovim plugins (also named llm!). In my case I was already thinking of renaming the project so I just went through with that. The other project's maintainer was nice enough to apologize and I ended up with a name I liked better.
They've really jumped the shark. Creating a wrapper for llama.cpp (a project they don't even credit here) and acting like that's even interesting, then somehow implying this is a feature or benefit of using Google Cloud Workstations? This is the most technically bankrupt product page I've ever seen in my life and for a company that used to mean something to people to do it is pathetic.
For the interested, I've been having fun with llama.cpp. I've got it running well, if a bit slowly, on my 2019 intel MacBook Pro. There's configs you can tweak that get it to run faster, mainly dealing with memory mapping. I've been working on documenting my findings but haven't published yet.
I say all that to encourage people to try it out with different models. It's not production quality but totally usable for testing things out even on older machines.
Looks like the repo (localllm) only contains a smallish Python project to do the model downloading. When it comes to serving the model, it calls out a Python module llama_cpp.server, which is not part of the repo, likely something inside the Docker image. A bit disappointing given how the article sounds.
The idea of making it easier to download modes from HuggingFace, and serve them via llama-cpp-python could be a good contribution, but unfortunately there are two different names that the "Localllm" project introduces for itself - Localllm and the 'llm' command, both of them problematic for quite a few of reasons, perhaps they could just drop naming it anything to do with local?
E.g: Simon Willison's well known `llm` package on PyPI already uses the `llm` command. A name for the command that differs from the project name creates extra work for no good reason.
Look at this positioning Google use in the blog post: "localllm combined with Cloud Workstations revolutionizes AI-driven application development by letting you use LLMs locally on CPU and memory within the Google Cloud environment." - implying a local setup that's actually reliant on cloud resources is a contradiction.
Maybe they could rename it with a single name that has no conflicts or misleading terms that makes it clear it's to help setup and run inference without confusing the matter about how local things might sometimes be. It won't be nice to read the scathing critiques in some of the other comments! Maybe they could fix up the mess in querylocal.py!
Being able to run the same code locally as in a cloud platform is a nice development pattern but optimal inference setup for many ML situations is a tricky problem, are you really making good use of the CPU / GPU / TPU?
The underlying server tech: llama-cpp-python recently added support for draft models that could make inference much faster. How easy would using that from Localllm be? I'd be concerned `Localllm > llama-cpp-python > llama.cpp` might be too many layers of systems to optimise or code with. Milliseconds often matter.
Having a fast, well priced solution is not easy, people want as many tokens per second as they can get, ideally with no warm-up. How would they solve that?
People looking at fast inference options might like to see Banana's parting words, as they wind down their serverless GPU cloud, in their swansong, they suggest a few hosted inference options people might want to consider: https://news.ycombinator.com/item?id=39288915
I've run non-ECC systems at heavy load for uptimes in excess of a year and not had issues. It really is statistically rare... but of course common enough that if you run whole data centers you will see it.
76 comments
[ 2.8 ms ] story [ 131 ms ] threadTechnically a wrapper of a wrapper, though llama-cpp-python is quite excellent... TBH I would just recommend using that and all its under-the-radar features (like grammar, and built in function calling support with Functionary).
[1] https://github.com/googlecloudplatform/localllm
I see llama.cpp in there, but I didn't go deeper than that. Ollama is not the same thing.
https://github.com/Mozilla-Ocho/llamafile
You can download any .gguf model (not just the ones in their examples) and run it locally (as long as you have the ram for it). I was running 7B models with ease on an old FX8350 and now 13B models on a 5600X (32GB RAM on both machines).
This wrapper spins up a local web server that runs a simple web frontend to use immediately with no code, but also exposes an OpenAI compatible API for dev work and alt frontends (like SillyTavern).
Very interesting question, as I also read top-level post as saying it's a llama-cpp-python feature, and therefore I could shove some random dolphin-mixtral or whatever I have on my hard drive at it, and it will work.
Functionary is a series of function calling llama architecture finetuned models, not a new base model, if thats what you mean.
Hence, it can be turned into a gguf like any other llama finetune.
It just has a very esoteric prompting format, but llama-cpp-python is specifically set up to leverage it.
> TBH I would just recommend using that and all its under-the-radar features (like grammar, and built in function calling support with Functionary).
I never heard about Functionary, this comment seems to say “I would use llama.cpp plus Functionary”. Now, since llama.cpp allows to plug in several models, I was wondering if Functionary works with several models too, ie is Functionary a library that allows to add function calling to models?
The following answer to my comment helped clarifying that Functionary is not a lib, but a specific model, or that is what I understand from the answer. So the answer is “no, you can’t use functionary with many models (eg it’s not like llama.cpp that works with multiple models) because Functionary is a model itself”
:-)
The need to fill more seats on the AI hype train.
(Someone's probably got "release AI software as Google open source" as an OKR)
Average price per month $966.56
https://gcloud-compute.com/e2-standard-32.html
Also, is this localllm kind of like a Google competitor to some aspects of ollama?
If someone has a microcenter nearby, they could build an 8 core ddr4 system with 128gb of ram for maybe $800.
$3200+ could build a 64 core/128gb ddr5 rig.
https://www.newegg.com/tyan-s8050gm2ne-9534-amd-epyc-9534-2-...
Non-ECC issues are statistically rare. You might never see them if you aren’t running a lot of systems at heavy load at scale.
It doesn't support everything other backends need (like certain quantization schemes). If it somehow does, then its not universally compatible and that's just going to create more confusion.
Why is that required?
Its actually great. Most backends and frontends "just work" with each other because they all talk with openai (albeit with some caveats).
Plus I like that it's three letters, since it's designed for CLI usage.
At least it’s not called “ai”, we have that already, e.g. https://github.com/yufeikang/ai-cli
I mean, let’s say you picked say, “ghost pony”; ok, sure, it’s obviously a name.
But LLM? I mean, it’s not like you can get a lot more generic than that. If your tools name is “tool” and some else makes a tool called “tool”, you can’t really complain that much…
- First, they "steal" @simonw's 'llm' keyword for their own CLI tool (https://news.ycombinator.com/item?id=39296567)
- Then they create a wrapper around llama-cpp-python which is a wrapper around llama-cpp, a project they don't even credit nor support.
- Then they steal @mcapodici's article title to publish it on their blog (https://news.ycombinator.com/item?id=39297563).
- And the ironic part is that their Gemini models are closed-source, so no gguf for those.
I want to know: are they contributing back to llamacpp? Are they paying GG?
https://github.com/gsuuon/model.nvim/discussions/37
> “…within the Google Cloud Workstation”
Here's a whole list of indie, OSS AI frameworks you can use: https://github.com/janhq/awesome-local-ai
Disclaimer: I'm one of the core devs on Jan.
I say all that to encourage people to try it out with different models. It's not production quality but totally usable for testing things out even on older machines.
> run LLMs locally on CPU and memory, right within the Google Cloud Workstation
And in the code https://github.com/GoogleCloudPlatform/localllm/blob/main/qu... there's just a shebang halfway down?
This is awful. Did bard write this?Look at this positioning Google use in the blog post: "localllm combined with Cloud Workstations revolutionizes AI-driven application development by letting you use LLMs locally on CPU and memory within the Google Cloud environment." - implying a local setup that's actually reliant on cloud resources is a contradiction.
Maybe they could rename it with a single name that has no conflicts or misleading terms that makes it clear it's to help setup and run inference without confusing the matter about how local things might sometimes be. It won't be nice to read the scathing critiques in some of the other comments! Maybe they could fix up the mess in querylocal.py!
Being able to run the same code locally as in a cloud platform is a nice development pattern but optimal inference setup for many ML situations is a tricky problem, are you really making good use of the CPU / GPU / TPU?
The underlying server tech: llama-cpp-python recently added support for draft models that could make inference much faster. How easy would using that from Localllm be? I'd be concerned `Localllm > llama-cpp-python > llama.cpp` might be too many layers of systems to optimise or code with. Milliseconds often matter.
Having a fast, well priced solution is not easy, people want as many tokens per second as they can get, ideally with no warm-up. How would they solve that?
People looking at fast inference options might like to see Banana's parting words, as they wind down their serverless GPU cloud, in their swansong, they suggest a few hosted inference options people might want to consider: https://news.ycombinator.com/item?id=39288915