import{S as vp,i as kp,s as yp,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 Pn}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 In}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ze}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as An}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Tp(F){let p,y,f,m,v;return m=new In({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"),y=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);y=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,y),g(l,f,u),T(m,l,u),v=!0},p:Pn,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,y,f,m,v;return{c(){p=n("p"),y=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);y=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,y),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function Lp(F){let p,y,f,m,v;return m=new In({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"),y=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);y=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,y),g(l,f,u),T(m,l,u),v=!0},p:Pn,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,y,f,m,v;return{c(){p=n("p"),y=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);y=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,y),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function xp(F){let p,y,f,m,v;return m=new In({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"),y=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);y=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,y),g(l,f,u),T(m,l,u),v=!0},p:Pn,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,y,f,m,v,l,u,G,Se,Ge,A,ee,ne,x,Re,S,Ve,Ee,W,He,se,ae,Qe,Xe,B,Ye,Fe,D,Me,Ke,ve,z,P,re,ie,et,le,de,tt,ze,C,te,R,ce,ot,V,nt,Ce,U,Te,Z,st,ke,q,oe,I,he,at;return{c(){p=n("p"),y=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"),Se=r("having all inputs as keyword arguments (like PyTorch models), or"),Ge=c(),A=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 `),S=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 `),W=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"),P=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(),U=n("li"),Te=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Z=n("code"),st=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ke=c(),q=n("p"),oe=r(`Note that when creating models and layers with
`),I=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(k){p=s(k,"P",{});var X=a(p);y=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(k),u=s(k,"UL",{});var j=a(u);G=s(j,"LI",{});var we=a(G);Se=i(we,"having all inputs as keyword arguments (like PyTorch models), or"),we.forEach(t),Ge=h(j),A=s(j,"LI",{});var _t=a(A);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(k),x=s(k,"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 `),S=s(E,"CODE",{});var vt=a(S);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 `),W=s(E,"CODE",{});var qe=a(W);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 kt=a(ae);Qe=i(kt,"fit()"),kt.forEach(t),Xe=i(E," and "),B=s(E,"CODE",{});var yt=a(B);Ye=i(yt,"predict()"),yt.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(k),z=s(k,"UL",{});var H=a(z);P=s(H,"LI",{});var pe=a(P);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),U=s(H,"LI",{});var rt=a(U);Te=i(rt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Z=s(rt,"CODE",{});var Ae=a(Z);st=i(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(t),rt.forEach(t),H.forEach(t),ke=h(k),q=s(k,"P",{});var $e=a(q);oe=i($e,`Note that when creating models and layers with
`),I=s($e,"A",{href:!0,rel:!0});var Tt=a(I);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(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),d(I,"rel","nofollow")},m(k,X){g(k,p,X),e(p,y),e(p,f),e(f,m),e(p,v),g(k,l,X),g(k,u,X),e(u,G),e(G,Se),e(u,Ge),e(u,A),e(A,ee),g(k,ne,X),g(k,x,X),e(x,Re),e(x,S),e(S,Ve),e(x,Ee),e(x,W),e(W,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(k,ve,X),g(k,z,X),e(z,P),e(P,re),e(P,ie),e(ie,et),e(P,le),e(P,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,U),e(U,Te),e(U,Z),e(Z,st),g(k,ke,X),g(k,q,X),e(q,oe),e(q,I),e(I,he),e(q,at)},d(k){k&&t(p),k&&t(l),k&&t(u),k&&t(ne),k&&t(x),k&&t(ve),k&&t(z),k&&t(ke),k&&t(q)}}}function Ep(F){let p,y,f,m,v;return{c(){p=n("p"),y=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);y=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,y),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function Xp(F){let p,y,f,m,v;return m=new In({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"),y=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);y=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,y),g(l,f,u),T(m,l,u),v=!0},p:Pn,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,y,f,m,v,l,u,G,Se,Ge,A,ee,ne,x,Re,S,Ve,Ee,W,He,se,ae,Qe,Xe,B,Ye,Fe,D,Me,Ke,ve,z,P,re,ie,et,le,de,tt,ze,C,te,R,ce,ot,V,nt,Ce,U,Te,Z,st,ke,q,oe,I,he,at;return{c(){p=n("p"),y=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"),Se=r("having all inputs as keyword arguments (like PyTorch models), or"),Ge=c(),A=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 `),S=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 `),W=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"),P=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(),U=n("li"),Te=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Z=n("code"),st=r('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ke=c(),q=n("p"),oe=r(`Note that when creating models and layers with
`),I=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(k){p=s(k,"P",{});var X=a(p);y=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(k),u=s(k,"UL",{});var j=a(u);G=s(j,"LI",{});var we=a(G);Se=i(we,"having all inputs as keyword arguments (like PyTorch models), or"),we.forEach(t),Ge=h(j),A=s(j,"LI",{});var _t=a(A);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(k),x=s(k,"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 `),S=s(E,"CODE",{});var vt=a(S);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 `),W=s(E,"CODE",{});var qe=a(W);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 kt=a(ae);Qe=i(kt,"fit()"),kt.forEach(t),Xe=i(E," and "),B=s(E,"CODE",{});var yt=a(B);Ye=i(yt,"predict()"),yt.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(k),z=s(k,"UL",{});var H=a(z);P=s(H,"LI",{});var pe=a(P);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),U=s(H,"LI",{});var rt=a(U);Te=i(rt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Z=s(rt,"CODE",{});var Ae=a(Z);st=i(Ae,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ae.forEach(t),rt.forEach(t),H.forEach(t),ke=h(k),q=s(k,"P",{});var $e=a(q);oe=i($e,`Note that when creating models and layers with
`),I=s($e,"A",{href:!0,rel:!0});var Tt=a(I);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(I,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),d(I,"rel","nofollow")},m(k,X){g(k,p,X),e(p,y),e(p,f),e(f,m),e(p,v),g(k,l,X),g(k,u,X),e(u,G),e(G,Se),e(u,Ge),e(u,A),e(A,ee),g(k,ne,X),g(k,x,X),e(x,Re),e(x,S),e(S,Ve),e(x,Ee),e(x,W),e(W,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(k,ve,X),g(k,z,X),e(z,P),e(P,re),e(P,ie),e(ie,et),e(P,le),e(P,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,U),e(U,Te),e(U,Z),e(Z,st),g(k,ke,X),g(k,q,X),e(q,oe),e(q,I),e(I,he),e(q,at)},d(k){k&&t(p),k&&t(l),k&&t(u),k&&t(ne),k&&t(x),k&&t(ve),k&&t(z),k&&t(ke),k&&t(q)}}}function zp(F){let p,y,f,m,v;return{c(){p=n("p"),y=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);y=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,y),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function Cp(F){let p,y,f,m,v;return m=new In({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"),y=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);y=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,y),g(l,f,u),T(m,l,u),v=!0},p:Pn,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,y,f,m,v;return{c(){p=n("p"),y=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);y=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,y),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function jp(F){let p,y,f,m,v;return m=new In({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"),y=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);y=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,y),g(l,f,u),T(m,l,u),v=!0},p:Pn,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,y,f,m,v;return{c(){p=n("p"),y=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);y=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,y),e(p,f),e(f,m),e(p,v)},d(l){l&&t(p)}}}function Pp(F){let p,y,f,m,v;return m=new In({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"),y=r("Example:"),f=c(),b(m.$$.fragment)},l(l){p=s(l,"P",{});var u=a(p);y=i(u,"Example:"),u.forEach(t),f=h(l),M(m.$$.fragment,l)},m(l,u){g(l,p,u),e(p,y),g(l,f,u),T(m,l,u),v=!0},p:Pn,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 Ip(F){let p,y,f,m,v,l,u,G,Se,Ge,A,ee,ne,x,Re,S,Ve,Ee,W,He,se,ae,Qe,Xe,B,Ye,Fe,D,Me,Ke,ve,z,P,re,ie,et,le,de,tt,ze,C,te,R,ce,ot,V,nt,Ce,U,Te,Z,st,ke,q,oe,I,he,at,k,X,ct,j,we,_t,E,vt,qe,kt,yt,Le,H,pe,bt,ue,me,je,Mt,rt,Ae,$e,Tt,kr,Nt,$a,wt,Wt,gs,Lo,yr,_s,br,xa,J,$o,Mr,it,Tr,Nn,wr,Lr,Wn,$r,xr,xo,Gr,Er,Xr,Go,Fr,Un,zr,Cr,qr,ht,Eo,jr,vs,Ar,Pr,Xo,Jn,Ir,ks,Nr,Wr,On,Ur,ys,Jr,Or,Ut,Fo,Br,zo,Dr,bs,Zr,Sr,Rr,Jt,Co,Vr,Ms,Hr,Qr,Bn,qo,Ga,Lt,Ot,Ts,jo,Yr,ws,Kr,Ea,fe,Ao,ei,xe,ti,Ls,oi,ni,Dn,si,ai,Zn,ri,ii,Po,li,di,ci,Io,hi,Sn,pi,ui,mi,pt,No,fi,$s,gi,_i,Wo,Rn,vi,xs,ki,yi,Vn,bi,Gs,Mi,Ti,Bt,Uo,wi,Es,Li,Xa,$t,Dt,Xs,Jo,$i,Fs,xi,Fa,ge,Oo,Gi,Bo,Ei,Hn,Xi,Fi,zi,Do,Ci,Zo,qi,ji,Ai,Zt,Pi,zs,Ii,Ni,Cs,Wi,Ui,Pe,So,Ji,xt,Oi,Qn,Bi,Di,qs,Zi,Si,Ri,St,Vi,Rt,za,Gt,Vt,js,Ro,Hi,As,Qi,Ca,_e,Vo,Yi,Ps,Ki,el,Ho,tl,Yn,ol,nl,sl,Qo,al,Yo,rl,il,ll,Ie,Ko,dl,Et,cl,Kn,hl,pl,Is,ul,ml,fl,Ht,gl,Qt,qa,Xt,Yt,Ns,en,_l,Ws,vl,ja,Q,tn,kl,on,yl,es,bl,Ml,Tl,nn,wl,sn,Ll,$l,xl,Kt,Gl,eo,El,Us,Xl,Fl,Js,zl,Cl,Ne,an,ql,Ft,jl,ts,Al,Pl,Os,Il,Nl,Wl,to,Ul,oo,Aa,zt,no,Bs,rn,Jl,Ds,Ol,Pa,Y,ln,Bl,Zs,Dl,Zl,dn,Sl,os,Rl,Vl,Hl,cn,Ql,hn,Yl,Kl,ed,so,td,We,pn,od,Ct,nd,ns,sd,ad,Ss,rd,id,ld,ao,dd,ro,Ia,qt,io,Rs,un,cd,Vs,hd,Na,K,mn,pd,fn,ud,ss,md,fd,gd,gn,_d,_n,vd,kd,yd,Hs,bd,Md,lt,Qs,vn,Td,wd,Ys,kn,Ld,$d,Ks,yn,xd,Gd,ea,bn,Ed,Xd,Ue,Mn,Fd,jt,zd,ta,Cd,qd,oa,jd,Ad,Pd,lo,Id,co,Wa,At,ho,na,Tn,Nd,sa,Wd,Ua,O,wn,Ud,aa,Jd,Od,Ln,Bd,as,Dd,Zd,Sd,$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,Pt,dc,ha,cc,hc,pa,pc,uc,mc,po,fc,uo,Ja;return l=new Ze({}),x=new Ze({}),ce=new Ze({}),he=new Ze({}),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.31.0/en/model_doc/xglm#transformers.XGLMModel">XGLMModel</a> or <a href="/docs/transformers/v4.31.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.31.0/src/transformers/models/xglm/configuration_xglm.py#L29"}}),Nt=new An({props:{anchor:"transformers.XGLMConfig.example",$$slots:{default:[Tp]},$$scope:{ctx:F}}}),Lo=new Ze({}),$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.31.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.31.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.31.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.31.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.31.0/src/transformers/models/xglm/tokenization_xglm.py#L298"}}),jo=new Ze({}),Ao=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.31.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.31.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>
`}}),Uo=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.31.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 Ze({}),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.31.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.31.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.31.0/src/transformers/models/xglm/modeling_xglm.py#L515"}}),So=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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/xglm/modeling_xglm.py#L576",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),St=new wo({props:{$$slots:{default:[wp]},$$scope:{ctx:F}}}),Rt=new An({props:{anchor:"transformers.XGLMModel.forward.example",$$slots:{default:[Lp]},$$scope:{ctx:F}}}),Ro=new Ze({}),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.31.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.31.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.31.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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/xglm/modeling_xglm.py#L774",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 An({props:{anchor:"transformers.XGLMForCausalLM.forward.example",$$slots:{default:[xp]},$$scope:{ctx:F}}}),en=new Ze({}),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.31.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.31.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.31.0/src/transformers/models/xglm/modeling_tf_xglm.py#L736"}}),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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/xglm/modeling_tf_xglm.py#L752",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 An({props:{anchor:"transformers.TFXGLMModel.call.example",$$slots:{default:[Xp]},$$scope:{ctx:F}}}),rn=new Ze({}),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.31.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.31.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.31.0/src/transformers/models/xglm/modeling_tf_xglm.py#L803"}}),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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/xglm/modeling_tf_xglm.py#L853",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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.31.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.31.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.31.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 An({props:{anchor:"transformers.TFXGLMForCausalLM.call.example",$$slots:{default:[Cp]},$$scope:{ctx:F}}}),un=new Ze({}),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.31.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.31.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.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.31.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:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"encoder_hidden_states",val:": typing.Optional[jax.Array] = None"},{name:"encoder_attention_mask",val:": typing.Optional[jax.Array] = 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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/xglm/modeling_flax_xglm.py#L611",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 An({props:{anchor:"transformers.FlaxXGLMModel.__call__.example",$$slots:{default:[jp]},$$scope:{ctx:F}}}),Tn=new Ze({}),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.31.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.31.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.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.31.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:": Array"},{name:"attention_mask",val:": typing.Optional[jax.Array] = None"},{name:"position_ids",val:": typing.Optional[jax.Array] = None"},{name:"encoder_hidden_states",val:": typing.Optional[jax.Array] = None"},{name:"encoder_attention_mask",val:": typing.Optional[jax.Array] = 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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/xglm/modeling_flax_xglm.py#L611",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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:[Ap]},$$scope:{ctx:F}}}),uo=new An({props:{anchor:"transformers.FlaxXGLMForCausalLM.__call__.example",$$slots:{default:[Pp]},$$scope:{ctx:F}}}),{c(){p=n("meta"),y=c(),f=n("h1"),m=n("a"),v=n("span"),b(l.$$.fragment),u=c(),G=n("span"),Se=r("XGLM"),Ge=c(),A=n("h2"),ee=n("a"),ne=n("span"),b(x.$$.fragment),Re=c(),S=n("span"),Ve=r("Overview"),Ee=c(),W=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"),P=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(),U=n("ul"),Te=n("li"),Z=n("a"),st=r("Causal language modeling task guide"),ke=c(),q=n("h2"),oe=n("a"),I=n("span"),b(he.$$.fragment),at=c(),k=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"),kt=r("XGLMModel"),yt=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 `),Ae=n("a"),$e=r("PretrainedConfig"),Tt=r(" for more information."),kr=c(),b(Nt.$$.fragment),$a=c(),wt=n("h2"),Wt=n("a"),gs=n("span"),b(Lo.$$.fragment),yr=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 "),Wn=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 "),Un=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"),Ar=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:`),Pr=c(),Xo=n("ul"),Jn=n("li"),Ir=r("single sequence: "),ks=n("code"),Nr=r("<s> X </s>"),Wr=c(),On=n("li"),Ur=r("pair of sequences: "),ys=n("code"),Jr=r("<s> A </s></s> B </s>"),Or=c(),Ut=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"),Zr=r("prepare_for_model"),Sr=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(Ao.$$.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 `),Zn=n("a"),ri=r("XLNetTokenizer"),ii=r(`. Based on
`),Po=n("a"),li=r("BPE"),di=r("."),ci=c(),Io=n("p"),hi=r("This tokenizer inherits from "),Sn=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(),Wo=n("ul"),Rn=n("li"),vi=r("single sequence: "),xs=n("code"),ki=r("<s> X </s>"),yi=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(Uo.$$.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 "),Zo=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.`),Ai=c(),Zt=n("p"),Pi=r("Transformer decoder consisting of "),zs=n("em"),Ii=r("config.num_layers"),Ni=r(" layers. Each layer is a "),Cs=n("code"),Wi=r("XGLMDecoderLayer"),Ui=c(),Pe=n("div"),b(So.$$.fragment),Ji=c(),xt=n("p"),Oi=r("The "),Qn=n("a"),Bi=r("XGLMModel"),Di=r(" forward method, overrides the "),qs=n("code"),Zi=r("__call__"),Si=r(" special method."),Ri=c(),b(St.$$.fragment),Vi=c(),b(Rt.$$.fragment),za=c(),Gt=n("h2"),Vt=n("a"),js=n("span"),b(Ro.$$.fragment),Hi=c(),As=n("span"),Qi=r("XGLMForCausalLM"),Ca=c(),_e=n("div"),b(Vo.$$.fragment),Yi=c(),Ps=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(),Ie=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 "),Is=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(),Ws=n("span"),vl=r("TFXGLMModel"),ja=c(),Q=n("div"),b(tn.$$.fragment),kl=c(),on=n("p"),yl=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 "),Us=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"),Al=r("TFXGLMModel"),Pl=r(" forward method, overrides the "),Os=n("code"),Il=r("__call__"),Nl=r(" special method."),Wl=c(),b(to.$$.fragment),Ul=c(),b(oo.$$.fragment),Aa=c(),zt=n("h2"),no=n("a"),Bs=n("span"),b(rn.$$.fragment),Jl=c(),Ds=n("span"),Ol=r("TFXGLMForCausalLM"),Pa=c(),Y=n("div"),b(ln.$$.fragment),Bl=c(),Zs=n("p"),Dl=r(`The XGLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Zl=c(),dn=n("p"),Sl=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(),We=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 "),Ss=n("code"),rd=r("__call__"),id=r(" special method."),ld=c(),b(ao.$$.fragment),dd=c(),b(ro.$$.fragment),Ia=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"),kd=r(` subclass. Use it as a
regular Flax Module and refer to the Flax documentation for all matter related to general usage and behavior.`),yd=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"),kn=n("a"),Ld=r("Automatic Differentiation"),$d=c(),Ks=n("li"),yn=n("a"),xd=r("Vectorization"),Gd=c(),ea=n("li"),bn=n("a"),Ed=r("Parallelization"),Xd=c(),Ue=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__"),Ad=r(" special method."),Pd=c(),b(lo.$$.fragment),Id=c(),b(co.$$.fragment),Wa=c(),At=n("h2"),ho=n("a"),na=n("span"),b(Tn.$$.fragment),Nd=c(),sa=n("span"),Wd=r("FlaxXGLMForCausalLM"),Ua=c(),O=n("div"),b(wn.$$.fragment),Ud=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"),Zd=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.)`),Sd=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(),Pt=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),y=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);Se=i(fa,"XGLM"),fa.forEach(t),Cn.forEach(t),Ge=h(o),A=s(o,"H2",{class:!0});var qn=a(A);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),S=s(qn,"SPAN",{});var va=a(S);Ve=i(va,"Overview"),va.forEach(t),qn.forEach(t),Ee=h(o),W=s(o,"P",{});var jn=a(W);He=i(jn,"The XGLM model was proposed in "),se=s(jn,"A",{href:!0,rel:!0});var ka=a(se);ae=i(ka,"Few-shot Learning with Multilingual Language Models"),ka.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 ya=a(B);Ye=i(ya,"The abstract from the paper is the following:"),ya.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 It=a(z);P=i(It,"This model was contributed by "),re=s(It,"A",{href:!0,rel:!0});var Ta=a(re);ie=i(Ta,"Suraj"),Ta.forEach(t),et=i(It,". The original code can be found "),le=s(It,"A",{href:!0,rel:!0});var yc=a(le);de=i(yc,"here"),yc.forEach(t),tt=i(It,"."),It.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),U=s(o,"UL",{});var wc=a(U);Te=s(wc,"LI",{});var Lc=a(Te);Z=s(Lc,"A",{href:!0});var $c=a(Z);st=i($c,"Causal language modeling task guide"),$c.forEach(t),Lc.forEach(t),wc.forEach(t),ke=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);I=s(xc,"SPAN",{});var Gc=a(I);M(he.$$.fragment,Gc),Gc.forEach(t),xc.forEach(t),at=h(Ba),k=s(Ba,"SPAN",{});var Ec=a(k);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);kt=i(Xc,"XGLMModel"),Xc.forEach(t),yt=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 `),Ae=s(is,"A",{href:!0});var Cc=a(Ae);$e=i(Cc,"PretrainedConfig"),Cc.forEach(t),Tt=i(is," for more information."),is.forEach(t),kr=h(mo),M(Nt.$$.fragment,mo),mo.forEach(t),$a=h(o),wt=s(o,"H2",{class:!0});var Da=a(wt);Wt=s(Da,"A",{id:!0,class:!0,href:!0});var qc=a(Wt);gs=s(qc,"SPAN",{});var jc=a(gs);M(Lo.$$.fragment,jc),jc.forEach(t),qc.forEach(t),yr=h(Da),_s=s(Da,"SPAN",{});var Ac=a(_s);br=i(Ac,"XGLMTokenizer"),Ac.forEach(t),Da.forEach(t),xa=h(o),J=s(o,"DIV",{class:!0});var ye=a(J);M($o.$$.fragment,ye),Mr=h(ye),it=s(ye,"P",{});var fo=a(it);Tr=i(fo,"Adapted from "),Nn=s(fo,"A",{href:!0});var Pc=a(Nn);wr=i(Pc,"RobertaTokenizer"),Pc.forEach(t),Lr=i(fo," and "),Wn=s(fo,"A",{href:!0});var Ic=a(Wn);$r=i(Ic,"XLNetTokenizer"),Ic.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(ye),Go=s(ye,"P",{});var Za=a(Go);Fr=i(Za,"This tokenizer inherits from "),Un=s(Za,"A",{href:!0});var Wc=a(Un);zr=i(Wc,"PreTrainedTokenizer"),Wc.forEach(t),Cr=i(Za,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Za.forEach(t),qr=h(ye),ht=s(ye,"DIV",{class:!0});var ls=a(ht);M(Eo.$$.fragment,ls),jr=h(ls),vs=s(ls,"P",{});var Uc=a(vs);Ar=i(Uc,`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:`),Uc.forEach(t),Pr=h(ls),Xo=s(ls,"UL",{});var Sa=a(Xo);Jn=s(Sa,"LI",{});var gc=a(Jn);Ir=i(gc,"single sequence: "),ks=s(gc,"CODE",{});var Jc=a(ks);Nr=i(Jc,"<s> X </s>"),Jc.forEach(t),gc.forEach(t),Wr=h(Sa),On=s(Sa,"LI",{});var _c=a(On);Ur=i(_c,"pair of sequences: "),ys=s(_c,"CODE",{});var Oc=a(ys);Jr=i(Oc,"<s> A </s></s> B </s>"),Oc.forEach(t),_c.forEach(t),Sa.forEach(t),ls.forEach(t),Or=h(ye),Ut=s(ye,"DIV",{class:!0});var Ra=a(Ut);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);Zr=i(Bc,"prepare_for_model"),Bc.forEach(t),Sr=i(Va," method."),Va.forEach(t),Ra.forEach(t),Rr=h(ye),Jt=s(ye,"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(ye),Bn=s(ye,"DIV",{class:!0});var Zc=a(Bn);M(qo.$$.fragment,Zc),Zc.forEach(t),ye.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 Sc=a(Ot);Ts=s(Sc,"SPAN",{});var Rc=a(Ts);M(jo.$$.fragment,Rc),Rc.forEach(t),Sc.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(Ao.$$.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 `),Zn=s(mt,"A",{href:!0});var Yc=a(Zn);ri=i(Yc,"XLNetTokenizer"),Yc.forEach(t),ii=i(mt,`. Based on
`),Po=s(mt,"A",{href:!0,rel:!0});var Kc=a(Po);li=i(Kc,"BPE"),Kc.forEach(t),di=i(mt,"."),mt.forEach(t),ci=h(ut),Io=s(ut,"P",{});var Ya=a(Io);hi=i(Ya,"This tokenizer inherits from "),Sn=s(Ya,"A",{href:!0});var eh=a(Sn);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),Wo=s(ds,"UL",{});var Ka=a(Wo);Rn=s(Ka,"LI",{});var vc=a(Rn);vi=i(vc,"single sequence: "),xs=s(vc,"CODE",{});var oh=a(xs);ki=i(oh,"<s> X </s>"),oh.forEach(t),vc.forEach(t),yi=h(Ka),Vn=s(Ka,"LI",{});var kc=a(Vn);bi=i(kc,"pair of sequences: "),Gs=s(kc,"CODE",{});var nh=a(Gs);Mi=i(nh,"<s> A </s></s> B </s>"),nh.forEach(t),kc.forEach(t),Ka.forEach(t),ds.forEach(t),Ti=h(ut),Bt=s(ut,"DIV",{class:!0});var er=a(Bt);M(Uo.$$.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 "),Zo=s(nr,"A",{href:!0,rel:!0});var dh=a(Zo);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),Ai=h(ft),Zt=s(ft,"P",{});var wa=a(Zt);Pi=i(wa,"Transformer decoder consisting of "),zs=s(wa,"EM",{});var ch=a(zs);Ii=i(ch,"config.num_layers"),ch.forEach(t),Ni=i(wa," layers. Each layer is a "),Cs=s(wa,"CODE",{});var hh=a(Cs);Wi=i(hh,"XGLMDecoderLayer"),hh.forEach(t),wa.forEach(t),Ui=h(ft),Pe=s(ft,"DIV",{class:!0});var go=a(Pe);M(So.$$.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);Zi=i(uh,"__call__"),uh.forEach(t),Si=i(cs," special method."),cs.forEach(t),Ri=h(go),M(St.$$.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),As=s(sr,"SPAN",{});var gh=a(As);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),Ps=s(gt,"P",{});var _h=a(Ps);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 kh=a(Yo);rl=i(kh,"torch.nn.Module"),kh.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),Ie=s(gt,"DIV",{class:!0});var _o=a(Ie);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 yh=a(Kn);hl=i(yh,"XGLMForCausalLM"),yh.forEach(t),pl=i(hs," forward method, overrides the "),Is=s(hs,"CODE",{});var bh=a(Is);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),Ws=s(ir,"SPAN",{});var wh=a(Ws);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),kl=h(Oe),on=s(Oe,"P",{});var lr=a(on);yl=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 "),Us=s(La,"EM",{});var xh=a(Us);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);Al=i(Eh,"TFXGLMModel"),Eh.forEach(t),Pl=i(ps," forward method, overrides the "),Os=s(ps,"CODE",{});var Xh=a(Os);Il=i(Xh,"__call__"),Xh.forEach(t),Nl=i(ps," special method."),ps.forEach(t),Wl=h(vo),M(to.$$.fragment,vo),Ul=h(vo),M(oo.$$.fragment,vo),vo.forEach(t),Oe.forEach(t),Aa=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),Pa=h(o),Y=s(o,"DIV",{class:!0});var Be=a(Y);M(ln.$$.fragment,Be),Bl=h(Be),Zs=s(Be,"P",{});var qh=a(Zs);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),Zl=h(Be),dn=s(Be,"P",{});var hr=a(dn);Sl=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 Ah=a(hn);Yl=i(Ah,"tf.keras.Model"),Ah.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),We=s(Be,"DIV",{class:!0});var ko=a(We);M(pn.$$.fragment,ko),od=h(ko),Ct=s(ko,"P",{});var us=a(Ct);nd=i(us,"The "),ns=s(us,"A",{href:!0});var Ph=a(ns);sd=i(Ph,"TFXGLMForCausalLM"),Ph.forEach(t),ad=i(us," forward method, overrides the "),Ss=s(us,"CODE",{});var Ih=a(Ss);rd=i(Ih,"__call__"),Ih.forEach(t),id=i(us," special method."),us.forEach(t),ld=h(ko),M(ao.$$.fragment,ko),dd=h(ko),M(ro.$$.fragment,ko),ko.forEach(t),Be.forEach(t),Ia=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 Wh=a(Rs);M(un.$$.fragment,Wh),Wh.forEach(t),Nh.forEach(t),cd=h(ur),Vs=s(ur,"SPAN",{});var Uh=a(Vs);hd=i(Uh,"FlaxXGLMModel"),Uh.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),kd=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),yd=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 yo=a(lt);Qs=s(yo,"LI",{});var Dh=a(Qs);vn=s(Dh,"A",{href:!0,rel:!0});var Zh=a(vn);Td=i(Zh,"Just-In-Time (JIT) compilation"),Zh.forEach(t),Dh.forEach(t),wd=h(yo),Ys=s(yo,"LI",{});var Sh=a(Ys);kn=s(Sh,"A",{href:!0,rel:!0});var Rh=a(kn);Ld=i(Rh,"Automatic Differentiation"),Rh.forEach(t),Sh.forEach(t),$d=h(yo),Ks=s(yo,"LI",{});var Vh=a(Ks);yn=s(Vh,"A",{href:!0,rel:!0});var Hh=a(yn);xd=i(Hh,"Vectorization"),Hh.forEach(t),Vh.forEach(t),Gd=h(yo),ea=s(yo,"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),yo.forEach(t),Xd=h(De),Ue=s(De,"DIV",{class:!0});var bo=a(Ue);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),Ad=i(ms," special method."),ms.forEach(t),Pd=h(bo),M(lo.$$.fragment,bo),Id=h(bo),M(co.$$.fragment,bo),bo.forEach(t),De.forEach(t),Wa=h(o),At=s(o,"H2",{class:!0});var gr=a(At);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);Wd=i(np,"FlaxXGLMForCausalLM"),np.forEach(t),gr.forEach(t),Ua=h(o),O=s(o,"DIV",{class:!0});var be=a(O);M(wn.$$.fragment,be),Ud=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),Zd=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),Sd=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),Pt=s(To,"P",{});var fs=a(Pt);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(A,"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(Z,"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.31.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.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(Ae,"href","/docs/transformers/v4.31.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(Wt,"id","transformers.XGLMTokenizer"),d(Wt,"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(Wt,"href","#transformers.XGLMTokenizer"),d(wt,"class","relative group"),d(Nn,"href","/docs/transformers/v4.31.0/en/model_doc/roberta#transformers.RobertaTokenizer"),d(Wn,"href","/docs/transformers/v4.31.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),d(xo,"href","https://github.com/google/sentencepiece"),d(xo,"rel","nofollow"),d(Un,"href","/docs/transformers/v4.31.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(Ut,"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.31.0/en/model_doc/roberta#transformers.RobertaTokenizer"),d(Zn,"href","/docs/transformers/v4.31.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),d(Po,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),d(Po,"rel","nofollow"),d(Sn,"href","/docs/transformers/v4.31.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.31.0/en/main_classes/model#transformers.PreTrainedModel"),d(Zo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Zo,"rel","nofollow"),d(Qn,"href","/docs/transformers/v4.31.0/en/model_doc/xglm#transformers.XGLMModel"),d(Pe,"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.31.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.31.0/en/model_doc/xglm#transformers.XGLMForCausalLM"),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(_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.31.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.31.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.31.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.31.0/en/model_doc/xglm#transformers.TFXGLMForCausalLM"),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(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.31.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(kn,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),d(kn,"rel","nofollow"),d(yn,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),d(yn,"rel","nofollow"),d(bn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(bn,"rel","nofollow"),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(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(At,"class","relative group"),d(as,"href","/docs/transformers/v4.31.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,y,_),g(o,f,_),e(f,m),e(m,v),T(l,v,null),e(f,u),e(f,G),e(G,Se),g(o,Ge,_),g(o,A,_),e(A,ee),e(ee,ne),T(x,ne,null),e(A,Re),e(A,S),e(S,Ve),g(o,Ee,_),g(o,W,_),e(W,He),e(W,se),e(se,ae),e(W,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,P),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,U,_),e(U,Te),e(Te,Z),e(Z,st),g(o,ke,_),g(o,q,_),e(q,oe),e(oe,I),T(he,I,null),e(q,at),e(q,k),e(k,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,kt),e(E,yt),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,Ae),e(Ae,$e),e(ue,Tt),e(j,kr),T(Nt,j,null),g(o,$a,_),g(o,wt,_),e(wt,Wt),e(Wt,gs),T(Lo,gs,null),e(wt,yr),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,Wn),e(Wn,$r),e(it,xr),e(it,xo),e(xo,Gr),e(it,Er),e(J,Xr),e(J,Go),e(Go,Fr),e(Go,Un),e(Un,zr),e(Go,Cr),e(J,qr),e(J,ht),T(Eo,ht,null),e(ht,jr),e(ht,vs),e(vs,Ar),e(ht,Pr),e(ht,Xo),e(Xo,Jn),e(Jn,Ir),e(Jn,ks),e(ks,Nr),e(Xo,Wr),e(Xo,On),e(On,Ur),e(On,ys),e(ys,Jr),e(J,Or),e(J,Ut),T(Fo,Ut,null),e(Ut,Br),e(Ut,zo),e(zo,Dr),e(zo,bs),e(bs,Zr),e(zo,Sr),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(Ao,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,Zn),e(Zn,ri),e(xe,ii),e(xe,Po),e(Po,li),e(xe,di),e(fe,ci),e(fe,Io),e(Io,hi),e(Io,Sn),e(Sn,pi),e(Io,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,Wo),e(Wo,Rn),e(Rn,vi),e(Rn,xs),e(xs,ki),e(Wo,yi),e(Wo,Vn),e(Vn,bi),e(Vn,Gs),e(Gs,Mi),e(fe,Ti),e(fe,Bt),T(Uo,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,Zo),e(Zo,qi),e(Do,ji),e(ge,Ai),e(ge,Zt),e(Zt,Pi),e(Zt,zs),e(zs,Ii),e(Zt,Ni),e(Zt,Cs),e(Cs,Wi),e(ge,Ui),e(ge,Pe),T(So,Pe,null),e(Pe,Ji),e(Pe,xt),e(xt,Oi),e(xt,Qn),e(Qn,Bi),e(xt,Di),e(xt,qs),e(qs,Zi),e(xt,Si),e(Pe,Ri),T(St,Pe,null),e(Pe,Vi),T(Rt,Pe,null),g(o,za,_),g(o,Gt,_),e(Gt,Vt),e(Vt,js),T(Ro,js,null),e(Gt,Hi),e(Gt,As),e(As,Qi),g(o,Ca,_),g(o,_e,_),T(Vo,_e,null),e(_e,Yi),e(_e,Ps),e(Ps,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,Ie),T(Ko,Ie,null),e(Ie,dl),e(Ie,Et),e(Et,cl),e(Et,Kn),e(Kn,hl),e(Et,pl),e(Et,Is),e(Is,ul),e(Et,ml),e(Ie,fl),T(Ht,Ie,null),e(Ie,gl),T(Qt,Ie,null),g(o,qa,_),g(o,Xt,_),e(Xt,Yt),e(Yt,Ns),T(en,Ns,null),e(Xt,_l),e(Xt,Ws),e(Ws,vl),g(o,ja,_),g(o,Q,_),T(tn,Q,null),e(Q,kl),e(Q,on),e(on,yl),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,Us),e(Us,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,Al),e(Ft,Pl),e(Ft,Os),e(Os,Il),e(Ft,Nl),e(Ne,Wl),T(to,Ne,null),e(Ne,Ul),T(oo,Ne,null),g(o,Aa,_),g(o,zt,_),e(zt,no),e(no,Bs),T(rn,Bs,null),e(zt,Jl),e(zt,Ds),e(Ds,Ol),g(o,Pa,_),g(o,Y,_),T(ln,Y,null),e(Y,Bl),e(Y,Zs),e(Zs,Dl),e(Y,Zl),e(Y,dn),e(dn,Sl),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,We),T(pn,We,null),e(We,od),e(We,Ct),e(Ct,nd),e(Ct,ns),e(ns,sd),e(Ct,ad),e(Ct,Ss),e(Ss,rd),e(Ct,id),e(We,ld),T(ao,We,null),e(We,dd),T(ro,We,null),g(o,Ia,_),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,kd),e(K,yd),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,kn),e(kn,Ld),e(lt,$d),e(lt,Ks),e(Ks,yn),e(yn,xd),e(lt,Gd),e(lt,ea),e(ea,bn),e(bn,Ed),e(K,Xd),e(K,Ue),T(Mn,Ue,null),e(Ue,Fd),e(Ue,jt),e(jt,zd),e(jt,ta),e(ta,Cd),e(jt,qd),e(jt,oa),e(oa,jd),e(jt,Ad),e(Ue,Pd),T(lo,Ue,null),e(Ue,Id),T(co,Ue,null),g(o,Wa,_),g(o,At,_),e(At,ho),e(ho,na),T(Tn,na,null),e(At,Nd),e(At,sa),e(sa,Wd),g(o,Ua,_),g(o,O,_),T(wn,O,null),e(O,Ud),e(O,aa),e(aa,Jd),e(O,Od),e(O,Ln),e(Ln,Bd),e(Ln,as),e(as,Dd),e(Ln,Zd),e(O,Sd),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,Pt),e(Pt,dc),e(Pt,ha),e(ha,cc),e(Pt,hc),e(Pt,pa),e(pa,pc),e(Pt,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}),St.$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 ka={};_&2&&(ka.$$scope={dirty:_,ctx:o}),ao.$set(ka);const ya={};_&2&&(ya.$$scope={dirty:_,ctx:o}),ro.$set(ya);const ba={};_&2&&(ba.$$scope={dirty:_,ctx:o}),lo.$set(ba);const Ma={};_&2&&(Ma.$$scope={dirty:_,ctx:o}),co.$set(Ma);const It={};_&2&&(It.$$scope={dirty:_,ctx:o}),po.$set(It);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(Ao.$$.fragment,o),w(No.$$.fragment,o),w(Uo.$$.fragment,o),w(Jo.$$.fragment,o),w(Oo.$$.fragment,o),w(So.$$.fragment,o),w(St.$$.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(Ao.$$.fragment,o),L(No.$$.fragment,o),L(Uo.$$.fragment,o),L(Jo.$$.fragment,o),L(Oo.$$.fragment,o),L(So.$$.fragment,o),L(St.$$.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(y),o&&t(f),$(l),o&&t(Ge),o&&t(A),$(x),o&&t(Ee),o&&t(W),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(U),o&&t(ke),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),$(Ao),$(No),$(Uo),o&&t(Xa),o&&t($t),$(Jo),o&&t(Fa),o&&t(ge),$(Oo),$(So),$(St),$(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(Aa),o&&t(zt),$(rn),o&&t(Pa),o&&t(Y),$(ln),$(so),$(pn),$(ao),$(ro),o&&t(Ia),o&&t(qt),$(un),o&&t(Na),o&&t(K),$(mn),$(Mn),$(lo),$(co),o&&t(Wa),o&&t(At),$(Tn),o&&t(Ua),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 Wp(F){return Mp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sp extends vp{constructor(p){super();kp(this,p,Wp,Ip,yp,{})}}export{Sp as default,Np as metadata};
