Skip to content
This repository was archived by the owner on Jun 16, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modeling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,9 @@ def generate(
num_return_sequences: (`optional`) int
The number of independently computed returned sequences for each element in the batch. Default to 1.

multi_code: (`optional`) list of int
The token for the topic of generation. Default to None.

Examples::

tokenizer = AutoTokenizer.from_pretrained('distilgpt2') # Initialize tokenizer
Expand Down