arnocandel commited on
Commit
8989e34
1 Parent(s): 743d232

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
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"])
@@ -58,8 +58,8 @@ import torch
58
  from h2oai_pipeline import H2OTextGenerationPipeline
59
  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)
@@ -98,7 +98,7 @@ GPTNeoXForCausalLM(
98
 
99
  ```json
100
  GPTNeoXConfig {
101
- "_name_or_path": "h2oai/h2ogpt-oig-oasst1-512-6.9b",
102
  "architectures": [
103
  "GPTNeoXForCausalLM"
104
  ],
 
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"])
 
58
  from h2oai_pipeline import H2OTextGenerationPipeline
59
  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)
 
98
 
99
  ```json
100
  GPTNeoXConfig {
101
+ "_name_or_path": "h2oai/h2ogpt-oig-oasst1-512-6_9b",
102
  "architectures": [
103
  "GPTNeoXForCausalLM"
104
  ],