306 points · by b4rtazz · 1y ago · 156 comments
Remember sampling from formal grammar is a thing! This is relevant, because llama.cpp has GBNF, and lazy grammar[2] setting now, which is making it double not-half-bad for a handful of use-cases, less of all deployments like this. That is to say, the grammar kicks in after </think>. Not to mention, it's always subject to further fine-tuning: multiple vendors are now offering "RFT" services, i.e. enriching your normal SFT dataset with synthetic reasoning data from the big-boy R1 himself. For all intents and purposes, this result could be much more valuable prior than you're giving it credit for!
6 tok/s decoding is not much, but Raspberry Pi people don't care, lol.
[1] https://github.com/deepseek-ai/DeepSeek-R1#distilled-model-e...
"Distilled" models are other models (Llama, Qwen) that have been put through an additional training round using DeepSeek as a teacher.
And is there a domain specific term I can look into if I wanted to read about someone trying to keep all the bits, but the runtime (trying to save ram) focusing in on parts of the data instead of this quantization?
It also looks to me like there was some Chinese propaganda trained into llama/quen too, but that’s just my observation.
Google it!
Crucially, the output of the teacher model includes token probabilities so that the fine-tuning is trying to learn the entire output distribution.
Or you could provide some example links
Suprisingly it's not *that* bad, with 3t/s for the quantized models: https://www.reddit.com/r/LocalLLaMA/comments/1in9qsg/boostin...
> NVidia ported it, and they claim almost 4 tokens/sec on 8xH100 server.
What? That sounds ridiculously low, someone just got 5.8t/s out of only one 3090 + CPU/RAM using the KTransformers inference library: https://www.reddit.com/r/LocalLLaMA/comments/1iq6ngx/ktransf...
There are many sources and discussions on this. Also DeepSeek recently changed their responses to hide references to various OpenAI things after all this came out, which is weird.
* pos=0 => P 138 ms S 864 kB R 1191 kB Connect
* pos=2000 => P 215 ms S 864 kB R 1191 kB .
* pos=4000 => P 256 ms S 864 kB R 1191 kB manager
* pos=6000 => P 335 ms S 864 kB R 1191 kB the
https://github.com/geerlingguy/ollama-benchmark?tab=readme-o...
Then I saw you github link and your HN handle and I was like “Wait, it is Jeff Geerling!”. :D
Double thanks for the 3rd party mac mini SSD tip - eagerly awaiting delivery!
That wouldn't get on Hacker News ;-)
My 300w 3070ti doesn't really exceed 100w during inference workloads. Boot up a 1440p video game and it's a different story altogether, but for inference and transcoding those 3060s are some of the most power efficient options on the consumer market.
If people want to talk about Beowulf clusters in their homelab, they should at least be running compute nodes with a shoestring budget FDR Infiniband network, running Slurm+Lustre or k8s+OpenStack+Ceph or some other goodness. Spare me this doesnt-even-scale-linearly-to-four-slowass-nodes BS.
You could also get one or two Ryzen mini PCs with similar specs for that price. Which might be a good idea, if you want to leave O(N) of them running on your desk, house without spending much on electricity or cooling. (Also, IMHO, the advantages of having an Epyc really only become apparent when you're tossing around multiple 10Gbit NICs, 16+ NVMe disks, etc. and so saturating all the PCIe lanes.)
I don't know if my complaint applies to RPi, or just other SBCs: the last time I got excited about an SBC, it turned out it boots unconditionally from SD card if one is inserted. IMO that's completely unacceptable for an "embedded" board that is supposed to be tucked away.
In my country (italy) a basic colocation service is like 80 euros/month + vat, and that only includes 100Wh of power and a 100mbps connection. +100wh/month upgrades are like +100 euros.
I looked up the kind of servers and cpus you're talking about and the cpu alone can pull something like 180W/h, without accounting for fans, disks and other stuff (stuff like GPUs, which are power hungry).
Yeah you could run it at home in theory, but you'll end up paying power at consumer price rather than datacenter pricing (and if you live in a flat, that's going to be a problem).
Unless you're really wealthy, you have your own home with sufficient power[1] delivery and cooling.
[1] not sure where you live, but here most residential power connections are below 3 KWh.
If otherwise you can point me at some datacenter that will let me run a normal server like the ones you're pointing at for like 100-150 euros/month, please DO let me know and i'll rush there first thing next business day and I will be throwing money at them.
Why do I need a colocation service to put a used 1U server from eBay in my house? I'd just plug it in, much like any other PC tower you might run at home.
> Unless you're really wealthy, you have your own home with sufficient power[1] delivery and cooling.
> not sure where you live, but here most residential power connections are below 3 KWh.
It's a single used 1U server, not a datacenter... It will plug into your domestic powersupply just fine. The total draw will likely be similar or even less than many gaming PC builds out there, and even then only when under peak loads etc.
A connection to a home wouldn't be rated in kilowatt-hours, it would likely be rated in amps, but could also be expressed in kilowatts.
> 100wh/month upgrades are like +100 euros.
I can't imagine anybody paying €1/Wh. Even if this was €1/kWh (1000x cheaper) it's still a few times more expensive than what most places would consider expensive.
brew install ollama
might be a good start ;)F these curl|sh installs.
The main issue for the maintainer team would be the work in hosting and maintaining all the package repos for apt, yum, etc, and making sure the we handle the case where nvidia/amd drivers aren't installed (quite common on cloud VMs). Mostly a matter of time and putting in the work.
For now every release of Ollama includes a minimal archive with the ollama binary and required dynamic libraries: https://github.com/ollama/ollama/blob/main/docs/linux.md#man.... But we could definitely do better
There are three broad groups of people in packaging:
A) People who package stuff you and others need.
B) People who don’t package stuff but use what’s available.
C) People who don’t package stuff and complain about what’s available without taking further action.
If you find yourself in group C while having no interest in contributing to group A or working within the limits of group B, then you have two realistic options: either open your wallet and pay someone to package it for you or accept that your complaints won’t change anything.
Most packaging work is done by volunteers. If something isn’t available, it’s not necessarily because no one sees value in it—it could also be due to policy restrictions, dependency complexity, or simply a lack of awareness. If you want it packaged, the best approach is to contribute, fund the work, or advocate for it constructively.
Sorry for not being more specific, but at this point I just lost faith in this package manager.
brew install llm # or pipx install llm or uv tool install llm
llm install llm-mlx
llm mlx download-model mlx-community/DeepSeek-R1-Distill-Llama-8B
llm -m mlx-community/DeepSeek-R1-Distill-Llama-8B 'poem about an otter'
It's pretty performant - I got 22 tokens/second running that just now: https://gist.github.com/simonw/dada46d027602d6e46ba9e4f48477...Extra tidbits to keep in mind:
- A bits-per-parameter higher than the model was trained adds nothing (other than compatibility on certain accelerators) but a bits-per-parameter lower than the model was trained degrades the quality.
- Different models may be trained at different bits-per-parameter. E.g. 671 billion parameter Deepseek R1 (full) was trained at fp8 while llama 3.1 405 billion parameter was trained and released at a higher parameter width so "full quality" benchmark results for Deepseek R1 require less memory than Llama 3.1 even though R1 has more total parameters.
- Lower quantinizations will tend to run proportionally faster if you were memory bandwidth bound and that can be a reason to lower the quality even if you can fit the larger version of a model into memory (such as in this demonstration).
So Q4 8B would be ~4GB.
But, yeah, performance aside, there are models that Ollama won't run at all as they need more than 8GB to run.
You mean like Ollama + llamacpp ?
We know there’s a market out there for Alexa and Google home. So this would be the next generation of that. It’s the nobrainer next step.
Can you link - I am answering an email on monday where this info would be very useful!
If we can get something working, then improving it will come.
Yes it's slower, but well, for free (or cheap) it is acceptable.
people think they can run these tiny models distilled from deepseek r1 and are actually running deepseek r1 itself
its kinda like if you drove a civic with a tesla bodykit and said it was a tesla
The advantage over centralizing the compute is that you can just connect your node and start contributing to the cause (both by providing compute and by being its eyes and hands out there in the real world), there's no confusion over things like who is paying the cloud compute bill and nobody has invested overmuch in hardware.