Rocketknight1 HF Staff commited on
Commit
53c5c37
·
verified ·
1 Parent(s): 6897779

Update README.md

Browse files

Update `parse_response` example code to the new API (pass `prefix=inputs["input_ids"]`), matching the base model PRs.

Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -180,7 +180,7 @@ outputs = model.generate(**inputs, max_new_tokens=1024)
180
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
181
 
182
  # Parse output
183
- processor.parse_response(response)
184
  ```
185
 
186
  To enable reasoning, set `enable_thinking=True` and the `parse_response` function will take care of parsing the thinking output.
@@ -240,7 +240,7 @@ outputs = model.generate(**inputs, max_new_tokens=512)
240
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
241
 
242
  # Parse output
243
- processor.parse_response(response)
244
  ```
245
 
246
  </details>
@@ -298,7 +298,7 @@ outputs = model.generate(**inputs, max_new_tokens=512)
298
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
299
 
300
  # Parse output
301
- processor.parse_response(response)
302
  ```
303
 
304
  </details>
@@ -357,7 +357,7 @@ outputs = model.generate(**inputs, max_new_tokens=512)
357
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
358
 
359
  # Parse output
360
- processor.parse_response(response)
361
  ```
362
 
363
  </details>
 
180
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
181
 
182
  # Parse output
183
+ processor.parse_response(response, prefix=inputs["input_ids"])
184
  ```
185
 
186
  To enable reasoning, set `enable_thinking=True` and the `parse_response` function will take care of parsing the thinking output.
 
240
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
241
 
242
  # Parse output
243
+ processor.parse_response(response, prefix=inputs["input_ids"])
244
  ```
245
 
246
  </details>
 
298
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
299
 
300
  # Parse output
301
+ processor.parse_response(response, prefix=inputs["input_ids"])
302
  ```
303
 
304
  </details>
 
357
  response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
358
 
359
  # Parse output
360
+ processor.parse_response(response, prefix=inputs["input_ids"])
361
  ```
362
 
363
  </details>