Views
No views yet
hivemind/gpt-j-6B-8bit for low-RAM loading, i.e., free Colab runtimes :)NOTE: PRIOR to loading the model, you need to "patch" it to be compatible with loading 8bit weights etc. See the original model card above for details on how to do this.
transformers, accelerate, and bitsandbytes if needed:pip install transformers accelerate bitsandbytesdevice_map="auto":1import transformers
2from transformers import AutoTokenizer
3
4"""
5CODE TO PATCH GPTJForCausalLM GOES HERE
6"""
7
8tokenizer = AutoTokenizer.from_pretrained("ethzanalytics/gpt-j-6B-8bit-sharded")
9
10model = GPTJForCausalLM.from_pretrained(
11 "ethzanalytics/gpt-j-6B-8bit-sharded",
12 device_map="auto",
13)