Commit
•
836bab6
1
Parent(s):
04cb502
Update README.md
Browse files
README.md
CHANGED
@@ -50,8 +50,8 @@ import torch
|
|
50 |
from h2oai_pipeline import H2OTextGenerationPipeline
|
51 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
52 |
|
53 |
-
tokenizer = AutoTokenizer.from_pretrained("h2oai/h2ogpt-oig-oasst1-256-
|
54 |
-
model = AutoModelForCausalLM.from_pretrained("h2oai/h2ogpt-oig-oasst1-256-
|
55 |
generate_text = H2OTextGenerationPipeline(model=model, tokenizer=tokenizer)
|
56 |
|
57 |
res = generate_text("Why is drinking water so healthy?", max_new_tokens=100)
|
|
|
50 |
from h2oai_pipeline import H2OTextGenerationPipeline
|
51 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
52 |
|
53 |
+
tokenizer = AutoTokenizer.from_pretrained("h2oai/h2ogpt-oig-oasst1-256-6_9b", padding_side="left")
|
54 |
+
model = AutoModelForCausalLM.from_pretrained("h2oai/h2ogpt-oig-oasst1-256-6_9b", torch_dtype=torch.bfloat16, device_map="auto")
|
55 |
generate_text = H2OTextGenerationPipeline(model=model, tokenizer=tokenizer)
|
56 |
|
57 |
res = generate_text("Why is drinking water so healthy?", max_new_tokens=100)
|