Live data from Hacker News

Deepseek R1 Distill 8B Q40 on 4 x Raspberry Pi 5

github.com

21–30 of 162 posts

Re: Deepseek R1 Distill 8B Q40 on 4 x Raspberry Pi 5

#21

Earlier quoted context omitted.

Memory capacity in itself doesn't help so long as the model+context fits in memory (and and 8B parameter Q4 model should fit in a single 8 GB Pi).

Is there a back-of-the-napkin way to calculate how much memory a given model will take? Or what parameter/quantization model will fit in a given memory size?

To find the absolute minimum you just multiply the number of parameters by the bits per parameter, divide by 8 if you want bytes. In case 8 billion parameters of 4 bits each means "at least 4 billion bytes". For back of the napkin add ~20% overhead to that (it really depends on your context setup and a few other things but that's a good swag to start with) and then add whatever memory the base operating system is going to be using in the background.

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).

Re: Deepseek R1 Distill 8B Q40 on 4 x Raspberry Pi 5

#22
post #4

This continues the pattern of all other announcements of running 'Deepseek R1' on raspberry pi - that they are running llama (or qwen), modified by deepseek's distillation technique.

Yet for some things they work exactly the same way, and with the same issues :)

Re: Deepseek R1 Distill 8B Q40 on 4 x Raspberry Pi 5

#23

Earlier quoted context omitted.

Lots of use cases don’t require low latency. Background work for agents. CI jobs. Other stuff I haven’t thought of.

If my "automated" CI job takes more than 5 minutes, I'll do it myself..

I bet the raspberry pi takes a smaller salary though.

Re: Deepseek R1 Distill 8B Q40 on 4 x Raspberry Pi 5

#25
post #4

This continues the pattern of all other announcements of running 'Deepseek R1' on raspberry pi - that they are running llama (or qwen), modified by deepseek's distillation technique.

I really don't like that these models can be branded as Deepseek R1.

Re: Deepseek R1 Distill 8B Q40 on 4 x Raspberry Pi 5

#26

The interesting thing here is being able to run llama inference in a distributed fashion across multiple computers.

Which begs the question; Where is the equiv of distributed GPU? (Seti@HOME) and just pipe to a tool which is globally ditributed R1 full, but slow... and let it reason in the open on deep and complex tasks

Re: Deepseek R1 Distill 8B Q40 on 4 x Raspberry Pi 5

#27
post #4

This continues the pattern of all other announcements of running 'Deepseek R1' on raspberry pi - that they are running llama (or qwen), modified by deepseek's distillation technique.

I don't know if they'd changed the submission title or what, but it says quite explicitly "Deepseek R1 Distill 8B Q40" which is a far-cry from "Deepseek R1" which would be misrepresenting the result, indeed. However, if you refer to Distilled Model Evaluation[1] section of the official R1 repository, you will note that DeepSeek-R1-Distill-Llama-8B is not half-bad; it supposedly out-performs both 4o-0513 and Sonnet-1022 on a handful of benchmarks.

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 . 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...

[2] https://github.com/ggerganov/llama.cpp/pull/9639

Re: Deepseek R1 Distill 8B Q40 on 4 x Raspberry Pi 5

#28

Can’t you run larger models easily on MacBook Pro laptops with the bigger memory options? I think I read that people are getting 100 tokens a second on 70B models.

You can get even faster results with GPUs, but that isn't the purpose of this demo. It's showcasing the ability to run such models on commodity hardware, and hopefully with better performance in the future.

Re: Deepseek R1 Distill 8B Q40 on 4 x Raspberry Pi 5

#29

Earlier quoted context omitted.

Lots of use cases don’t require low latency. Background work for agents. CI jobs. Other stuff I haven’t thought of.

If my "automated" CI job takes more than 5 minutes, I'll do it myself..

There are tasks that I don't want to do whose delivery sensitivity is 24 hours, aka they can be run while I'm sleeping.
Post reply on HN