Upload README.md
Browse files
README.md
CHANGED
@@ -24,11 +24,12 @@ We wil provide several examples soon and you can modify the input according to y
|
|
24 |
|
25 |
```python
|
26 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
27 |
device = "cuda" # the device to load the model onto
|
28 |
|
29 |
model = AutoModelForCausalLM.from_pretrained(
|
30 |
"zjunlp/OceanGPT-14B-v0.1",
|
31 |
-
torch_dtype=
|
32 |
device_map="auto"
|
33 |
)
|
34 |
tokenizer = AutoTokenizer.from_pretrained("zjunlp/OceanGPT-14B-v0.1")
|
|
|
24 |
|
25 |
```python
|
26 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
27 |
+
import torch
|
28 |
device = "cuda" # the device to load the model onto
|
29 |
|
30 |
model = AutoModelForCausalLM.from_pretrained(
|
31 |
"zjunlp/OceanGPT-14B-v0.1",
|
32 |
+
torch_dtype=torch.bfloat16,
|
33 |
device_map="auto"
|
34 |
)
|
35 |
tokenizer = AutoTokenizer.from_pretrained("zjunlp/OceanGPT-14B-v0.1")
|