Buckets:
| # generation/parameters | |
| * * * | |
| <a id="module_generation/parameters..GenerationFunctionParameters" class="group"></a> | |
| ## `generation/parameters~GenerationFunctionParameters` : <code>Object</code> | |
| **Kind**: inner typedef of [<code>generation/parameters</code>](#module_generation/parameters) | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Param</th><th>Type</th><th>Description</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td>[kwargs]</td><td><code>any</code></td><td><p>(<code>Dict[str, any]</code>, <em>optional</em>):</p> | |
| </td> | |
| </tr> </tbody> | |
| </table> | |
| **Properties** | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Name</th><th>Type</th><th>Default</th><th>Description</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td>[inputs]</td><td><code>*</code></td><td><code></code></td><td><p>(<code>Tensor</code> of varying shape depending on the modality, <em>optional</em>): | |
| The sequence used as a prompt for the generation or as model inputs to the encoder. If <code>null</code> the | |
| method initializes it with <code>bos_token_id</code> and a batch size of 1. For decoder-only models <code>inputs</code> | |
| should be in the format of <code>input_ids</code>. For encoder-decoder models <em>inputs</em> can represent any of | |
| <code>input_ids</code>, <code>input_values</code>, <code>input_features</code>, or <code>pixel_values</code>.</p> | |
| </td> | |
| </tr><tr> | |
| <td>[generation_config]</td><td><code>*</code></td><td><code></code></td><td><p>(<code>GenerationConfig</code>, <em>optional</em>): | |
| The generation configuration to be used as base parametrization for the generation call. | |
| <code>**kwargs</code> passed to generate matching the attributes of <code>generation_config</code> will override them. | |
| If <code>generation_config</code> is not provided, the default will be used, which has the following loading | |
| priority:</p> | |
| <ul> | |
| <li>(1) from the <code>generation_config.json</code> model file, if it exists;</li> | |
| <li>(2) from the model configuration. Please note that unspecified parameters will inherit [<code>GenerationConfig</code>]'s | |
| default values, whose documentation should be checked to parameterize generation.</li> | |
| </ul> | |
| </td> | |
| </tr><tr> | |
| <td>[logits_processor]</td><td><code>*</code></td><td><code></code></td><td><p>(<code>LogitsProcessorList</code>, <em>optional</em>): | |
| Custom logits processors that complement the default logits processors built from arguments and | |
| generation config. If a logit processor is passed that is already created with the arguments or a | |
| generation config an error is thrown. This feature is intended for advanced users.</p> | |
| </td> | |
| </tr><tr> | |
| <td>[stopping_criteria]</td><td><code>*</code></td><td><code></code></td><td><p>(<code>StoppingCriteriaList</code>, <em>optional</em>): | |
| Custom stopping criteria that complements the default stopping criteria built from arguments and a | |
| generation config. If a stopping criteria is passed that is already created with the arguments or a | |
| generation config an error is thrown. This feature is intended for advanced users.</p> | |
| </td> | |
| </tr><tr> | |
| <td>[streamer]</td><td><code>*</code></td><td><code></code></td><td><p>(<code>BaseStreamer</code>, <em>optional</em>): | |
| Streamer object that will be used to stream the generated sequences. Generated tokens are passed | |
| through <code>streamer.put(token_ids)</code> and the streamer is responsible for any further processing.</p> | |
| </td> | |
| </tr><tr> | |
| <td>[decoder_input_ids]</td><td><code>Array.<number></code></td><td><code></code></td><td><p>(<code>number[]</code>, <em>optional</em>): | |
| If the model is an encoder-decoder model, this argument is used to pass the <code>decoder_input_ids</code>.</p> | |
| </td> | |
| </tr> </tbody> | |
| </table> | |
| * * * | |
| <EditOnGithub source="https://github.com/huggingface/transformers.js/blob/main/docs/source/api/generation/parameters.md" /> |
Xet Storage Details
- Size:
- 3.8 kB
- Xet hash:
- a7f5043cd85bbce086c07aa78bbd66a8447b11e98b4f17946c4624cda7a2bea5
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.