Buckets:

rtrm's picture
download
raw
9.05 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;generation/parameters&quot;,&quot;local&quot;:&quot;generationparameters&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;generation/parameters~GenerationFunctionParameters : <code> Object </code>&quot;,&quot;local&quot;:&quot;generationparametersgenerationfunctionparameters--code-object-code&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}">
<link href="/docs/transformers.js/pr_1113/en/_app/immutable/assets/0.e3b0c442.css" rel="modulepreload">
<link rel="modulepreload" href="/docs/transformers.js/pr_1113/en/_app/immutable/entry/start.88a6e140.js">
<link rel="modulepreload" href="/docs/transformers.js/pr_1113/en/_app/immutable/chunks/scheduler.0219f8bd.js">
<link rel="modulepreload" href="/docs/transformers.js/pr_1113/en/_app/immutable/chunks/singletons.c59c6d8d.js">
<link rel="modulepreload" href="/docs/transformers.js/pr_1113/en/_app/immutable/chunks/paths.8e090985.js">
<link rel="modulepreload" href="/docs/transformers.js/pr_1113/en/_app/immutable/entry/app.0003020d.js">
<link rel="modulepreload" href="/docs/transformers.js/pr_1113/en/_app/immutable/chunks/index.f61edf3b.js">
<link rel="modulepreload" href="/docs/transformers.js/pr_1113/en/_app/immutable/nodes/0.25c65ab2.js">
<link rel="modulepreload" href="/docs/transformers.js/pr_1113/en/_app/immutable/nodes/8.cd09ddf7.js">
<link rel="modulepreload" href="/docs/transformers.js/pr_1113/en/_app/immutable/chunks/EditOnGithub.48fa589f.js"><!-- HEAD_svelte-u9bgzb_START --><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;generation/parameters&quot;,&quot;local&quot;:&quot;generationparameters&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;generation/parameters~GenerationFunctionParameters : <code> Object </code>&quot;,&quot;local&quot;:&quot;generationparametersgenerationfunctionparameters--code-object-code&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"><!-- HEAD_svelte-u9bgzb_END --> <p></p> <a id="module_generation/parameters" class="group"></a> <h1 class="relative group"><a id="generationparameters" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#generationparameters"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>generation/parameters</span></h1> <hr> <a id="module_generation/parameters..GenerationFunctionParameters" class="group"></a> <h2 class="relative group"><a id="generationparametersgenerationfunctionparameters--code-object-code" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#generationparametersgenerationfunctionparameters--code-object-code"><span><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg></span></a> <span>generation/parameters~GenerationFunctionParameters : &lt;code> Object &lt;/code></span></h2> <p data-svelte-h="svelte-zfcqcp"><strong>Kind</strong>: inner typedef of <a href="#module_generation/parameters"><code>generation/parameters</code></a></p> <table data-svelte-h="svelte-h6l41y"><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> <p data-svelte-h="svelte-drbxoe"><strong>Properties</strong></p> <table data-svelte-h="svelte-1qgpclw"><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>]&#39;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.&lt;number&gt;</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> <hr> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/transformers.js/blob/main/docs/source/api/generation/parameters.md" target="_blank"><span data-svelte-h="svelte-1kd6by1">&lt;</span> <span data-svelte-h="svelte-x0xyl0">&gt;</span> <span data-svelte-h="svelte-1dajgef"><span class="underline ml-1.5">Update</span> on GitHub</span></a> <p></p>
<script>
{
__sveltekit_kuyevp = {
assets: "/docs/transformers.js/pr_1113/en",
base: "/docs/transformers.js/pr_1113/en",
env: {}
};
const element = document.currentScript.parentElement;
const data = [null,null];
Promise.all([
import("/docs/transformers.js/pr_1113/en/_app/immutable/entry/start.88a6e140.js"),
import("/docs/transformers.js/pr_1113/en/_app/immutable/entry/app.0003020d.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 8],
data,
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
9.05 kB
·
Xet hash:
430db8108bac4b956c127f0c48a705a1cd679c5cc49e6f0dc90fb17023afb9bd

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.