import{S as Fp,i as Bp,s as qp,e as a,k as p,w as y,t as d,M as Mp,c as s,d as t,m,a as r,x as v,h as l,b as h,G as e,g as _,y as T,q as w,o as $,B as x,v as jp,L as je}from"../../chunks/vendor-hf-doc-builder.js";import{T as Rn}from"../../chunks/Tip-hf-doc-builder.js";import{D as C}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ee}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as We}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Me}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Ep(S){let i,k,f,u,b;return u=new Ee({props:{code:`from transformers import BlenderbotSmallConfig, BlenderbotSmallModel

# Initializing a BlenderbotSmall facebook/blenderbot_small-90M style configuration
configuration = BlenderbotSmallConfig()

# Initializing a model (with random weights) from the facebook/blenderbot_small-90M style configuration
model = BlenderbotSmallModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BlenderbotSmallConfig, BlenderbotSmallModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BlenderbotSmall facebook/blenderbot_small-90M style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BlenderbotSmallConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/blenderbot_small-90M style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotSmallModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Cp(S){let i,k,f,u,b;return{c(){i=a("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(c,"CODE",{});var M=r(f);u=l(M,"Module"),M.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){_(n,i,c),e(i,k),e(i,f),e(f,u),e(i,b)},d(n){n&&t(i)}}}function Ap(S){let i,k,f,u,b;return u=new Ee({props:{code:`from transformers import AutoTokenizer, BlenderbotSmallModel

model = BlenderbotSmallModel.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

inputs = tokenizer("Studies have been shown that owning a dog is good for you", return_tensors="pt")
decoder_inputs = tokenizer("Studies show that", return_tensors="pt")  # Batch size 1
outputs = model(input_ids=inputs.input_ids, decoder_input_ids=decoder_inputs.input_ids)

last_hidden_states = outputs.last_hidden_state
list(last_hidden_states.shape)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BlenderbotSmallModel

<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotSmallModel.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Studies have been shown that owning a dog is good for you&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_inputs = tokenizer(<span class="hljs-string">&quot;Studies show that&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids=inputs.input_ids, decoder_input_ids=decoder_inputs.input_ids)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">3</span>, <span class="hljs-number">512</span>]`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Pp(S){let i,k,f,u,b;return{c(){i=a("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(c,"CODE",{});var M=r(f);u=l(M,"Module"),M.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){_(n,i,c),e(i,k),e(i,f),e(f,u),e(i,b)},d(n){n&&t(i)}}}function Op(S){let i,k,f,u,b;return u=new Ee({props:{code:`from transformers import AutoTokenizer, BlenderbotSmallForConditionalGeneration

mname = "facebook/blenderbot_small-90M"
model = BlenderbotSmallForConditionalGeneration.from_pretrained(mname)
tokenizer = AutoTokenizer.from_pretrained(mname)
UTTERANCE = "My friends are cool but they eat too many carbs."
print("Human: ", UTTERANCE)

inputs = tokenizer([UTTERANCE], return_tensors="pt")
reply_ids = model.generate(**inputs)
print("Bot: ", tokenizer.batch_decode(reply_ids, skip_special_tokens=True)[0])

REPLY = "I'm not sure"
print("Human: ", REPLY)

NEXT_UTTERANCE = (
    "My friends are cool but they eat too many carbs.</s> <s>what kind of carbs do they eat? "
    "i don't know much about carbs</s> "
    "<s> I'm not sure."
)
inputs = tokenizer([NEXT_UTTERANCE], return_tensors="pt")
next_reply_ids = model.generate(**inputs)
print("Bot: ", tokenizer.batch_decode(next_reply_ids, skip_special_tokens=True)[0])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>mname = <span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotSmallForConditionalGeneration.from_pretrained(mname)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(mname)
<span class="hljs-meta">&gt;&gt;&gt; </span>UTTERANCE = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Human: &quot;</span>, UTTERANCE)
Human:  My friends are cool but they eat too many carbs.

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([UTTERANCE], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>reply_ids = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Bot: &quot;</span>, tokenizer.batch_decode(reply_ids, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>])
Bot:  what kind of carbs do they eat? i don<span class="hljs-string">&#x27;t know much about carbs.

&gt;&gt;&gt; REPLY = &quot;I&#x27;</span>m <span class="hljs-keyword">not</span> sure<span class="hljs-string">&quot;
&gt;&gt;&gt; print(&quot;</span>Human: <span class="hljs-string">&quot;, REPLY)
Human: I&#x27;m not sure

&gt;&gt;&gt; NEXT_UTTERANCE = (
...     &quot;</span>My friends are cool but they eat too many carbs.&lt;/s&gt; &lt;s&gt;what kind of carbs do they eat? <span class="hljs-string">&quot;
...     &quot;</span>i don<span class="hljs-string">&#x27;t know much about carbs&lt;/s&gt; &quot;
...     &quot;&lt;s&gt; I&#x27;</span>m <span class="hljs-keyword">not</span> sure.<span class="hljs-string">&quot;
... )
&gt;&gt;&gt; inputs = tokenizer([NEXT_UTTERANCE], return_tensors=&quot;</span>pt<span class="hljs-string">&quot;)
&gt;&gt;&gt; next_reply_ids = model.generate(**inputs)
&gt;&gt;&gt; print(&quot;</span>Bot: <span class="hljs-string">&quot;, tokenizer.batch_decode(next_reply_ids, skip_special_tokens=True)[0])
Bot:  they eat a lot of carbs. carbs are high in fat, protein, and carbohydrates.</span>`}}),{c(){i=a("p"),k=d("Conversation example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Conversation example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Np(S){let i,k,f,u,b;return u=new Ee({props:{code:`from transformers import AutoTokenizer, BlenderbotSmallForCausalLM

tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")
model = BlenderbotSmallForCausalLM.from_pretrained(
    "facebook/blenderbot_small-90M", add_cross_attention=False
)
assert model.config.is_decoder, f"{model.__class__} has to be configured as a decoder."
inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

logits = outputs.logits
expected_shape = [1, inputs.input_ids.shape[-1], model.config.vocab_size]
list(logits.shape) == expected_shape`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BlenderbotSmallForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotSmallForCausalLM.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>, add_cross_attention=<span class="hljs-literal">False</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> model.config.is_decoder, <span class="hljs-string">f&quot;<span class="hljs-subst">{model.__class__}</span> has to be configured as a decoder.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span>expected_shape = [<span class="hljs-number">1</span>, inputs.input_ids.shape[-<span class="hljs-number">1</span>], model.config.vocab_size]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape) == expected_shape
<span class="hljs-literal">True</span>`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Lp(S){let i,k,f,u,b,n,c,M,Re,Ce,j,Ue,Q,F,He,V,Ve,Ke,W,Je,Xe,K,Ye,Ze,J,Qe,Ae,N,ee,Te,X,A,P,et,te,oe,tt,R,ot,nt,O,he,de,Pe,fe,Y,at,Oe,G,st,ne,_e,le,L,Ne,E,rt,ie;return{c(){i=a("p"),k=d("TensorFlow models and layers in "),f=a("code"),u=d("transformers"),b=d(" accept two formats as input:"),n=p(),c=a("ul"),M=a("li"),Re=d("having all inputs as keyword arguments (like PyTorch models), or"),Ce=p(),j=a("li"),Ue=d("having all inputs as a list, tuple or dict in the first positional argument."),Q=p(),F=a("p"),He=d(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=a("code"),Ve=d("model.fit()"),Ke=d(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=a("code"),Je=d("model.fit()"),Xe=d(` supports! If, however, you want to use the second
format outside of Keras methods like `),K=a("code"),Ye=d("fit()"),Ze=d(" and "),J=a("code"),Qe=d("predict()"),Ae=d(`, such as when creating your own layers or models with
the Keras `),N=a("code"),ee=d("Functional"),Te=d(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),X=p(),A=a("ul"),P=a("li"),et=d("a single Tensor with "),te=a("code"),oe=d("input_ids"),tt=d(" only and nothing else: "),R=a("code"),ot=d("model(input_ids)"),nt=p(),O=a("li"),he=d(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),de=a("code"),Pe=d("model([input_ids, attention_mask])"),fe=d(" or "),Y=a("code"),at=d("model([input_ids, attention_mask, token_type_ids])"),Oe=p(),G=a("li"),st=d(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=a("code"),_e=d('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),le=p(),L=a("p"),Ne=d(`Note that when creating models and layers with
`),E=a("a"),rt=d("subclassing"),ie=d(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(z){i=s(z,"P",{});var q=r(i);k=l(q,"TensorFlow models and layers in "),f=s(q,"CODE",{});var we=r(f);u=l(we,"transformers"),we.forEach(t),b=l(q," accept two formats as input:"),q.forEach(t),n=m(z),c=s(z,"UL",{});var $e=r(c);M=s($e,"LI",{});var bt=r(M);Re=l(bt,"having all inputs as keyword arguments (like PyTorch models), or"),bt.forEach(t),Ce=m($e),j=s($e,"LI",{});var mt=r(j);Ue=l(mt,"having all inputs as a list, tuple or dict in the first positional argument."),mt.forEach(t),$e.forEach(t),Q=m(z),F=s(z,"P",{});var B=r(F);He=l(B,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=s(B,"CODE",{});var ge=r(V);Ve=l(ge,"model.fit()"),ge.forEach(t),Ke=l(B,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=s(B,"CODE",{});var dt=r(W);Je=l(dt,"model.fit()"),dt.forEach(t),Xe=l(B,` supports! If, however, you want to use the second
format outside of Keras methods like `),K=s(B,"CODE",{});var xe=r(K);Ye=l(xe,"fit()"),xe.forEach(t),Ze=l(B," and "),J=s(B,"CODE",{});var kt=r(J);Qe=l(kt,"predict()"),kt.forEach(t),Ae=l(B,`, such as when creating your own layers or models with
the Keras `),N=s(B,"CODE",{});var lt=r(N);ee=l(lt,"Functional"),lt.forEach(t),Te=l(B,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),B.forEach(t),X=m(z),A=s(z,"UL",{});var Z=r(A);P=s(Z,"LI",{});var ae=r(P);et=l(ae,"a single Tensor with "),te=s(ae,"CODE",{});var U=r(te);oe=l(U,"input_ids"),U.forEach(t),tt=l(ae," only and nothing else: "),R=s(ae,"CODE",{});var ze=r(R);ot=l(ze,"model(input_ids)"),ze.forEach(t),ae.forEach(t),nt=m(Z),O=s(Z,"LI",{});var ce=r(O);he=l(ce,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),de=s(ce,"CODE",{});var pe=r(de);Pe=l(pe,"model([input_ids, attention_mask])"),pe.forEach(t),fe=l(ce," or "),Y=s(ce,"CODE",{});var yt=r(Y);at=l(yt,"model([input_ids, attention_mask, token_type_ids])"),yt.forEach(t),ce.forEach(t),Oe=m(Z),G=s(Z,"LI",{});var be=r(G);st=l(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=s(be,"CODE",{});var vt=r(ne);_e=l(vt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),vt.forEach(t),be.forEach(t),Z.forEach(t),le=m(z),L=s(z,"P",{});var Se=r(L);Ne=l(Se,`Note that when creating models and layers with
`),E=s(Se,"A",{href:!0,rel:!0});var Fe=r(E);rt=l(Fe,"subclassing"),Fe.forEach(t),ie=l(Se,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),Se.forEach(t),this.h()},h(){h(E,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(E,"rel","nofollow")},m(z,q){_(z,i,q),e(i,k),e(i,f),e(f,u),e(i,b),_(z,n,q),_(z,c,q),e(c,M),e(M,Re),e(c,Ce),e(c,j),e(j,Ue),_(z,Q,q),_(z,F,q),e(F,He),e(F,V),e(V,Ve),e(F,Ke),e(F,W),e(W,Je),e(F,Xe),e(F,K),e(K,Ye),e(F,Ze),e(F,J),e(J,Qe),e(F,Ae),e(F,N),e(N,ee),e(F,Te),_(z,X,q),_(z,A,q),e(A,P),e(P,et),e(P,te),e(te,oe),e(P,tt),e(P,R),e(R,ot),e(A,nt),e(A,O),e(O,he),e(O,de),e(de,Pe),e(O,fe),e(O,Y),e(Y,at),e(A,Oe),e(A,G),e(G,st),e(G,ne),e(ne,_e),_(z,le,q),_(z,L,q),e(L,Ne),e(L,E),e(E,rt),e(L,ie)},d(z){z&&t(i),z&&t(n),z&&t(c),z&&t(Q),z&&t(F),z&&t(X),z&&t(A),z&&t(le),z&&t(L)}}}function Ip(S){let i,k,f,u,b;return{c(){i=a("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(c,"CODE",{});var M=r(f);u=l(M,"Module"),M.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){_(n,i,c),e(i,k),e(i,f),e(f,u),e(i,b)},d(n){n&&t(i)}}}function Dp(S){let i,k,f,u,b;return u=new Ee({props:{code:`from transformers import AutoTokenizer, TFBlenderbotSmallModel
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")
model = TFBlenderbotSmallModel.from_pretrained("facebook/blenderbot_small-90M")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
outputs = model(inputs)

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBlenderbotSmallModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBlenderbotSmallModel.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Gp(S){let i,k,f,u,b,n,c,M,Re,Ce,j,Ue,Q,F,He,V,Ve,Ke,W,Je,Xe,K,Ye,Ze,J,Qe,Ae,N,ee,Te,X,A,P,et,te,oe,tt,R,ot,nt,O,he,de,Pe,fe,Y,at,Oe,G,st,ne,_e,le,L,Ne,E,rt,ie;return{c(){i=a("p"),k=d("TensorFlow models and layers in "),f=a("code"),u=d("transformers"),b=d(" accept two formats as input:"),n=p(),c=a("ul"),M=a("li"),Re=d("having all inputs as keyword arguments (like PyTorch models), or"),Ce=p(),j=a("li"),Ue=d("having all inputs as a list, tuple or dict in the first positional argument."),Q=p(),F=a("p"),He=d(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=a("code"),Ve=d("model.fit()"),Ke=d(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=a("code"),Je=d("model.fit()"),Xe=d(` supports! If, however, you want to use the second
format outside of Keras methods like `),K=a("code"),Ye=d("fit()"),Ze=d(" and "),J=a("code"),Qe=d("predict()"),Ae=d(`, such as when creating your own layers or models with
the Keras `),N=a("code"),ee=d("Functional"),Te=d(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),X=p(),A=a("ul"),P=a("li"),et=d("a single Tensor with "),te=a("code"),oe=d("input_ids"),tt=d(" only and nothing else: "),R=a("code"),ot=d("model(input_ids)"),nt=p(),O=a("li"),he=d(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),de=a("code"),Pe=d("model([input_ids, attention_mask])"),fe=d(" or "),Y=a("code"),at=d("model([input_ids, attention_mask, token_type_ids])"),Oe=p(),G=a("li"),st=d(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=a("code"),_e=d('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),le=p(),L=a("p"),Ne=d(`Note that when creating models and layers with
`),E=a("a"),rt=d("subclassing"),ie=d(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(z){i=s(z,"P",{});var q=r(i);k=l(q,"TensorFlow models and layers in "),f=s(q,"CODE",{});var we=r(f);u=l(we,"transformers"),we.forEach(t),b=l(q," accept two formats as input:"),q.forEach(t),n=m(z),c=s(z,"UL",{});var $e=r(c);M=s($e,"LI",{});var bt=r(M);Re=l(bt,"having all inputs as keyword arguments (like PyTorch models), or"),bt.forEach(t),Ce=m($e),j=s($e,"LI",{});var mt=r(j);Ue=l(mt,"having all inputs as a list, tuple or dict in the first positional argument."),mt.forEach(t),$e.forEach(t),Q=m(z),F=s(z,"P",{});var B=r(F);He=l(B,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),V=s(B,"CODE",{});var ge=r(V);Ve=l(ge,"model.fit()"),ge.forEach(t),Ke=l(B,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=s(B,"CODE",{});var dt=r(W);Je=l(dt,"model.fit()"),dt.forEach(t),Xe=l(B,` supports! If, however, you want to use the second
format outside of Keras methods like `),K=s(B,"CODE",{});var xe=r(K);Ye=l(xe,"fit()"),xe.forEach(t),Ze=l(B," and "),J=s(B,"CODE",{});var kt=r(J);Qe=l(kt,"predict()"),kt.forEach(t),Ae=l(B,`, such as when creating your own layers or models with
the Keras `),N=s(B,"CODE",{});var lt=r(N);ee=l(lt,"Functional"),lt.forEach(t),Te=l(B,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),B.forEach(t),X=m(z),A=s(z,"UL",{});var Z=r(A);P=s(Z,"LI",{});var ae=r(P);et=l(ae,"a single Tensor with "),te=s(ae,"CODE",{});var U=r(te);oe=l(U,"input_ids"),U.forEach(t),tt=l(ae," only and nothing else: "),R=s(ae,"CODE",{});var ze=r(R);ot=l(ze,"model(input_ids)"),ze.forEach(t),ae.forEach(t),nt=m(Z),O=s(Z,"LI",{});var ce=r(O);he=l(ce,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),de=s(ce,"CODE",{});var pe=r(de);Pe=l(pe,"model([input_ids, attention_mask])"),pe.forEach(t),fe=l(ce," or "),Y=s(ce,"CODE",{});var yt=r(Y);at=l(yt,"model([input_ids, attention_mask, token_type_ids])"),yt.forEach(t),ce.forEach(t),Oe=m(Z),G=s(Z,"LI",{});var be=r(G);st=l(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),ne=s(be,"CODE",{});var vt=r(ne);_e=l(vt,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),vt.forEach(t),be.forEach(t),Z.forEach(t),le=m(z),L=s(z,"P",{});var Se=r(L);Ne=l(Se,`Note that when creating models and layers with
`),E=s(Se,"A",{href:!0,rel:!0});var Fe=r(E);rt=l(Fe,"subclassing"),Fe.forEach(t),ie=l(Se,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),Se.forEach(t),this.h()},h(){h(E,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(E,"rel","nofollow")},m(z,q){_(z,i,q),e(i,k),e(i,f),e(f,u),e(i,b),_(z,n,q),_(z,c,q),e(c,M),e(M,Re),e(c,Ce),e(c,j),e(j,Ue),_(z,Q,q),_(z,F,q),e(F,He),e(F,V),e(V,Ve),e(F,Ke),e(F,W),e(W,Je),e(F,Xe),e(F,K),e(K,Ye),e(F,Ze),e(F,J),e(J,Qe),e(F,Ae),e(F,N),e(N,ee),e(F,Te),_(z,X,q),_(z,A,q),e(A,P),e(P,et),e(P,te),e(te,oe),e(P,tt),e(P,R),e(R,ot),e(A,nt),e(A,O),e(O,he),e(O,de),e(de,Pe),e(O,fe),e(O,Y),e(Y,at),e(A,Oe),e(A,G),e(G,st),e(G,ne),e(ne,_e),_(z,le,q),_(z,L,q),e(L,Ne),e(L,E),e(E,rt),e(L,ie)},d(z){z&&t(i),z&&t(n),z&&t(c),z&&t(Q),z&&t(F),z&&t(X),z&&t(A),z&&t(le),z&&t(L)}}}function Wp(S){let i,k,f,u,b;return{c(){i=a("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(c,"CODE",{});var M=r(f);u=l(M,"Module"),M.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){_(n,i,c),e(i,k),e(i,f),e(f,u),e(i,b)},d(n){n&&t(i)}}}function Rp(S){let i,k,f,u,b;return u=new Ee({props:{code:`from transformers import AutoTokenizer, TFBlenderbotSmallForConditionalGeneration

mname = "facebook/blenderbot_small-90M"
model = BlenderbotSmallForConditionalGeneration.from_pretrained(mname)
tokenizer = AutoTokenizer.from_pretrained(mname)

UTTERANCE = "My friends are cool but they eat too many carbs."
print("Human: ", UTTERANCE)
inputs = tokenizer([UTTERANCE], return_tensors="tf")

reply_ids = model.generate(**inputs)
print("Bot: ", tokenizer.batch_decode(reply_ids, skip_special_tokens=True)[0])

REPLY = "I'm not sure"
print("Human: ", REPLY)
NEXT_UTTERANCE = (
    "My friends are cool but they eat too many carbs.</s> "
    "<s>what kind of carbs do they eat? i don't know much about carbs.</s> "
    "<s>I'm not sure."
)

inputs = tokenizer([NEXT_UTTERANCE], return_tensors="tf")
inputs.pop("token_type_ids")
next_reply_ids = model.generate(**inputs)
print("Bot: ", tokenizer.batch_decode(next_reply_ids, skip_special_tokens=True)[0])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>mname = <span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BlenderbotSmallForConditionalGeneration.from_pretrained(mname)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(mname)

<span class="hljs-meta">&gt;&gt;&gt; </span>UTTERANCE = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Human: &quot;</span>, UTTERANCE)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([UTTERANCE], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>reply_ids = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Bot: &quot;</span>, tokenizer.batch_decode(reply_ids, skip_special_tokens=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>])
what kind of carbs do they eat? i don<span class="hljs-string">&#x27;t know much about carbs.

&gt;&gt;&gt; REPLY = &quot;I&#x27;</span>m <span class="hljs-keyword">not</span> sure<span class="hljs-string">&quot;
&gt;&gt;&gt; print(&quot;</span>Human: <span class="hljs-string">&quot;, REPLY)
&gt;&gt;&gt; NEXT_UTTERANCE = (
...     &quot;</span>My friends are cool but they eat too many carbs.&lt;/s&gt; <span class="hljs-string">&quot;
...     &quot;</span>&lt;s&gt;what kind of carbs do they eat? i don<span class="hljs-string">&#x27;t know much about carbs.&lt;/s&gt; &quot;
...     &quot;&lt;s&gt;I&#x27;</span>m <span class="hljs-keyword">not</span> sure.<span class="hljs-string">&quot;
... )

&gt;&gt;&gt; inputs = tokenizer([NEXT_UTTERANCE], return_tensors=&quot;</span>t<span class="hljs-string">f&quot;)
&gt;&gt;&gt; inputs.pop(&quot;</span>token_type_ids<span class="hljs-string">&quot;)
&gt;&gt;&gt; next_reply_ids = model.generate(**inputs)
&gt;&gt;&gt; print(&quot;</span>Bot: <span class="hljs-string">&quot;, tokenizer.batch_decode(next_reply_ids, skip_special_tokens=True)[0])</span>`}}),{c(){i=a("p"),k=d("Conversation example::"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Conversation example::"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Up(S){let i,k,f,u,b;return u=new Ee({props:{code:`from transformers import AutoTokenizer, FlaxBlenderbotSmallModel

tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")
model = FlaxBlenderbotSmallModel.from_pretrained("facebook/blenderbot_small-90M")

inputs = tokenizer("Hello, my dog is cute", return_tensors="jax")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotSmallModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallModel.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Hp(S){let i,k,f,u,b;return u=new Ee({props:{code:`from transformers import AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="np")
encoder_outputs = model.encode(**inputs)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Vp(S){let i,k,f,u,b;return u=new Ee({props:{code:`import jax.numpy as jnp
from transformers import AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="np")
encoder_outputs = model.encode(**inputs)

decoder_start_token_id = model.config.decoder_start_token_id
decoder_input_ids = jnp.ones((inputs.input_ids.shape[0], 1), dtype="i4") * decoder_start_token_id

outputs = model.decode(decoder_input_ids, encoder_outputs)
last_decoder_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> jax.numpy <span class="hljs-keyword">as</span> jnp
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_start_token_id = model.config.decoder_start_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = jnp.ones((inputs.input_ids.shape[<span class="hljs-number">0</span>], <span class="hljs-number">1</span>), dtype=<span class="hljs-string">&quot;i4&quot;</span>) * decoder_start_token_id

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_decoder_hidden_states = outputs.last_hidden_state`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Kp(S){let i,k,f,u,b;return{c(){i=a("p"),k=d("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a("code"),u=d("Module"),b=d(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(c,"CODE",{});var M=r(f);u=l(M,"Module"),M.forEach(t),b=l(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(n,c){_(n,i,c),e(i,k),e(i,f),e(f,u),e(i,b)},d(n){n&&t(i)}}}function Jp(S){let i,k,f,u,b;return u=new Ee({props:{code:`from transformers import AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

ARTICLE_TO_SUMMARIZE = "My friends are cool but they eat too many carbs."
inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=1024, return_tensors="np")

# Generate Summary
summary_ids = model.generate(inputs["input_ids"]).sequences
print(tokenizer.batch_decode(summary_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False))`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>ARTICLE_TO_SUMMARIZE = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer([ARTICLE_TO_SUMMARIZE], max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate Summary</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>summary_ids = model.generate(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>]).sequences
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(tokenizer.batch_decode(summary_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>))`}}),{c(){i=a("p"),k=d("Summarization example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Summarization example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Xp(S){let i,k,f,u,b;return u=new Ee({props:{code:`from transformers import AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")
TXT = "My friends are <mask> but they eat too many carbs."

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
input_ids = tokenizer([TXT], return_tensors="np")["input_ids"]
logits = model(input_ids).logits

masked_index = (input_ids[0] == tokenizer.mask_token_id).nonzero().item()
probs = jax.nn.softmax(logits[0, masked_index], axis=0)
values, predictions = jax.lax.top_k(probs)

tokenizer.decode(predictions).split()`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>TXT = <span class="hljs-string">&quot;My friends are &lt;mask&gt; but they eat too many carbs.&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer([TXT], return_tensors=<span class="hljs-string">&quot;np&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(input_ids).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>masked_index = (input_ids[<span class="hljs-number">0</span>] == tokenizer.mask_token_id).nonzero().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = jax.nn.softmax(logits[<span class="hljs-number">0</span>, masked_index], axis=<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>values, predictions = jax.lax.top_k(probs)

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predictions).split()`}}),{c(){i=a("p"),k=d("Mask filling example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Mask filling example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Yp(S){let i,k,f,u,b;return u=new Ee({props:{code:`from transformers import AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="np")
encoder_outputs = model.encode(**inputs)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Zp(S){let i,k,f,u,b;return u=new Ee({props:{code:`import jax.numpy as jnp
from transformers import AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained("facebook/blenderbot_small-90M")
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot_small-90M")

text = "My friends are cool but they eat too many carbs."
inputs = tokenizer(text, max_length=1024, return_tensors="np")
encoder_outputs = model.encode(**inputs)

decoder_start_token_id = model.config.decoder_start_token_id
decoder_input_ids = jnp.ones((inputs.input_ids.shape[0], 1), dtype="i4") * decoder_start_token_id

outputs = model.decode(decoder_input_ids, encoder_outputs)
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> jax.numpy <span class="hljs-keyword">as</span> jnp
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBlenderbotSmallForConditionalGeneration

<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBlenderbotSmallForConditionalGeneration.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/blenderbot_small-90M&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My friends are cool but they eat too many carbs.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(text, max_length=<span class="hljs-number">1024</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>encoder_outputs = model.encode(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_start_token_id = model.config.decoder_start_token_id
<span class="hljs-meta">&gt;&gt;&gt; </span>decoder_input_ids = jnp.ones((inputs.input_ids.shape[<span class="hljs-number">0</span>], <span class="hljs-number">1</span>), dtype=<span class="hljs-string">&quot;i4&quot;</span>) * decoder_start_token_id

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.decode(decoder_input_ids, encoder_outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){i=a("p"),k=d("Example:"),f=p(),y(u.$$.fragment)},l(n){i=s(n,"P",{});var c=r(i);k=l(c,"Example:"),c.forEach(t),f=m(n),v(u.$$.fragment,n)},m(n,c){_(n,i,c),e(i,k),_(n,f,c),T(u,n,c),b=!0},p:je,i(n){b||(w(u.$$.fragment,n),b=!0)},o(n){$(u.$$.fragment,n),b=!1},d(n){n&&t(i),n&&t(f),x(u,n)}}}function Qp(S){let i,k,f,u,b,n,c,M,Re,Ce,j,Ue,Q,F,He,V,Ve,Ke,W,Je,Xe,K,Ye,Ze,J,Qe,Ae,N,ee,Te,X,A,P,et,te,oe,tt,R,ot,nt,O,he,de,Pe,fe,Y,at,Oe,G,st,ne,_e,le,L,Ne,E,rt,ie,z,q,we,$e,bt,mt,B,ge,dt,xe,kt,lt,Z,ae,U,ze,ce,pe,yt,be,vt,Se,Fe,vr,Tr,wr,Tt,$r,Un,xr,zr,Hn,Sr,Fr,Br,Lt,ws,wt,It,ka,jo,qr,ya,Mr,$s,H,Eo,jr,va,Er,Cr,Co,Ar,Vn,Pr,Or,Nr,ut,Ao,Lr,Ta,Ir,Dr,wa,Gr,Wr,Dt,Po,Rr,$t,Ur,$a,Hr,Vr,xa,Kr,Jr,Xr,ht,Oo,Yr,Kn,Zr,Jn,Qr,ed,za,td,od,Xn,No,xs,xt,Gt,Sa,Lo,nd,Fa,ad,zs,it,Io,sd,Do,rd,Ba,dd,ld,id,Wt,Go,cd,qa,pd,Ss,zt,Rt,Ma,Wo,md,ja,ud,Fs,Be,Ro,hd,Uo,fd,Yn,_d,gd,bd,Ho,kd,Vo,yd,vd,Td,Le,Ko,wd,St,$d,Zn,xd,zd,Ea,Sd,Fd,Bd,Ut,qd,Ht,Bs,Ft,Vt,Ca,Jo,Md,Aa,jd,qs,qe,Xo,Ed,Yo,Cd,Qn,Ad,Pd,Od,Zo,Nd,Qo,Ld,Id,Dd,Ie,en,Gd,Bt,Wd,ea,Rd,Ud,Pa,Hd,Vd,Kd,Kt,Jd,Jt,Ms,qt,Xt,Oa,tn,Xd,Na,Yd,js,Mt,on,Zd,Yt,nn,Qd,Zt,Es,jt,Qt,La,an,el,Ia,tl,Cs,me,sn,ol,rn,nl,ta,al,sl,rl,dn,dl,ln,ll,il,cl,eo,pl,De,cn,ml,Et,ul,oa,hl,fl,Da,_l,gl,bl,to,kl,oo,As,Ct,no,Ga,pn,yl,Wa,vl,Ps,ue,mn,Tl,un,wl,na,$l,xl,zl,hn,Sl,fn,Fl,Bl,ql,ao,Ml,Ge,_n,jl,At,El,aa,Cl,Al,Ra,Pl,Ol,Nl,so,Ll,ro,Os,Pt,lo,Ua,gn,Il,Ha,Dl,Ns,I,bn,Gl,kn,Wl,sa,Rl,Ul,Hl,yn,Vl,vn,Kl,Jl,Xl,Va,Yl,Zl,ct,Ka,Tn,Ql,ei,Ja,wn,ti,oi,Xa,$n,ni,ai,Ya,xn,si,ri,io,zn,di,co,li,po,Sn,ii,mo,ci,uo,Fn,pi,ho,Ls,Ot,fo,Za,Bn,mi,Qa,ui,Is,D,qn,hi,Mn,fi,ra,_i,gi,bi,jn,ki,En,yi,vi,Ti,es,wi,$i,pt,ts,Cn,xi,zi,os,An,Si,Fi,ns,Pn,Bi,qi,as,On,Mi,ji,ke,Nn,Ei,Nt,Ci,ss,Ai,Pi,rs,Oi,Ni,Li,_o,Ii,go,Di,bo,Gi,ko,Ln,Wi,yo,Ri,vo,In,Ui,To,Ds;return n=new We({}),X=new We({}),xe=new We({}),ze=new C({props:{name:"class transformers.BlenderbotSmallConfig",anchor:"transformers.BlenderbotSmallConfig",parameters:[{name:"vocab_size",val:" = 50265"},{name:"max_position_embeddings",val:" = 512"},{name:"encoder_layers",val:" = 8"},{name:"encoder_ffn_dim",val:" = 2048"},{name:"encoder_attention_heads",val:" = 16"},{name:"decoder_layers",val:" = 8"},{name:"decoder_ffn_dim",val:" = 2048"},{name:"decoder_attention_heads",val:" = 16"},{name:"encoder_layerdrop",val:" = 0.0"},{name:"decoder_layerdrop",val:" = 0.0"},{name:"use_cache",val:" = True"},{name:"is_encoder_decoder",val:" = True"},{name:"activation_function",val:" = 'gelu'"},{name:"d_model",val:" = 512"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.0"},{name:"activation_dropout",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"decoder_start_token_id",val:" = 1"},{name:"scale_embedding",val:" = False"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"forced_eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlenderbotSmallConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the BlenderbotSmall model. Defines the number of different tokens that can be
represented by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallModel">BlenderbotSmallModel</a> or <a href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.TFBlenderbotSmallModel">TFBlenderbotSmallModel</a>.`,name:"vocab_size"},{anchor:"transformers.BlenderbotSmallConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.BlenderbotSmallConfig.encoder_layers",description:`<strong>encoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of encoder layers.`,name:"encoder_layers"},{anchor:"transformers.BlenderbotSmallConfig.decoder_layers",description:`<strong>decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 8) &#x2014;
Number of decoder layers.`,name:"decoder_layers"},{anchor:"transformers.BlenderbotSmallConfig.encoder_attention_heads",description:`<strong>encoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"encoder_attention_heads"},{anchor:"transformers.BlenderbotSmallConfig.decoder_attention_heads",description:`<strong>decoder_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"decoder_attention_heads"},{anchor:"transformers.BlenderbotSmallConfig.decoder_ffn_dim",description:`<strong>decoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"decoder_ffn_dim"},{anchor:"transformers.BlenderbotSmallConfig.encoder_ffn_dim",description:`<strong>encoder_ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"encoder_ffn_dim"},{anchor:"transformers.BlenderbotSmallConfig.activation_function",description:`<strong>activation_function</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"activation_function"},{anchor:"transformers.BlenderbotSmallConfig.dropout",description:`<strong>dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"dropout"},{anchor:"transformers.BlenderbotSmallConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.BlenderbotSmallConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for activations inside the fully connected layer.`,name:"activation_dropout"},{anchor:"transformers.BlenderbotSmallConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.BlenderbotSmallConfig.init_std",description:`<strong>init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"init_std"},{anchor:"transformers.BlenderbotSmallConfig.encoder_layerdrop",description:`<strong>encoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the encoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"encoder_layerdrop"},{anchor:"transformers.BlenderbotSmallConfig.decoder_layerdrop",description:`<strong>decoder_layerdrop</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The LayerDrop probability for the decoder. See the [LayerDrop paper](see <a href="https://arxiv.org/abs/1909.11556" rel="nofollow">https://arxiv.org/abs/1909.11556</a>)
for more details.`,name:"decoder_layerdrop"},{anchor:"transformers.BlenderbotSmallConfig.scale_embedding",description:`<strong>scale_embedding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Scale embeddings by diving by sqrt(d_model).`,name:"scale_embedding"},{anchor:"transformers.BlenderbotSmallConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models)`,name:"use_cache"},{anchor:"transformers.BlenderbotSmallConfig.forced_eos_token_id",description:`<strong>forced_eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The id of the token to force as the last generated token when <code>max_length</code> is reached. Usually set to
<code>eos_token_id</code>.`,name:"forced_eos_token_id"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/configuration_blenderbot_small.py#L36"}}),Lt=new Me({props:{anchor:"transformers.BlenderbotSmallConfig.example",$$slots:{default:[Ep]},$$scope:{ctx:S}}}),jo=new We({}),Eo=new C({props:{name:"class transformers.BlenderbotSmallTokenizer",anchor:"transformers.BlenderbotSmallTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"bos_token",val:" = '__start__'"},{name:"eos_token",val:" = '__end__'"},{name:"unk_token",val:" = '__unk__'"},{name:"pad_token",val:" = '__null__'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlenderbotSmallTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.BlenderbotSmallTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"},{anchor:"transformers.BlenderbotSmallTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;__start__&quot;</code>) &#x2014;
The beginning of sentence token.`,name:"bos_token"},{anchor:"transformers.BlenderbotSmallTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;__end__&quot;</code>) &#x2014;
The end of sentence token.`,name:"eos_token"},{anchor:"transformers.BlenderbotSmallTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;__unk__&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.BlenderbotSmallTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;__pad__&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.
**kwargs &#x2014;
Additional keyword arguments passed along to <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a>`,name:"pad_token"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/tokenization_blenderbot_small.py#L69"}}),Ao=new C({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.BlenderbotSmallTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallTokenizer.build_inputs_with_special_tokens.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence.",name:"token_ids_0"},{anchor:"transformers.BlenderbotSmallTokenizer.build_inputs_with_special_tokens.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L3046",returnDescription:`
<p>The model input with special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Po=new C({props:{name:"get_special_tokens_mask",anchor:"transformers.BlenderbotSmallTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List"},{name:"token_ids_1",val:": typing.Optional[typing.List] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids of the first sequence.`,name:"token_ids_0"},{anchor:"transformers.BlenderbotSmallTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
List of ids of the second sequence.`,name:"token_ids_1"},{anchor:"transformers.BlenderbotSmallTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils.py#L845",returnDescription:`
<p>1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p>A list of integers in the range [0, 1]</p>
`}}),Oo=new C({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BlenderbotSmallTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence.",name:"token_ids_0"},{anchor:"transformers.BlenderbotSmallTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014; The second tokenized sequence.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tokenization_utils_base.py#L3026",returnDescription:`
<p>The token type ids.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),No=new C({props:{name:"save_vocabulary",anchor:"transformers.BlenderbotSmallTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/tokenization_blenderbot_small.py#L211"}}),Lo=new We({}),Io=new C({props:{name:"class transformers.BlenderbotSmallTokenizerFast",anchor:"transformers.BlenderbotSmallTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"unk_token",val:" = '<|endoftext|>'"},{name:"bos_token",val:" = '<|endoftext|>'"},{name:"eos_token",val:" = '<|endoftext|>'"},{name:"add_prefix_space",val:" = False"},{name:"trim_offsets",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BlenderbotSmallTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/tokenization_blenderbot_small_fast.py#L52"}}),Go=new C({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BlenderbotSmallTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.BlenderbotSmallTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/tokenization_blenderbot_small_fast.py#L98",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Wo=new We({}),Ro=new C({props:{name:"class transformers.BlenderbotSmallModel",anchor:"transformers.BlenderbotSmallModel",parameters:[{name:"config",val:": BlenderbotSmallConfig"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1088"}}),Ko=new C({props:{name:"forward",anchor:"transformers.BlenderbotSmallModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Union[typing.Tuple, transformers.modeling_outputs.BaseModelOutput, NoneType] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BlenderbotSmallModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BlenderbotSmallModel.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>BlenderbotSmall uses the <code>bos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.BlenderbotSmallModel.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.BlenderbotSmallModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BlenderbotSmallModel.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.BlenderbotSmallModel.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.BlenderbotSmallModel.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.BlenderbotSmallModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.BlenderbotSmallModel.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.BlenderbotSmallModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BlenderbotSmallModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BlenderbotSmallModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BlenderbotSmallModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1117",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqModelOutput"
>transformers.modeling_outputs.Seq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ut=new Rn({props:{$$slots:{default:[Cp]},$$scope:{ctx:S}}}),Ht=new Me({props:{anchor:"transformers.BlenderbotSmallModel.forward.example",$$slots:{default:[Ap]},$$scope:{ctx:S}}}),Jo=new We({}),Xo=new C({props:{name:"class transformers.BlenderbotSmallForConditionalGeneration",anchor:"transformers.BlenderbotSmallForConditionalGeneration",parameters:[{name:"config",val:": BlenderbotSmallConfig"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1216"}}),en=new C({props:{name:"forward",anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_outputs",val:": typing.Union[typing.Tuple, transformers.modeling_outputs.BaseModelOutput, NoneType] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>BlenderbotSmall uses the <code>bos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>. inputs_embeds (<code>torch.FloatTensor</code> of shape
<code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>): Optionally, instead of passing <code>input_ids</code> you
can choose to directly pass an embedded representation. This is useful if you want more control over how to
convert <code>input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.`,name:"past_key_values"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.decoder_inputs_embeds",description:`<strong>decoder_inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, target_sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>decoder_input_ids</code> you can choose to directly pass an embedded
representation. If <code>past_key_values</code> is used, optionally only the last <code>decoder_inputs_embeds</code> have to be
input (see <code>past_key_values</code>). This is useful if you want more control over how to convert
<code>decoder_input_ids</code> indices into associated vectors than the model&#x2019;s internal embedding lookup matrix.</p>
<p>If <code>decoder_input_ids</code> and <code>decoder_inputs_embeds</code> are both unset, <code>decoder_inputs_embeds</code> takes the value
of <code>inputs_embeds</code>.`,name:"decoder_inputs_embeds"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1262",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.Seq2SeqLMOutput"
>transformers.modeling_outputs.Seq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Kt=new Rn({props:{$$slots:{default:[Pp]},$$scope:{ctx:S}}}),Jt=new Me({props:{anchor:"transformers.BlenderbotSmallForConditionalGeneration.forward.example",$$slots:{default:[Op]},$$scope:{ctx:S}}}),tn=new We({}),on=new C({props:{name:"class transformers.BlenderbotSmallForCausalLM",anchor:"transformers.BlenderbotSmallForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1398"}}),nn=new C({props:{name:"forward",anchor:"transformers.BlenderbotSmallForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BlenderbotSmallForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you
provide it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BlenderbotSmallForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BlenderbotSmallForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention
if the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.BlenderbotSmallForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used
in the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:`,name:"encoder_attention_mask"},{anchor:"transformers.BlenderbotSmallForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BlenderbotSmallForCausalLM.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.BlenderbotSmallForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of
shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>. The two additional
tensors are only required when the model is used as a decoder in a Sequence to Sequence model.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the
cross-attention blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those
that don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of
all <code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.BlenderbotSmallForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.BlenderbotSmallForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding
(see <code>past_key_values</code>).</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"use_cache"},{anchor:"transformers.BlenderbotSmallForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under
returned tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BlenderbotSmallForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors
for more detail.`,name:"output_hidden_states"},{anchor:"transformers.BlenderbotSmallForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_blenderbot_small.py#L1431",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Zt=new Me({props:{anchor:"transformers.BlenderbotSmallForCausalLM.forward.example",$$slots:{default:[Np]},$$scope:{ctx:S}}}),an=new We({}),sn=new C({props:{name:"class transformers.TFBlenderbotSmallModel",anchor:"transformers.TFBlenderbotSmallModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlenderbotSmallModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py#L1177"}}),eo=new Rn({props:{$$slots:{default:[Lp]},$$scope:{ctx:S}}}),cn=new C({props:{name:"call",anchor:"transformers.TFBlenderbotSmallModel.call",parameters:[{name:"input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"encoder_outputs",val:": typing.Union[typing.Tuple, transformers.modeling_tf_outputs.TFBaseModelOutput, NoneType] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[tensorflow.python.framework.ops.Tensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": typing.Optional[bool] = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlenderbotSmallModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBlenderbotSmallModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFBlenderbotSmallModel.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>BlenderbotSmall uses the <code>bos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.TFBlenderbotSmallModel.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFBlenderbotSmallModel.call.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.TFBlenderbotSmallModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFBlenderbotSmallModel.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFBlenderbotSmallModel.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.TFBlenderbotSmallModel.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFBlenderbotSmallModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFBlenderbotSmallModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFBlenderbotSmallModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFBlenderbotSmallModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFBlenderbotSmallModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBlenderbotSmallModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py#L1189",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqModelOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),to=new Rn({props:{$$slots:{default:[Ip]},$$scope:{ctx:S}}}),oo=new Me({props:{anchor:"transformers.TFBlenderbotSmallModel.call.example",$$slots:{default:[Dp]},$$scope:{ctx:S}}}),pn=new We({}),mn=new C({props:{name:"class transformers.TFBlenderbotSmallForConditionalGeneration",anchor:"transformers.TFBlenderbotSmallForConditionalGeneration",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py#L1283"}}),ao=new Rn({props:{$$slots:{default:[Gp]},$$scope:{ctx:S}}}),_n=new C({props:{name:"call",anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call",parameters:[{name:"input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_input_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_attention_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_position_ids",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"cross_attn_head_mask",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"encoder_outputs",val:": typing.Optional[transformers.modeling_tf_outputs.TFBaseModelOutput] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[tensorflow.python.framework.ops.Tensor]] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"decoder_inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> of shape <code>({0})</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.attention_mask",description:`<strong>attention_mask</strong> (<code>tf.Tensor</code> of shape <code>({0})</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>BlenderbotSmall uses the <code>bos_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
will be made by default and ignore pad tokens. It is not recommended to set this for most use cases.`,name:"decoder_attention_mask"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(encoder_layers, encoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the encoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.decoder_head_mask",description:`<strong>decoder_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the attention modules in the decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"decoder_head_mask"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(decoder_layers, decoder_attention_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the cross-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"cross_attn_head_mask"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tf.FloatTensor</code>, <em>optional</em>) &#x2014;
hidden states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.
of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of`,name:"encoder_outputs"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.labels",description:`<strong>labels</strong> (<code>tf.tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored
(masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_tf_blenderbot_small.py#L1321",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSeq2SeqLMOutput"
>transformers.modeling_tf_outputs.TFSeq2SeqLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),so=new Rn({props:{$$slots:{default:[Wp]},$$scope:{ctx:S}}}),ro=new Me({props:{anchor:"transformers.TFBlenderbotSmallForConditionalGeneration.call.example",$$slots:{default:[Rp]},$$scope:{ctx:S}}}),gn=new We({}),bn=new C({props:{name:"class transformers.FlaxBlenderbotSmallModel",anchor:"transformers.FlaxBlenderbotSmallModel",parameters:[{name:"config",val:": BlenderbotSmallConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotSmallModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBlenderbotSmallModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1215"}}),zn=new C({props:{name:"__call__",anchor:"transformers.FlaxBlenderbotSmallModel.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1151",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the decoder of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(jnp.ndarray)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),co=new Me({props:{anchor:"transformers.FlaxBlenderbotSmallModel.__call__.example",$$slots:{default:[Up]},$$scope:{ctx:S}}}),Sn=new C({props:{name:"encode",anchor:"transformers.FlaxBlenderbotSmallModel.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotSmallModel.encode.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxBlenderbotSmallModel.encode.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxBlenderbotSmallModel.encode.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxBlenderbotSmallModel.encode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxBlenderbotSmallModel.encode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxBlenderbotSmallModel.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L972",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot_small.configuration_blenderbot_small.BlenderbotSmallConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mo=new Me({props:{anchor:"transformers.FlaxBlenderbotSmallModel.encode.example",$$slots:{default:[Hp]},$$scope:{ctx:S}}}),Fn=new C({props:{name:"decode",anchor:"transformers.FlaxBlenderbotSmallModel.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"past_key_values",val:": dict = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotSmallModel.decode.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxBlenderbotSmallModel.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.FlaxBlenderbotSmallModel.decode.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"encoder_attention_mask"},{anchor:"transformers.FlaxBlenderbotSmallModel.decode.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxBlenderbotSmallModel.decode.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxBlenderbotSmallModel.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxBlenderbotSmallModel.decode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxBlenderbotSmallModel.decode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxBlenderbotSmallModel.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1035",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot_small.configuration_blenderbot_small.BlenderbotSmallConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(jnp.ndarray)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ho=new Me({props:{anchor:"transformers.FlaxBlenderbotSmallModel.decode.example",$$slots:{default:[Vp]},$$scope:{ctx:S}}}),Bn=new We({}),qn=new C({props:{name:"class transformers.FlaxBlenderbotSmallForConditionalGeneration",anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration",parameters:[{name:"config",val:": BlenderbotSmallConfig"},{name:"input_shape",val:": typing.Tuple[int] = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig">BlenderbotSmallConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1301"}}),Nn=new C({props:{name:"__call__",anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_input_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1151",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallConfig"
>BlenderbotSmallConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(jnp.ndarray)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>decoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>decoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>encoder_last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) \u2014 Sequence of hidden-states at the output of the last layer of the encoder of the model.</p>
</li>
<li>
<p><strong>encoder_hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>encoder_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
self-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput"
>transformers.modeling_flax_outputs.FlaxSeq2SeqLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_o=new Rn({props:{$$slots:{default:[Kp]},$$scope:{ctx:S}}}),go=new Me({props:{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.example",$$slots:{default:[Jp]},$$scope:{ctx:S}}}),bo=new Me({props:{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.__call__.example-2",$$slots:{default:[Xp]},$$scope:{ctx:S}}}),Ln=new C({props:{name:"encode",anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.encode",parameters:[{name:"input_ids",val:": ndarray"},{name:"attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"train",val:": bool = False"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.encode.input_ids",description:`<strong>input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.encode.attention_mask",description:`<strong>attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.encode.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.encode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.encode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.encode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L972",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot_small.configuration_blenderbot_small.BlenderbotSmallConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutput"
>transformers.modeling_flax_outputs.FlaxBaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),yo=new Me({props:{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.encode.example",$$slots:{default:[Yp]},$$scope:{ctx:S}}}),In=new C({props:{name:"decode",anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode",parameters:[{name:"decoder_input_ids",val:""},{name:"encoder_outputs",val:""},{name:"encoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_attention_mask",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"decoder_position_ids",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"past_key_values",val:": dict = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"deterministic",val:": bool = True"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#decoder-input-ids">What are decoder input IDs?</a></p>
<p>For translation and summarization training, <code>decoder_input_ids</code> should be provided. If no
<code>decoder_input_ids</code> is provided, the model will create this tensor by shifting the <code>input_ids</code> to the right
for denoising pre-training following the paper.`,name:"decoder_input_ids"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(jnp.ndarray)</code>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <em>optional</em>: <code>hidden_states</code>, <em>optional</em>: <code>attentions</code>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) is a sequence of
hidden-states at the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"encoder_attention_mask"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.</p>
<p>If you want to change padding behavior, you should modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the
paper</a> for more information on the default strategy.`,name:"decoder_attention_mask"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode.decoder_position_ids",description:`<strong>decoder_position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each decoder input sequence tokens in the position embeddings. Selected in the
range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"decoder_position_ids"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode.past_key_values",description:`<strong>past_key_values</strong> (<code>Dict[str, np.ndarray]</code>, <em>optional</em>, returned by <code>init_cache</code> or when passing previous <code>past_key_values</code>) &#x2014;
Dictionary of pre-computed hidden-states (key and values in the attention blocks) that can be used for fast
auto-regressive decoding. Pre-computed key and value hidden-states are of shape <em>[batch_size, max_length]</em>.`,name:"past_key_values"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/blenderbot_small/modeling_flax_blenderbot_small.py#L1305",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.models.blenderbot_small.configuration_blenderbot_small.BlenderbotSmallConfig'&gt;</code>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),To=new Me({props:{anchor:"transformers.FlaxBlenderbotSmallForConditionalGeneration.decode.example",$$slots:{default:[Zp]},$$scope:{ctx:S}}}),{c(){i=a("meta"),k=p(),f=a("h1"),u=a("a"),b=a("span"),y(n.$$.fragment),c=p(),M=a("span"),Re=d("Blenderbot Small"),Ce=p(),j=a("p"),Ue=d("Note that "),Q=a("a"),F=d("BlenderbotSmallModel"),He=d(` and
`),V=a("a"),Ve=d("BlenderbotSmallForConditionalGeneration"),Ke=d(` are only used in combination with the checkpoint
`),W=a("a"),Je=d("facebook/blenderbot-90M"),Xe=d(`. Larger Blenderbot checkpoints should
instead be used with `),K=a("a"),Ye=d("BlenderbotModel"),Ze=d(` and
`),J=a("a"),Qe=d("BlenderbotForConditionalGeneration"),Ae=p(),N=a("h2"),ee=a("a"),Te=a("span"),y(X.$$.fragment),A=p(),P=a("span"),et=d("Overview"),te=p(),oe=a("p"),tt=d("The Blender chatbot model was proposed in "),R=a("a"),ot=d("Recipes for building an open-domain chatbot"),nt=d(` Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu,
Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston on 30 Apr 2020.`),O=p(),he=a("p"),de=d("The abstract of the paper is the following:"),Pe=p(),fe=a("p"),Y=a("em"),at=d(`Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that
scaling neural models in the number of parameters and the size of the data they are trained on gives improved results,
we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of
skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to
their partners, and displaying knowledge, empathy and personality appropriately, while maintaining a consistent
persona. We show that large scale models can learn these skills when given appropriate training data and choice of
generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter models, and make our models
and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn
dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing
failure cases of our models.`),Oe=p(),G=a("p"),st=d("Tips:"),ne=p(),_e=a("ul"),le=a("li"),L=d(`Blenderbot Small is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),Ne=p(),E=a("p"),rt=d("This model was contributed by "),ie=a("a"),z=d("patrickvonplaten"),q=d(`. The authors\u2019 code can be
found `),we=a("a"),$e=d("here"),bt=d(" ."),mt=p(),B=a("h2"),ge=a("a"),dt=a("span"),y(xe.$$.fragment),kt=p(),lt=a("span"),Z=d("BlenderbotSmallConfig"),ae=p(),U=a("div"),y(ze.$$.fragment),ce=p(),pe=a("p"),yt=d("This is the configuration class to store the configuration of a "),be=a("a"),vt=d("BlenderbotSmallModel"),Se=d(`. It is used to instantiate
an BlenderbotSmall model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the BlenderbotSmall
`),Fe=a("a"),vr=d("facebook/blenderbot_small-90M"),Tr=d(" architecture."),wr=p(),Tt=a("p"),$r=d("Configuration objects inherit from "),Un=a("a"),xr=d("PretrainedConfig"),zr=d(` and can be used to control the model outputs. Read the
documentation from `),Hn=a("a"),Sr=d("PretrainedConfig"),Fr=d(" for more information."),Br=p(),y(Lt.$$.fragment),ws=p(),wt=a("h2"),It=a("a"),ka=a("span"),y(jo.$$.fragment),qr=p(),ya=a("span"),Mr=d("BlenderbotSmallTokenizer"),$s=p(),H=a("div"),y(Eo.$$.fragment),jr=p(),va=a("p"),Er=d("Constructs a Blenderbot-90M tokenizer based on BPE (Byte-Pair-Encoding)"),Cr=p(),Co=a("p"),Ar=d("This tokenizer inherits from "),Vn=a("a"),Pr=d("PreTrainedTokenizer"),Or=d(` which contains most of the main methods. Users should refer to
the superclass for more information regarding methods.`),Nr=p(),ut=a("div"),y(Ao.$$.fragment),Lr=p(),Ta=a("p"),Ir=d(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens.`),Dr=p(),wa=a("p"),Gr=d("This implementation does not add special tokens and this method should be overridden in a subclass."),Wr=p(),Dt=a("div"),y(Po.$$.fragment),Rr=p(),$t=a("p"),Ur=d(`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),$a=a("code"),Hr=d("prepare_for_model"),Vr=d(" or "),xa=a("code"),Kr=d("encode_plus"),Jr=d(" methods."),Xr=p(),ht=a("div"),y(Oo.$$.fragment),Yr=p(),Kn=a("p"),Zr=d("Create the token type IDs corresponding to the sequences passed. "),Jn=a("a"),Qr=d(`What are token type
IDs?`),ed=p(),za=a("p"),td=d("Should be overridden in a subclass if the model has a special way of building those."),od=p(),Xn=a("div"),y(No.$$.fragment),xs=p(),xt=a("h2"),Gt=a("a"),Sa=a("span"),y(Lo.$$.fragment),nd=p(),Fa=a("span"),ad=d("BlenderbotSmallTokenizerFast"),zs=p(),it=a("div"),y(Io.$$.fragment),sd=p(),Do=a("p"),rd=d("Construct a \u201Cfast\u201D BlenderbotSmall tokenizer (backed by HuggingFace\u2019s "),Ba=a("em"),dd=d("tokenizers"),ld=d(" library)."),id=p(),Wt=a("div"),y(Go.$$.fragment),cd=p(),qa=a("p"),pd=d(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. BlenderbotSmall
does not make use of token type ids, therefore a list of zeros is returned.`),Ss=p(),zt=a("h2"),Rt=a("a"),Ma=a("span"),y(Wo.$$.fragment),md=p(),ja=a("span"),ud=d("BlenderbotSmallModel"),Fs=p(),Be=a("div"),y(Ro.$$.fragment),hd=p(),Uo=a("p"),fd=d(`The bare BlenderbotSmall Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Yn=a("a"),_d=d("PreTrainedModel"),gd=d(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),bd=p(),Ho=a("p"),kd=d("This model is also a PyTorch "),Vo=a("a"),yd=d("torch.nn.Module"),vd=d(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Td=p(),Le=a("div"),y(Ko.$$.fragment),wd=p(),St=a("p"),$d=d("The "),Zn=a("a"),xd=d("BlenderbotSmallModel"),zd=d(" forward method, overrides the "),Ea=a("code"),Sd=d("__call__"),Fd=d(" special method."),Bd=p(),y(Ut.$$.fragment),qd=p(),y(Ht.$$.fragment),Bs=p(),Ft=a("h2"),Vt=a("a"),Ca=a("span"),y(Jo.$$.fragment),Md=p(),Aa=a("span"),jd=d("BlenderbotSmallForConditionalGeneration"),qs=p(),qe=a("div"),y(Xo.$$.fragment),Ed=p(),Yo=a("p"),Cd=d(`The BlenderbotSmall Model with a language modeling head. Can be used for summarization.
This model inherits from `),Qn=a("a"),Ad=d("PreTrainedModel"),Pd=d(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Od=p(),Zo=a("p"),Nd=d("This model is also a PyTorch "),Qo=a("a"),Ld=d("torch.nn.Module"),Id=d(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Dd=p(),Ie=a("div"),y(en.$$.fragment),Gd=p(),Bt=a("p"),Wd=d("The "),ea=a("a"),Rd=d("BlenderbotSmallForConditionalGeneration"),Ud=d(" forward method, overrides the "),Pa=a("code"),Hd=d("__call__"),Vd=d(" special method."),Kd=p(),y(Kt.$$.fragment),Jd=p(),y(Jt.$$.fragment),Ms=p(),qt=a("h2"),Xt=a("a"),Oa=a("span"),y(tn.$$.fragment),Xd=p(),Na=a("span"),Yd=d("BlenderbotSmallForCausalLM"),js=p(),Mt=a("div"),y(on.$$.fragment),Zd=p(),Yt=a("div"),y(nn.$$.fragment),Qd=p(),y(Zt.$$.fragment),Es=p(),jt=a("h2"),Qt=a("a"),La=a("span"),y(an.$$.fragment),el=p(),Ia=a("span"),tl=d("TFBlenderbotSmallModel"),Cs=p(),me=a("div"),y(sn.$$.fragment),ol=p(),rn=a("p"),nl=d(`The bare BLENDERBOT_SMALL Model outputting raw hidden-states without any specific head on top.
This model inherits from `),ta=a("a"),al=d("TFPreTrainedModel"),sl=d(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),rl=p(),dn=a("p"),dl=d("This model is also a "),ln=a("a"),ll=d("tf.keras.Model"),il=d(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),cl=p(),y(eo.$$.fragment),pl=p(),De=a("div"),y(cn.$$.fragment),ml=p(),Et=a("p"),ul=d("The "),oa=a("a"),hl=d("TFBlenderbotSmallModel"),fl=d(" forward method, overrides the "),Da=a("code"),_l=d("__call__"),gl=d(" special method."),bl=p(),y(to.$$.fragment),kl=p(),y(oo.$$.fragment),As=p(),Ct=a("h2"),no=a("a"),Ga=a("span"),y(pn.$$.fragment),yl=p(),Wa=a("span"),vl=d("TFBlenderbotSmallForConditionalGeneration"),Ps=p(),ue=a("div"),y(mn.$$.fragment),Tl=p(),un=a("p"),wl=d(`The BLENDERBOT_SMALL Model with a language modeling head. Can be used for summarization.
This model inherits from `),na=a("a"),$l=d("TFPreTrainedModel"),xl=d(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),zl=p(),hn=a("p"),Sl=d("This model is also a "),fn=a("a"),Fl=d("tf.keras.Model"),Bl=d(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ql=p(),y(ao.$$.fragment),Ml=p(),Ge=a("div"),y(_n.$$.fragment),jl=p(),At=a("p"),El=d("The "),aa=a("a"),Cl=d("TFBlenderbotSmallForConditionalGeneration"),Al=d(" forward method, overrides the "),Ra=a("code"),Pl=d("__call__"),Ol=d(" special method."),Nl=p(),y(so.$$.fragment),Ll=p(),y(ro.$$.fragment),Os=p(),Pt=a("h2"),lo=a("a"),Ua=a("span"),y(gn.$$.fragment),Il=p(),Ha=a("span"),Dl=d("FlaxBlenderbotSmallModel"),Ns=p(),I=a("div"),y(bn.$$.fragment),Gl=p(),kn=a("p"),Wl=d(`The bare BlenderbotSmall Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),sa=a("a"),Rl=d("FlaxPreTrainedModel"),Ul=d(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Hl=p(),yn=a("p"),Vl=d(`This model is also a Flax Linen
`),vn=a("a"),Kl=d("flax.nn.Module"),Jl=d(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Xl=p(),Va=a("p"),Yl=d("Finally, this model supports inherent JAX features such as:"),Zl=p(),ct=a("ul"),Ka=a("li"),Tn=a("a"),Ql=d("Just-In-Time (JIT) compilation"),ei=p(),Ja=a("li"),wn=a("a"),ti=d("Automatic Differentiation"),oi=p(),Xa=a("li"),$n=a("a"),ni=d("Vectorization"),ai=p(),Ya=a("li"),xn=a("a"),si=d("Parallelization"),ri=p(),io=a("div"),y(zn.$$.fragment),di=p(),y(co.$$.fragment),li=p(),po=a("div"),y(Sn.$$.fragment),ii=p(),y(mo.$$.fragment),ci=p(),uo=a("div"),y(Fn.$$.fragment),pi=p(),y(ho.$$.fragment),Ls=p(),Ot=a("h2"),fo=a("a"),Za=a("span"),y(Bn.$$.fragment),mi=p(),Qa=a("span"),ui=d("FlaxBlenderbotForConditionalGeneration"),Is=p(),D=a("div"),y(qn.$$.fragment),hi=p(),Mn=a("p"),fi=d(`The BLENDERBOT_SMALL Model with a language modeling head. Can be used for summarization.
This model inherits from `),ra=a("a"),_i=d("FlaxPreTrainedModel"),gi=d(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),bi=p(),jn=a("p"),ki=d(`This model is also a Flax Linen
`),En=a("a"),yi=d("flax.nn.Module"),vi=d(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Ti=p(),es=a("p"),wi=d("Finally, this model supports inherent JAX features such as:"),$i=p(),pt=a("ul"),ts=a("li"),Cn=a("a"),xi=d("Just-In-Time (JIT) compilation"),zi=p(),os=a("li"),An=a("a"),Si=d("Automatic Differentiation"),Fi=p(),ns=a("li"),Pn=a("a"),Bi=d("Vectorization"),qi=p(),as=a("li"),On=a("a"),Mi=d("Parallelization"),ji=p(),ke=a("div"),y(Nn.$$.fragment),Ei=p(),Nt=a("p"),Ci=d("The "),ss=a("code"),Ai=d("FlaxBlenderbotSmallPreTrainedModel"),Pi=d(" forward method, overrides the "),rs=a("code"),Oi=d("__call__"),Ni=d(" special method."),Li=p(),y(_o.$$.fragment),Ii=p(),y(go.$$.fragment),Di=p(),y(bo.$$.fragment),Gi=p(),ko=a("div"),y(Ln.$$.fragment),Wi=p(),y(yo.$$.fragment),Ri=p(),vo=a("div"),y(In.$$.fragment),Ui=p(),y(To.$$.fragment),this.h()},l(o){const g=Mp('[data-svelte="svelte-1phssyn"]',document.head);i=s(g,"META",{name:!0,content:!0}),g.forEach(t),k=m(o),f=s(o,"H1",{class:!0});var Dn=r(f);u=s(Dn,"A",{id:!0,class:!0,href:!0});var ds=r(u);b=s(ds,"SPAN",{});var ls=r(b);v(n.$$.fragment,ls),ls.forEach(t),ds.forEach(t),c=m(Dn),M=s(Dn,"SPAN",{});var is=r(M);Re=l(is,"Blenderbot Small"),is.forEach(t),Dn.forEach(t),Ce=m(o),j=s(o,"P",{});var ye=r(j);Ue=l(ye,"Note that "),Q=s(ye,"A",{href:!0});var cs=r(Q);F=l(cs,"BlenderbotSmallModel"),cs.forEach(t),He=l(ye,` and
`),V=s(ye,"A",{href:!0});var ps=r(V);Ve=l(ps,"BlenderbotSmallForConditionalGeneration"),ps.forEach(t),Ke=l(ye,` are only used in combination with the checkpoint
`),W=s(ye,"A",{href:!0,rel:!0});var ms=r(W);Je=l(ms,"facebook/blenderbot-90M"),ms.forEach(t),Xe=l(ye,`. Larger Blenderbot checkpoints should
instead be used with `),K=s(ye,"A",{href:!0});var us=r(K);Ye=l(us,"BlenderbotModel"),us.forEach(t),Ze=l(ye,` and
`),J=s(ye,"A",{href:!0});var hs=r(J);Qe=l(hs,"BlenderbotForConditionalGeneration"),hs.forEach(t),ye.forEach(t),Ae=m(o),N=s(o,"H2",{class:!0});var Gn=r(N);ee=s(Gn,"A",{id:!0,class:!0,href:!0});var fs=r(ee);Te=s(fs,"SPAN",{});var _s=r(Te);v(X.$$.fragment,_s),_s.forEach(t),fs.forEach(t),A=m(Gn),P=s(Gn,"SPAN",{});var gs=r(P);et=l(gs,"Overview"),gs.forEach(t),Gn.forEach(t),te=m(o),oe=s(o,"P",{});var Wn=r(oe);tt=l(Wn,"The Blender chatbot model was proposed in "),R=s(Wn,"A",{href:!0,rel:!0});var bs=r(R);ot=l(bs,"Recipes for building an open-domain chatbot"),bs.forEach(t),nt=l(Wn,` Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu,
Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston on 30 Apr 2020.`),Wn.forEach(t),O=m(o),he=s(o,"P",{});var ks=r(he);de=l(ks,"The abstract of the paper is the following:"),ks.forEach(t),Pe=m(o),fe=s(o,"P",{});var ys=r(fe);Y=s(ys,"EM",{});var vs=r(Y);at=l(vs,`Building open-domain chatbots is a challenging area for machine learning research. While prior work has shown that
scaling neural models in the number of parameters and the size of the data they are trained on gives improved results,
we show that other ingredients are important for a high-performing chatbot. Good conversation requires a number of
skills that an expert conversationalist blends in a seamless way: providing engaging talking points and listening to
their partners, and displaying knowledge, empathy and personality appropriately, while maintaining a consistent
persona. We show that large scale models can learn these skills when given appropriate training data and choice of
generation strategy. We build variants of these recipes with 90M, 2.7B and 9.4B parameter models, and make our models
and code publicly available. Human evaluations show our best models are superior to existing approaches in multi-turn
dialogue in terms of engagingness and humanness measurements. We then discuss the limitations of this work by analyzing
failure cases of our models.`),vs.forEach(t),ys.forEach(t),Oe=m(o),G=s(o,"P",{});var Ts=r(G);st=l(Ts,"Tips:"),Ts.forEach(t),ne=m(o),_e=s(o,"UL",{});var Vi=r(_e);le=s(Vi,"LI",{});var Ki=r(le);L=l(Ki,`Blenderbot Small is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),Ki.forEach(t),Vi.forEach(t),Ne=m(o),E=s(o,"P",{});var da=r(E);rt=l(da,"This model was contributed by "),ie=s(da,"A",{href:!0,rel:!0});var Ji=r(ie);z=l(Ji,"patrickvonplaten"),Ji.forEach(t),q=l(da,`. The authors\u2019 code can be
found `),we=s(da,"A",{href:!0,rel:!0});var Xi=r(we);$e=l(Xi,"here"),Xi.forEach(t),bt=l(da," ."),da.forEach(t),mt=m(o),B=s(o,"H2",{class:!0});var Gs=r(B);ge=s(Gs,"A",{id:!0,class:!0,href:!0});var Yi=r(ge);dt=s(Yi,"SPAN",{});var Zi=r(dt);v(xe.$$.fragment,Zi),Zi.forEach(t),Yi.forEach(t),kt=m(Gs),lt=s(Gs,"SPAN",{});var Qi=r(lt);Z=l(Qi,"BlenderbotSmallConfig"),Qi.forEach(t),Gs.forEach(t),ae=m(o),U=s(o,"DIV",{class:!0});var wo=r(U);v(ze.$$.fragment,wo),ce=m(wo),pe=s(wo,"P",{});var la=r(pe);yt=l(la,"This is the configuration class to store the configuration of a "),be=s(la,"A",{href:!0});var ec=r(be);vt=l(ec,"BlenderbotSmallModel"),ec.forEach(t),Se=l(la,`. It is used to instantiate
an BlenderbotSmall model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the BlenderbotSmall
`),Fe=s(la,"A",{href:!0,rel:!0});var tc=r(Fe);vr=l(tc,"facebook/blenderbot_small-90M"),tc.forEach(t),Tr=l(la," architecture."),la.forEach(t),wr=m(wo),Tt=s(wo,"P",{});var ia=r(Tt);$r=l(ia,"Configuration objects inherit from "),Un=s(ia,"A",{href:!0});var oc=r(Un);xr=l(oc,"PretrainedConfig"),oc.forEach(t),zr=l(ia,` and can be used to control the model outputs. Read the
documentation from `),Hn=s(ia,"A",{href:!0});var nc=r(Hn);Sr=l(nc,"PretrainedConfig"),nc.forEach(t),Fr=l(ia," for more information."),ia.forEach(t),Br=m(wo),v(Lt.$$.fragment,wo),wo.forEach(t),ws=m(o),wt=s(o,"H2",{class:!0});var Ws=r(wt);It=s(Ws,"A",{id:!0,class:!0,href:!0});var ac=r(It);ka=s(ac,"SPAN",{});var sc=r(ka);v(jo.$$.fragment,sc),sc.forEach(t),ac.forEach(t),qr=m(Ws),ya=s(Ws,"SPAN",{});var rc=r(ya);Mr=l(rc,"BlenderbotSmallTokenizer"),rc.forEach(t),Ws.forEach(t),$s=m(o),H=s(o,"DIV",{class:!0});var ve=r(H);v(Eo.$$.fragment,ve),jr=m(ve),va=s(ve,"P",{});var dc=r(va);Er=l(dc,"Constructs a Blenderbot-90M tokenizer based on BPE (Byte-Pair-Encoding)"),dc.forEach(t),Cr=m(ve),Co=s(ve,"P",{});var Rs=r(Co);Ar=l(Rs,"This tokenizer inherits from "),Vn=s(Rs,"A",{href:!0});var lc=r(Vn);Pr=l(lc,"PreTrainedTokenizer"),lc.forEach(t),Or=l(Rs,` which contains most of the main methods. Users should refer to
the superclass for more information regarding methods.`),Rs.forEach(t),Nr=m(ve),ut=s(ve,"DIV",{class:!0});var ca=r(ut);v(Ao.$$.fragment,ca),Lr=m(ca),Ta=s(ca,"P",{});var ic=r(Ta);Ir=l(ic,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens.`),ic.forEach(t),Dr=m(ca),wa=s(ca,"P",{});var cc=r(wa);Gr=l(cc,"This implementation does not add special tokens and this method should be overridden in a subclass."),cc.forEach(t),ca.forEach(t),Wr=m(ve),Dt=s(ve,"DIV",{class:!0});var Us=r(Dt);v(Po.$$.fragment,Us),Rr=m(Us),$t=s(Us,"P",{});var pa=r($t);Ur=l(pa,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),$a=s(pa,"CODE",{});var pc=r($a);Hr=l(pc,"prepare_for_model"),pc.forEach(t),Vr=l(pa," or "),xa=s(pa,"CODE",{});var mc=r(xa);Kr=l(mc,"encode_plus"),mc.forEach(t),Jr=l(pa," methods."),pa.forEach(t),Us.forEach(t),Xr=m(ve),ht=s(ve,"DIV",{class:!0});var ma=r(ht);v(Oo.$$.fragment,ma),Yr=m(ma),Kn=s(ma,"P",{});var Hi=r(Kn);Zr=l(Hi,"Create the token type IDs corresponding to the sequences passed. "),Jn=s(Hi,"A",{href:!0});var uc=r(Jn);Qr=l(uc,`What are token type
IDs?`),uc.forEach(t),Hi.forEach(t),ed=m(ma),za=s(ma,"P",{});var hc=r(za);td=l(hc,"Should be overridden in a subclass if the model has a special way of building those."),hc.forEach(t),ma.forEach(t),od=m(ve),Xn=s(ve,"DIV",{class:!0});var fc=r(Xn);v(No.$$.fragment,fc),fc.forEach(t),ve.forEach(t),xs=m(o),xt=s(o,"H2",{class:!0});var Hs=r(xt);Gt=s(Hs,"A",{id:!0,class:!0,href:!0});var _c=r(Gt);Sa=s(_c,"SPAN",{});var gc=r(Sa);v(Lo.$$.fragment,gc),gc.forEach(t),_c.forEach(t),nd=m(Hs),Fa=s(Hs,"SPAN",{});var bc=r(Fa);ad=l(bc,"BlenderbotSmallTokenizerFast"),bc.forEach(t),Hs.forEach(t),zs=m(o),it=s(o,"DIV",{class:!0});var ua=r(it);v(Io.$$.fragment,ua),sd=m(ua),Do=s(ua,"P",{});var Vs=r(Do);rd=l(Vs,"Construct a \u201Cfast\u201D BlenderbotSmall tokenizer (backed by HuggingFace\u2019s "),Ba=s(Vs,"EM",{});var kc=r(Ba);dd=l(kc,"tokenizers"),kc.forEach(t),ld=l(Vs," library)."),Vs.forEach(t),id=m(ua),Wt=s(ua,"DIV",{class:!0});var Ks=r(Wt);v(Go.$$.fragment,Ks),cd=m(Ks),qa=s(Ks,"P",{});var yc=r(qa);pd=l(yc,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. BlenderbotSmall
does not make use of token type ids, therefore a list of zeros is returned.`),yc.forEach(t),Ks.forEach(t),ua.forEach(t),Ss=m(o),zt=s(o,"H2",{class:!0});var Js=r(zt);Rt=s(Js,"A",{id:!0,class:!0,href:!0});var vc=r(Rt);Ma=s(vc,"SPAN",{});var Tc=r(Ma);v(Wo.$$.fragment,Tc),Tc.forEach(t),vc.forEach(t),md=m(Js),ja=s(Js,"SPAN",{});var wc=r(ja);ud=l(wc,"BlenderbotSmallModel"),wc.forEach(t),Js.forEach(t),Fs=m(o),Be=s(o,"DIV",{class:!0});var $o=r(Be);v(Ro.$$.fragment,$o),hd=m($o),Uo=s($o,"P",{});var Xs=r(Uo);fd=l(Xs,`The bare BlenderbotSmall Model outputting raw hidden-states without any specific head on top.
This model inherits from `),Yn=s(Xs,"A",{href:!0});var $c=r(Yn);_d=l($c,"PreTrainedModel"),$c.forEach(t),gd=l(Xs,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Xs.forEach(t),bd=m($o),Ho=s($o,"P",{});var Ys=r(Ho);kd=l(Ys,"This model is also a PyTorch "),Vo=s(Ys,"A",{href:!0,rel:!0});var xc=r(Vo);yd=l(xc,"torch.nn.Module"),xc.forEach(t),vd=l(Ys,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ys.forEach(t),Td=m($o),Le=s($o,"DIV",{class:!0});var xo=r(Le);v(Ko.$$.fragment,xo),wd=m(xo),St=s(xo,"P",{});var ha=r(St);$d=l(ha,"The "),Zn=s(ha,"A",{href:!0});var zc=r(Zn);xd=l(zc,"BlenderbotSmallModel"),zc.forEach(t),zd=l(ha," forward method, overrides the "),Ea=s(ha,"CODE",{});var Sc=r(Ea);Sd=l(Sc,"__call__"),Sc.forEach(t),Fd=l(ha," special method."),ha.forEach(t),Bd=m(xo),v(Ut.$$.fragment,xo),qd=m(xo),v(Ht.$$.fragment,xo),xo.forEach(t),$o.forEach(t),Bs=m(o),Ft=s(o,"H2",{class:!0});var Zs=r(Ft);Vt=s(Zs,"A",{id:!0,class:!0,href:!0});var Fc=r(Vt);Ca=s(Fc,"SPAN",{});var Bc=r(Ca);v(Jo.$$.fragment,Bc),Bc.forEach(t),Fc.forEach(t),Md=m(Zs),Aa=s(Zs,"SPAN",{});var qc=r(Aa);jd=l(qc,"BlenderbotSmallForConditionalGeneration"),qc.forEach(t),Zs.forEach(t),qs=m(o),qe=s(o,"DIV",{class:!0});var zo=r(qe);v(Xo.$$.fragment,zo),Ed=m(zo),Yo=s(zo,"P",{});var Qs=r(Yo);Cd=l(Qs,`The BlenderbotSmall Model with a language modeling head. Can be used for summarization.
This model inherits from `),Qn=s(Qs,"A",{href:!0});var Mc=r(Qn);Ad=l(Mc,"PreTrainedModel"),Mc.forEach(t),Pd=l(Qs,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Qs.forEach(t),Od=m(zo),Zo=s(zo,"P",{});var er=r(Zo);Nd=l(er,"This model is also a PyTorch "),Qo=s(er,"A",{href:!0,rel:!0});var jc=r(Qo);Ld=l(jc,"torch.nn.Module"),jc.forEach(t),Id=l(er,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),er.forEach(t),Dd=m(zo),Ie=s(zo,"DIV",{class:!0});var So=r(Ie);v(en.$$.fragment,So),Gd=m(So),Bt=s(So,"P",{});var fa=r(Bt);Wd=l(fa,"The "),ea=s(fa,"A",{href:!0});var Ec=r(ea);Rd=l(Ec,"BlenderbotSmallForConditionalGeneration"),Ec.forEach(t),Ud=l(fa," forward method, overrides the "),Pa=s(fa,"CODE",{});var Cc=r(Pa);Hd=l(Cc,"__call__"),Cc.forEach(t),Vd=l(fa," special method."),fa.forEach(t),Kd=m(So),v(Kt.$$.fragment,So),Jd=m(So),v(Jt.$$.fragment,So),So.forEach(t),zo.forEach(t),Ms=m(o),qt=s(o,"H2",{class:!0});var tr=r(qt);Xt=s(tr,"A",{id:!0,class:!0,href:!0});var Ac=r(Xt);Oa=s(Ac,"SPAN",{});var Pc=r(Oa);v(tn.$$.fragment,Pc),Pc.forEach(t),Ac.forEach(t),Xd=m(tr),Na=s(tr,"SPAN",{});var Oc=r(Na);Yd=l(Oc,"BlenderbotSmallForCausalLM"),Oc.forEach(t),tr.forEach(t),js=m(o),Mt=s(o,"DIV",{class:!0});var or=r(Mt);v(on.$$.fragment,or),Zd=m(or),Yt=s(or,"DIV",{class:!0});var nr=r(Yt);v(nn.$$.fragment,nr),Qd=m(nr),v(Zt.$$.fragment,nr),nr.forEach(t),or.forEach(t),Es=m(o),jt=s(o,"H2",{class:!0});var ar=r(jt);Qt=s(ar,"A",{id:!0,class:!0,href:!0});var Nc=r(Qt);La=s(Nc,"SPAN",{});var Lc=r(La);v(an.$$.fragment,Lc),Lc.forEach(t),Nc.forEach(t),el=m(ar),Ia=s(ar,"SPAN",{});var Ic=r(Ia);tl=l(Ic,"TFBlenderbotSmallModel"),Ic.forEach(t),ar.forEach(t),Cs=m(o),me=s(o,"DIV",{class:!0});var ft=r(me);v(sn.$$.fragment,ft),ol=m(ft),rn=s(ft,"P",{});var sr=r(rn);nl=l(sr,`The bare BLENDERBOT_SMALL Model outputting raw hidden-states without any specific head on top.
This model inherits from `),ta=s(sr,"A",{href:!0});var Dc=r(ta);al=l(Dc,"TFPreTrainedModel"),Dc.forEach(t),sl=l(sr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),sr.forEach(t),rl=m(ft),dn=s(ft,"P",{});var rr=r(dn);dl=l(rr,"This model is also a "),ln=s(rr,"A",{href:!0,rel:!0});var Gc=r(ln);ll=l(Gc,"tf.keras.Model"),Gc.forEach(t),il=l(rr,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),rr.forEach(t),cl=m(ft),v(eo.$$.fragment,ft),pl=m(ft),De=s(ft,"DIV",{class:!0});var Fo=r(De);v(cn.$$.fragment,Fo),ml=m(Fo),Et=s(Fo,"P",{});var _a=r(Et);ul=l(_a,"The "),oa=s(_a,"A",{href:!0});var Wc=r(oa);hl=l(Wc,"TFBlenderbotSmallModel"),Wc.forEach(t),fl=l(_a," forward method, overrides the "),Da=s(_a,"CODE",{});var Rc=r(Da);_l=l(Rc,"__call__"),Rc.forEach(t),gl=l(_a," special method."),_a.forEach(t),bl=m(Fo),v(to.$$.fragment,Fo),kl=m(Fo),v(oo.$$.fragment,Fo),Fo.forEach(t),ft.forEach(t),As=m(o),Ct=s(o,"H2",{class:!0});var dr=r(Ct);no=s(dr,"A",{id:!0,class:!0,href:!0});var Uc=r(no);Ga=s(Uc,"SPAN",{});var Hc=r(Ga);v(pn.$$.fragment,Hc),Hc.forEach(t),Uc.forEach(t),yl=m(dr),Wa=s(dr,"SPAN",{});var Vc=r(Wa);vl=l(Vc,"TFBlenderbotSmallForConditionalGeneration"),Vc.forEach(t),dr.forEach(t),Ps=m(o),ue=s(o,"DIV",{class:!0});var _t=r(ue);v(mn.$$.fragment,_t),Tl=m(_t),un=s(_t,"P",{});var lr=r(un);wl=l(lr,`The BLENDERBOT_SMALL Model with a language modeling head. Can be used for summarization.
This model inherits from `),na=s(lr,"A",{href:!0});var Kc=r(na);$l=l(Kc,"TFPreTrainedModel"),Kc.forEach(t),xl=l(lr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),lr.forEach(t),zl=m(_t),hn=s(_t,"P",{});var ir=r(hn);Sl=l(ir,"This model is also a "),fn=s(ir,"A",{href:!0,rel:!0});var Jc=r(fn);Fl=l(Jc,"tf.keras.Model"),Jc.forEach(t),Bl=l(ir,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ir.forEach(t),ql=m(_t),v(ao.$$.fragment,_t),Ml=m(_t),Ge=s(_t,"DIV",{class:!0});var Bo=r(Ge);v(_n.$$.fragment,Bo),jl=m(Bo),At=s(Bo,"P",{});var ga=r(At);El=l(ga,"The "),aa=s(ga,"A",{href:!0});var Xc=r(aa);Cl=l(Xc,"TFBlenderbotSmallForConditionalGeneration"),Xc.forEach(t),Al=l(ga," forward method, overrides the "),Ra=s(ga,"CODE",{});var Yc=r(Ra);Pl=l(Yc,"__call__"),Yc.forEach(t),Ol=l(ga," special method."),ga.forEach(t),Nl=m(Bo),v(so.$$.fragment,Bo),Ll=m(Bo),v(ro.$$.fragment,Bo),Bo.forEach(t),_t.forEach(t),Os=m(o),Pt=s(o,"H2",{class:!0});var cr=r(Pt);lo=s(cr,"A",{id:!0,class:!0,href:!0});var Zc=r(lo);Ua=s(Zc,"SPAN",{});var Qc=r(Ua);v(gn.$$.fragment,Qc),Qc.forEach(t),Zc.forEach(t),Il=m(cr),Ha=s(cr,"SPAN",{});var ep=r(Ha);Dl=l(ep,"FlaxBlenderbotSmallModel"),ep.forEach(t),cr.forEach(t),Ns=m(o),I=s(o,"DIV",{class:!0});var se=r(I);v(bn.$$.fragment,se),Gl=m(se),kn=s(se,"P",{});var pr=r(kn);Wl=l(pr,`The bare BlenderbotSmall Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),sa=s(pr,"A",{href:!0});var tp=r(sa);Rl=l(tp,"FlaxPreTrainedModel"),tp.forEach(t),Ul=l(pr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),pr.forEach(t),Hl=m(se),yn=s(se,"P",{});var mr=r(yn);Vl=l(mr,`This model is also a Flax Linen
`),vn=s(mr,"A",{href:!0,rel:!0});var op=r(vn);Kl=l(op,"flax.nn.Module"),op.forEach(t),Jl=l(mr,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),mr.forEach(t),Xl=m(se),Va=s(se,"P",{});var np=r(Va);Yl=l(np,"Finally, this model supports inherent JAX features such as:"),np.forEach(t),Zl=m(se),ct=s(se,"UL",{});var qo=r(ct);Ka=s(qo,"LI",{});var ap=r(Ka);Tn=s(ap,"A",{href:!0,rel:!0});var sp=r(Tn);Ql=l(sp,"Just-In-Time (JIT) compilation"),sp.forEach(t),ap.forEach(t),ei=m(qo),Ja=s(qo,"LI",{});var rp=r(Ja);wn=s(rp,"A",{href:!0,rel:!0});var dp=r(wn);ti=l(dp,"Automatic Differentiation"),dp.forEach(t),rp.forEach(t),oi=m(qo),Xa=s(qo,"LI",{});var lp=r(Xa);$n=s(lp,"A",{href:!0,rel:!0});var ip=r($n);ni=l(ip,"Vectorization"),ip.forEach(t),lp.forEach(t),ai=m(qo),Ya=s(qo,"LI",{});var cp=r(Ya);xn=s(cp,"A",{href:!0,rel:!0});var pp=r(xn);si=l(pp,"Parallelization"),pp.forEach(t),cp.forEach(t),qo.forEach(t),ri=m(se),io=s(se,"DIV",{class:!0});var ur=r(io);v(zn.$$.fragment,ur),di=m(ur),v(co.$$.fragment,ur),ur.forEach(t),li=m(se),po=s(se,"DIV",{class:!0});var hr=r(po);v(Sn.$$.fragment,hr),ii=m(hr),v(mo.$$.fragment,hr),hr.forEach(t),ci=m(se),uo=s(se,"DIV",{class:!0});var fr=r(uo);v(Fn.$$.fragment,fr),pi=m(fr),v(ho.$$.fragment,fr),fr.forEach(t),se.forEach(t),Ls=m(o),Ot=s(o,"H2",{class:!0});var _r=r(Ot);fo=s(_r,"A",{id:!0,class:!0,href:!0});var mp=r(fo);Za=s(mp,"SPAN",{});var up=r(Za);v(Bn.$$.fragment,up),up.forEach(t),mp.forEach(t),mi=m(_r),Qa=s(_r,"SPAN",{});var hp=r(Qa);ui=l(hp,"FlaxBlenderbotForConditionalGeneration"),hp.forEach(t),_r.forEach(t),Is=m(o),D=s(o,"DIV",{class:!0});var re=r(D);v(qn.$$.fragment,re),hi=m(re),Mn=s(re,"P",{});var gr=r(Mn);fi=l(gr,`The BLENDERBOT_SMALL Model with a language modeling head. Can be used for summarization.
This model inherits from `),ra=s(gr,"A",{href:!0});var fp=r(ra);_i=l(fp,"FlaxPreTrainedModel"),fp.forEach(t),gi=l(gr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),gr.forEach(t),bi=m(re),jn=s(re,"P",{});var br=r(jn);ki=l(br,`This model is also a Flax Linen
`),En=s(br,"A",{href:!0,rel:!0});var _p=r(En);yi=l(_p,"flax.nn.Module"),_p.forEach(t),vi=l(br,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),br.forEach(t),Ti=m(re),es=s(re,"P",{});var gp=r(es);wi=l(gp,"Finally, this model supports inherent JAX features such as:"),gp.forEach(t),$i=m(re),pt=s(re,"UL",{});var Mo=r(pt);ts=s(Mo,"LI",{});var bp=r(ts);Cn=s(bp,"A",{href:!0,rel:!0});var kp=r(Cn);xi=l(kp,"Just-In-Time (JIT) compilation"),kp.forEach(t),bp.forEach(t),zi=m(Mo),os=s(Mo,"LI",{});var yp=r(os);An=s(yp,"A",{href:!0,rel:!0});var vp=r(An);Si=l(vp,"Automatic Differentiation"),vp.forEach(t),yp.forEach(t),Fi=m(Mo),ns=s(Mo,"LI",{});var Tp=r(ns);Pn=s(Tp,"A",{href:!0,rel:!0});var wp=r(Pn);Bi=l(wp,"Vectorization"),wp.forEach(t),Tp.forEach(t),qi=m(Mo),as=s(Mo,"LI",{});var $p=r(as);On=s($p,"A",{href:!0,rel:!0});var xp=r(On);Mi=l(xp,"Parallelization"),xp.forEach(t),$p.forEach(t),Mo.forEach(t),ji=m(re),ke=s(re,"DIV",{class:!0});var gt=r(ke);v(Nn.$$.fragment,gt),Ei=m(gt),Nt=s(gt,"P",{});var ba=r(Nt);Ci=l(ba,"The "),ss=s(ba,"CODE",{});var zp=r(ss);Ai=l(zp,"FlaxBlenderbotSmallPreTrainedModel"),zp.forEach(t),Pi=l(ba," forward method, overrides the "),rs=s(ba,"CODE",{});var Sp=r(rs);Oi=l(Sp,"__call__"),Sp.forEach(t),Ni=l(ba," special method."),ba.forEach(t),Li=m(gt),v(_o.$$.fragment,gt),Ii=m(gt),v(go.$$.fragment,gt),Di=m(gt),v(bo.$$.fragment,gt),gt.forEach(t),Gi=m(re),ko=s(re,"DIV",{class:!0});var kr=r(ko);v(Ln.$$.fragment,kr),Wi=m(kr),v(yo.$$.fragment,kr),kr.forEach(t),Ri=m(re),vo=s(re,"DIV",{class:!0});var yr=r(vo);v(In.$$.fragment,yr),Ui=m(yr),v(To.$$.fragment,yr),yr.forEach(t),re.forEach(t),this.h()},h(){h(i,"name","hf:doc:metadata"),h(i,"content",JSON.stringify(em)),h(u,"id","blenderbot-small"),h(u,"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"),h(u,"href","#blenderbot-small"),h(f,"class","relative group"),h(Q,"href","/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallModel"),h(V,"href","/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallForConditionalGeneration"),h(W,"href","https://huggingface.co/facebook/blenderbot-90M"),h(W,"rel","nofollow"),h(K,"href","/docs/transformers/main/en/model_doc/blenderbot#transformers.BlenderbotModel"),h(J,"href","/docs/transformers/main/en/model_doc/blenderbot#transformers.BlenderbotForConditionalGeneration"),h(ee,"id","overview"),h(ee,"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"),h(ee,"href","#overview"),h(N,"class","relative group"),h(R,"href","https://arxiv.org/pdf/2004.13637.pdf"),h(R,"rel","nofollow"),h(ie,"href","https://huggingface.co/patrickvonplaten"),h(ie,"rel","nofollow"),h(we,"href","https://github.com/facebookresearch/ParlAI"),h(we,"rel","nofollow"),h(ge,"id","transformers.BlenderbotSmallConfig"),h(ge,"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"),h(ge,"href","#transformers.BlenderbotSmallConfig"),h(B,"class","relative group"),h(be,"href","/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallModel"),h(Fe,"href","https://huggingface.co/facebook/blenderbot_small-90M"),h(Fe,"rel","nofollow"),h(Un,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),h(Hn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),h(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(It,"id","transformers.BlenderbotSmallTokenizer"),h(It,"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"),h(It,"href","#transformers.BlenderbotSmallTokenizer"),h(wt,"class","relative group"),h(Vn,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),h(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Jn,"href","../glossary#token-type-ids"),h(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Xn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Gt,"id","transformers.BlenderbotSmallTokenizerFast"),h(Gt,"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"),h(Gt,"href","#transformers.BlenderbotSmallTokenizerFast"),h(xt,"class","relative group"),h(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Rt,"id","transformers.BlenderbotSmallModel"),h(Rt,"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"),h(Rt,"href","#transformers.BlenderbotSmallModel"),h(zt,"class","relative group"),h(Yn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Vo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Vo,"rel","nofollow"),h(Zn,"href","/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallModel"),h(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Vt,"id","transformers.BlenderbotSmallForConditionalGeneration"),h(Vt,"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"),h(Vt,"href","#transformers.BlenderbotSmallForConditionalGeneration"),h(Ft,"class","relative group"),h(Qn,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Qo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Qo,"rel","nofollow"),h(ea,"href","/docs/transformers/main/en/model_doc/blenderbot-small#transformers.BlenderbotSmallForConditionalGeneration"),h(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Xt,"id","transformers.BlenderbotSmallForCausalLM"),h(Xt,"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"),h(Xt,"href","#transformers.BlenderbotSmallForCausalLM"),h(qt,"class","relative group"),h(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Qt,"id","transformers.TFBlenderbotSmallModel"),h(Qt,"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"),h(Qt,"href","#transformers.TFBlenderbotSmallModel"),h(jt,"class","relative group"),h(ta,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(ln,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(ln,"rel","nofollow"),h(oa,"href","/docs/transformers/main/en/model_doc/blenderbot-small#transformers.TFBlenderbotSmallModel"),h(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(no,"id","transformers.TFBlenderbotSmallForConditionalGeneration"),h(no,"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"),h(no,"href","#transformers.TFBlenderbotSmallForConditionalGeneration"),h(Ct,"class","relative group"),h(na,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(fn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(fn,"rel","nofollow"),h(aa,"href","/docs/transformers/main/en/model_doc/blenderbot-small#transformers.TFBlenderbotSmallForConditionalGeneration"),h(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(lo,"id","transformers.FlaxBlenderbotSmallModel"),h(lo,"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"),h(lo,"href","#transformers.FlaxBlenderbotSmallModel"),h(Pt,"class","relative group"),h(sa,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(vn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),h(vn,"rel","nofollow"),h(Tn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Tn,"rel","nofollow"),h(wn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(wn,"rel","nofollow"),h($n,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h($n,"rel","nofollow"),h(xn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(xn,"rel","nofollow"),h(io,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(fo,"id","transformers.FlaxBlenderbotSmallForConditionalGeneration"),h(fo,"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"),h(fo,"href","#transformers.FlaxBlenderbotSmallForConditionalGeneration"),h(Ot,"class","relative group"),h(ra,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(En,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),h(En,"rel","nofollow"),h(Cn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Cn,"rel","nofollow"),h(An,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(An,"rel","nofollow"),h(Pn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Pn,"rel","nofollow"),h(On,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(On,"rel","nofollow"),h(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ko,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,g){e(document.head,i),_(o,k,g),_(o,f,g),e(f,u),e(u,b),T(n,b,null),e(f,c),e(f,M),e(M,Re),_(o,Ce,g),_(o,j,g),e(j,Ue),e(j,Q),e(Q,F),e(j,He),e(j,V),e(V,Ve),e(j,Ke),e(j,W),e(W,Je),e(j,Xe),e(j,K),e(K,Ye),e(j,Ze),e(j,J),e(J,Qe),_(o,Ae,g),_(o,N,g),e(N,ee),e(ee,Te),T(X,Te,null),e(N,A),e(N,P),e(P,et),_(o,te,g),_(o,oe,g),e(oe,tt),e(oe,R),e(R,ot),e(oe,nt),_(o,O,g),_(o,he,g),e(he,de),_(o,Pe,g),_(o,fe,g),e(fe,Y),e(Y,at),_(o,Oe,g),_(o,G,g),e(G,st),_(o,ne,g),_(o,_e,g),e(_e,le),e(le,L),_(o,Ne,g),_(o,E,g),e(E,rt),e(E,ie),e(ie,z),e(E,q),e(E,we),e(we,$e),e(E,bt),_(o,mt,g),_(o,B,g),e(B,ge),e(ge,dt),T(xe,dt,null),e(B,kt),e(B,lt),e(lt,Z),_(o,ae,g),_(o,U,g),T(ze,U,null),e(U,ce),e(U,pe),e(pe,yt),e(pe,be),e(be,vt),e(pe,Se),e(pe,Fe),e(Fe,vr),e(pe,Tr),e(U,wr),e(U,Tt),e(Tt,$r),e(Tt,Un),e(Un,xr),e(Tt,zr),e(Tt,Hn),e(Hn,Sr),e(Tt,Fr),e(U,Br),T(Lt,U,null),_(o,ws,g),_(o,wt,g),e(wt,It),e(It,ka),T(jo,ka,null),e(wt,qr),e(wt,ya),e(ya,Mr),_(o,$s,g),_(o,H,g),T(Eo,H,null),e(H,jr),e(H,va),e(va,Er),e(H,Cr),e(H,Co),e(Co,Ar),e(Co,Vn),e(Vn,Pr),e(Co,Or),e(H,Nr),e(H,ut),T(Ao,ut,null),e(ut,Lr),e(ut,Ta),e(Ta,Ir),e(ut,Dr),e(ut,wa),e(wa,Gr),e(H,Wr),e(H,Dt),T(Po,Dt,null),e(Dt,Rr),e(Dt,$t),e($t,Ur),e($t,$a),e($a,Hr),e($t,Vr),e($t,xa),e(xa,Kr),e($t,Jr),e(H,Xr),e(H,ht),T(Oo,ht,null),e(ht,Yr),e(ht,Kn),e(Kn,Zr),e(Kn,Jn),e(Jn,Qr),e(ht,ed),e(ht,za),e(za,td),e(H,od),e(H,Xn),T(No,Xn,null),_(o,xs,g),_(o,xt,g),e(xt,Gt),e(Gt,Sa),T(Lo,Sa,null),e(xt,nd),e(xt,Fa),e(Fa,ad),_(o,zs,g),_(o,it,g),T(Io,it,null),e(it,sd),e(it,Do),e(Do,rd),e(Do,Ba),e(Ba,dd),e(Do,ld),e(it,id),e(it,Wt),T(Go,Wt,null),e(Wt,cd),e(Wt,qa),e(qa,pd),_(o,Ss,g),_(o,zt,g),e(zt,Rt),e(Rt,Ma),T(Wo,Ma,null),e(zt,md),e(zt,ja),e(ja,ud),_(o,Fs,g),_(o,Be,g),T(Ro,Be,null),e(Be,hd),e(Be,Uo),e(Uo,fd),e(Uo,Yn),e(Yn,_d),e(Uo,gd),e(Be,bd),e(Be,Ho),e(Ho,kd),e(Ho,Vo),e(Vo,yd),e(Ho,vd),e(Be,Td),e(Be,Le),T(Ko,Le,null),e(Le,wd),e(Le,St),e(St,$d),e(St,Zn),e(Zn,xd),e(St,zd),e(St,Ea),e(Ea,Sd),e(St,Fd),e(Le,Bd),T(Ut,Le,null),e(Le,qd),T(Ht,Le,null),_(o,Bs,g),_(o,Ft,g),e(Ft,Vt),e(Vt,Ca),T(Jo,Ca,null),e(Ft,Md),e(Ft,Aa),e(Aa,jd),_(o,qs,g),_(o,qe,g),T(Xo,qe,null),e(qe,Ed),e(qe,Yo),e(Yo,Cd),e(Yo,Qn),e(Qn,Ad),e(Yo,Pd),e(qe,Od),e(qe,Zo),e(Zo,Nd),e(Zo,Qo),e(Qo,Ld),e(Zo,Id),e(qe,Dd),e(qe,Ie),T(en,Ie,null),e(Ie,Gd),e(Ie,Bt),e(Bt,Wd),e(Bt,ea),e(ea,Rd),e(Bt,Ud),e(Bt,Pa),e(Pa,Hd),e(Bt,Vd),e(Ie,Kd),T(Kt,Ie,null),e(Ie,Jd),T(Jt,Ie,null),_(o,Ms,g),_(o,qt,g),e(qt,Xt),e(Xt,Oa),T(tn,Oa,null),e(qt,Xd),e(qt,Na),e(Na,Yd),_(o,js,g),_(o,Mt,g),T(on,Mt,null),e(Mt,Zd),e(Mt,Yt),T(nn,Yt,null),e(Yt,Qd),T(Zt,Yt,null),_(o,Es,g),_(o,jt,g),e(jt,Qt),e(Qt,La),T(an,La,null),e(jt,el),e(jt,Ia),e(Ia,tl),_(o,Cs,g),_(o,me,g),T(sn,me,null),e(me,ol),e(me,rn),e(rn,nl),e(rn,ta),e(ta,al),e(rn,sl),e(me,rl),e(me,dn),e(dn,dl),e(dn,ln),e(ln,ll),e(dn,il),e(me,cl),T(eo,me,null),e(me,pl),e(me,De),T(cn,De,null),e(De,ml),e(De,Et),e(Et,ul),e(Et,oa),e(oa,hl),e(Et,fl),e(Et,Da),e(Da,_l),e(Et,gl),e(De,bl),T(to,De,null),e(De,kl),T(oo,De,null),_(o,As,g),_(o,Ct,g),e(Ct,no),e(no,Ga),T(pn,Ga,null),e(Ct,yl),e(Ct,Wa),e(Wa,vl),_(o,Ps,g),_(o,ue,g),T(mn,ue,null),e(ue,Tl),e(ue,un),e(un,wl),e(un,na),e(na,$l),e(un,xl),e(ue,zl),e(ue,hn),e(hn,Sl),e(hn,fn),e(fn,Fl),e(hn,Bl),e(ue,ql),T(ao,ue,null),e(ue,Ml),e(ue,Ge),T(_n,Ge,null),e(Ge,jl),e(Ge,At),e(At,El),e(At,aa),e(aa,Cl),e(At,Al),e(At,Ra),e(Ra,Pl),e(At,Ol),e(Ge,Nl),T(so,Ge,null),e(Ge,Ll),T(ro,Ge,null),_(o,Os,g),_(o,Pt,g),e(Pt,lo),e(lo,Ua),T(gn,Ua,null),e(Pt,Il),e(Pt,Ha),e(Ha,Dl),_(o,Ns,g),_(o,I,g),T(bn,I,null),e(I,Gl),e(I,kn),e(kn,Wl),e(kn,sa),e(sa,Rl),e(kn,Ul),e(I,Hl),e(I,yn),e(yn,Vl),e(yn,vn),e(vn,Kl),e(yn,Jl),e(I,Xl),e(I,Va),e(Va,Yl),e(I,Zl),e(I,ct),e(ct,Ka),e(Ka,Tn),e(Tn,Ql),e(ct,ei),e(ct,Ja),e(Ja,wn),e(wn,ti),e(ct,oi),e(ct,Xa),e(Xa,$n),e($n,ni),e(ct,ai),e(ct,Ya),e(Ya,xn),e(xn,si),e(I,ri),e(I,io),T(zn,io,null),e(io,di),T(co,io,null),e(I,li),e(I,po),T(Sn,po,null),e(po,ii),T(mo,po,null),e(I,ci),e(I,uo),T(Fn,uo,null),e(uo,pi),T(ho,uo,null),_(o,Ls,g),_(o,Ot,g),e(Ot,fo),e(fo,Za),T(Bn,Za,null),e(Ot,mi),e(Ot,Qa),e(Qa,ui),_(o,Is,g),_(o,D,g),T(qn,D,null),e(D,hi),e(D,Mn),e(Mn,fi),e(Mn,ra),e(ra,_i),e(Mn,gi),e(D,bi),e(D,jn),e(jn,ki),e(jn,En),e(En,yi),e(jn,vi),e(D,Ti),e(D,es),e(es,wi),e(D,$i),e(D,pt),e(pt,ts),e(ts,Cn),e(Cn,xi),e(pt,zi),e(pt,os),e(os,An),e(An,Si),e(pt,Fi),e(pt,ns),e(ns,Pn),e(Pn,Bi),e(pt,qi),e(pt,as),e(as,On),e(On,Mi),e(D,ji),e(D,ke),T(Nn,ke,null),e(ke,Ei),e(ke,Nt),e(Nt,Ci),e(Nt,ss),e(ss,Ai),e(Nt,Pi),e(Nt,rs),e(rs,Oi),e(Nt,Ni),e(ke,Li),T(_o,ke,null),e(ke,Ii),T(go,ke,null),e(ke,Di),T(bo,ke,null),e(D,Gi),e(D,ko),T(Ln,ko,null),e(ko,Wi),T(yo,ko,null),e(D,Ri),e(D,vo),T(In,vo,null),e(vo,Ui),T(To,vo,null),Ds=!0},p(o,[g]){const Dn={};g&2&&(Dn.$$scope={dirty:g,ctx:o}),Lt.$set(Dn);const ds={};g&2&&(ds.$$scope={dirty:g,ctx:o}),Ut.$set(ds);const ls={};g&2&&(ls.$$scope={dirty:g,ctx:o}),Ht.$set(ls);const is={};g&2&&(is.$$scope={dirty:g,ctx:o}),Kt.$set(is);const ye={};g&2&&(ye.$$scope={dirty:g,ctx:o}),Jt.$set(ye);const cs={};g&2&&(cs.$$scope={dirty:g,ctx:o}),Zt.$set(cs);const ps={};g&2&&(ps.$$scope={dirty:g,ctx:o}),eo.$set(ps);const ms={};g&2&&(ms.$$scope={dirty:g,ctx:o}),to.$set(ms);const us={};g&2&&(us.$$scope={dirty:g,ctx:o}),oo.$set(us);const hs={};g&2&&(hs.$$scope={dirty:g,ctx:o}),ao.$set(hs);const Gn={};g&2&&(Gn.$$scope={dirty:g,ctx:o}),so.$set(Gn);const fs={};g&2&&(fs.$$scope={dirty:g,ctx:o}),ro.$set(fs);const _s={};g&2&&(_s.$$scope={dirty:g,ctx:o}),co.$set(_s);const gs={};g&2&&(gs.$$scope={dirty:g,ctx:o}),mo.$set(gs);const Wn={};g&2&&(Wn.$$scope={dirty:g,ctx:o}),ho.$set(Wn);const bs={};g&2&&(bs.$$scope={dirty:g,ctx:o}),_o.$set(bs);const ks={};g&2&&(ks.$$scope={dirty:g,ctx:o}),go.$set(ks);const ys={};g&2&&(ys.$$scope={dirty:g,ctx:o}),bo.$set(ys);const vs={};g&2&&(vs.$$scope={dirty:g,ctx:o}),yo.$set(vs);const Ts={};g&2&&(Ts.$$scope={dirty:g,ctx:o}),To.$set(Ts)},i(o){Ds||(w(n.$$.fragment,o),w(X.$$.fragment,o),w(xe.$$.fragment,o),w(ze.$$.fragment,o),w(Lt.$$.fragment,o),w(jo.$$.fragment,o),w(Eo.$$.fragment,o),w(Ao.$$.fragment,o),w(Po.$$.fragment,o),w(Oo.$$.fragment,o),w(No.$$.fragment,o),w(Lo.$$.fragment,o),w(Io.$$.fragment,o),w(Go.$$.fragment,o),w(Wo.$$.fragment,o),w(Ro.$$.fragment,o),w(Ko.$$.fragment,o),w(Ut.$$.fragment,o),w(Ht.$$.fragment,o),w(Jo.$$.fragment,o),w(Xo.$$.fragment,o),w(en.$$.fragment,o),w(Kt.$$.fragment,o),w(Jt.$$.fragment,o),w(tn.$$.fragment,o),w(on.$$.fragment,o),w(nn.$$.fragment,o),w(Zt.$$.fragment,o),w(an.$$.fragment,o),w(sn.$$.fragment,o),w(eo.$$.fragment,o),w(cn.$$.fragment,o),w(to.$$.fragment,o),w(oo.$$.fragment,o),w(pn.$$.fragment,o),w(mn.$$.fragment,o),w(ao.$$.fragment,o),w(_n.$$.fragment,o),w(so.$$.fragment,o),w(ro.$$.fragment,o),w(gn.$$.fragment,o),w(bn.$$.fragment,o),w(zn.$$.fragment,o),w(co.$$.fragment,o),w(Sn.$$.fragment,o),w(mo.$$.fragment,o),w(Fn.$$.fragment,o),w(ho.$$.fragment,o),w(Bn.$$.fragment,o),w(qn.$$.fragment,o),w(Nn.$$.fragment,o),w(_o.$$.fragment,o),w(go.$$.fragment,o),w(bo.$$.fragment,o),w(Ln.$$.fragment,o),w(yo.$$.fragment,o),w(In.$$.fragment,o),w(To.$$.fragment,o),Ds=!0)},o(o){$(n.$$.fragment,o),$(X.$$.fragment,o),$(xe.$$.fragment,o),$(ze.$$.fragment,o),$(Lt.$$.fragment,o),$(jo.$$.fragment,o),$(Eo.$$.fragment,o),$(Ao.$$.fragment,o),$(Po.$$.fragment,o),$(Oo.$$.fragment,o),$(No.$$.fragment,o),$(Lo.$$.fragment,o),$(Io.$$.fragment,o),$(Go.$$.fragment,o),$(Wo.$$.fragment,o),$(Ro.$$.fragment,o),$(Ko.$$.fragment,o),$(Ut.$$.fragment,o),$(Ht.$$.fragment,o),$(Jo.$$.fragment,o),$(Xo.$$.fragment,o),$(en.$$.fragment,o),$(Kt.$$.fragment,o),$(Jt.$$.fragment,o),$(tn.$$.fragment,o),$(on.$$.fragment,o),$(nn.$$.fragment,o),$(Zt.$$.fragment,o),$(an.$$.fragment,o),$(sn.$$.fragment,o),$(eo.$$.fragment,o),$(cn.$$.fragment,o),$(to.$$.fragment,o),$(oo.$$.fragment,o),$(pn.$$.fragment,o),$(mn.$$.fragment,o),$(ao.$$.fragment,o),$(_n.$$.fragment,o),$(so.$$.fragment,o),$(ro.$$.fragment,o),$(gn.$$.fragment,o),$(bn.$$.fragment,o),$(zn.$$.fragment,o),$(co.$$.fragment,o),$(Sn.$$.fragment,o),$(mo.$$.fragment,o),$(Fn.$$.fragment,o),$(ho.$$.fragment,o),$(Bn.$$.fragment,o),$(qn.$$.fragment,o),$(Nn.$$.fragment,o),$(_o.$$.fragment,o),$(go.$$.fragment,o),$(bo.$$.fragment,o),$(Ln.$$.fragment,o),$(yo.$$.fragment,o),$(In.$$.fragment,o),$(To.$$.fragment,o),Ds=!1},d(o){t(i),o&&t(k),o&&t(f),x(n),o&&t(Ce),o&&t(j),o&&t(Ae),o&&t(N),x(X),o&&t(te),o&&t(oe),o&&t(O),o&&t(he),o&&t(Pe),o&&t(fe),o&&t(Oe),o&&t(G),o&&t(ne),o&&t(_e),o&&t(Ne),o&&t(E),o&&t(mt),o&&t(B),x(xe),o&&t(ae),o&&t(U),x(ze),x(Lt),o&&t(ws),o&&t(wt),x(jo),o&&t($s),o&&t(H),x(Eo),x(Ao),x(Po),x(Oo),x(No),o&&t(xs),o&&t(xt),x(Lo),o&&t(zs),o&&t(it),x(Io),x(Go),o&&t(Ss),o&&t(zt),x(Wo),o&&t(Fs),o&&t(Be),x(Ro),x(Ko),x(Ut),x(Ht),o&&t(Bs),o&&t(Ft),x(Jo),o&&t(qs),o&&t(qe),x(Xo),x(en),x(Kt),x(Jt),o&&t(Ms),o&&t(qt),x(tn),o&&t(js),o&&t(Mt),x(on),x(nn),x(Zt),o&&t(Es),o&&t(jt),x(an),o&&t(Cs),o&&t(me),x(sn),x(eo),x(cn),x(to),x(oo),o&&t(As),o&&t(Ct),x(pn),o&&t(Ps),o&&t(ue),x(mn),x(ao),x(_n),x(so),x(ro),o&&t(Os),o&&t(Pt),x(gn),o&&t(Ns),o&&t(I),x(bn),x(zn),x(co),x(Sn),x(mo),x(Fn),x(ho),o&&t(Ls),o&&t(Ot),x(Bn),o&&t(Is),o&&t(D),x(qn),x(Nn),x(_o),x(go),x(bo),x(Ln),x(yo),x(In),x(To)}}}const em={local:"blenderbot-small",sections:[{local:"overview",title:"Overview"},{local:"transformers.BlenderbotSmallConfig",title:"BlenderbotSmallConfig"},{local:"transformers.BlenderbotSmallTokenizer",title:"BlenderbotSmallTokenizer"},{local:"transformers.BlenderbotSmallTokenizerFast",title:"BlenderbotSmallTokenizerFast"},{local:"transformers.BlenderbotSmallModel",title:"BlenderbotSmallModel"},{local:"transformers.BlenderbotSmallForConditionalGeneration",title:"BlenderbotSmallForConditionalGeneration"},{local:"transformers.BlenderbotSmallForCausalLM",title:"BlenderbotSmallForCausalLM"},{local:"transformers.TFBlenderbotSmallModel",title:"TFBlenderbotSmallModel"},{local:"transformers.TFBlenderbotSmallForConditionalGeneration",title:"TFBlenderbotSmallForConditionalGeneration"},{local:"transformers.FlaxBlenderbotSmallModel",title:"FlaxBlenderbotSmallModel"},{local:"transformers.FlaxBlenderbotSmallForConditionalGeneration",title:"FlaxBlenderbotForConditionalGeneration"}],title:"Blenderbot Small"};function tm(S){return jp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class lm extends Fp{constructor(i){super();Bp(this,i,tm,Qp,qp,{})}}export{lm as default,em as metadata};
