hf_olmo and the OLMo integration into transformers are not compatible, since both try to register a model from the string "olmo". In particular, hf_olmo fails to import. This change makes hf_olmo not register the model & config when the new transformers version is present. Thus:
On old versions, AutoModelForCausalLM.from_pretrained("allenai/OLMo-1B") will work properly as before (if hf_olmo is imported). AutoModelForCausalLM.from_pretrained("allenai/OLMo-1B-hf") will break.
On new versions, AutoModelForCausalLM.from_pretrained("allenai/OLMo-1B") will break (none of the weights will get loaded). AutoModelForCausalLM.from_pretrained("allenai/OLMo-1B-hf") will work properly. Using OLMoForCausalLM.from_pretrained("allenai/OLMo-1B") with OLMoForCausalLM from hf_olmo will work just like in old versions.
hf_olmo
and the OLMo integration intotransformers
are not compatible, since both try to register a model from the string "olmo". In particular,hf_olmo
fails to import. This change makeshf_olmo
not register the model & config when the new transformers version is present. Thus:AutoModelForCausalLM.from_pretrained("allenai/OLMo-1B")
will work properly as before (ifhf_olmo
is imported).AutoModelForCausalLM.from_pretrained("allenai/OLMo-1B-hf")
will break.AutoModelForCausalLM.from_pretrained("allenai/OLMo-1B")
will break (none of the weights will get loaded).AutoModelForCausalLM.from_pretrained("allenai/OLMo-1B-hf")
will work properly. UsingOLMoForCausalLM.from_pretrained("allenai/OLMo-1B")
withOLMoForCausalLM
fromhf_olmo
will work just like in old versions.