alexrs commited on
Commit
baf7a3d
·
verified ·
1 Parent(s): 1bbe414

Update README.md

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