transformers
e085c33b - Fix GemmaQuantizer loading for multi-scale embedding_scale (#51577)

Commit
22 hours ago
Fix GemmaQuantizer loading for multi-scale embedding_scale (#51577) * Fix GemmaQuantizer loading for multi-scale embedding_scale Override param_needs_quantization in GemmaQuantizer to return True for *.embedding_scale parameters. QuantizedEmbedding initializes embedding_scale with a placeholder shape of (num_embeddings, 1), while pre-quantized checkpoints (such as per-layer embeddings) can store block-wise scales of shape (num_embeddings, num_scales). Without this override, set_param_for_module records a size mismatch and raises a RuntimeError when ignore_mismatched_sizes=False. * remove comment --------- Co-authored-by: Cyril Vallez <cyril.vallez@gmail.com>
Author
Parents
Loading