Since some newer models like starcoder2 are not included in model config and when load model it would complain:
File "/nix/store/7hpffz24mjm12y5ymd2is43lxl7nf27b-python3-3.11.6-env/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 1064, in from_pretrained
config_class = CONFIG_MAPPING[config_dict["model_type"]]
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/7hpffz24mjm12y5ymd2is43lxl7nf27b-python3-3.11.6-env/lib/python3.11/site-packages/transformers/models/auto/configuration_auto.py", line 761, in __getitem__
raise KeyError(key)
KeyError: 'starcoder2'
In normal env, pip install --upgrade git+https://github.com/huggingface/transformers would work.
Right now we're using transformers from nixpkgs, which isn't a new enough version to support starcoder2 yet. We could package our own version of transformers.
Since some newer models like starcoder2 are not included in model config and when load model it would complain:
In normal env,
pip install --upgrade git+https://github.com/huggingface/transformers
would work.