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

Update README.md (#3)

Browse files

- Update README.md (1828d539b89ba9c7a77610b9c734c2fd886c2d03)

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")