lfm3: online FP8 (W8A16) support, graph-mode and FP8 benchmarks
- load_weights: run the strict missing-parameter check only for unquantized models; vLLM's loader checks quantized ones and knows the params a checkpoint cannot carry (online-FP8 weight_scale). BF16 output unchanged. - tests: variant launcher, greedy and quality comparisons, BetterBench table + ITL 1% low recompute, Discord notify helper. - NOTES: round 2 (eager vs default vs FULL_DECODE_ONLY, default kept) and round 3 (FP8 W8A16: +49% decode, +35% @8, answers unchanged); llama-swap snippet now FP8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4e7a7ce903
commit
3b85c03761
29 files changed
+87117
-18
No files matched your search
@@ -491,6 +491,7 @@ class Lfm3ForCausalLM(nn.Module, HasInnerState, SupportsPP, IsHybrid, SupportsQu
|
||||
config = vllm_config.model_config.hf_config
|
||||
quant_config = vllm_config.quant_config
|
||||
self.config = config
|
||||
self.quant_config = quant_config
|
||||
self.model = Lfm3Model(vllm_config=vllm_config, prefix=maybe_prefix(prefix, "model"))
|
||||
|
||||
if get_pp_group().is_last_rank:
|
||||
@@ -530,9 +531,11 @@ class Lfm3ForCausalLM(nn.Module, HasInnerState, SupportsPP, IsHybrid, SupportsQu
|
||||
loader = AutoWeightsLoader(self)
|
||||
loaded = loader.load_weights(weights, mapper=self.hf_to_vllm_mapper)
|
||||
|
||||
# tied lm_head.weight is deduplicated into model.embed_tokens.weight here
|
||||
# tied lm_head.weight is deduplicated into model.embed_tokens.weight here.
|
||||
# Quantized models get vLLM's own check instead (DefaultModelLoader), which knows
|
||||
# the parameters a checkpoint cannot carry (e.g. online-FP8 weight_scale).
|
||||
missing = sorted({name for name, _ in self.named_parameters()} - loaded)
|
||||
if missing:
|
||||
if missing and self.quant_config is None:
|
||||
raise ValueError(
|
||||
f"LFM3: {len(missing)} parameters not found in checkpoint: {missing[:20]}"
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user