Update README.md

#3
by joaogante HF staff - opened
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")