arnocandel commited on
Commit
98f7436
·
1 Parent(s): 92f1a5f

Update README.md

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