joaogante HF staff commited on
Commit
1828d53
1 Parent(s): c58d0c8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
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")