Buckets:

rtrm's picture
download
raw
6.43 kB
import{s as X,n as Y,o as Z}from"../chunks/scheduler.0219f8bd.js";import{S as ee,i as te,g as d,s as r,r as I,A as oe,h as i,f as o,c as n,j as q,u as D,x as F,k as b,y as ae,a,v as B,d as O,t as R,w as K}from"../chunks/index.f61edf3b.js";import{H as W,E as re}from"../chunks/EditOnGithub.48fa589f.js";function ne(N){let s,y,$,v,c,T,l,P,L,H,p,x,m,C,u,U='<strong>Kind</strong>: inner typedef of <a href="#module_generation/parameters"><code>generation/parameters</code></a>',E,f,J="<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>",M,h,Q="<strong>Properties</strong>",j,g,V=`<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>`,k,A,G,_,z,w,S;return l=new W({props:{title:"generation/parameters",local:"generationparameters",headingTag:"h1"}}),m=new W({props:{title:"generation/parameters~GenerationFunctionParameters : <code> Object </code>",local:"generationparametersgenerationfunctionparameters--code-object-code",headingTag:"h2"}}),_=new re({props:{source:"https://github.com/huggingface/transformers.js/blob/main/docs/source/api/generation/parameters.md"}}),{c(){s=d("meta"),y=r(),$=d("p"),v=r(),c=d("a"),T=r(),I(l.$$.fragment),P=r(),L=d("hr"),H=r(),p=d("a"),x=r(),I(m.$$.fragment),C=r(),u=d("p"),u.innerHTML=U,E=r(),f=d("table"),f.innerHTML=J,M=r(),h=d("p"),h.innerHTML=Q,j=r(),g=d("table"),g.innerHTML=V,k=r(),A=d("hr"),G=r(),I(_.$$.fragment),z=r(),w=d("p"),this.h()},l(e){const t=oe("svelte-u9bgzb",document.head);s=i(t,"META",{name:!0,content:!0}),t.forEach(o),y=n(e),$=i(e,"P",{}),q($).forEach(o),v=n(e),c=i(e,"A",{id:!0,class:!0}),q(c).forEach(o),T=n(e),D(l.$$.fragment,e),P=n(e),L=i(e,"HR",{}),H=n(e),p=i(e,"A",{id:!0,class:!0}),q(p).forEach(o),x=n(e),D(m.$$.fragment,e),C=n(e),u=i(e,"P",{"data-svelte-h":!0}),F(u)!=="svelte-zfcqcp"&&(u.innerHTML=U),E=n(e),f=i(e,"TABLE",{"data-svelte-h":!0}),F(f)!=="svelte-h6l41y"&&(f.innerHTML=J),M=n(e),h=i(e,"P",{"data-svelte-h":!0}),F(h)!=="svelte-drbxoe"&&(h.innerHTML=Q),j=n(e),g=i(e,"TABLE",{"data-svelte-h":!0}),F(g)!=="svelte-1qgpclw"&&(g.innerHTML=V),k=n(e),A=i(e,"HR",{}),G=n(e),D(_.$$.fragment,e),z=n(e),w=i(e,"P",{}),q(w).forEach(o),this.h()},h(){b(s,"name","hf:doc:metadata"),b(s,"content",de),b(c,"id","module_generation/parameters"),b(c,"class","group"),b(p,"id","module_generation/parameters..GenerationFunctionParameters"),b(p,"class","group")},m(e,t){ae(document.head,s),a(e,y,t),a(e,$,t),a(e,v,t),a(e,c,t),a(e,T,t),B(l,e,t),a(e,P,t),a(e,L,t),a(e,H,t),a(e,p,t),a(e,x,t),B(m,e,t),a(e,C,t),a(e,u,t),a(e,E,t),a(e,f,t),a(e,M,t),a(e,h,t),a(e,j,t),a(e,g,t),a(e,k,t),a(e,A,t),a(e,G,t),B(_,e,t),a(e,z,t),a(e,w,t),S=!0},p:Y,i(e){S||(O(l.$$.fragment,e),O(m.$$.fragment,e),O(_.$$.fragment,e),S=!0)},o(e){R(l.$$.fragment,e),R(m.$$.fragment,e),R(_.$$.fragment,e),S=!1},d(e){e&&(o(y),o($),o(v),o(c),o(T),o(P),o(L),o(H),o(p),o(x),o(C),o(u),o(E),o(f),o(M),o(h),o(j),o(g),o(k),o(A),o(G),o(z),o(w)),o(s),K(l,e),K(m,e),K(_,e)}}}const de='{"title":"generation/parameters","local":"generationparameters","sections":[{"title":"generation/parameters~GenerationFunctionParameters : <code> Object </code>","local":"generationparametersgenerationfunctionparameters--code-object-code","sections":[],"depth":2}],"depth":1}';function ie(N){return Z(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class pe extends ee{constructor(s){super(),te(this,s,ie,ne,X,{})}}export{pe as component};

Xet Storage Details

Size:
6.43 kB
·
Xet hash:
a53bc96e6abd45e539651e8b08736a6f84524266bcab6ed05f4d7e6435303e93

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