transformers
b11c4d7a - GGUF: de-offset norms via keep-in-fp32 instead of pre-applying

Commit
47 days ago
GGUF: de-offset norms via keep-in-fp32 instead of pre-applying SubtractOne is a real fp32 op again. Rather than pre-subtracting on the fp32 source in load_checkpoint_state, the quantizer forces the `w + 1` norms to stay fp32 for the load via `_keep_in_fp32_modules_strict` (covers fp16 and bf16), keyed off the SubtractOne converter targets in weight_mapping — no arch list. The converter then subtracts in fp32 and the result is exact. Those norms end up fp32 on the GGUF load, so the weights-conversion tests compare at the original dtype. Validated on MPS: nemotron(fp16)/gemma2(fp16)/ gemma3_text(bf16) conversion + stablelm control + qwen2 generation.
Author
Parents
Loading