hipnologo commited on
Commit
1ad8655
1 Parent(s): 014b487

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -0
README.md CHANGED
@@ -166,5 +166,17 @@ pipeline = transformers.pipeline(
166
  tokenizer=tokenizer,
167
  torch_dtype=torch.bfloat16,
168
  trust_remote_code=True,
 
 
 
 
 
 
 
 
 
 
 
 
169
  ```
170
 
 
166
  tokenizer=tokenizer,
167
  torch_dtype=torch.bfloat16,
168
  trust_remote_code=True,
169
+ device_map="auto",
170
+ )
171
+ sequences = pipeline(
172
+ "If a public stock price has been rising for years, what is most likely to happen in the next year?",
173
+ max_length=200,
174
+ do_sample=True,
175
+ top_k=10,
176
+ num_return_sequences=1,
177
+ eos_token_id=tokenizer.eos_token_id,
178
+ )
179
+ for seq in sequences:
180
+ print(f"Result: {seq['generated_text']}")
181
  ```
182