File size: 324 Bytes
5fa1a76
 
 
 
 
 
 
1
2
3
4
5
6
7
Customize text generation
You can override any generation_config by passing the parameters and their values directly to the [generate] method:
thon

my_model.generate(**inputs, num_beams=4, do_sample=True)  # doctest: +SKIP

Even if the default decoding strategy mostly works for your task, you can still tweak a few things.