[Qwen3.5] pass quant_config to VocabParallelEmbedding so the embedding table can be quantized - #319
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Post-publication correction: I re-read the MTP load receipts and found that my original body overstated what the model-file change buys. Both comparison logs say |
VocabParallelEmbeddingalready supports quantization: it callsquant_config.get_quant_method(self, prefix)and refuses a method that does not implementembedding(). Both Qwen3.5 model files construct it without passing the config:so the hook can never fire and the table stays BF16 no matter what the backend supports.
Why it matters
On Qwen3.8-27B the input embedding table is 248,320 x 5,120 = 2.543 GB resident - second
only to the MLP stack, larger than the whole attention stack after quantization, and the only
large tensor in the model that is never multiplied (it is a gather).
With an int8 overlay behind it (EXL3 side, #318) the effect on a 32 GB card is:
--max-model-lenthat startsVerified by use rather than allocation: exact needle retrieval at depths 0.1/0.5/0.9 from
227,334-token prompts on a 5090-sized budget with vision enabled.
Why the MTP file still needs this change
Qwen3_5MultiTokenPredictormaterializes an embedding table while its weights load, so it mustpass the quant config for the same hook to be reachable. The current vLLM proposer then aliases
that table to the target model embedding (
llm_base_proposer.pylogs "Sharing target modelembedding weights with the draft model"). It is therefore not a second resident table, and
quantizing it separately cannot increase steady-state KV capacity or change draft acceptance.
This patch lowers transient load memory and keeps standalone MTP construction consistent; the
native-context MTP gap is elsewhere.
Compatibility
Backends that do not implement
embedding()are unaffected:get_quant_methodreturnsNoneand the layer falls back to
UnquantizedEmbeddingMethod, which is today's behaviour.