arnocandel commited on
Commit
39b45e9
1 Parent(s): e5c47f9

commit files to HF hub

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -41,10 +41,10 @@ pip install einops==0.6.1
41
 
42
  ```python
43
  import torch
44
- from transformers import pipeline
45
 
46
  generate_text = pipeline(model="h2oai/h2ogpt-oig-oasst1-falcon-40b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto", prompt_type="human_bot")
47
-
48
  res = generate_text("Why is drinking water so healthy?", max_new_tokens=100)
49
  print(res[0]["generated_text"])
50
  ```
 
41
 
42
  ```python
43
  import torch
44
+ from transformers import pipeline, AutoTokenizer
45
 
46
  generate_text = pipeline(model="h2oai/h2ogpt-oig-oasst1-falcon-40b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto", prompt_type="human_bot")
47
+ tokenizer = AutoTokenizer.from_pretrained("h2oai/h2ogpt-oig-oasst1-falcon-40b", padding_side="left")
48
  res = generate_text("Why is drinking water so healthy?", max_new_tokens=100)
49
  print(res[0]["generated_text"])
50
  ```