File size: 525 Bytes
5fa1a76 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
When you load a model explicitly, you can inspect the generation configuration that comes with it through
model.generation_config:
thon
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("distilbert/distilgpt2")
model.generation_config
GenerationConfig {
"bos_token_id": 50256,
"eos_token_id": 50256,
}
Printing out the model.generation_config reveals only the values that are different from the default generation
configuration, and does not list any of the default values. |