joaogante HF staff commited on
Commit
1a9cc15
1 Parent(s): 27860ce

Update README.md (#3)

Browse files

- Update README.md (32920f2a9478339719f716d805c3c80f7d0c2887)

Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -94,7 +94,7 @@ print(tokenizer.decode(outputs[0]))
94
  from transformers import AutoTokenizer, OPTForCausalLM
95
 
96
  tokenizer = AutoTokenizer.from_pretrained("facebook/galactica-1.3b")
97
- OPTForCausalLM.from_pretrained("facebook/galactica-1.3b", device_map="auto")
98
 
99
  input_text = "The Transformer architecture [START_REF]"
100
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
 
94
  from transformers import AutoTokenizer, OPTForCausalLM
95
 
96
  tokenizer = AutoTokenizer.from_pretrained("facebook/galactica-1.3b")
97
+ model = OPTForCausalLM.from_pretrained("facebook/galactica-1.3b", device_map="auto")
98
 
99
  input_text = "The Transformer architecture [START_REF]"
100
  input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")