r/opencode • • 28d ago

πŸ‘€ About DeepSeek and quantization...

Post image
284 Upvotes

59 comments sorted by

View all comments

12

u/elitegenes 28d ago

FP4 has inferior performance to FP8, which is what being served via official Deepseek API.

Apparently, "dax" thinks people are idiots.

The famous "hmm hmm" is not just a coincidence - it's a direct indicator of using a nerfed model.

7

u/marhensa 28d ago

hmmm...

6

u/ZveirX 28d ago

It isn't. It's all the same, they just serve the model in FP8 kv cache.

1

u/confused-photon 28d ago

The kv cache is also fp4 natively though?

0

u/ZveirX 28d ago

No, KV cache is far more sensitive to quantization than the model itself. Hence it is recommended to not go lower than FP8 or Q8 for KV cache.

4

u/confused-photon 28d ago

https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash

Bro read the model card, CSA2 uses fp4 kv cache

1

u/ZveirX 28d ago

DeepSeek's system fingerprint literally used to say FP8 kv cache on their deployment, unless they forgot to remove that part from the deployment naming itself. Which would make sense if they corrected it recently since it can't be tracked correctly through md5 anymore

2

u/Low-Locksmith-6504 28d ago

4.1f in general uses a new hybird fp4 KV cache if you open up the original model paper its got some fancy math equations. The model itself runs mixed weights between fp4/fp8 as well. Natively trained that way

1

u/confused-photon 28d ago

Same as with expert weights, packing 2 fp4 into single fp8 value perhaps then?

1

u/ProductResident4634 27d ago

Deepseeks v4.1 flash model card says they use NVFP4 kv cache

3

u/TheAIPU-guy 28d ago

Models natively trained at fp4 don't have inferior inference performance in fp4 compared to fp8.

1

u/ggPeti 28d ago

Β which is what being served via official Deepseek API

source?

1

u/xmsxms 28d ago

What are you on about? He literally stated the model itself is fp4. Deepseek aren't serving it at fp8.

0

u/sam7oon 28d ago

no there isn't, FP4 hardware compatibility makes it the same like FP8 , and when did you get that official is FP8 vs opencode"s is FP4 ,

pile of crap

2

u/overand 28d ago

FP4 isn't "the same as FP8" regardless of hardware.

Sure, hardware can affect the speed of how a system handles FP4 vs FP8 vs INT8 vs BF16 etc.Β 

But, hardware isn't magically bringing back those 4 bits that were lost / deleted to go from FP8 to FP4.

1

u/Dixxi_Normous1080p 28d ago

It is. There is enough research showing that the sign of th weights is the most important part. There is a difference between naively quantizing a model and integrating into the training.

1

u/sam7oon 28d ago

https://x.com/thdxr/status/2116581467715195278?a=6IK652IyycnDBfVcKV4&s=20

You can share your feedback in a more positive way to the guy directly , they could not be more transparent i think ,

They repeatdly mention its more about the config instead of the Quantizaiotn, and seems they are constantly working on the configuration .

→ More replies (1)

1

u/overand 28d ago

Just for some context, here's an example of 4-bit vs 8-bit images.

  • 4 bit: 16 possible values (colors, in this case)
  • 8 bit: 256 possible values / colors

1

u/Joe_The_Lawn 27d ago edited 27d ago

You could argue it's more problematic than that, since floating point isn't linear quanitization like integer. Integer quantization is a lot more predictable, but once you start going down to FP8 and then FP4 your lower bounds start to introduce some pretty extreme rounding errors.

1

u/overand 27d ago

Also, the image I picked was hand-created!

But, it's cool, the person I was responding to apparently thinks I'm a bot now. Cuz I guess bots would think to use an EGA vs VGA image comparison of an early 90s adventure game in a discussion about quantizations lol

1

u/sam7oon 27d ago

okey bot