Fix doctest more (for docs/source/en) (#30247)
* fix * fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -42,11 +42,10 @@ These ready-to-use checkpoints can be downloaded and used via the HuggingFace Hu
|
||||
>>> prompt = "def print_hello_world():"
|
||||
|
||||
>>> model_inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
|
||||
>>> model.to(device)
|
||||
|
||||
>>> generated_ids = model.generate(**model_inputs, max_new_tokens=10, do_sample=False)
|
||||
>>> tokenizer.batch_decode(generated_ids)[0]
|
||||
"def print_hello_world():\n\treturn 'Hello World!'"
|
||||
'def print_hello_world():\n print("Hello World!")\n\ndef print'
|
||||
```
|
||||
|
||||
## Starcoder2Config
|
||||
|
||||
Reference in New Issue
Block a user