alexrs commited on
Commit
710fbfe
·
verified ·
1 Parent(s): 9335fcd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -3
README.md CHANGED
@@ -141,6 +141,7 @@ from transformers import pipeline
141
  import torch
142
 
143
  model_id = "CohereLabs/command-a-plus-05-2026-w4a4"
 
144
 
145
  pipe = pipeline(
146
  "text-generation",
@@ -153,15 +154,12 @@ messages = [
153
  {"role": "user", "content": "Explain the Transformer architecture"},
154
  ]
155
 
156
- tokenizer = pipe.tokenizer
157
-
158
  text = tokenizer.apply_chat_template(
159
  messages,
160
  tokenize=False,
161
  add_generation_prompt=True,
162
  )
163
 
164
-
165
  outputs = pipe(
166
  messages,
167
  max_new_tokens=300,
 
141
  import torch
142
 
143
  model_id = "CohereLabs/command-a-plus-05-2026-w4a4"
144
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
145
 
146
  pipe = pipeline(
147
  "text-generation",
 
154
  {"role": "user", "content": "Explain the Transformer architecture"},
155
  ]
156
 
 
 
157
  text = tokenizer.apply_chat_template(
158
  messages,
159
  tokenize=False,
160
  add_generation_prompt=True,
161
  )
162
 
 
163
  outputs = pipe(
164
  messages,
165
  max_new_tokens=300,