Additional inference parameters
Additional inference parameters for Text Generation
▪ [property: string
]: unknown
• Optional
best_of: number
The number of sampling queries to run. Only the best one (in terms of total logprob) will be returned.
inference/src/tasks/nlp/textGeneration.ts:34
• Optional
decoder_input_details: boolean
Whether or not to output decoder input details
inference/src/tasks/nlp/textGeneration.ts:38
• Optional
details: boolean
Whether or not to output details
inference/src/tasks/nlp/textGeneration.ts:42
• Optional
do_sample: boolean
Whether to use logits sampling instead of greedy decoding when generating new tokens.
inference/src/tasks/nlp/textGeneration.ts:46
• Optional
max_new_tokens: number
The maximum number of tokens to generate.
inference/src/tasks/nlp/textGeneration.ts:50
• Optional
repetition_penalty: number
The parameter for repetition penalty. A value of 1.0 means no penalty. See this paper for more details.
inference/src/tasks/nlp/textGeneration.ts:55
• Optional
return_full_text: boolean
Whether to prepend the prompt to the generated text.
inference/src/tasks/nlp/textGeneration.ts:59
• Optional
seed: number
The random sampling seed.
inference/src/tasks/nlp/textGeneration.ts:63
• Optional
stop_sequences: string
[]
Stop generating tokens if a member of stop_sequences
is generated.
inference/src/tasks/nlp/textGeneration.ts:67
• Optional
temperature: number
The value used to modulate the logits distribution.
inference/src/tasks/nlp/textGeneration.ts:71
• Optional
top_k: number
The number of highest probability vocabulary tokens to keep for top-k-filtering.
inference/src/tasks/nlp/textGeneration.ts:75
• Optional
top_p: number
If set to < 1, only the smallest set of most probable tokens with probabilities that add
up to top_p
or higher are kept for generation.
inference/src/tasks/nlp/textGeneration.ts:80
• Optional
truncate: number
Truncate input tokens to the given size.
inference/src/tasks/nlp/textGeneration.ts:84
• Optional
typical_p: number
Typical Decoding mass. See Typical Decoding for Natural Language Generation for more information
inference/src/tasks/nlp/textGeneration.ts:89
• Optional
watermark: boolean
Watermarking with A Watermark for Large Language Models