import{S as vp,i as yp,s as kp,e as n,k as c,w as b,t as r,M as bp,c as s,d as t,m as h,a,x as M,h as i,b as d,G as e,g,y as T,q as w,o as L,B as $,v as Mp,L as In}from"../../chunks/vendor-hf-doc-builder.js";import{T as wo}from"../../chunks/Tip-hf-doc-builder.js";import{D as N}from"../../chunks/Docstring-hf-doc-builder.js";import{C as An}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Se}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Pn}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Tp(F){let p,k,f,m,v;return m=new An({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFhHTE1Nb2RlbCUyQyUyMFhHTE1Db25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwWEdMTSUyMGZhY2Vib29rJTJGeGdsbS01NjRNJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFhHTE1Db25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBmYWNlYm9vayUyRnhnbG0tNTY0TSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwWEdMTU1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> XGLMModel, XGLMConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a XGLM facebook/xglm-564M style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = XGLMConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the facebook/xglm-564M style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XGLMModel(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(){p=n("p"),k=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);k=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,k),g(l,f,u),T(m,l,u),v=!0},p:In,i(l){v||(w(m.$$.fragment,l),v=!0)},o(l){L(m.$$.fragment,l),v=!1},d(l){l&&t(p),l&&t(f),$(m,l)}}}function wp(F){let p,k,f,m,v;return{c(){p=n("p"),k=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=r("Module"),v=r(`
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(l){p=s(l,"P",{});var u=a(p);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var G=a(f);m=i(G,"Module"),G.forEach(t),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,p,u),e(p,k),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function Lp(F){let p,k,f,m,v;return m=new An({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYR0xNTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGeGdsbS01NjRNJTIyKSUwQW1vZGVsJTIwJTNEJTIwWEdMTU1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnhnbG0tNTY0TSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XGLMModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/xglm-564M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XGLMModel.from_pretrained(<span class="hljs-string">&quot;facebook/xglm-564M&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>last_hidden_states = outputs.last_hidden_state`}}),{c(){p=n("p"),k=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);k=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,k),g(l,f,u),T(m,l,u),v=!0},p:In,i(l){v||(w(m.$$.fragment,l),v=!0)},o(l){L(m.$$.fragment,l),v=!1},d(l){l&&t(p),l&&t(f),$(m,l)}}}function $p(F){let p,k,f,m,v;return{c(){p=n("p"),k=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=r("Module"),v=r(`
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(l){p=s(l,"P",{});var u=a(p);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var G=a(f);m=i(G,"Module"),G.forEach(t),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,p,u),e(p,k),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function xp(F){let p,k,f,m,v;return m=new An({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFhHTE1Gb3JDYXVzYWxMTSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZhY2Vib29rJTJGeGdsbS01NjRNJTIyKSUwQW1vZGVsJTIwJTNEJTIwWEdMTUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnhnbG0tNTY0TSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XGLMForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/xglm-564M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XGLMForCausalLM.from_pretrained(<span class="hljs-string">&quot;facebook/xglm-564M&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, labels=inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){p=n("p"),k=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);k=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,k),g(l,f,u),T(m,l,u),v=!0},p:In,i(l){v||(w(m.$$.fragment,l),v=!0)},o(l){L(m.$$.fragment,l),v=!1},d(l){l&&t(p),l&&t(f),$(m,l)}}}function Gp(F){let p,k,f,m,v,l,u,G,Ze,Ge,P,ee,ne,x,Re,Z,Ve,Ee,U,He,se,ae,Qe,Xe,B,Ye,Fe,D,Me,Ke,ve,z,I,re,ie,et,le,de,tt,ze,C,te,R,ce,ot,V,nt,Ce,W,Te,S,st,ye,q,oe,A,he,at;return{c(){p=n("p"),k=r("TensorFlow models and layers in "),f=n("code"),m=r("transformers"),v=r(" accept two formats as input:"),l=c(),u=n("ul"),G=n("li"),Ze=r("having all inputs as keyword arguments (like PyTorch models), or"),Ge=c(),P=n("li"),ee=r("having all inputs as a list, tuple or dict in the first positional argument."),ne=c(),x=n("p"),Re=r(`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 `),Z=n("code"),Ve=r("model.fit()"),Ee=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=n("code"),He=r("model.fit()"),se=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=n("code"),Qe=r("fit()"),Xe=r(" and "),B=n("code"),Ye=r("predict()"),Fe=r(`, such as when creating your own layers or models with
the Keras `),D=n("code"),Me=r("Functional"),Ke=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ve=c(),z=n("ul"),I=n("li"),re=r("a single Tensor with "),ie=n("code"),et=r("input_ids"),le=r(" only and nothing else: "),de=n("code"),tt=r("model(input_ids)"),ze=c(),C=n("li"),te=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=n("code"),ce=r("model([input_ids, attention_mask])"),ot=r(" or "),V=n("code"),nt=r("model([input_ids, attention_mask, token_type_ids])"),Ce=c(),W=n("li"),Te=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=n("code"),st=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ye=c(),q=n("p"),oe=r(`Note that when creating models and layers with
`),A=n("a"),he=r("subclassing"),at=r(` 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(y){p=s(y,"P",{});var X=a(p);k=i(X,"TensorFlow models and layers in "),f=s(X,"CODE",{});var ct=a(f);m=i(ct,"transformers"),ct.forEach(t),v=i(X," accept two formats as input:"),X.forEach(t),l=h(y),u=s(y,"UL",{});var j=a(u);G=s(j,"LI",{});var we=a(G);Ze=i(we,"having all inputs as keyword arguments (like PyTorch models), or"),we.forEach(t),Ge=h(j),P=s(j,"LI",{});var _t=a(P);ee=i(_t,"having all inputs as a list, tuple or dict in the first positional argument."),_t.forEach(t),j.forEach(t),ne=h(y),x=s(y,"P",{});var E=a(x);Re=i(E,`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 `),Z=s(E,"CODE",{});var vt=a(Z);Ve=i(vt,"model.fit()"),vt.forEach(t),Ee=i(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=s(E,"CODE",{});var qe=a(U);He=i(qe,"model.fit()"),qe.forEach(t),se=i(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=s(E,"CODE",{});var yt=a(ae);Qe=i(yt,"fit()"),yt.forEach(t),Xe=i(E," and "),B=s(E,"CODE",{});var kt=a(B);Ye=i(kt,"predict()"),kt.forEach(t),Fe=i(E,`, such as when creating your own layers or models with
the Keras `),D=s(E,"CODE",{});var Le=a(D);Me=i(Le,"Functional"),Le.forEach(t),Ke=i(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ve=h(y),z=s(y,"UL",{});var H=a(z);I=s(H,"LI",{});var pe=a(I);re=i(pe,"a single Tensor with "),ie=s(pe,"CODE",{});var bt=a(ie);et=i(bt,"input_ids"),bt.forEach(t),le=i(pe," only and nothing else: "),de=s(pe,"CODE",{});var ue=a(de);tt=i(ue,"model(input_ids)"),ue.forEach(t),pe.forEach(t),ze=h(H),C=s(H,"LI",{});var me=a(C);te=i(me,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=s(me,"CODE",{});var je=a(R);ce=i(je,"model([input_ids, attention_mask])"),je.forEach(t),ot=i(me," or "),V=s(me,"CODE",{});var Mt=a(V);nt=i(Mt,"model([input_ids, attention_mask, token_type_ids])"),Mt.forEach(t),me.forEach(t),Ce=h(H),W=s(H,"LI",{});var rt=a(W);Te=i(rt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=s(rt,"CODE",{});var Pe=a(S);st=i(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),rt.forEach(t),H.forEach(t),ye=h(y),q=s(y,"P",{});var $e=a(q);oe=i($e,`Note that when creating models and layers with
`),A=s($e,"A",{href:!0,rel:!0});var Tt=a(A);he=i(Tt,"subclassing"),Tt.forEach(t),at=i($e,` 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!`),$e.forEach(t),this.h()},h(){d(A,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),d(A,"rel","nofollow")},m(y,X){g(y,p,X),e(p,k),e(p,f),e(f,m),e(p,v),g(y,l,X),g(y,u,X),e(u,G),e(G,Ze),e(u,Ge),e(u,P),e(P,ee),g(y,ne,X),g(y,x,X),e(x,Re),e(x,Z),e(Z,Ve),e(x,Ee),e(x,U),e(U,He),e(x,se),e(x,ae),e(ae,Qe),e(x,Xe),e(x,B),e(B,Ye),e(x,Fe),e(x,D),e(D,Me),e(x,Ke),g(y,ve,X),g(y,z,X),e(z,I),e(I,re),e(I,ie),e(ie,et),e(I,le),e(I,de),e(de,tt),e(z,ze),e(z,C),e(C,te),e(C,R),e(R,ce),e(C,ot),e(C,V),e(V,nt),e(z,Ce),e(z,W),e(W,Te),e(W,S),e(S,st),g(y,ye,X),g(y,q,X),e(q,oe),e(q,A),e(A,he),e(q,at)},d(y){y&&t(p),y&&t(l),y&&t(u),y&&t(ne),y&&t(x),y&&t(ve),y&&t(z),y&&t(ye),y&&t(q)}}}function Ep(F){let p,k,f,m,v;return{c(){p=n("p"),k=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=r("Module"),v=r(`
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(l){p=s(l,"P",{});var u=a(p);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var G=a(f);m=i(G,"Module"),G.forEach(t),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,p,u),e(p,k),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function Xp(F){let p,k,f,m,v;return m=new An({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhHTE1Nb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ4Z2xtLTU2NE0lMjIpJTBBbW9kZWwlMjAlM0QlMjBURlhHTE1Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ4Z2xtLTU2NE0lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXGLMModel
<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/xglm-564M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXGLMModel.from_pretrained(<span class="hljs-string">&quot;facebook/xglm-564M&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(){p=n("p"),k=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);k=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,k),g(l,f,u),T(m,l,u),v=!0},p:In,i(l){v||(w(m.$$.fragment,l),v=!0)},o(l){L(m.$$.fragment,l),v=!1},d(l){l&&t(p),l&&t(f),$(m,l)}}}function Fp(F){let p,k,f,m,v,l,u,G,Ze,Ge,P,ee,ne,x,Re,Z,Ve,Ee,U,He,se,ae,Qe,Xe,B,Ye,Fe,D,Me,Ke,ve,z,I,re,ie,et,le,de,tt,ze,C,te,R,ce,ot,V,nt,Ce,W,Te,S,st,ye,q,oe,A,he,at;return{c(){p=n("p"),k=r("TensorFlow models and layers in "),f=n("code"),m=r("transformers"),v=r(" accept two formats as input:"),l=c(),u=n("ul"),G=n("li"),Ze=r("having all inputs as keyword arguments (like PyTorch models), or"),Ge=c(),P=n("li"),ee=r("having all inputs as a list, tuple or dict in the first positional argument."),ne=c(),x=n("p"),Re=r(`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 `),Z=n("code"),Ve=r("model.fit()"),Ee=r(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=n("code"),He=r("model.fit()"),se=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=n("code"),Qe=r("fit()"),Xe=r(" and "),B=n("code"),Ye=r("predict()"),Fe=r(`, such as when creating your own layers or models with
the Keras `),D=n("code"),Me=r("Functional"),Ke=r(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ve=c(),z=n("ul"),I=n("li"),re=r("a single Tensor with "),ie=n("code"),et=r("input_ids"),le=r(" only and nothing else: "),de=n("code"),tt=r("model(input_ids)"),ze=c(),C=n("li"),te=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=n("code"),ce=r("model([input_ids, attention_mask])"),ot=r(" or "),V=n("code"),nt=r("model([input_ids, attention_mask, token_type_ids])"),Ce=c(),W=n("li"),Te=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=n("code"),st=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ye=c(),q=n("p"),oe=r(`Note that when creating models and layers with
`),A=n("a"),he=r("subclassing"),at=r(` 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(y){p=s(y,"P",{});var X=a(p);k=i(X,"TensorFlow models and layers in "),f=s(X,"CODE",{});var ct=a(f);m=i(ct,"transformers"),ct.forEach(t),v=i(X," accept two formats as input:"),X.forEach(t),l=h(y),u=s(y,"UL",{});var j=a(u);G=s(j,"LI",{});var we=a(G);Ze=i(we,"having all inputs as keyword arguments (like PyTorch models), or"),we.forEach(t),Ge=h(j),P=s(j,"LI",{});var _t=a(P);ee=i(_t,"having all inputs as a list, tuple or dict in the first positional argument."),_t.forEach(t),j.forEach(t),ne=h(y),x=s(y,"P",{});var E=a(x);Re=i(E,`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 `),Z=s(E,"CODE",{});var vt=a(Z);Ve=i(vt,"model.fit()"),vt.forEach(t),Ee=i(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=s(E,"CODE",{});var qe=a(U);He=i(qe,"model.fit()"),qe.forEach(t),se=i(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=s(E,"CODE",{});var yt=a(ae);Qe=i(yt,"fit()"),yt.forEach(t),Xe=i(E," and "),B=s(E,"CODE",{});var kt=a(B);Ye=i(kt,"predict()"),kt.forEach(t),Fe=i(E,`, such as when creating your own layers or models with
the Keras `),D=s(E,"CODE",{});var Le=a(D);Me=i(Le,"Functional"),Le.forEach(t),Ke=i(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ve=h(y),z=s(y,"UL",{});var H=a(z);I=s(H,"LI",{});var pe=a(I);re=i(pe,"a single Tensor with "),ie=s(pe,"CODE",{});var bt=a(ie);et=i(bt,"input_ids"),bt.forEach(t),le=i(pe," only and nothing else: "),de=s(pe,"CODE",{});var ue=a(de);tt=i(ue,"model(input_ids)"),ue.forEach(t),pe.forEach(t),ze=h(H),C=s(H,"LI",{});var me=a(C);te=i(me,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=s(me,"CODE",{});var je=a(R);ce=i(je,"model([input_ids, attention_mask])"),je.forEach(t),ot=i(me," or "),V=s(me,"CODE",{});var Mt=a(V);nt=i(Mt,"model([input_ids, attention_mask, token_type_ids])"),Mt.forEach(t),me.forEach(t),Ce=h(H),W=s(H,"LI",{});var rt=a(W);Te=i(rt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=s(rt,"CODE",{});var Pe=a(S);st=i(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),rt.forEach(t),H.forEach(t),ye=h(y),q=s(y,"P",{});var $e=a(q);oe=i($e,`Note that when creating models and layers with
`),A=s($e,"A",{href:!0,rel:!0});var Tt=a(A);he=i(Tt,"subclassing"),Tt.forEach(t),at=i($e,` 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!`),$e.forEach(t),this.h()},h(){d(A,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),d(A,"rel","nofollow")},m(y,X){g(y,p,X),e(p,k),e(p,f),e(f,m),e(p,v),g(y,l,X),g(y,u,X),e(u,G),e(G,Ze),e(u,Ge),e(u,P),e(P,ee),g(y,ne,X),g(y,x,X),e(x,Re),e(x,Z),e(Z,Ve),e(x,Ee),e(x,U),e(U,He),e(x,se),e(x,ae),e(ae,Qe),e(x,Xe),e(x,B),e(B,Ye),e(x,Fe),e(x,D),e(D,Me),e(x,Ke),g(y,ve,X),g(y,z,X),e(z,I),e(I,re),e(I,ie),e(ie,et),e(I,le),e(I,de),e(de,tt),e(z,ze),e(z,C),e(C,te),e(C,R),e(R,ce),e(C,ot),e(C,V),e(V,nt),e(z,Ce),e(z,W),e(W,Te),e(W,S),e(S,st),g(y,ye,X),g(y,q,X),e(q,oe),e(q,A),e(A,he),e(q,at)},d(y){y&&t(p),y&&t(l),y&&t(u),y&&t(ne),y&&t(x),y&&t(ve),y&&t(z),y&&t(ye),y&&t(q)}}}function zp(F){let p,k,f,m,v;return{c(){p=n("p"),k=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=r("Module"),v=r(`
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(l){p=s(l,"P",{});var u=a(p);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var G=a(f);m=i(G,"Module"),G.forEach(t),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,p,u),e(p,k),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function Cp(F){let p,k,f,m,v;return m=new An({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhHTE1Gb3JDYXVzYWxMTSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ4Z2xtLTU2NE0lMjIpJTBBbW9kZWwlMjAlM0QlMjBURlhHTE1Gb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ4Z2xtLTU2NE0lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXGLMForCausalLM
<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/xglm-564M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXGLMForCausalLM.from_pretrained(<span class="hljs-string">&quot;facebook/xglm-564M&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>logits = outputs.logits`}}),{c(){p=n("p"),k=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);k=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,k),g(l,f,u),T(m,l,u),v=!0},p:In,i(l){v||(w(m.$$.fragment,l),v=!0)},o(l){L(m.$$.fragment,l),v=!1},d(l){l&&t(p),l&&t(f),$(m,l)}}}function qp(F){let p,k,f,m,v;return{c(){p=n("p"),k=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=r("Module"),v=r(`
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(l){p=s(l,"P",{});var u=a(p);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var G=a(f);m=i(G,"Module"),G.forEach(t),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,p,u),e(p,k),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function jp(F){let p,k,f,m,v;return m=new An({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4WEdMTU1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ4Z2xtLTU2NE0lMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4WEdMTU1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnhnbG0tNTY0TSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxXGLMModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/xglm-564M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxXGLMModel.from_pretrained(<span class="hljs-string">&quot;facebook/xglm-564M&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(){p=n("p"),k=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);k=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,k),g(l,f,u),T(m,l,u),v=!0},p:In,i(l){v||(w(m.$$.fragment,l),v=!0)},o(l){L(m.$$.fragment,l),v=!1},d(l){l&&t(p),l&&t(f),$(m,l)}}}function Pp(F){let p,k,f,m,v;return{c(){p=n("p"),k=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=n("code"),m=r("Module"),v=r(`
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(l){p=s(l,"P",{});var u=a(p);k=i(u,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s(u,"CODE",{});var G=a(f);m=i(G,"Module"),G.forEach(t),v=i(u,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),u.forEach(t)},m(l,u){g(l,p,u),e(p,k),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function Ip(F){let p,k,f,m,v;return m=new An({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4WEdMTUZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZmFjZWJvb2slMkZ4Z2xtLTU2NE0lMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4WEdMTUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnhnbG0tNTY0TSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQSUyMyUyMHJldHJpZXZlJTIwbG9ndHMlMjBmb3IlMjBuZXh0JTIwdG9rZW4lMEFuZXh0X3Rva2VuX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTVCJTNBJTJDJTIwLTElNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxXGLMForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;facebook/xglm-564M&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxXGLMForCausalLM.from_pretrained(<span class="hljs-string">&quot;facebook/xglm-564M&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve logts for next token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs.logits[:, -<span class="hljs-number">1</span>]`}}),{c(){p=n("p"),k=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);k=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,k),g(l,f,u),T(m,l,u),v=!0},p:In,i(l){v||(w(m.$$.fragment,l),v=!0)},o(l){L(m.$$.fragment,l),v=!1},d(l){l&&t(p),l&&t(f),$(m,l)}}}function Ap(F){let p,k,f,m,v,l,u,G,Ze,Ge,P,ee,ne,x,Re,Z,Ve,Ee,U,He,se,ae,Qe,Xe,B,Ye,Fe,D,Me,Ke,ve,z,I,re,ie,et,le,de,tt,ze,C,te,R,ce,ot,V,nt,Ce,W,Te,S,st,ye,q,oe,A,he,at,y,X,ct,j,we,_t,E,vt,qe,yt,kt,Le,H,pe,bt,ue,me,je,Mt,rt,Pe,$e,Tt,yr,Nt,$a,wt,Ut,gs,Lo,kr,_s,br,xa,J,$o,Mr,it,Tr,Nn,wr,Lr,Un,$r,xr,xo,Gr,Er,Xr,Go,Fr,Wn,zr,Cr,qr,ht,Eo,jr,vs,Pr,Ir,Xo,Jn,Ar,ys,Nr,Ur,On,Wr,ks,Jr,Or,Wt,Fo,Br,zo,Dr,bs,Sr,Zr,Rr,Jt,Co,Vr,Ms,Hr,Qr,Bn,qo,Ga,Lt,Ot,Ts,jo,Yr,ws,Kr,Ea,fe,Po,ei,xe,ti,Ls,oi,ni,Dn,si,ai,Sn,ri,ii,Io,li,di,ci,Ao,hi,Zn,pi,ui,mi,pt,No,fi,$s,gi,_i,Uo,Rn,vi,xs,yi,ki,Vn,bi,Gs,Mi,Ti,Bt,Wo,wi,Es,Li,Xa,$t,Dt,Xs,Jo,$i,Fs,xi,Fa,ge,Oo,Gi,Bo,Ei,Hn,Xi,Fi,zi,Do,Ci,So,qi,ji,Pi,St,Ii,zs,Ai,Ni,Cs,Ui,Wi,Ie,Zo,Ji,xt,Oi,Qn,Bi,Di,qs,Si,Zi,Ri,Zt,Vi,Rt,za,Gt,Vt,js,Ro,Hi,Ps,Qi,Ca,_e,Vo,Yi,Is,Ki,el,Ho,tl,Yn,ol,nl,sl,Qo,al,Yo,rl,il,ll,Ae,Ko,dl,Et,cl,Kn,hl,pl,As,ul,ml,fl,Ht,gl,Qt,qa,Xt,Yt,Ns,en,_l,Us,vl,ja,Q,tn,yl,on,kl,es,bl,Ml,Tl,nn,wl,sn,Ll,$l,xl,Kt,Gl,eo,El,Ws,Xl,Fl,Js,zl,Cl,Ne,an,ql,Ft,jl,ts,Pl,Il,Os,Al,Nl,Ul,to,Wl,oo,Pa,zt,no,Bs,rn,Jl,Ds,Ol,Ia,Y,ln,Bl,Ss,Dl,Sl,dn,Zl,os,Rl,Vl,Hl,cn,Ql,hn,Yl,Kl,ed,so,td,Ue,pn,od,Ct,nd,ns,sd,ad,Zs,rd,id,ld,ao,dd,ro,Aa,qt,io,Rs,un,cd,Vs,hd,Na,K,mn,pd,fn,ud,ss,md,fd,gd,gn,_d,_n,vd,yd,kd,Hs,bd,Md,lt,Qs,vn,Td,wd,Ys,yn,Ld,$d,Ks,kn,xd,Gd,ea,bn,Ed,Xd,We,Mn,Fd,jt,zd,ta,Cd,qd,oa,jd,Pd,Id,lo,Ad,co,Ua,Pt,ho,na,Tn,Nd,sa,Ud,Wa,O,wn,Wd,aa,Jd,Od,Ln,Bd,as,Dd,Sd,Zd,$n,Rd,xn,Vd,Hd,Qd,ra,Yd,Kd,dt,ia,Gn,ec,tc,la,En,oc,nc,da,Xn,sc,ac,ca,Fn,rc,ic,Je,zn,lc,It,dc,ha,cc,hc,pa,pc,uc,mc,po,fc,uo,Ja;return l=new Se({}),x=new Se({}),ce=new Se({}),he=new Se({}),we=new N({props:{name:"class transformers.XGLMConfig",anchor:"transformers.XGLMConfig",parameters:[{name:"vocab_size",val:" = 256008"},{name:"max_position_embeddings",val:" = 2048"},{name:"d_model",val:" = 1024"},{name:"ffn_dim",val:" = 4096"},{name:"num_layers",val:" = 24"},{name:"attention_heads",val:" = 16"},{name:"activation_function",val:" = 'gelu'"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.0"},{name:"layerdrop",val:" = 0.0"},{name:"init_std",val:" = 0.02"},{name:"scale_embedding",val:" = True"},{name:"use_cache",val:" = True"},{name:"decoder_start_token_id",val:" = 2"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XGLMConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256008) &#x2014;
Vocabulary size of the XGLM model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMModel">XGLMModel</a> or <a href="/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.FlaxXGLMModel">FlaxXGLMModel</a>.`,name:"vocab_size"},{anchor:"transformers.XGLMConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#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.XGLMConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimension of the layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.XGLMConfig.ffn_dim",description:`<strong>ffn_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in decoder.`,name:"ffn_dim"},{anchor:"transformers.XGLMConfig.num_layers",description:`<strong>num_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers Transformer decoder.`,name:"num_layers"},{anchor:"transformers.XGLMConfig.attention_heads",description:`<strong>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:"attention_heads"},{anchor:"transformers.XGLMConfig.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.XGLMConfig.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, dencoder, and pooler.`,name:"dropout"},{anchor:"transformers.XGLMConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.XGLMConfig.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.XGLMConfig.layerdrop",description:`<strong>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:"layerdrop"},{anchor:"transformers.XGLMConfig.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.XGLMConfig.scale_embedding",description:`<strong>scale_embedding</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Scale embeddings by diving by sqrt(d_model).`,name:"scale_embedding"},{anchor:"transformers.XGLMConfig.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"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/configuration_xglm.py#L29"}}),Nt=new Pn({props:{anchor:"transformers.XGLMConfig.example",$$slots:{default:[Tp]},$$scope:{ctx:F}}}),Lo=new Se({}),$o=new N({props:{name:"class transformers.XGLMTokenizer",anchor:"transformers.XGLMTokenizer",parameters:[{name:"vocab_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XGLMTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.XGLMTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.XGLMTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.XGLMTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.XGLMTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.XGLMTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&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.XGLMTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.XGLMTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.XGLMTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.XGLMTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.XGLMTokenizer.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/tokenization_xglm.py#L43"}}),Eo=new N({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.XGLMTokenizer.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.XGLMTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.XGLMTokenizer.build_inputs_with_special_tokens.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/v4.30.0/src/transformers/models/xglm/tokenization_xglm.py#L189",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Fo=new N({props:{name:"get_special_tokens_mask",anchor:"transformers.XGLMTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.XGLMTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.XGLMTokenizer.get_special_tokens_mask.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"},{anchor:"transformers.XGLMTokenizer.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/v4.30.0/src/transformers/models/xglm/tokenization_xglm.py#L214",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Co=new N({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.XGLMTokenizer.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.XGLMTokenizer.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.XGLMTokenizer.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/v4.30.0/src/transformers/models/xglm/tokenization_xglm.py#L242",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),qo=new N({props:{name:"save_vocabulary",anchor:"transformers.XGLMTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/tokenization_xglm.py#L298"}}),jo=new Se({}),Po=new N({props:{name:"class transformers.XGLMTokenizerFast",anchor:"transformers.XGLMTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XGLMTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.XGLMTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.XGLMTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.XGLMTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.XGLMTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.XGLMTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&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.XGLMTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.XGLMTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/tokenization_xglm_fast.py#L49"}}),No=new N({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.XGLMTokenizerFast.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.XGLMTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.XGLMTokenizerFast.build_inputs_with_special_tokens.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/v4.30.0/src/transformers/models/xglm/tokenization_xglm_fast.py#L139",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Wo=new N({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.XGLMTokenizerFast.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.XGLMTokenizerFast.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.XGLMTokenizerFast.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/v4.30.0/src/transformers/models/xglm/tokenization_xglm_fast.py#L164",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Jo=new Se({}),Oo=new N({props:{name:"class transformers.XGLMModel",anchor:"transformers.XGLMModel",parameters:[{name:"config",val:": XGLMConfig"},{name:"embed_tokens",val:": typing.Optional[torch.nn.modules.sparse.Embedding] = None"}],parametersDescription:[{anchor:"transformers.XGLMModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig">XGLMConfig</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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.
config &#x2014; XGLMConfig`,name:"config"},{anchor:"transformers.XGLMModel.embed_tokens",description:"<strong>embed_tokens</strong> (nn.Embedding) &#x2014; output embedding",name:"embed_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/modeling_xglm.py#L516"}}),Zo=new N({props:{name:"forward",anchor:"transformers.XGLMModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = 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.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"}],parametersDescription:[{anchor:"transformers.XGLMModel.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.XGLMModel.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.XGLMModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XGLMModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, encoder_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 of
the decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.XGLMModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, encoder_sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing cross-attention on padding tokens indices of encoder input_ids. 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.XGLMModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_layers, 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.XGLMModel.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_layers, 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.XGLMModel.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.XGLMModel.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.XGLMModel.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.XGLMModel.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/modeling_xglm.py#L577",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</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/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig"
>XGLMConfig</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 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 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(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> and <code>config.add_cross_attention=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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Zt=new wo({props:{$$slots:{default:[wp]},$$scope:{ctx:F}}}),Rt=new Pn({props:{anchor:"transformers.XGLMModel.forward.example",$$slots:{default:[Lp]},$$scope:{ctx:F}}}),Ro=new Se({}),Vo=new N({props:{name:"class transformers.XGLMForCausalLM",anchor:"transformers.XGLMForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XGLMForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig">XGLMConfig</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/v4.30.0/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/v4.30.0/src/transformers/models/xglm/modeling_xglm.py#L750"}}),Ko=new N({props:{name:"forward",anchor:"transformers.XGLMForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = 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.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.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"}],parametersDescription:[{anchor:"transformers.XGLMForCausalLM.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.XGLMForCausalLM.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.XGLMForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XGLMForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, encoder_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 of
the decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.XGLMForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, encoder_sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing cross-attention on padding tokens indices of encoder input_ids. 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.XGLMForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_layers, 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.XGLMForCausalLM.forward.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>torch.Tensor</code> of shape <code>(num_layers, 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.XGLMForCausalLM.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.XGLMForCausalLM.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.XGLMForCausalLM.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.XGLMForCausalLM.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XGLMForCausalLM.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/v4.30.0/src/transformers/models/xglm/modeling_xglm.py#L781",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig"
>XGLMConfig</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/v4.30.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ht=new wo({props:{$$slots:{default:[$p]},$$scope:{ctx:F}}}),Qt=new Pn({props:{anchor:"transformers.XGLMForCausalLM.forward.example",$$slots:{default:[xp]},$$scope:{ctx:F}}}),en=new Se({}),tn=new N({props:{name:"class transformers.TFXGLMModel",anchor:"transformers.TFXGLMModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXGLMModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig">XGLMConfig</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/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.
config &#x2014; XGLMConfig
embed_tokens &#x2014; [TFSharedEmbeddings]: output embedding`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/modeling_tf_xglm.py#L741"}}),Kt=new wo({props:{$$slots:{default:[Gp]},$$scope:{ctx:F}}}),an=new N({props:{name:"call",anchor:"transformers.TFXGLMModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"},{name:"**kwargs",val:": Any"}],parametersDescription:[{anchor:"transformers.TFXGLMModel.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.TFXGLMModel.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.TFXGLMModel.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXGLMModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, encoder_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 of
the decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFXGLMModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, encoder_sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing cross-attention on padding tokens indices of encoder input_ids. 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.TFXGLMModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_layers, 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.TFXGLMModel.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_layers, 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.TFXGLMModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.num_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.TFXGLMModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
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:"inputs_embeds"},{anchor:"transformers.TFXGLMModel.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.TFXGLMModel.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.TFXGLMModel.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.TFXGLMModel.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/v4.30.0/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.TFXGLMModel.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/v4.30.0/src/transformers/models/xglm/modeling_tf_xglm.py#L757",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions</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/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig"
>XGLMConfig</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 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) 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(tf.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>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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>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 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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),to=new wo({props:{$$slots:{default:[Ep]},$$scope:{ctx:F}}}),oo=new Pn({props:{anchor:"transformers.TFXGLMModel.call.example",$$slots:{default:[Xp]},$$scope:{ctx:F}}}),rn=new Se({}),ln=new N({props:{name:"class transformers.TFXGLMForCausalLM",anchor:"transformers.TFXGLMForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXGLMForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig">XGLMConfig</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/v4.30.0/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/v4.30.0/src/transformers/models/xglm/modeling_tf_xglm.py#L808"}}),so=new wo({props:{$$slots:{default:[Fp]},$$scope:{ctx:F}}}),pn=new N({props:{name:"call",anchor:"transformers.TFXGLMForCausalLM.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"cross_attn_head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"},{name:"**kwargs",val:": Any"}],parametersDescription:[{anchor:"transformers.TFXGLMForCausalLM.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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.TFXGLMForCausalLM.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.TFXGLMForCausalLM.call.position_ids",description:`<strong>position_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXGLMForCausalLM.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, encoder_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 of
the decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFXGLMForCausalLM.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, encoder_sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing cross-attention on padding tokens indices of encoder input_ids. 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.TFXGLMForCausalLM.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_layers, 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.TFXGLMForCausalLM.call.cross_attn_head_mask",description:`<strong>cross_attn_head_mask</strong> (<code>tf.Tensor</code> of shape <code>(num_layers, 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.TFXGLMForCausalLM.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.num_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.TFXGLMForCausalLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
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:"inputs_embeds"},{anchor:"transformers.TFXGLMForCausalLM.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.TFXGLMForCausalLM.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.TFXGLMForCausalLM.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.TFXGLMForCausalLM.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/v4.30.0/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.TFXGLMForCausalLM.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.TFXGLMForCausalLM.call.labels",description:`<strong>labels</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for language modeling. Note that the labels <strong>are shifted</strong> inside the model, i.e. you can set
<code>labels = input_ids</code> Indices are selected in <code>[-100, 0, ..., config.vocab_size]</code> All labels set to <code>-100</code>
are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/modeling_tf_xglm.py#L858",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</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/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig"
>XGLMConfig</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 (for next-token prediction).</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>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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>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 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>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) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code>: A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</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/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig"
>XGLMConfig</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 (for next-token prediction).</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>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 model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>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 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>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) 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/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ao=new wo({props:{$$slots:{default:[zp]},$$scope:{ctx:F}}}),ro=new Pn({props:{anchor:"transformers.TFXGLMForCausalLM.call.example",$$slots:{default:[Cp]},$$scope:{ctx:F}}}),un=new Se({}),mn=new N({props:{name:"class transformers.FlaxXGLMModel",anchor:"transformers.FlaxXGLMModel",parameters:[{name:"config",val:": XGLMConfig"},{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.FlaxXGLMModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig">XGLMConfig</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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxXGLMModel.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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/modeling_flax_xglm.py#L689"}}),Mn=new N({props:{name:"__call__",anchor:"transformers.FlaxXGLMModel.__call__",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:"encoder_hidden_states",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"encoder_attention_mask",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:"past_key_values",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxXGLMModel.__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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxXGLMModel.__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.FlaxXGLMModel.__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.FlaxXGLMModel.__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.FlaxXGLMModel.__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.FlaxXGLMModel.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/modeling_flax_xglm.py#L611",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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 (<a
  href="/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig"
>XGLMConfig</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 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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),lo=new wo({props:{$$slots:{default:[qp]},$$scope:{ctx:F}}}),co=new Pn({props:{anchor:"transformers.FlaxXGLMModel.__call__.example",$$slots:{default:[jp]},$$scope:{ctx:F}}}),Tn=new Se({}),wn=new N({props:{name:"class transformers.FlaxXGLMForCausalLM",anchor:"transformers.FlaxXGLMForCausalLM",parameters:[{name:"config",val:": XGLMConfig"},{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.FlaxXGLMForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig">XGLMConfig</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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxXGLMForCausalLM.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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/modeling_flax_xglm.py#L766"}}),zn=new N({props:{name:"__call__",anchor:"transformers.FlaxXGLMForCausalLM.__call__",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:"encoder_hidden_states",val:": typing.Optional[jax._src.numpy.ndarray.ndarray] = None"},{name:"encoder_attention_mask",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:"past_key_values",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"}],parametersDescription:[{anchor:"transformers.FlaxXGLMForCausalLM.__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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxXGLMForCausalLM.__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.FlaxXGLMForCausalLM.__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.FlaxXGLMForCausalLM.__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.FlaxXGLMForCausalLM.__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.FlaxXGLMForCausalLM.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xglm/modeling_flax_xglm.py#L611",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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 (<a
  href="/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMConfig"
>XGLMConfig</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>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/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),po=new wo({props:{$$slots:{default:[Pp]},$$scope:{ctx:F}}}),uo=new Pn({props:{anchor:"transformers.FlaxXGLMForCausalLM.__call__.example",$$slots:{default:[Ip]},$$scope:{ctx:F}}}),{c(){p=n("meta"),k=c(),f=n("h1"),m=n("a"),v=n("span"),b(l.$$.fragment),u=c(),G=n("span"),Ze=r("XGLM"),Ge=c(),P=n("h2"),ee=n("a"),ne=n("span"),b(x.$$.fragment),Re=c(),Z=n("span"),Ve=r("Overview"),Ee=c(),U=n("p"),He=r("The XGLM model was proposed in "),se=n("a"),ae=r("Few-shot Learning with Multilingual Language Models"),Qe=r(`
by Xi Victoria Lin, Todor Mihaylov, Mikel Artetxe, Tianlu Wang, Shuohui Chen, Daniel Simig, Myle Ott, Naman Goyal,
Shruti Bhosale, Jingfei Du, Ramakanth Pasunuru, Sam Shleifer, Punit Singh Koura, Vishrav Chaudhary, Brian O\u2019Horo,
Jeff Wang, Luke Zettlemoyer, Zornitsa Kozareva, Mona Diab, Veselin Stoyanov, Xian Li.`),Xe=c(),B=n("p"),Ye=r("The abstract from the paper is the following:"),Fe=c(),D=n("p"),Me=n("em"),Ke=r(`Large-scale autoregressive language models such as GPT-3 are few-shot learners that can perform a wide range of language
tasks without fine-tuning. While these models are known to be able to jointly represent many different languages,
their training data is dominated by English, potentially limiting their cross-lingual generalization.
In this work, we train multilingual autoregressive language models on a balanced corpus covering a diverse set of languages,
and study their few- and zero-shot learning capabilities in a wide range of tasks. Our largest model with 7.5 billion parameters
sets new state of the art in few-shot learning in more than 20 representative languages, outperforming GPT-3 of comparable size
in multilingual commonsense reasoning (with +7.4% absolute accuracy improvement in 0-shot settings and +9.4% in 4-shot settings)
and natural language inference (+5.4% in each of 0-shot and 4-shot settings). On the FLORES-101 machine translation benchmark,
our model outperforms GPT-3 on 171 out of 182 translation directions with 32 training examples, while surpassing the
official supervised baseline in 45 directions. We present a detailed analysis of where the model succeeds and fails,
showing in particular that it enables cross-lingual in-context learning on some tasks, while there is still room for improvement
on surface form robustness and adaptation to tasks that do not have a natural cloze form. Finally, we evaluate our models
in social value tasks such as hate speech detection in five languages and find it has limitations similar to comparable sized GPT-3 models.`),ve=c(),z=n("p"),I=r("This model was contributed by "),re=n("a"),ie=r("Suraj"),et=r(". The original code can be found "),le=n("a"),de=r("here"),tt=r("."),ze=c(),C=n("h2"),te=n("a"),R=n("span"),b(ce.$$.fragment),ot=c(),V=n("span"),nt=r("Documentation resources"),Ce=c(),W=n("ul"),Te=n("li"),S=n("a"),st=r("Causal language modeling task guide"),ye=c(),q=n("h2"),oe=n("a"),A=n("span"),b(he.$$.fragment),at=c(),y=n("span"),X=r("XGLMConfig"),ct=c(),j=n("div"),b(we.$$.fragment),_t=c(),E=n("p"),vt=r("This is the configuration class to store the configuration of a "),qe=n("a"),yt=r("XGLMModel"),kt=r(`. It is used to instantiate an XGLM
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 XGLM
`),Le=n("a"),H=r("facebook/xglm-564M"),pe=r(" architecture."),bt=c(),ue=n("p"),me=r("Configuration objects inherit from "),je=n("a"),Mt=r("PretrainedConfig"),rt=r(` and can be used to control the model outputs. Read the
documentation from `),Pe=n("a"),$e=r("PretrainedConfig"),Tt=r(" for more information."),yr=c(),b(Nt.$$.fragment),$a=c(),wt=n("h2"),Ut=n("a"),gs=n("span"),b(Lo.$$.fragment),kr=c(),_s=n("span"),br=r("XGLMTokenizer"),xa=c(),J=n("div"),b($o.$$.fragment),Mr=c(),it=n("p"),Tr=r("Adapted from "),Nn=n("a"),wr=r("RobertaTokenizer"),Lr=r(" and "),Un=n("a"),$r=r("XLNetTokenizer"),xr=r(`. Based on
`),xo=n("a"),Gr=r("SentencePiece"),Er=r("."),Xr=c(),Go=n("p"),Fr=r("This tokenizer inherits from "),Wn=n("a"),zr=r("PreTrainedTokenizer"),Cr=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),qr=c(),ht=n("div"),b(Eo.$$.fragment),jr=c(),vs=n("p"),Pr=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM-RoBERTa sequence has the following format:`),Ir=c(),Xo=n("ul"),Jn=n("li"),Ar=r("single sequence: "),ys=n("code"),Nr=r("<s> X </s>"),Ur=c(),On=n("li"),Wr=r("pair of sequences: "),ks=n("code"),Jr=r("<s> A </s></s> B </s>"),Or=c(),Wt=n("div"),b(Fo.$$.fragment),Br=c(),zo=n("p"),Dr=r(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),bs=n("code"),Sr=r("prepare_for_model"),Zr=r(" method."),Rr=c(),Jt=n("div"),b(Co.$$.fragment),Vr=c(),Ms=n("p"),Hr=r(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does
not make use of token type ids, therefore a list of zeros is returned.`),Qr=c(),Bn=n("div"),b(qo.$$.fragment),Ga=c(),Lt=n("h2"),Ot=n("a"),Ts=n("span"),b(jo.$$.fragment),Yr=c(),ws=n("span"),Kr=r("XGLMTokenizerFast"),Ea=c(),fe=n("div"),b(Po.$$.fragment),ei=c(),xe=n("p"),ti=r("Construct a \u201Cfast\u201D XGLM tokenizer (backed by HuggingFace\u2019s "),Ls=n("em"),oi=r("tokenizers"),ni=r(" library). Adapted from "),Dn=n("a"),si=r("RobertaTokenizer"),ai=r(`
and `),Sn=n("a"),ri=r("XLNetTokenizer"),ii=r(`. Based on
`),Io=n("a"),li=r("BPE"),di=r("."),ci=c(),Ao=n("p"),hi=r("This tokenizer inherits from "),Zn=n("a"),pi=r("PreTrainedTokenizerFast"),ui=r(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),mi=c(),pt=n("div"),b(No.$$.fragment),fi=c(),$s=n("p"),gi=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM-RoBERTa sequence has the following format:`),_i=c(),Uo=n("ul"),Rn=n("li"),vi=r("single sequence: "),xs=n("code"),yi=r("<s> X </s>"),ki=c(),Vn=n("li"),bi=r("pair of sequences: "),Gs=n("code"),Mi=r("<s> A </s></s> B </s>"),Ti=c(),Bt=n("div"),b(Wo.$$.fragment),wi=c(),Es=n("p"),Li=r(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does
not make use of token type ids, therefore a list of zeros is returned.`),Xa=c(),$t=n("h2"),Dt=n("a"),Xs=n("span"),b(Jo.$$.fragment),$i=c(),Fs=n("span"),xi=r("XGLMModel"),Fa=c(),ge=n("div"),b(Oo.$$.fragment),Gi=c(),Bo=n("p"),Ei=r(`The bare XGLM Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Hn=n("a"),Xi=r("PreTrainedModel"),Fi=r(`. 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.)`),zi=c(),Do=n("p"),Ci=r("This model is also a PyTorch "),So=n("a"),qi=r("torch.nn.Module"),ji=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Pi=c(),St=n("p"),Ii=r("Transformer decoder consisting of "),zs=n("em"),Ai=r("config.num_layers"),Ni=r(" layers. Each layer is a "),Cs=n("code"),Ui=r("XGLMDecoderLayer"),Wi=c(),Ie=n("div"),b(Zo.$$.fragment),Ji=c(),xt=n("p"),Oi=r("The "),Qn=n("a"),Bi=r("XGLMModel"),Di=r(" forward method, overrides the "),qs=n("code"),Si=r("__call__"),Zi=r(" special method."),Ri=c(),b(Zt.$$.fragment),Vi=c(),b(Rt.$$.fragment),za=c(),Gt=n("h2"),Vt=n("a"),js=n("span"),b(Ro.$$.fragment),Hi=c(),Ps=n("span"),Qi=r("XGLMForCausalLM"),Ca=c(),_e=n("div"),b(Vo.$$.fragment),Yi=c(),Is=n("p"),Ki=r(`The XGLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),el=c(),Ho=n("p"),tl=r("This model inherits from "),Yn=n("a"),ol=r("PreTrainedModel"),nl=r(`. 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.)`),sl=c(),Qo=n("p"),al=r("This model is also a PyTorch "),Yo=n("a"),rl=r("torch.nn.Module"),il=r(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ll=c(),Ae=n("div"),b(Ko.$$.fragment),dl=c(),Et=n("p"),cl=r("The "),Kn=n("a"),hl=r("XGLMForCausalLM"),pl=r(" forward method, overrides the "),As=n("code"),ul=r("__call__"),ml=r(" special method."),fl=c(),b(Ht.$$.fragment),gl=c(),b(Qt.$$.fragment),qa=c(),Xt=n("h2"),Yt=n("a"),Ns=n("span"),b(en.$$.fragment),_l=c(),Us=n("span"),vl=r("TFXGLMModel"),ja=c(),Q=n("div"),b(tn.$$.fragment),yl=c(),on=n("p"),kl=r(`The bare XGLM Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),es=n("a"),bl=r("TFPreTrainedModel"),Ml=r(`. 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.)`),Tl=c(),nn=n("p"),wl=r("This model is also a "),sn=n("a"),Ll=r("tf.keras.Model"),$l=r(` 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.`),xl=c(),b(Kt.$$.fragment),Gl=c(),eo=n("p"),El=r("Transformer decoder consisting of "),Ws=n("em"),Xl=r("config.num_layers"),Fl=r(" layers. Each layer is a "),Js=n("code"),zl=r("TFXGLMDecoderLayer"),Cl=c(),Ne=n("div"),b(an.$$.fragment),ql=c(),Ft=n("p"),jl=r("The "),ts=n("a"),Pl=r("TFXGLMModel"),Il=r(" forward method, overrides the "),Os=n("code"),Al=r("__call__"),Nl=r(" special method."),Ul=c(),b(to.$$.fragment),Wl=c(),b(oo.$$.fragment),Pa=c(),zt=n("h2"),no=n("a"),Bs=n("span"),b(rn.$$.fragment),Jl=c(),Ds=n("span"),Ol=r("TFXGLMForCausalLM"),Ia=c(),Y=n("div"),b(ln.$$.fragment),Bl=c(),Ss=n("p"),Dl=r(`The XGLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Sl=c(),dn=n("p"),Zl=r("This model inherits from "),os=n("a"),Rl=r("TFPreTrainedModel"),Vl=r(`. 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=c(),cn=n("p"),Ql=r("This model is also a "),hn=n("a"),Yl=r("tf.keras.Model"),Kl=r(` 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.`),ed=c(),b(so.$$.fragment),td=c(),Ue=n("div"),b(pn.$$.fragment),od=c(),Ct=n("p"),nd=r("The "),ns=n("a"),sd=r("TFXGLMForCausalLM"),ad=r(" forward method, overrides the "),Zs=n("code"),rd=r("__call__"),id=r(" special method."),ld=c(),b(ao.$$.fragment),dd=c(),b(ro.$$.fragment),Aa=c(),qt=n("h2"),io=n("a"),Rs=n("span"),b(un.$$.fragment),cd=c(),Vs=n("span"),hd=r("FlaxXGLMModel"),Na=c(),K=n("div"),b(mn.$$.fragment),pd=c(),fn=n("p"),ud=r(`The bare XGLM Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),ss=n("a"),md=r("FlaxPreTrainedModel"),fd=r(`. 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.)`),gd=c(),gn=n("p"),_d=r(`This model is also a Flax Linen
`),_n=n("a"),vd=r("flax.nn.Module"),yd=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),kd=c(),Hs=n("p"),bd=r("Finally, this model supports inherent JAX features such as:"),Md=c(),lt=n("ul"),Qs=n("li"),vn=n("a"),Td=r("Just-In-Time (JIT) compilation"),wd=c(),Ys=n("li"),yn=n("a"),Ld=r("Automatic Differentiation"),$d=c(),Ks=n("li"),kn=n("a"),xd=r("Vectorization"),Gd=c(),ea=n("li"),bn=n("a"),Ed=r("Parallelization"),Xd=c(),We=n("div"),b(Mn.$$.fragment),Fd=c(),jt=n("p"),zd=r("The "),ta=n("code"),Cd=r("FlaxXGLMPreTrainedModel"),qd=r(" forward method, overrides the "),oa=n("code"),jd=r("__call__"),Pd=r(" special method."),Id=c(),b(lo.$$.fragment),Ad=c(),b(co.$$.fragment),Ua=c(),Pt=n("h2"),ho=n("a"),na=n("span"),b(Tn.$$.fragment),Nd=c(),sa=n("span"),Ud=r("FlaxXGLMForCausalLM"),Wa=c(),O=n("div"),b(wn.$$.fragment),Wd=c(),aa=n("p"),Jd=r(`The XGLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Od=c(),Ln=n("p"),Bd=r("This model inherits from "),as=n("a"),Dd=r("FlaxPreTrainedModel"),Sd=r(`. 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.)`),Zd=c(),$n=n("p"),Rd=r(`This model is also a Flax Linen
`),xn=n("a"),Vd=r("flax.nn.Module"),Hd=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),Qd=c(),ra=n("p"),Yd=r("Finally, this model supports inherent JAX features such as:"),Kd=c(),dt=n("ul"),ia=n("li"),Gn=n("a"),ec=r("Just-In-Time (JIT) compilation"),tc=c(),la=n("li"),En=n("a"),oc=r("Automatic Differentiation"),nc=c(),da=n("li"),Xn=n("a"),sc=r("Vectorization"),ac=c(),ca=n("li"),Fn=n("a"),rc=r("Parallelization"),ic=c(),Je=n("div"),b(zn.$$.fragment),lc=c(),It=n("p"),dc=r("The "),ha=n("code"),cc=r("FlaxXGLMPreTrainedModel"),hc=r(" forward method, overrides the "),pa=n("code"),pc=r("__call__"),uc=r(" special method."),mc=c(),b(po.$$.fragment),fc=c(),b(uo.$$.fragment),this.h()},l(o){const _=bp('[data-svelte="svelte-1phssyn"]',document.head);p=s(_,"META",{name:!0,content:!0}),_.forEach(t),k=h(o),f=s(o,"H1",{class:!0});var Cn=a(f);m=s(Cn,"A",{id:!0,class:!0,href:!0});var ua=a(m);v=s(ua,"SPAN",{});var ma=a(v);M(l.$$.fragment,ma),ma.forEach(t),ua.forEach(t),u=h(Cn),G=s(Cn,"SPAN",{});var fa=a(G);Ze=i(fa,"XGLM"),fa.forEach(t),Cn.forEach(t),Ge=h(o),P=s(o,"H2",{class:!0});var qn=a(P);ee=s(qn,"A",{id:!0,class:!0,href:!0});var ga=a(ee);ne=s(ga,"SPAN",{});var _a=a(ne);M(x.$$.fragment,_a),_a.forEach(t),ga.forEach(t),Re=h(qn),Z=s(qn,"SPAN",{});var va=a(Z);Ve=i(va,"Overview"),va.forEach(t),qn.forEach(t),Ee=h(o),U=s(o,"P",{});var jn=a(U);He=i(jn,"The XGLM model was proposed in "),se=s(jn,"A",{href:!0,rel:!0});var ya=a(se);ae=i(ya,"Few-shot Learning with Multilingual Language Models"),ya.forEach(t),Qe=i(jn,`
by Xi Victoria Lin, Todor Mihaylov, Mikel Artetxe, Tianlu Wang, Shuohui Chen, Daniel Simig, Myle Ott, Naman Goyal,
Shruti Bhosale, Jingfei Du, Ramakanth Pasunuru, Sam Shleifer, Punit Singh Koura, Vishrav Chaudhary, Brian O\u2019Horo,
Jeff Wang, Luke Zettlemoyer, Zornitsa Kozareva, Mona Diab, Veselin Stoyanov, Xian Li.`),jn.forEach(t),Xe=h(o),B=s(o,"P",{});var ka=a(B);Ye=i(ka,"The abstract from the paper is the following:"),ka.forEach(t),Fe=h(o),D=s(o,"P",{});var ba=a(D);Me=s(ba,"EM",{});var Ma=a(Me);Ke=i(Ma,`Large-scale autoregressive language models such as GPT-3 are few-shot learners that can perform a wide range of language
tasks without fine-tuning. While these models are known to be able to jointly represent many different languages,
their training data is dominated by English, potentially limiting their cross-lingual generalization.
In this work, we train multilingual autoregressive language models on a balanced corpus covering a diverse set of languages,
and study their few- and zero-shot learning capabilities in a wide range of tasks. Our largest model with 7.5 billion parameters
sets new state of the art in few-shot learning in more than 20 representative languages, outperforming GPT-3 of comparable size
in multilingual commonsense reasoning (with +7.4% absolute accuracy improvement in 0-shot settings and +9.4% in 4-shot settings)
and natural language inference (+5.4% in each of 0-shot and 4-shot settings). On the FLORES-101 machine translation benchmark,
our model outperforms GPT-3 on 171 out of 182 translation directions with 32 training examples, while surpassing the
official supervised baseline in 45 directions. We present a detailed analysis of where the model succeeds and fails,
showing in particular that it enables cross-lingual in-context learning on some tasks, while there is still room for improvement
on surface form robustness and adaptation to tasks that do not have a natural cloze form. Finally, we evaluate our models
in social value tasks such as hate speech detection in five languages and find it has limitations similar to comparable sized GPT-3 models.`),Ma.forEach(t),ba.forEach(t),ve=h(o),z=s(o,"P",{});var At=a(z);I=i(At,"This model was contributed by "),re=s(At,"A",{href:!0,rel:!0});var Ta=a(re);ie=i(Ta,"Suraj"),Ta.forEach(t),et=i(At,". The original code can be found "),le=s(At,"A",{href:!0,rel:!0});var kc=a(le);de=i(kc,"here"),kc.forEach(t),tt=i(At,"."),At.forEach(t),ze=h(o),C=s(o,"H2",{class:!0});var Oa=a(C);te=s(Oa,"A",{id:!0,class:!0,href:!0});var bc=a(te);R=s(bc,"SPAN",{});var Mc=a(R);M(ce.$$.fragment,Mc),Mc.forEach(t),bc.forEach(t),ot=h(Oa),V=s(Oa,"SPAN",{});var Tc=a(V);nt=i(Tc,"Documentation resources"),Tc.forEach(t),Oa.forEach(t),Ce=h(o),W=s(o,"UL",{});var wc=a(W);Te=s(wc,"LI",{});var Lc=a(Te);S=s(Lc,"A",{href:!0});var $c=a(S);st=i($c,"Causal language modeling task guide"),$c.forEach(t),Lc.forEach(t),wc.forEach(t),ye=h(o),q=s(o,"H2",{class:!0});var Ba=a(q);oe=s(Ba,"A",{id:!0,class:!0,href:!0});var xc=a(oe);A=s(xc,"SPAN",{});var Gc=a(A);M(he.$$.fragment,Gc),Gc.forEach(t),xc.forEach(t),at=h(Ba),y=s(Ba,"SPAN",{});var Ec=a(y);X=i(Ec,"XGLMConfig"),Ec.forEach(t),Ba.forEach(t),ct=h(o),j=s(o,"DIV",{class:!0});var mo=a(j);M(we.$$.fragment,mo),_t=h(mo),E=s(mo,"P",{});var rs=a(E);vt=i(rs,"This is the configuration class to store the configuration of a "),qe=s(rs,"A",{href:!0});var Xc=a(qe);yt=i(Xc,"XGLMModel"),Xc.forEach(t),kt=i(rs,`. It is used to instantiate an XGLM
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 XGLM
`),Le=s(rs,"A",{href:!0,rel:!0});var Fc=a(Le);H=i(Fc,"facebook/xglm-564M"),Fc.forEach(t),pe=i(rs," architecture."),rs.forEach(t),bt=h(mo),ue=s(mo,"P",{});var is=a(ue);me=i(is,"Configuration objects inherit from "),je=s(is,"A",{href:!0});var zc=a(je);Mt=i(zc,"PretrainedConfig"),zc.forEach(t),rt=i(is,` and can be used to control the model outputs. Read the
documentation from `),Pe=s(is,"A",{href:!0});var Cc=a(Pe);$e=i(Cc,"PretrainedConfig"),Cc.forEach(t),Tt=i(is," for more information."),is.forEach(t),yr=h(mo),M(Nt.$$.fragment,mo),mo.forEach(t),$a=h(o),wt=s(o,"H2",{class:!0});var Da=a(wt);Ut=s(Da,"A",{id:!0,class:!0,href:!0});var qc=a(Ut);gs=s(qc,"SPAN",{});var jc=a(gs);M(Lo.$$.fragment,jc),jc.forEach(t),qc.forEach(t),kr=h(Da),_s=s(Da,"SPAN",{});var Pc=a(_s);br=i(Pc,"XGLMTokenizer"),Pc.forEach(t),Da.forEach(t),xa=h(o),J=s(o,"DIV",{class:!0});var ke=a(J);M($o.$$.fragment,ke),Mr=h(ke),it=s(ke,"P",{});var fo=a(it);Tr=i(fo,"Adapted from "),Nn=s(fo,"A",{href:!0});var Ic=a(Nn);wr=i(Ic,"RobertaTokenizer"),Ic.forEach(t),Lr=i(fo," and "),Un=s(fo,"A",{href:!0});var Ac=a(Un);$r=i(Ac,"XLNetTokenizer"),Ac.forEach(t),xr=i(fo,`. Based on
`),xo=s(fo,"A",{href:!0,rel:!0});var Nc=a(xo);Gr=i(Nc,"SentencePiece"),Nc.forEach(t),Er=i(fo,"."),fo.forEach(t),Xr=h(ke),Go=s(ke,"P",{});var Sa=a(Go);Fr=i(Sa,"This tokenizer inherits from "),Wn=s(Sa,"A",{href:!0});var Uc=a(Wn);zr=i(Uc,"PreTrainedTokenizer"),Uc.forEach(t),Cr=i(Sa,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Sa.forEach(t),qr=h(ke),ht=s(ke,"DIV",{class:!0});var ls=a(ht);M(Eo.$$.fragment,ls),jr=h(ls),vs=s(ls,"P",{});var Wc=a(vs);Pr=i(Wc,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM-RoBERTa sequence has the following format:`),Wc.forEach(t),Ir=h(ls),Xo=s(ls,"UL",{});var Za=a(Xo);Jn=s(Za,"LI",{});var gc=a(Jn);Ar=i(gc,"single sequence: "),ys=s(gc,"CODE",{});var Jc=a(ys);Nr=i(Jc,"<s> X </s>"),Jc.forEach(t),gc.forEach(t),Ur=h(Za),On=s(Za,"LI",{});var _c=a(On);Wr=i(_c,"pair of sequences: "),ks=s(_c,"CODE",{});var Oc=a(ks);Jr=i(Oc,"<s> A </s></s> B </s>"),Oc.forEach(t),_c.forEach(t),Za.forEach(t),ls.forEach(t),Or=h(ke),Wt=s(ke,"DIV",{class:!0});var Ra=a(Wt);M(Fo.$$.fragment,Ra),Br=h(Ra),zo=s(Ra,"P",{});var Va=a(zo);Dr=i(Va,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),bs=s(Va,"CODE",{});var Bc=a(bs);Sr=i(Bc,"prepare_for_model"),Bc.forEach(t),Zr=i(Va," method."),Va.forEach(t),Ra.forEach(t),Rr=h(ke),Jt=s(ke,"DIV",{class:!0});var Ha=a(Jt);M(Co.$$.fragment,Ha),Vr=h(Ha),Ms=s(Ha,"P",{});var Dc=a(Ms);Hr=i(Dc,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does
not make use of token type ids, therefore a list of zeros is returned.`),Dc.forEach(t),Ha.forEach(t),Qr=h(ke),Bn=s(ke,"DIV",{class:!0});var Sc=a(Bn);M(qo.$$.fragment,Sc),Sc.forEach(t),ke.forEach(t),Ga=h(o),Lt=s(o,"H2",{class:!0});var Qa=a(Lt);Ot=s(Qa,"A",{id:!0,class:!0,href:!0});var Zc=a(Ot);Ts=s(Zc,"SPAN",{});var Rc=a(Ts);M(jo.$$.fragment,Rc),Rc.forEach(t),Zc.forEach(t),Yr=h(Qa),ws=s(Qa,"SPAN",{});var Vc=a(ws);Kr=i(Vc,"XGLMTokenizerFast"),Vc.forEach(t),Qa.forEach(t),Ea=h(o),fe=s(o,"DIV",{class:!0});var ut=a(fe);M(Po.$$.fragment,ut),ei=h(ut),xe=s(ut,"P",{});var mt=a(xe);ti=i(mt,"Construct a \u201Cfast\u201D XGLM tokenizer (backed by HuggingFace\u2019s "),Ls=s(mt,"EM",{});var Hc=a(Ls);oi=i(Hc,"tokenizers"),Hc.forEach(t),ni=i(mt," library). Adapted from "),Dn=s(mt,"A",{href:!0});var Qc=a(Dn);si=i(Qc,"RobertaTokenizer"),Qc.forEach(t),ai=i(mt,`
and `),Sn=s(mt,"A",{href:!0});var Yc=a(Sn);ri=i(Yc,"XLNetTokenizer"),Yc.forEach(t),ii=i(mt,`. Based on
`),Io=s(mt,"A",{href:!0,rel:!0});var Kc=a(Io);li=i(Kc,"BPE"),Kc.forEach(t),di=i(mt,"."),mt.forEach(t),ci=h(ut),Ao=s(ut,"P",{});var Ya=a(Ao);hi=i(Ya,"This tokenizer inherits from "),Zn=s(Ya,"A",{href:!0});var eh=a(Zn);pi=i(eh,"PreTrainedTokenizerFast"),eh.forEach(t),ui=i(Ya,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Ya.forEach(t),mi=h(ut),pt=s(ut,"DIV",{class:!0});var ds=a(pt);M(No.$$.fragment,ds),fi=h(ds),$s=s(ds,"P",{});var th=a($s);gi=i(th,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM-RoBERTa sequence has the following format:`),th.forEach(t),_i=h(ds),Uo=s(ds,"UL",{});var Ka=a(Uo);Rn=s(Ka,"LI",{});var vc=a(Rn);vi=i(vc,"single sequence: "),xs=s(vc,"CODE",{});var oh=a(xs);yi=i(oh,"<s> X </s>"),oh.forEach(t),vc.forEach(t),ki=h(Ka),Vn=s(Ka,"LI",{});var yc=a(Vn);bi=i(yc,"pair of sequences: "),Gs=s(yc,"CODE",{});var nh=a(Gs);Mi=i(nh,"<s> A </s></s> B </s>"),nh.forEach(t),yc.forEach(t),Ka.forEach(t),ds.forEach(t),Ti=h(ut),Bt=s(ut,"DIV",{class:!0});var er=a(Bt);M(Wo.$$.fragment,er),wi=h(er),Es=s(er,"P",{});var sh=a(Es);Li=i(sh,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does
not make use of token type ids, therefore a list of zeros is returned.`),sh.forEach(t),er.forEach(t),ut.forEach(t),Xa=h(o),$t=s(o,"H2",{class:!0});var tr=a($t);Dt=s(tr,"A",{id:!0,class:!0,href:!0});var ah=a(Dt);Xs=s(ah,"SPAN",{});var rh=a(Xs);M(Jo.$$.fragment,rh),rh.forEach(t),ah.forEach(t),$i=h(tr),Fs=s(tr,"SPAN",{});var ih=a(Fs);xi=i(ih,"XGLMModel"),ih.forEach(t),tr.forEach(t),Fa=h(o),ge=s(o,"DIV",{class:!0});var ft=a(ge);M(Oo.$$.fragment,ft),Gi=h(ft),Bo=s(ft,"P",{});var or=a(Bo);Ei=i(or,`The bare XGLM Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Hn=s(or,"A",{href:!0});var lh=a(Hn);Xi=i(lh,"PreTrainedModel"),lh.forEach(t),Fi=i(or,`. 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.)`),or.forEach(t),zi=h(ft),Do=s(ft,"P",{});var nr=a(Do);Ci=i(nr,"This model is also a PyTorch "),So=s(nr,"A",{href:!0,rel:!0});var dh=a(So);qi=i(dh,"torch.nn.Module"),dh.forEach(t),ji=i(nr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nr.forEach(t),Pi=h(ft),St=s(ft,"P",{});var wa=a(St);Ii=i(wa,"Transformer decoder consisting of "),zs=s(wa,"EM",{});var ch=a(zs);Ai=i(ch,"config.num_layers"),ch.forEach(t),Ni=i(wa," layers. Each layer is a "),Cs=s(wa,"CODE",{});var hh=a(Cs);Ui=i(hh,"XGLMDecoderLayer"),hh.forEach(t),wa.forEach(t),Wi=h(ft),Ie=s(ft,"DIV",{class:!0});var go=a(Ie);M(Zo.$$.fragment,go),Ji=h(go),xt=s(go,"P",{});var cs=a(xt);Oi=i(cs,"The "),Qn=s(cs,"A",{href:!0});var ph=a(Qn);Bi=i(ph,"XGLMModel"),ph.forEach(t),Di=i(cs," forward method, overrides the "),qs=s(cs,"CODE",{});var uh=a(qs);Si=i(uh,"__call__"),uh.forEach(t),Zi=i(cs," special method."),cs.forEach(t),Ri=h(go),M(Zt.$$.fragment,go),Vi=h(go),M(Rt.$$.fragment,go),go.forEach(t),ft.forEach(t),za=h(o),Gt=s(o,"H2",{class:!0});var sr=a(Gt);Vt=s(sr,"A",{id:!0,class:!0,href:!0});var mh=a(Vt);js=s(mh,"SPAN",{});var fh=a(js);M(Ro.$$.fragment,fh),fh.forEach(t),mh.forEach(t),Hi=h(sr),Ps=s(sr,"SPAN",{});var gh=a(Ps);Qi=i(gh,"XGLMForCausalLM"),gh.forEach(t),sr.forEach(t),Ca=h(o),_e=s(o,"DIV",{class:!0});var gt=a(_e);M(Vo.$$.fragment,gt),Yi=h(gt),Is=s(gt,"P",{});var _h=a(Is);Ki=i(_h,`The XGLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),_h.forEach(t),el=h(gt),Ho=s(gt,"P",{});var ar=a(Ho);tl=i(ar,"This model inherits from "),Yn=s(ar,"A",{href:!0});var vh=a(Yn);ol=i(vh,"PreTrainedModel"),vh.forEach(t),nl=i(ar,`. 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.)`),ar.forEach(t),sl=h(gt),Qo=s(gt,"P",{});var rr=a(Qo);al=i(rr,"This model is also a PyTorch "),Yo=s(rr,"A",{href:!0,rel:!0});var yh=a(Yo);rl=i(yh,"torch.nn.Module"),yh.forEach(t),il=i(rr,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),rr.forEach(t),ll=h(gt),Ae=s(gt,"DIV",{class:!0});var _o=a(Ae);M(Ko.$$.fragment,_o),dl=h(_o),Et=s(_o,"P",{});var hs=a(Et);cl=i(hs,"The "),Kn=s(hs,"A",{href:!0});var kh=a(Kn);hl=i(kh,"XGLMForCausalLM"),kh.forEach(t),pl=i(hs," forward method, overrides the "),As=s(hs,"CODE",{});var bh=a(As);ul=i(bh,"__call__"),bh.forEach(t),ml=i(hs," special method."),hs.forEach(t),fl=h(_o),M(Ht.$$.fragment,_o),gl=h(_o),M(Qt.$$.fragment,_o),_o.forEach(t),gt.forEach(t),qa=h(o),Xt=s(o,"H2",{class:!0});var ir=a(Xt);Yt=s(ir,"A",{id:!0,class:!0,href:!0});var Mh=a(Yt);Ns=s(Mh,"SPAN",{});var Th=a(Ns);M(en.$$.fragment,Th),Th.forEach(t),Mh.forEach(t),_l=h(ir),Us=s(ir,"SPAN",{});var wh=a(Us);vl=i(wh,"TFXGLMModel"),wh.forEach(t),ir.forEach(t),ja=h(o),Q=s(o,"DIV",{class:!0});var Oe=a(Q);M(tn.$$.fragment,Oe),yl=h(Oe),on=s(Oe,"P",{});var lr=a(on);kl=i(lr,`The bare XGLM Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),es=s(lr,"A",{href:!0});var Lh=a(es);bl=i(Lh,"TFPreTrainedModel"),Lh.forEach(t),Ml=i(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),Tl=h(Oe),nn=s(Oe,"P",{});var dr=a(nn);wl=i(dr,"This model is also a "),sn=s(dr,"A",{href:!0,rel:!0});var $h=a(sn);Ll=i($h,"tf.keras.Model"),$h.forEach(t),$l=i(dr,` 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.`),dr.forEach(t),xl=h(Oe),M(Kt.$$.fragment,Oe),Gl=h(Oe),eo=s(Oe,"P",{});var La=a(eo);El=i(La,"Transformer decoder consisting of "),Ws=s(La,"EM",{});var xh=a(Ws);Xl=i(xh,"config.num_layers"),xh.forEach(t),Fl=i(La," layers. Each layer is a "),Js=s(La,"CODE",{});var Gh=a(Js);zl=i(Gh,"TFXGLMDecoderLayer"),Gh.forEach(t),La.forEach(t),Cl=h(Oe),Ne=s(Oe,"DIV",{class:!0});var vo=a(Ne);M(an.$$.fragment,vo),ql=h(vo),Ft=s(vo,"P",{});var ps=a(Ft);jl=i(ps,"The "),ts=s(ps,"A",{href:!0});var Eh=a(ts);Pl=i(Eh,"TFXGLMModel"),Eh.forEach(t),Il=i(ps," forward method, overrides the "),Os=s(ps,"CODE",{});var Xh=a(Os);Al=i(Xh,"__call__"),Xh.forEach(t),Nl=i(ps," special method."),ps.forEach(t),Ul=h(vo),M(to.$$.fragment,vo),Wl=h(vo),M(oo.$$.fragment,vo),vo.forEach(t),Oe.forEach(t),Pa=h(o),zt=s(o,"H2",{class:!0});var cr=a(zt);no=s(cr,"A",{id:!0,class:!0,href:!0});var Fh=a(no);Bs=s(Fh,"SPAN",{});var zh=a(Bs);M(rn.$$.fragment,zh),zh.forEach(t),Fh.forEach(t),Jl=h(cr),Ds=s(cr,"SPAN",{});var Ch=a(Ds);Ol=i(Ch,"TFXGLMForCausalLM"),Ch.forEach(t),cr.forEach(t),Ia=h(o),Y=s(o,"DIV",{class:!0});var Be=a(Y);M(ln.$$.fragment,Be),Bl=h(Be),Ss=s(Be,"P",{});var qh=a(Ss);Dl=i(qh,`The XGLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),qh.forEach(t),Sl=h(Be),dn=s(Be,"P",{});var hr=a(dn);Zl=i(hr,"This model inherits from "),os=s(hr,"A",{href:!0});var jh=a(os);Rl=i(jh,"TFPreTrainedModel"),jh.forEach(t),Vl=i(hr,`. 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.)`),hr.forEach(t),Hl=h(Be),cn=s(Be,"P",{});var pr=a(cn);Ql=i(pr,"This model is also a "),hn=s(pr,"A",{href:!0,rel:!0});var Ph=a(hn);Yl=i(Ph,"tf.keras.Model"),Ph.forEach(t),Kl=i(pr,` 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.`),pr.forEach(t),ed=h(Be),M(so.$$.fragment,Be),td=h(Be),Ue=s(Be,"DIV",{class:!0});var yo=a(Ue);M(pn.$$.fragment,yo),od=h(yo),Ct=s(yo,"P",{});var us=a(Ct);nd=i(us,"The "),ns=s(us,"A",{href:!0});var Ih=a(ns);sd=i(Ih,"TFXGLMForCausalLM"),Ih.forEach(t),ad=i(us," forward method, overrides the "),Zs=s(us,"CODE",{});var Ah=a(Zs);rd=i(Ah,"__call__"),Ah.forEach(t),id=i(us," special method."),us.forEach(t),ld=h(yo),M(ao.$$.fragment,yo),dd=h(yo),M(ro.$$.fragment,yo),yo.forEach(t),Be.forEach(t),Aa=h(o),qt=s(o,"H2",{class:!0});var ur=a(qt);io=s(ur,"A",{id:!0,class:!0,href:!0});var Nh=a(io);Rs=s(Nh,"SPAN",{});var Uh=a(Rs);M(un.$$.fragment,Uh),Uh.forEach(t),Nh.forEach(t),cd=h(ur),Vs=s(ur,"SPAN",{});var Wh=a(Vs);hd=i(Wh,"FlaxXGLMModel"),Wh.forEach(t),ur.forEach(t),Na=h(o),K=s(o,"DIV",{class:!0});var De=a(K);M(mn.$$.fragment,De),pd=h(De),fn=s(De,"P",{});var mr=a(fn);ud=i(mr,`The bare XGLM Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),ss=s(mr,"A",{href:!0});var Jh=a(ss);md=i(Jh,"FlaxPreTrainedModel"),Jh.forEach(t),fd=i(mr,`. 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.)`),mr.forEach(t),gd=h(De),gn=s(De,"P",{});var fr=a(gn);_d=i(fr,`This model is also a Flax Linen
`),_n=s(fr,"A",{href:!0,rel:!0});var Oh=a(_n);vd=i(Oh,"flax.nn.Module"),Oh.forEach(t),yd=i(fr,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),fr.forEach(t),kd=h(De),Hs=s(De,"P",{});var Bh=a(Hs);bd=i(Bh,"Finally, this model supports inherent JAX features such as:"),Bh.forEach(t),Md=h(De),lt=s(De,"UL",{});var ko=a(lt);Qs=s(ko,"LI",{});var Dh=a(Qs);vn=s(Dh,"A",{href:!0,rel:!0});var Sh=a(vn);Td=i(Sh,"Just-In-Time (JIT) compilation"),Sh.forEach(t),Dh.forEach(t),wd=h(ko),Ys=s(ko,"LI",{});var Zh=a(Ys);yn=s(Zh,"A",{href:!0,rel:!0});var Rh=a(yn);Ld=i(Rh,"Automatic Differentiation"),Rh.forEach(t),Zh.forEach(t),$d=h(ko),Ks=s(ko,"LI",{});var Vh=a(Ks);kn=s(Vh,"A",{href:!0,rel:!0});var Hh=a(kn);xd=i(Hh,"Vectorization"),Hh.forEach(t),Vh.forEach(t),Gd=h(ko),ea=s(ko,"LI",{});var Qh=a(ea);bn=s(Qh,"A",{href:!0,rel:!0});var Yh=a(bn);Ed=i(Yh,"Parallelization"),Yh.forEach(t),Qh.forEach(t),ko.forEach(t),Xd=h(De),We=s(De,"DIV",{class:!0});var bo=a(We);M(Mn.$$.fragment,bo),Fd=h(bo),jt=s(bo,"P",{});var ms=a(jt);zd=i(ms,"The "),ta=s(ms,"CODE",{});var Kh=a(ta);Cd=i(Kh,"FlaxXGLMPreTrainedModel"),Kh.forEach(t),qd=i(ms," forward method, overrides the "),oa=s(ms,"CODE",{});var ep=a(oa);jd=i(ep,"__call__"),ep.forEach(t),Pd=i(ms," special method."),ms.forEach(t),Id=h(bo),M(lo.$$.fragment,bo),Ad=h(bo),M(co.$$.fragment,bo),bo.forEach(t),De.forEach(t),Ua=h(o),Pt=s(o,"H2",{class:!0});var gr=a(Pt);ho=s(gr,"A",{id:!0,class:!0,href:!0});var tp=a(ho);na=s(tp,"SPAN",{});var op=a(na);M(Tn.$$.fragment,op),op.forEach(t),tp.forEach(t),Nd=h(gr),sa=s(gr,"SPAN",{});var np=a(sa);Ud=i(np,"FlaxXGLMForCausalLM"),np.forEach(t),gr.forEach(t),Wa=h(o),O=s(o,"DIV",{class:!0});var be=a(O);M(wn.$$.fragment,be),Wd=h(be),aa=s(be,"P",{});var sp=a(aa);Jd=i(sp,`The XGLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),sp.forEach(t),Od=h(be),Ln=s(be,"P",{});var _r=a(Ln);Bd=i(_r,"This model inherits from "),as=s(_r,"A",{href:!0});var ap=a(as);Dd=i(ap,"FlaxPreTrainedModel"),ap.forEach(t),Sd=i(_r,`. 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.)`),_r.forEach(t),Zd=h(be),$n=s(be,"P",{});var vr=a($n);Rd=i(vr,`This model is also a Flax Linen
`),xn=s(vr,"A",{href:!0,rel:!0});var rp=a(xn);Vd=i(rp,"flax.nn.Module"),rp.forEach(t),Hd=i(vr,` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),vr.forEach(t),Qd=h(be),ra=s(be,"P",{});var ip=a(ra);Yd=i(ip,"Finally, this model supports inherent JAX features such as:"),ip.forEach(t),Kd=h(be),dt=s(be,"UL",{});var Mo=a(dt);ia=s(Mo,"LI",{});var lp=a(ia);Gn=s(lp,"A",{href:!0,rel:!0});var dp=a(Gn);ec=i(dp,"Just-In-Time (JIT) compilation"),dp.forEach(t),lp.forEach(t),tc=h(Mo),la=s(Mo,"LI",{});var cp=a(la);En=s(cp,"A",{href:!0,rel:!0});var hp=a(En);oc=i(hp,"Automatic Differentiation"),hp.forEach(t),cp.forEach(t),nc=h(Mo),da=s(Mo,"LI",{});var pp=a(da);Xn=s(pp,"A",{href:!0,rel:!0});var up=a(Xn);sc=i(up,"Vectorization"),up.forEach(t),pp.forEach(t),ac=h(Mo),ca=s(Mo,"LI",{});var mp=a(ca);Fn=s(mp,"A",{href:!0,rel:!0});var fp=a(Fn);rc=i(fp,"Parallelization"),fp.forEach(t),mp.forEach(t),Mo.forEach(t),ic=h(be),Je=s(be,"DIV",{class:!0});var To=a(Je);M(zn.$$.fragment,To),lc=h(To),It=s(To,"P",{});var fs=a(It);dc=i(fs,"The "),ha=s(fs,"CODE",{});var gp=a(ha);cc=i(gp,"FlaxXGLMPreTrainedModel"),gp.forEach(t),hc=i(fs," forward method, overrides the "),pa=s(fs,"CODE",{});var _p=a(pa);pc=i(_p,"__call__"),_p.forEach(t),uc=i(fs," special method."),fs.forEach(t),mc=h(To),M(po.$$.fragment,To),fc=h(To),M(uo.$$.fragment,To),To.forEach(t),be.forEach(t),this.h()},h(){d(p,"name","hf:doc:metadata"),d(p,"content",JSON.stringify(Np)),d(m,"id","xglm"),d(m,"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"),d(m,"href","#xglm"),d(f,"class","relative group"),d(ee,"id","overview"),d(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"),d(ee,"href","#overview"),d(P,"class","relative group"),d(se,"href","https://arxiv.org/abs/2112.10668"),d(se,"rel","nofollow"),d(re,"href","https://huggingface.co/valhalla"),d(re,"rel","nofollow"),d(le,"href","https://github.com/pytorch/fairseq/tree/main/examples/xglm"),d(le,"rel","nofollow"),d(te,"id","documentation-resources"),d(te,"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"),d(te,"href","#documentation-resources"),d(C,"class","relative group"),d(S,"href","../tasks/language_modeling"),d(oe,"id","transformers.XGLMConfig"),d(oe,"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"),d(oe,"href","#transformers.XGLMConfig"),d(q,"class","relative group"),d(qe,"href","/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMModel"),d(Le,"href","https://huggingface.co/facebook/xglm-564M"),d(Le,"rel","nofollow"),d(je,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(Pe,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ut,"id","transformers.XGLMTokenizer"),d(Ut,"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"),d(Ut,"href","#transformers.XGLMTokenizer"),d(wt,"class","relative group"),d(Nn,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaTokenizer"),d(Un,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),d(xo,"href","https://github.com/google/sentencepiece"),d(xo,"rel","nofollow"),d(Wn,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),d(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Bn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ot,"id","transformers.XGLMTokenizerFast"),d(Ot,"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"),d(Ot,"href","#transformers.XGLMTokenizerFast"),d(Lt,"class","relative group"),d(Dn,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaTokenizer"),d(Sn,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),d(Io,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),d(Io,"rel","nofollow"),d(Zn,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),d(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Dt,"id","transformers.XGLMModel"),d(Dt,"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"),d(Dt,"href","#transformers.XGLMModel"),d($t,"class","relative group"),d(Hn,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),d(So,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(So,"rel","nofollow"),d(Qn,"href","/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMModel"),d(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Vt,"id","transformers.XGLMForCausalLM"),d(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"),d(Vt,"href","#transformers.XGLMForCausalLM"),d(Gt,"class","relative group"),d(Yn,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),d(Yo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Yo,"rel","nofollow"),d(Kn,"href","/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.XGLMForCausalLM"),d(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Yt,"id","transformers.TFXGLMModel"),d(Yt,"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"),d(Yt,"href","#transformers.TFXGLMModel"),d(Xt,"class","relative group"),d(es,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),d(sn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),d(sn,"rel","nofollow"),d(ts,"href","/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.TFXGLMModel"),d(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(no,"id","transformers.TFXGLMForCausalLM"),d(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"),d(no,"href","#transformers.TFXGLMForCausalLM"),d(zt,"class","relative group"),d(os,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),d(hn,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),d(hn,"rel","nofollow"),d(ns,"href","/docs/transformers/v4.30.0/en/model_doc/xglm#transformers.TFXGLMForCausalLM"),d(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(io,"id","transformers.FlaxXGLMModel"),d(io,"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"),d(io,"href","#transformers.FlaxXGLMModel"),d(qt,"class","relative group"),d(ss,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(_n,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),d(_n,"rel","nofollow"),d(vn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(vn,"rel","nofollow"),d(yn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(yn,"rel","nofollow"),d(kn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(kn,"rel","nofollow"),d(bn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(bn,"rel","nofollow"),d(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ho,"id","transformers.FlaxXGLMForCausalLM"),d(ho,"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"),d(ho,"href","#transformers.FlaxXGLMForCausalLM"),d(Pt,"class","relative group"),d(as,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),d(xn,"href","https://flax.readthedocs.io/en/latest/_autosummary/flax.nn.module.html"),d(xn,"rel","nofollow"),d(Gn,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),d(Gn,"rel","nofollow"),d(En,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(En,"rel","nofollow"),d(Xn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(Xn,"rel","nofollow"),d(Fn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(Fn,"rel","nofollow"),d(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(O,"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,_){e(document.head,p),g(o,k,_),g(o,f,_),e(f,m),e(m,v),T(l,v,null),e(f,u),e(f,G),e(G,Ze),g(o,Ge,_),g(o,P,_),e(P,ee),e(ee,ne),T(x,ne,null),e(P,Re),e(P,Z),e(Z,Ve),g(o,Ee,_),g(o,U,_),e(U,He),e(U,se),e(se,ae),e(U,Qe),g(o,Xe,_),g(o,B,_),e(B,Ye),g(o,Fe,_),g(o,D,_),e(D,Me),e(Me,Ke),g(o,ve,_),g(o,z,_),e(z,I),e(z,re),e(re,ie),e(z,et),e(z,le),e(le,de),e(z,tt),g(o,ze,_),g(o,C,_),e(C,te),e(te,R),T(ce,R,null),e(C,ot),e(C,V),e(V,nt),g(o,Ce,_),g(o,W,_),e(W,Te),e(Te,S),e(S,st),g(o,ye,_),g(o,q,_),e(q,oe),e(oe,A),T(he,A,null),e(q,at),e(q,y),e(y,X),g(o,ct,_),g(o,j,_),T(we,j,null),e(j,_t),e(j,E),e(E,vt),e(E,qe),e(qe,yt),e(E,kt),e(E,Le),e(Le,H),e(E,pe),e(j,bt),e(j,ue),e(ue,me),e(ue,je),e(je,Mt),e(ue,rt),e(ue,Pe),e(Pe,$e),e(ue,Tt),e(j,yr),T(Nt,j,null),g(o,$a,_),g(o,wt,_),e(wt,Ut),e(Ut,gs),T(Lo,gs,null),e(wt,kr),e(wt,_s),e(_s,br),g(o,xa,_),g(o,J,_),T($o,J,null),e(J,Mr),e(J,it),e(it,Tr),e(it,Nn),e(Nn,wr),e(it,Lr),e(it,Un),e(Un,$r),e(it,xr),e(it,xo),e(xo,Gr),e(it,Er),e(J,Xr),e(J,Go),e(Go,Fr),e(Go,Wn),e(Wn,zr),e(Go,Cr),e(J,qr),e(J,ht),T(Eo,ht,null),e(ht,jr),e(ht,vs),e(vs,Pr),e(ht,Ir),e(ht,Xo),e(Xo,Jn),e(Jn,Ar),e(Jn,ys),e(ys,Nr),e(Xo,Ur),e(Xo,On),e(On,Wr),e(On,ks),e(ks,Jr),e(J,Or),e(J,Wt),T(Fo,Wt,null),e(Wt,Br),e(Wt,zo),e(zo,Dr),e(zo,bs),e(bs,Sr),e(zo,Zr),e(J,Rr),e(J,Jt),T(Co,Jt,null),e(Jt,Vr),e(Jt,Ms),e(Ms,Hr),e(J,Qr),e(J,Bn),T(qo,Bn,null),g(o,Ga,_),g(o,Lt,_),e(Lt,Ot),e(Ot,Ts),T(jo,Ts,null),e(Lt,Yr),e(Lt,ws),e(ws,Kr),g(o,Ea,_),g(o,fe,_),T(Po,fe,null),e(fe,ei),e(fe,xe),e(xe,ti),e(xe,Ls),e(Ls,oi),e(xe,ni),e(xe,Dn),e(Dn,si),e(xe,ai),e(xe,Sn),e(Sn,ri),e(xe,ii),e(xe,Io),e(Io,li),e(xe,di),e(fe,ci),e(fe,Ao),e(Ao,hi),e(Ao,Zn),e(Zn,pi),e(Ao,ui),e(fe,mi),e(fe,pt),T(No,pt,null),e(pt,fi),e(pt,$s),e($s,gi),e(pt,_i),e(pt,Uo),e(Uo,Rn),e(Rn,vi),e(Rn,xs),e(xs,yi),e(Uo,ki),e(Uo,Vn),e(Vn,bi),e(Vn,Gs),e(Gs,Mi),e(fe,Ti),e(fe,Bt),T(Wo,Bt,null),e(Bt,wi),e(Bt,Es),e(Es,Li),g(o,Xa,_),g(o,$t,_),e($t,Dt),e(Dt,Xs),T(Jo,Xs,null),e($t,$i),e($t,Fs),e(Fs,xi),g(o,Fa,_),g(o,ge,_),T(Oo,ge,null),e(ge,Gi),e(ge,Bo),e(Bo,Ei),e(Bo,Hn),e(Hn,Xi),e(Bo,Fi),e(ge,zi),e(ge,Do),e(Do,Ci),e(Do,So),e(So,qi),e(Do,ji),e(ge,Pi),e(ge,St),e(St,Ii),e(St,zs),e(zs,Ai),e(St,Ni),e(St,Cs),e(Cs,Ui),e(ge,Wi),e(ge,Ie),T(Zo,Ie,null),e(Ie,Ji),e(Ie,xt),e(xt,Oi),e(xt,Qn),e(Qn,Bi),e(xt,Di),e(xt,qs),e(qs,Si),e(xt,Zi),e(Ie,Ri),T(Zt,Ie,null),e(Ie,Vi),T(Rt,Ie,null),g(o,za,_),g(o,Gt,_),e(Gt,Vt),e(Vt,js),T(Ro,js,null),e(Gt,Hi),e(Gt,Ps),e(Ps,Qi),g(o,Ca,_),g(o,_e,_),T(Vo,_e,null),e(_e,Yi),e(_e,Is),e(Is,Ki),e(_e,el),e(_e,Ho),e(Ho,tl),e(Ho,Yn),e(Yn,ol),e(Ho,nl),e(_e,sl),e(_e,Qo),e(Qo,al),e(Qo,Yo),e(Yo,rl),e(Qo,il),e(_e,ll),e(_e,Ae),T(Ko,Ae,null),e(Ae,dl),e(Ae,Et),e(Et,cl),e(Et,Kn),e(Kn,hl),e(Et,pl),e(Et,As),e(As,ul),e(Et,ml),e(Ae,fl),T(Ht,Ae,null),e(Ae,gl),T(Qt,Ae,null),g(o,qa,_),g(o,Xt,_),e(Xt,Yt),e(Yt,Ns),T(en,Ns,null),e(Xt,_l),e(Xt,Us),e(Us,vl),g(o,ja,_),g(o,Q,_),T(tn,Q,null),e(Q,yl),e(Q,on),e(on,kl),e(on,es),e(es,bl),e(on,Ml),e(Q,Tl),e(Q,nn),e(nn,wl),e(nn,sn),e(sn,Ll),e(nn,$l),e(Q,xl),T(Kt,Q,null),e(Q,Gl),e(Q,eo),e(eo,El),e(eo,Ws),e(Ws,Xl),e(eo,Fl),e(eo,Js),e(Js,zl),e(Q,Cl),e(Q,Ne),T(an,Ne,null),e(Ne,ql),e(Ne,Ft),e(Ft,jl),e(Ft,ts),e(ts,Pl),e(Ft,Il),e(Ft,Os),e(Os,Al),e(Ft,Nl),e(Ne,Ul),T(to,Ne,null),e(Ne,Wl),T(oo,Ne,null),g(o,Pa,_),g(o,zt,_),e(zt,no),e(no,Bs),T(rn,Bs,null),e(zt,Jl),e(zt,Ds),e(Ds,Ol),g(o,Ia,_),g(o,Y,_),T(ln,Y,null),e(Y,Bl),e(Y,Ss),e(Ss,Dl),e(Y,Sl),e(Y,dn),e(dn,Zl),e(dn,os),e(os,Rl),e(dn,Vl),e(Y,Hl),e(Y,cn),e(cn,Ql),e(cn,hn),e(hn,Yl),e(cn,Kl),e(Y,ed),T(so,Y,null),e(Y,td),e(Y,Ue),T(pn,Ue,null),e(Ue,od),e(Ue,Ct),e(Ct,nd),e(Ct,ns),e(ns,sd),e(Ct,ad),e(Ct,Zs),e(Zs,rd),e(Ct,id),e(Ue,ld),T(ao,Ue,null),e(Ue,dd),T(ro,Ue,null),g(o,Aa,_),g(o,qt,_),e(qt,io),e(io,Rs),T(un,Rs,null),e(qt,cd),e(qt,Vs),e(Vs,hd),g(o,Na,_),g(o,K,_),T(mn,K,null),e(K,pd),e(K,fn),e(fn,ud),e(fn,ss),e(ss,md),e(fn,fd),e(K,gd),e(K,gn),e(gn,_d),e(gn,_n),e(_n,vd),e(gn,yd),e(K,kd),e(K,Hs),e(Hs,bd),e(K,Md),e(K,lt),e(lt,Qs),e(Qs,vn),e(vn,Td),e(lt,wd),e(lt,Ys),e(Ys,yn),e(yn,Ld),e(lt,$d),e(lt,Ks),e(Ks,kn),e(kn,xd),e(lt,Gd),e(lt,ea),e(ea,bn),e(bn,Ed),e(K,Xd),e(K,We),T(Mn,We,null),e(We,Fd),e(We,jt),e(jt,zd),e(jt,ta),e(ta,Cd),e(jt,qd),e(jt,oa),e(oa,jd),e(jt,Pd),e(We,Id),T(lo,We,null),e(We,Ad),T(co,We,null),g(o,Ua,_),g(o,Pt,_),e(Pt,ho),e(ho,na),T(Tn,na,null),e(Pt,Nd),e(Pt,sa),e(sa,Ud),g(o,Wa,_),g(o,O,_),T(wn,O,null),e(O,Wd),e(O,aa),e(aa,Jd),e(O,Od),e(O,Ln),e(Ln,Bd),e(Ln,as),e(as,Dd),e(Ln,Sd),e(O,Zd),e(O,$n),e($n,Rd),e($n,xn),e(xn,Vd),e($n,Hd),e(O,Qd),e(O,ra),e(ra,Yd),e(O,Kd),e(O,dt),e(dt,ia),e(ia,Gn),e(Gn,ec),e(dt,tc),e(dt,la),e(la,En),e(En,oc),e(dt,nc),e(dt,da),e(da,Xn),e(Xn,sc),e(dt,ac),e(dt,ca),e(ca,Fn),e(Fn,rc),e(O,ic),e(O,Je),T(zn,Je,null),e(Je,lc),e(Je,It),e(It,dc),e(It,ha),e(ha,cc),e(It,hc),e(It,pa),e(pa,pc),e(It,uc),e(Je,mc),T(po,Je,null),e(Je,fc),T(uo,Je,null),Ja=!0},p(o,[_]){const Cn={};_&2&&(Cn.$$scope={dirty:_,ctx:o}),Nt.$set(Cn);const ua={};_&2&&(ua.$$scope={dirty:_,ctx:o}),Zt.$set(ua);const ma={};_&2&&(ma.$$scope={dirty:_,ctx:o}),Rt.$set(ma);const fa={};_&2&&(fa.$$scope={dirty:_,ctx:o}),Ht.$set(fa);const qn={};_&2&&(qn.$$scope={dirty:_,ctx:o}),Qt.$set(qn);const ga={};_&2&&(ga.$$scope={dirty:_,ctx:o}),Kt.$set(ga);const _a={};_&2&&(_a.$$scope={dirty:_,ctx:o}),to.$set(_a);const va={};_&2&&(va.$$scope={dirty:_,ctx:o}),oo.$set(va);const jn={};_&2&&(jn.$$scope={dirty:_,ctx:o}),so.$set(jn);const ya={};_&2&&(ya.$$scope={dirty:_,ctx:o}),ao.$set(ya);const ka={};_&2&&(ka.$$scope={dirty:_,ctx:o}),ro.$set(ka);const ba={};_&2&&(ba.$$scope={dirty:_,ctx:o}),lo.$set(ba);const Ma={};_&2&&(Ma.$$scope={dirty:_,ctx:o}),co.$set(Ma);const At={};_&2&&(At.$$scope={dirty:_,ctx:o}),po.$set(At);const Ta={};_&2&&(Ta.$$scope={dirty:_,ctx:o}),uo.$set(Ta)},i(o){Ja||(w(l.$$.fragment,o),w(x.$$.fragment,o),w(ce.$$.fragment,o),w(he.$$.fragment,o),w(we.$$.fragment,o),w(Nt.$$.fragment,o),w(Lo.$$.fragment,o),w($o.$$.fragment,o),w(Eo.$$.fragment,o),w(Fo.$$.fragment,o),w(Co.$$.fragment,o),w(qo.$$.fragment,o),w(jo.$$.fragment,o),w(Po.$$.fragment,o),w(No.$$.fragment,o),w(Wo.$$.fragment,o),w(Jo.$$.fragment,o),w(Oo.$$.fragment,o),w(Zo.$$.fragment,o),w(Zt.$$.fragment,o),w(Rt.$$.fragment,o),w(Ro.$$.fragment,o),w(Vo.$$.fragment,o),w(Ko.$$.fragment,o),w(Ht.$$.fragment,o),w(Qt.$$.fragment,o),w(en.$$.fragment,o),w(tn.$$.fragment,o),w(Kt.$$.fragment,o),w(an.$$.fragment,o),w(to.$$.fragment,o),w(oo.$$.fragment,o),w(rn.$$.fragment,o),w(ln.$$.fragment,o),w(so.$$.fragment,o),w(pn.$$.fragment,o),w(ao.$$.fragment,o),w(ro.$$.fragment,o),w(un.$$.fragment,o),w(mn.$$.fragment,o),w(Mn.$$.fragment,o),w(lo.$$.fragment,o),w(co.$$.fragment,o),w(Tn.$$.fragment,o),w(wn.$$.fragment,o),w(zn.$$.fragment,o),w(po.$$.fragment,o),w(uo.$$.fragment,o),Ja=!0)},o(o){L(l.$$.fragment,o),L(x.$$.fragment,o),L(ce.$$.fragment,o),L(he.$$.fragment,o),L(we.$$.fragment,o),L(Nt.$$.fragment,o),L(Lo.$$.fragment,o),L($o.$$.fragment,o),L(Eo.$$.fragment,o),L(Fo.$$.fragment,o),L(Co.$$.fragment,o),L(qo.$$.fragment,o),L(jo.$$.fragment,o),L(Po.$$.fragment,o),L(No.$$.fragment,o),L(Wo.$$.fragment,o),L(Jo.$$.fragment,o),L(Oo.$$.fragment,o),L(Zo.$$.fragment,o),L(Zt.$$.fragment,o),L(Rt.$$.fragment,o),L(Ro.$$.fragment,o),L(Vo.$$.fragment,o),L(Ko.$$.fragment,o),L(Ht.$$.fragment,o),L(Qt.$$.fragment,o),L(en.$$.fragment,o),L(tn.$$.fragment,o),L(Kt.$$.fragment,o),L(an.$$.fragment,o),L(to.$$.fragment,o),L(oo.$$.fragment,o),L(rn.$$.fragment,o),L(ln.$$.fragment,o),L(so.$$.fragment,o),L(pn.$$.fragment,o),L(ao.$$.fragment,o),L(ro.$$.fragment,o),L(un.$$.fragment,o),L(mn.$$.fragment,o),L(Mn.$$.fragment,o),L(lo.$$.fragment,o),L(co.$$.fragment,o),L(Tn.$$.fragment,o),L(wn.$$.fragment,o),L(zn.$$.fragment,o),L(po.$$.fragment,o),L(uo.$$.fragment,o),Ja=!1},d(o){t(p),o&&t(k),o&&t(f),$(l),o&&t(Ge),o&&t(P),$(x),o&&t(Ee),o&&t(U),o&&t(Xe),o&&t(B),o&&t(Fe),o&&t(D),o&&t(ve),o&&t(z),o&&t(ze),o&&t(C),$(ce),o&&t(Ce),o&&t(W),o&&t(ye),o&&t(q),$(he),o&&t(ct),o&&t(j),$(we),$(Nt),o&&t($a),o&&t(wt),$(Lo),o&&t(xa),o&&t(J),$($o),$(Eo),$(Fo),$(Co),$(qo),o&&t(Ga),o&&t(Lt),$(jo),o&&t(Ea),o&&t(fe),$(Po),$(No),$(Wo),o&&t(Xa),o&&t($t),$(Jo),o&&t(Fa),o&&t(ge),$(Oo),$(Zo),$(Zt),$(Rt),o&&t(za),o&&t(Gt),$(Ro),o&&t(Ca),o&&t(_e),$(Vo),$(Ko),$(Ht),$(Qt),o&&t(qa),o&&t(Xt),$(en),o&&t(ja),o&&t(Q),$(tn),$(Kt),$(an),$(to),$(oo),o&&t(Pa),o&&t(zt),$(rn),o&&t(Ia),o&&t(Y),$(ln),$(so),$(pn),$(ao),$(ro),o&&t(Aa),o&&t(qt),$(un),o&&t(Na),o&&t(K),$(mn),$(Mn),$(lo),$(co),o&&t(Ua),o&&t(Pt),$(Tn),o&&t(Wa),o&&t(O),$(wn),$(zn),$(po),$(uo)}}}const Np={local:"xglm",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.XGLMConfig",title:"XGLMConfig"},{local:"transformers.XGLMTokenizer",title:"XGLMTokenizer"},{local:"transformers.XGLMTokenizerFast",title:"XGLMTokenizerFast"},{local:"transformers.XGLMModel",title:"XGLMModel"},{local:"transformers.XGLMForCausalLM",title:"XGLMForCausalLM"},{local:"transformers.TFXGLMModel",title:"TFXGLMModel"},{local:"transformers.TFXGLMForCausalLM",title:"TFXGLMForCausalLM"},{local:"transformers.FlaxXGLMModel",title:"FlaxXGLMModel"},{local:"transformers.FlaxXGLMForCausalLM",title:"FlaxXGLMForCausalLM"}],title:"XGLM"};function Up(F){return Mp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Zp extends vp{constructor(p){super();yp(this,p,Up,Ap,kp,{})}}export{Zp as default,Np as metadata};
