ybelkada commited on
Commit
9bb23a1
1 Parent(s): 0657afd

Update README.md (#4)

Browse files

- Update README.md (2d8b93350328275d80627b92cc101b785f589f9f)

Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -158,7 +158,7 @@ tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-xxl")
158
  model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-xxl")
159
 
160
  input_text = "translate English to German: How old are you?"
161
- input_ids = tokenizer.encode(input_text, return_tensors="pt").input_ids
162
 
163
  outputs = model.generate(input_ids)
164
  print(tokenizer.decode(outputs[0]))
@@ -179,7 +179,7 @@ tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-xxl")
179
  model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-xxl", device_map="auto")
180
 
181
  input_text = "translate English to German: How old are you?"
182
- input_ids = tokenizer.encode(input_text, return_tensors="pt").input_ids.to("cuda")
183
 
184
  outputs = model.generate(input_ids)
185
  print(tokenizer.decode(outputs[0]))
@@ -203,7 +203,7 @@ tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-xxl")
203
  model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-xxl", device_map="auto", torch_dtype=torch.float16)
204
 
205
  input_text = "translate English to German: How old are you?"
206
- input_ids = tokenizer.encode(input_text, return_tensors="pt").input_ids.to("cuda")
207
 
208
  outputs = model.generate(input_ids)
209
  print(tokenizer.decode(outputs[0]))
@@ -224,7 +224,7 @@ tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-xxl")
224
  model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-xxl", device_map="auto", load_in_8bit=True)
225
 
226
  input_text = "translate English to German: How old are you?"
227
- input_ids = tokenizer.encode(input_text, return_tensors="pt").input_ids.to("cuda")
228
 
229
  outputs = model.generate(input_ids)
230
  print(tokenizer.decode(outputs[0]))
 
158
  model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-xxl")
159
 
160
  input_text = "translate English to German: How old are you?"
161
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids
162
 
163
  outputs = model.generate(input_ids)
164
  print(tokenizer.decode(outputs[0]))
 
179
  model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-xxl", device_map="auto")
180
 
181
  input_text = "translate English to German: How old are you?"
182
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
183
 
184
  outputs = model.generate(input_ids)
185
  print(tokenizer.decode(outputs[0]))
 
203
  model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-xxl", device_map="auto", torch_dtype=torch.float16)
204
 
205
  input_text = "translate English to German: How old are you?"
206
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
207
 
208
  outputs = model.generate(input_ids)
209
  print(tokenizer.decode(outputs[0]))
 
224
  model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-xxl", device_map="auto", load_in_8bit=True)
225
 
226
  input_text = "translate English to German: How old are you?"
227
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
228
 
229
  outputs = model.generate(input_ids)
230
  print(tokenizer.decode(outputs[0]))