"configs/git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "b67904d52897fb1d8f42567ee054e36e245674fa"
Unverified Commit f4014e75 authored by Joao Gante's avatar Joao Gante Committed by GitHub
Browse files

Docs: update example with assisted generation + sample (#30853)

parent 95b3c381
...@@ -333,5 +333,5 @@ culture, and they allow us to design the' ...@@ -333,5 +333,5 @@ culture, and they allow us to design the'
>>> assistant_model = AutoModelForCausalLM.from_pretrained(assistant_checkpoint) >>> assistant_model = AutoModelForCausalLM.from_pretrained(assistant_checkpoint)
>>> outputs = model.generate(**inputs, assistant_model=assistant_model, do_sample=True, temperature=0.5) >>> outputs = model.generate(**inputs, assistant_model=assistant_model, do_sample=True, temperature=0.5)
>>> tokenizer.batch_decode(outputs, skip_special_tokens=True) >>> tokenizer.batch_decode(outputs, skip_special_tokens=True)
['Alice and Bob are going to the same party. It is a small party, in a small'] ['Alice and Bob, who were both in their early twenties, were both in the process of']
``` ```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment