r/opencode • • 27d ago

👀 About DeepSeek and quantization...

Post image
284 Upvotes

59 comments sorted by

50

u/Presstabstart 27d ago

Reminds me of when gpt oss released. People were crying saying OpenAI released a useless model. Turns out that the kernels were just non-fused and buggy, it was actually miles ahead of any other open weight model at the time. Not to say it didn't have problems

17

u/MarcelloT254k 27d ago

Let the community do beta testing, reporting, debugging, and let OPENai profit.

2

u/MediocreAnalyst2121 22d ago

Kinda sounds like the “let everyone do the work, and then train on their data for profit” business model it’s all built on

2

u/Presstabstart 26d ago

It just occurred to me that it is possible that the KV cache is quantized to FP8. This is the only reasonable way I would see that any sort of quantization would occur aside from what has already been quantized in the huggingface model. This would degrade output, but if this were happening I'm assuming Dax would mention this- unless he's confident that FP8 KV quantization wouldn't result in degraded output.

0

u/paperbenni 27d ago

So you think Opencode is using buggy kernels with an FP4 model? (Meaning not further quantized than the original but still worse than official inference)? I think that's quite likely as well, but I don't totally understand where your comment is going

2

u/Presstabstart 26d ago

No, I'm just saying the community is almost always wrong when it comes to rumors or suspicions .

2

u/paperbenni 26d ago

They were right about the observed behavior of GPT OSS though, they just didn't know the cause and jumped to conclusions

20

u/torrso 27d ago

Because people parrot what they heard without understanding to appear smarter. Many of them don't even know what it means.

19

u/co-lor-less 27d ago

But many providers are offering FP8 on openrouter??

7

u/Silco1402 27d ago

More like marketing, the fp4 expert have like 1 fp8 block every 32 fp4 block or so (that's what mxfp4 is), and technically the attention (~7gb) are fp8, the engram table should also be fp8. Btw deepseek actual serving kv cache should also be fp4. However, the expert comprise most of the parameters count, so it's fair to call it fp4 rather than fp8. Also like you could just ask your ai to look at the original model checkpoint and it will tell you which part of the model are like which quant.

1

u/for4f 27d ago

yeah the fp8 ones on openrouter are the full-fat weights, that's the whole point lol. the quant complaints are all about local ggufs where you're cramming a 200b+ moe into 24gb and wondering why it got dumber. on my 4090 i just grab q4 or q5 and accept the tradeoff, fp8 of anything big is api-only territory for me

9

u/Silco1402 27d ago

Have you ever check the original deepseek release weight, if you haven't, maybe ask your favorite AI to help. The model are MXFP4 expert (the expert comprise most of the active weight) and fp8 are more like the engram table and stuff, more like marketing use to fool dummy into thinking they're getting better than what it actually is. That's why a 550b parameter model + 200b engram table are just 510gb (check the original checkpoint size on HF) on disk. And if you don't know, 750b of fp8 should be more like 750gb on disk instead

1

u/for4f 23d ago

fair, i was oversimplifying. whatever they are serving runs circles around what i can fit in 24gb locally though lol, the local quant pain is the same either way

0

u/[deleted] 27d ago

[deleted]

1

u/Sir-Draco 27d ago

lol that’s cute

9

u/candraa6 27d ago

works great for me, idk why people complaining.

it's great, it gets the job done without too much nudge, what else do you need? opus level inteligence? you're asking too much man. it's cheap, nearly unlimited, it's smart enough.

last week I throw it complex data restoration task and it just do that.

and I use it regularly in my day-to-day job, mind you I'm quite pedantic in terms of AI generated code and I grill the hell of it until it gets right, and lately I do it less and less "correction" because the output just got better.

like what are you doing with these models really? rocket science?

0

u/Open-Ad7687 27d ago

Used Muse Spark 1.3 for long time and now unable to like any model. Especially how well it worked with ASD-STE100 unlike deepseek.

I find Deepseek taking too much time and still not doing the job , like unreliable to depend on.

7

u/--Spaci-- 27d ago

Deepseekv4 uses a mixed quantization in their offical release. Its not all fp4 or fp8, it is mainly fp4 tho

2

u/tetoing 26d ago

Raw model weight quantization is not the only kind of quantization that exists, there are all kinds of tricks and hacks a model provider can use to accelerate inference at the cost of precision. This does not prove they are serving the same model as deepseek API.

7

u/Wwwhhyyyyyyyy 27d ago

8

u/xyz4d 27d ago

This is false. The FP4 weights are packed in the checkpoint, two per byte (which gets rendered as "FP8"). You can tell by the shape of the expert weights, the hidden dim of the tensor is half of the actual hidden size, because it's packed 2:1.

0

u/ironj 27d ago

Agree. that's what I'm using and it's mind-blowingly amazing. It replaced GLM-5.3 in my day to day work (and it's incredibly cheap!)

