ilu000 commited on
Commit
9170ab2
1 Parent(s): 281798a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -1
README.md CHANGED
@@ -35,10 +35,19 @@ 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-v2",
 
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
+
41
+ tokenizer = AutoTokenizer.from_pretrained(
42
+ "h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v2",
43
+ use_fast=False,
44
+ padding_side="left",
45
+ trust_remote_code=True,
46
+ )
47
 
48
  generate_text = pipeline(
49
  model="h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v2",
50
+ tokenizer=tokenizer,
51
  torch_dtype=torch.float16,
52
  trust_remote_code=True,
53
  use_fast=False,