joaogante HF staff commited on
Commit
508480d
1 Parent(s): 6f8c37c

Update README.md (#3)

Browse files

- Update README.md (e932658bcab545ec21e64df53e0acc4b9b202894)

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