joaogante HF staff commited on
Commit
bcd0704
1 Parent(s): 522c299

Update README.md

Browse files
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-6.7b")
97
- OPTForCausalLM.from_pretrained("facebook/galactica-6.7b", 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-6.7b")
97
+ model = OPTForCausalLM.from_pretrained("facebook/galactica-6.7b", 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")