ilu000 commited on
Commit
f7b8456
1 Parent(s): a8bb3b0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -1
README.md CHANGED
@@ -35,10 +35,18 @@ pip install einops==0.6.1
35
 
36
  ```python
37
  import torch
38
- from transformers import pipeline
 
 
 
 
 
 
 
39
 
40
  generate_text = pipeline(
41
  model="h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b",
 
42
  torch_dtype=torch.float16,
43
  trust_remote_code=True,
44
  use_fast=False,
 
35
 
36
  ```python
37
  import torch
38
+ from transformers import AutoTokenizer, pipeline
39
+
40
+ tokenizer = AutoTokenizer.from_pretrained(
41
+ "h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b",
42
+ use_fast=False,
43
+ padding_side="left",
44
+ trust_remote_code=True,
45
+ )
46
 
47
  generate_text = pipeline(
48
  model="h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b",
49
+ tokenizer=tokenizer,
50
  torch_dtype=torch.float16,
51
  trust_remote_code=True,
52
  use_fast=False,