Update README.md
Browse files
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")
|