pseudotensor commited on
Commit
029a787
1 Parent(s): c493b72

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -44,7 +44,7 @@ pip install accelerate==0.18.0
44
  import torch
45
  from transformers import pipeline
46
 
47
- generate_text = pipeline(model="h2oai/h2ogpt-oig-oasst1-512-6_9b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")
48
 
49
  res = generate_text("Why is drinking water so healthy?", max_new_tokens=100)
50
  print(res[0]["generated_text"])
@@ -60,7 +60,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
60
 
61
  tokenizer = AutoTokenizer.from_pretrained("h2oai/h2ogpt-oig-oasst1-512-6_9b", padding_side="left")
62
  model = AutoModelForCausalLM.from_pretrained("h2oai/h2ogpt-oig-oasst1-512-6_9b", torch_dtype=torch.bfloat16, device_map="auto")
63
- generate_text = H2OTextGenerationPipeline(model=model, tokenizer=tokenizer)
64
 
65
  res = generate_text("Why is drinking water so healthy?", max_new_tokens=100)
66
  print(res[0]["generated_text"])
 
44
  import torch
45
  from transformers import pipeline
46
 
47
+ generate_text = pipeline(model="h2oai/h2ogpt-oig-oasst1-512-6_9b", 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"])
 
60
 
61
  tokenizer = AutoTokenizer.from_pretrained("h2oai/h2ogpt-oig-oasst1-512-6_9b", padding_side="left")
62
  model = AutoModelForCausalLM.from_pretrained("h2oai/h2ogpt-oig-oasst1-512-6_9b", torch_dtype=torch.bfloat16, device_map="auto")
63
+ generate_text = H2OTextGenerationPipeline(model=model, tokenizer=tokenizer, prompt_type='human_bot')
64
 
65
  res = generate_text("Why is drinking water so healthy?", max_new_tokens=100)
66
  print(res[0]["generated_text"])