How to get "EleutherAI/gpt-j-6B" working?
I’m trying to run theEleutherAI/gpt-j-6Bmodel, but with no luck. The codemodel = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-j-6B")returns the following error:Traceback (most recent call last):
  File "gptjtest.py", line 18, in <module>
    model = AutoModelForCausalLM.from_pretrained("gpt-j-6B")
  File "/home/marcin/miniconda3/envs/py37/lib/python3.7/site-packages/transformers/models/auto/auto_factory.py", line 383, in from_pretrained
    pretrained_model_name_or_path, return_unused_kwargs=True, **kwargs
  File "/home/marcin/miniconda3/envs/py37/lib/python3.7/site-packages/transformers/models/auto/configuration_auto.py", line 514, in from_pretrained
    config_class = CONFIG_MAPPING[config_dict["model_type"]]
  File "/home/marcin/miniconda3/envs/py37/lib/python3.7/site-packages/transformers/models/auto/configuration_auto.py", line 263, in __getitem__
    raise KeyError(key)
KeyError: 'gptj'I’ve tried transformers version 4.9.2 as well as the latest 4.10.0.dev0 from github trunk. Apparently there is nomodel_typeof typegptj. Do I need to add it somehow?
2021-08-24T07:01:48Z
Hi, GPT-J-6B is not added yet to the library. It will be soon though:GPT-J-6B by StellaAthena · Pull Request #13022 · huggingface/transformers · GitHub
2021-08-24T20:06:10Z
Thanks for your answer! Thanks to you, I found the rightforkand got it working for the meantime.Maybe it would be beneficial to include information about the version of the library the models run with? (possibly an extension of the huggingface web interface`).
2021-08-31T17:54:27Z
Hi, Thank you for linking the right fork! I am new to hugging face and I can’t figure out how to get it working as you did. Could you please point me in the right direction where I could learn how to do it?
2021-08-31T18:45:06Z
this worked for me:uninstall previous version:pip uninstall transformersinstall the fork:pip install git+https://github.com/StellaAthena/transformersuse the model:model = AutoModelForCausalLM.from_pretrained("EleutherAI/gpt-j-6B")just remember, this model needs 24GB memory.