File size: 777 Bytes
0b5d7fa e0eca88 bd0aac7 e0eca88 bd0aac7 e0eca88 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
---
inference: False
---
# ethzanalytics/gpt-j-6B-8bit-sharded
this is a version of `hivemind/gpt-j-6B-8bit` for low-RAM loading.
Please refer to the [original model card](https://huggingface.co/hivemind/gpt-j-6B-8bit) for all details.
## Usage
> **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.
```python
import transformers
from transformers import AutoTokenizer
"""
CODE TO PATCH GPTJForCausalLM GOES HERE
"""
tokenizer = AutoTokenizer.from_pretrained("ethzanalytics/gpt-j-6B-8bit-sharded")
model = GPTJForCausalLM.from_pretrained(
"ethzanalytics/gpt-j-6B-8bit-sharded",
low_cpu_mem_usage=True,
max_shard_size=f"1000MB",
)
``` |