joaogante HF staff commited on
Commit
f1d2d54
1 Parent(s): 7c1c0dd

Update README.md (#3)

Browse files

- Update README.md (9428825d973a6796d1568a8852f02732303c01f5)

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-125m")
97
- OPTForCausalLM.from_pretrained("facebook/galactica-125m", 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-125m")
97
+ model = OPTForCausalLM.from_pretrained("facebook/galactica-125m", 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")