12

u/elitegenes 27d 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 27d ago

hmmm...

6

u/ZveirX 27d ago

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

1

u/confused-photon 27d ago

The kv cache is also fp4 natively though?

0

u/ZveirX 27d 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 27d ago

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

Bro read the model card, CSA2 uses fp4 kv cache

1

u/ZveirX 27d 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 27d 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 27d ago

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

1

u/ProductResident4634 26d ago

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

3

u/TheAIPU-guy 27d ago

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

1

u/ggPeti 27d ago

 which is what being served via official Deepseek API

source?

1

u/xmsxms 27d ago

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

0

u/sam7oon 27d 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 27d 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 27d 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 27d 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 .

0

u/overand 27d ago edited 27d ago

You said "the same like" - I think there's a language problem here.

  • "FP4 is the same as FP8" means equal. So that's similar to saying "3.14 = 3.1415926" (which is wrong)

  • "FP4 is like FP8" is more ambiguous and flexible. That's more like "3.14 ~= 3.1415926" which is much more reasonable.

"The same as" means "identical or effectively identical."

If you mean "almost the same as," you could say "FP4 is effectively indistinguishable from FP8." Or, "FP4 works as well as FP8." I wouldn't have argued with you about those statements, because they're more subjective, and I don't have enough information to agree or disagree.

But "FP4 is the same as FP8" is just incorrect. And "the hardware" has essentially nothing to do with FP4's accuracy, only the speed of processing.

Also, I'm not responding to Dax; I'm responding to you saying "FP4 is the same as FP8." FP4 and FP8 are vastly different in terms of the accuracy of the numbers they represent.

1

u/overand 27d 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 26d ago edited 26d 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 26d 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 26d ago

okey bot

3

u/CYCLONOUS_69 27d ago

People are dumb. You are getting $100 worth of effective usage just by paying $10 is just crazy.
Even though it is a bit slow, it gets job done. I've seen that the current model is far better than the old V4.1 Flash.
Just spec your tasks properly, have some test units or suites and go you are good to go. It won't hallucinate nearly as people are saying.

8

u/lamardoss 27d ago

Saying people are dumb, will get you nowhere.

If you aren't having a bad experience with it, great. Provide helpful suggestions without the rudeness.

8

u/nikitaluger 27d ago

Preach, asking DS to plan, investigate and map before porting a feature 1:1 only to go straight to 8+ rounds of debugging is not a fun time.

5

u/EC36339 27d ago

People are dumb

2

u/CYCLONOUS_69 27d ago

You can get anywhere if you know how to “use” dumb people. Just look around everywhere, you’ll get what I mean.

Not being rude, just blunt.

1

u/lamardoss 27d ago

I get what you mean.

It just stinks seeing this subreddit going back and forth insulting other users on it recently so much. There's been a lot of that these past couple of weeks here and it would be good if we helped each other verses continue putting other users down.

0

u/CYCLONOUS_69 27d ago

Yeah, I get what you mean. I’ve seen a lot of people here on this sub providing non-constructive criticism and feedback.

I never get why people are so ungrateful for free usage too and they keep coming back to rant.

The sub is in weird state ngl.

1

u/TPLINKSHIT 23d ago

so what exactly are OC quantizing except the experts lol