kiji-proxy icon indicating copy to clipboard operation
kiji-proxy copied to clipboard

eval_model_detailed.py and compare_models.py can't load mDeBERTa checkpoints

Open Davidnet opened this issue 2 weeks ago • 0 comments

Found while reviewing #688.

model/src/eval_model_detailed.py:131-147 and model/src/compare_models.py:111-131 still map deberta-v2 to microsoft/deberta-v3-base when _name_or_path is missing from the config. save_pretrained never writes _name_or_path, so that fallback is always taken. trainer.py:689 (encoder.config._name_or_path = …) has no effect.

Repro: load any mix v3/v4/v5 output with either script. It builds a 128,100-token embedding and fails with a size mismatch against the checkpoint's 250,102 tokens.

#688 already fixes the same bug in quantitize.py and eval_model.py (by rebuilding the encoder from the saved config).

Suggested fix: use the same loader in both scripts. Drop the no-op _name_or_path line in trainer.py, or save the base model name in a file that is actually written.

Davidnet avatar Nov 17 '26 02:11 Davidnet