fix: store residual_scale as a scalar and drop the unused conditioning

#1
InstaDeep Ltd org

residual_scale was stored as [1] where the model declares [], which transformers 5 refuses to load (and ignore_mismatched_sizes=True silently resets it to 1.0). No value changes: produced by ntv3_huggingface/repack_annotation_safetensors.py, genomix-research commit c100b5e0a2.

Verified under transformers 4.57.1 and 5.17.0 (the latter with the NTv3_pretrained rotary PR): default load, the seven trained residual_scale values, and jax_model/roundtrip_fixture.npz reproduced at max abs <= 4.6e-05, 100% argmax.

bernardo-de-almeida changed pull request status to merged

Sign up or log in to comment