Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,25 @@
|
|
1 |
---
|
2 |
inference: False
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
inference: False
|
3 |
+
---
|
4 |
+
|
5 |
+
# ethzanalytics/gpt-j-6B-8bit-sharded
|
6 |
+
|
7 |
+
this is a version of `hivemind/gpt-j-6B-8bit` for low-RAM loading.
|
8 |
+
|
9 |
+
Please refer to the [original model card](https://huggingface.co/hivemind/gpt-j-6B-8bit) for all details.
|
10 |
+
|
11 |
+
## Usage
|
12 |
+
|
13 |
+
|
14 |
+
> **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.
|
15 |
+
|
16 |
+
```python
|
17 |
+
|
18 |
+
tokenizer = AutoTokenizer.from_pretrained("ethzanalytics/gpt-j-6B-8bit-sharded")
|
19 |
+
|
20 |
+
model = GPTJForCausalLM.from_pretrained(
|
21 |
+
"ethzanalytics/gpt-j-6B-8bit-sharded",
|
22 |
+
low_cpu_mem_usage=True,
|
23 |
+
max_shard_size=f"1000MB",
|
24 |
+
)
|
25 |
+
```
|