Update README.md (#3)
Browse files- Update README.md (1828d539b89ba9c7a77610b9c734c2fd886c2d03)
README.md
CHANGED
@@ -96,7 +96,7 @@ print(tokenizer.decode(outputs[0]))
|
|
96 |
from transformers import AutoTokenizer, OPTForCausalLM
|
97 |
|
98 |
tokenizer = AutoTokenizer.from_pretrained("facebook/galactica-120b")
|
99 |
-
OPTForCausalLM.from_pretrained("facebook/galactica-120b", device_map="auto")
|
100 |
|
101 |
input_text = "The Transformer architecture [START_REF]"
|
102 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
|
|
|
96 |
from transformers import AutoTokenizer, OPTForCausalLM
|
97 |
|
98 |
tokenizer = AutoTokenizer.from_pretrained("facebook/galactica-120b")
|
99 |
+
model = OPTForCausalLM.from_pretrained("facebook/galactica-120b", device_map="auto")
|
100 |
|
101 |
input_text = "The Transformer architecture [START_REF]"
|
102 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
|