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 An}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 Pn}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Tp(z){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:An,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(z){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(z){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:An,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(z){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(z){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:An,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(z){let p,y,f,m,v,l,u,G,Se,Ge,P,ee,ne,x,Re,S,Ve,Ee,U,He,se,ae,Qe,Xe,B,Ye,ze,D,Me,Ke,ve,F,A,re,ie,et,le,de,tt,Fe,C,te,R,ce,ot,V,nt,Ce,W,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(),P=n("li"),ee=r("having all inputs as a list, tuple or dict in the first positional argument."),ne=c(),x=n("p"),Re=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),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 `),U=n("code"),He=r("model.fit()"),se=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=n("code"),Qe=r("fit()"),Xe=r(" and "),B=n("code"),Ye=r("predict()"),ze=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(),F=n("ul"),A=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)"),Fe=c(),C=n("li"),te=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=n("code"),ce=r("model([input_ids, attention_mask])"),ot=r(" or "),V=n("code"),nt=r("model([input_ids, attention_mask, token_type_ids])"),Ce=c(),W=n("li"),Te=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),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),P=s(j,"LI",{});var _t=a(P);ee=i(_t,"having all inputs as a list, tuple or dict in the first positional argument."),_t.forEach(t),j.forEach(t),ne=h(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 `),U=s(E,"CODE",{});var qe=a(U);He=i(qe,"model.fit()"),qe.forEach(t),se=i(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=s(E,"CODE",{});var 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),ze=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),F=s(k,"UL",{});var H=a(F);A=s(H,"LI",{});var pe=a(A);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),Fe=h(H),C=s(H,"LI",{});var me=a(C);te=i(me,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=s(me,"CODE",{});var je=a(R);ce=i(je,"model([input_ids, attention_mask])"),je.forEach(t),ot=i(me," or "),V=s(me,"CODE",{});var Mt=a(V);nt=i(Mt,"model([input_ids, attention_mask, token_type_ids])"),Mt.forEach(t),me.forEach(t),Ce=h(H),W=s(H,"LI",{});var rt=a(W);Te=i(rt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Z=s(rt,"CODE",{});var Pe=a(Z);st=i(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.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,P),e(P,ee),g(k,ne,X),g(k,x,X),e(x,Re),e(x,S),e(S,Ve),e(x,Ee),e(x,U),e(U,He),e(x,se),e(x,ae),e(ae,Qe),e(x,Xe),e(x,B),e(B,Ye),e(x,ze),e(x,D),e(D,Me),e(x,Ke),g(k,ve,X),g(k,F,X),e(F,A),e(A,re),e(A,ie),e(ie,et),e(A,le),e(A,de),e(de,tt),e(F,Fe),e(F,C),e(C,te),e(C,R),e(R,ce),e(C,ot),e(C,V),e(V,nt),e(F,Ce),e(F,W),e(W,Te),e(W,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(F),k&&t(ke),k&&t(q)}}}function Ep(z){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(z){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:An,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 zp(z){let p,y,f,m,v,l,u,G,Se,Ge,P,ee,ne,x,Re,S,Ve,Ee,U,He,se,ae,Qe,Xe,B,Ye,ze,D,Me,Ke,ve,F,A,re,ie,et,le,de,tt,Fe,C,te,R,ce,ot,V,nt,Ce,W,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(),P=n("li"),ee=r("having all inputs as a list, tuple or dict in the first positional argument."),ne=c(),x=n("p"),Re=r(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),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 `),U=n("code"),He=r("model.fit()"),se=r(` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=n("code"),Qe=r("fit()"),Xe=r(" and "),B=n("code"),Ye=r("predict()"),ze=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(),F=n("ul"),A=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)"),Fe=c(),C=n("li"),te=r(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=n("code"),ce=r("model([input_ids, attention_mask])"),ot=r(" or "),V=n("code"),nt=r("model([input_ids, attention_mask, token_type_ids])"),Ce=c(),W=n("li"),Te=r(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),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),P=s(j,"LI",{});var _t=a(P);ee=i(_t,"having all inputs as a list, tuple or dict in the first positional argument."),_t.forEach(t),j.forEach(t),ne=h(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 `),U=s(E,"CODE",{});var qe=a(U);He=i(qe,"model.fit()"),qe.forEach(t),se=i(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),ae=s(E,"CODE",{});var 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),ze=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),F=s(k,"UL",{});var H=a(F);A=s(H,"LI",{});var pe=a(A);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),Fe=h(H),C=s(H,"LI",{});var me=a(C);te=i(me,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),R=s(me,"CODE",{});var je=a(R);ce=i(je,"model([input_ids, attention_mask])"),je.forEach(t),ot=i(me," or "),V=s(me,"CODE",{});var Mt=a(V);nt=i(Mt,"model([input_ids, attention_mask, token_type_ids])"),Mt.forEach(t),me.forEach(t),Ce=h(H),W=s(H,"LI",{});var rt=a(W);Te=i(rt,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Z=s(rt,"CODE",{});var Pe=a(Z);st=i(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.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,P),e(P,ee),g(k,ne,X),g(k,x,X),e(x,Re),e(x,S),e(S,Ve),e(x,Ee),e(x,U),e(U,He),e(x,se),e(x,ae),e(ae,Qe),e(x,Xe),e(x,B),e(B,Ye),e(x,ze),e(x,D),e(D,Me),e(x,Ke),g(k,ve,X),g(k,F,X),e(F,A),e(A,re),e(A,ie),e(ie,et),e(A,le),e(A,de),e(de,tt),e(F,Fe),e(F,C),e(C,te),e(C,R),e(R,ce),e(C,ot),e(C,V),e(V,nt),e(F,Ce),e(F,W),e(W,Te),e(W,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(F),k&&t(ke),k&&t(q)}}}function Fp(z){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(z){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:An,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(z){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(z){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:An,i(l){v||(w(m.$$.fragment,l),v=!0)},o(l){L(m.$$.fragment,l),v=!1},d(l){l&&t(p),l&&t(f),$(m,l)}}}function Pp(z){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 Ap(z){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:An,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(z){let p,y,f,m,v,l,u,G,Se,Ge,P,ee,ne,x,Re,S,Ve,Ee,U,He,se,ae,Qe,Xe,B,Ye,ze,D,Me,Ke,ve,F,A,re,ie,et,le,de,tt,Fe,C,te,R,ce,ot,V,nt,Ce,W,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,Pe,$e,Tt,kr,Nt,$a,wt,Ut,gs,Lo,yr,_s,br,xa,J,$o,Mr,it,Tr,Nn,wr,Lr,Un,$r,xr,xo,Gr,Er,Xr,Go,zr,Wn,Fr,Cr,qr,ht,Eo,jr,vs,Pr,Ar,Xo,Jn,Ir,ks,Nr,Ur,On,Wr,ys,Jr,Or,Wt,zo,Br,Fo,Dr,bs,Zr,Sr,Rr,Jt,Co,Vr,Ms,Hr,Qr,Bn,qo,Ga,Lt,Ot,Ts,jo,Yr,ws,Kr,Ea,fe,Po,ei,xe,ti,Ls,oi,ni,Dn,si,ai,Zn,ri,ii,Ao,li,di,ci,Io,hi,Sn,pi,ui,mi,pt,No,fi,$s,gi,_i,Uo,Rn,vi,xs,ki,yi,Vn,bi,Gs,Mi,Ti,Bt,Wo,wi,Es,Li,Xa,$t,Dt,Xs,Jo,$i,zs,xi,za,ge,Oo,Gi,Bo,Ei,Hn,Xi,zi,Fi,Do,Ci,Zo,qi,ji,Pi,Zt,Ai,Fs,Ii,Ni,Cs,Ui,Wi,Ae,So,Ji,xt,Oi,Qn,Bi,Di,qs,Zi,Si,Ri,St,Vi,Rt,Fa,Gt,Vt,js,Ro,Hi,Ps,Qi,Ca,_e,Vo,Yi,As,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,Us,vl,ja,Q,tn,kl,on,yl,es,bl,Ml,Tl,nn,wl,sn,Ll,$l,xl,Kt,Gl,eo,El,Ws,Xl,zl,Js,Fl,Cl,Ne,an,ql,zt,jl,ts,Pl,Al,Os,Il,Nl,Ul,to,Wl,oo,Pa,Ft,no,Bs,rn,Jl,Ds,Ol,Aa,Y,ln,Bl,Zs,Dl,Zl,dn,Sl,os,Rl,Vl,Hl,cn,Ql,hn,Yl,Kl,ed,so,td,Ue,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,We,Mn,zd,jt,Fd,ta,Cd,qd,oa,jd,Pd,Ad,lo,Id,co,Ua,Pt,ho,na,Tn,Nd,sa,Ud,Wa,O,wn,Wd,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,zn,rc,ic,Je,Fn,lc,At,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.33.0/en/model_doc/xglm#transformers.XGLMModel">XGLMModel</a> or <a href="/docs/transformers/v4.33.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.33.0/src/transformers/models/xglm/configuration_xglm.py#L29"}}),Nt=new Pn({props:{anchor:"transformers.XGLMConfig.example",$$slots:{default:[Tp]},$$scope:{ctx:z}}}),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.33.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.33.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>
`}}),zo=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.33.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.33.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.33.0/src/transformers/models/xglm/tokenization_xglm.py#L298"}}),jo=new Ze({}),Po=new N({props:{name:"class transformers.XGLMTokenizerFast",anchor:"transformers.XGLMTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XGLMTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.XGLMTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

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

					</div>`,name:"eos_token"},{anchor:"transformers.XGLMTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.XGLMTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.XGLMTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.XGLMTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.XGLMTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.33.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.33.0/src/transformers/models/xglm/tokenization_xglm_fast.py#L142",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Wo=new N({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.XGLMTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.XGLMTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.XGLMTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/xglm/tokenization_xglm_fast.py#L167",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.33.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.33.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.33.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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.33.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.33.0/src/transformers/models/xglm/modeling_xglm.py#L576",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:z}}}),Rt=new Pn({props:{anchor:"transformers.XGLMModel.forward.example",$$slots:{default:[Lp]},$$scope:{ctx:z}}}),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.33.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.33.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.33.0/src/transformers/models/xglm/modeling_xglm.py#L751"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.33.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.33.0/src/transformers/models/xglm/modeling_xglm.py#L775",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:z}}}),Qt=new Pn({props:{anchor:"transformers.XGLMForCausalLM.forward.example",$$slots:{default:[xp]},$$scope:{ctx:z}}}),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.33.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.33.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.33.0/src/transformers/models/xglm/modeling_tf_xglm.py#L736"}}),Kt=new wo({props:{$$slots:{default:[Gp]},$$scope:{ctx:z}}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.33.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.33.0/src/transformers/models/xglm/modeling_tf_xglm.py#L752",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:z}}}),oo=new Pn({props:{anchor:"transformers.TFXGLMModel.call.example",$$slots:{default:[Xp]},$$scope:{ctx:z}}}),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.33.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.33.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.33.0/src/transformers/models/xglm/modeling_tf_xglm.py#L803"}}),so=new wo({props:{$$slots:{default:[zp]},$$scope:{ctx:z}}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.33.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.33.0/src/transformers/models/xglm/modeling_tf_xglm.py#L853",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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.33.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.33.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.33.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:[Fp]},$$scope:{ctx:z}}}),ro=new Pn({props:{anchor:"transformers.TFXGLMForCausalLM.call.example",$$slots:{default:[Cp]},$$scope:{ctx:z}}}),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.33.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.33.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.33.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.33.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.33.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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.33.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.33.0/src/transformers/models/xglm/modeling_flax_xglm.py#L611",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:z}}}),co=new Pn({props:{anchor:"transformers.FlaxXGLMModel.__call__.example",$$slots:{default:[jp]},$$scope:{ctx:z}}}),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.33.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.33.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.33.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.33.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/xglm/modeling_flax_xglm.py#L766"}}),Fn=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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.33.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.33.0/src/transformers/models/xglm/modeling_flax_xglm.py#L611",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),po=new wo({props:{$$slots:{default:[Pp]},$$scope:{ctx:z}}}),uo=new Pn({props:{anchor:"transformers.FlaxXGLMForCausalLM.__call__.example",$$slots:{default:[Ap]},$$scope:{ctx:z}}}),{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(),P=n("h2"),ee=n("a"),ne=n("span"),b(x.$$.fragment),Re=c(),S=n("span"),Ve=r("Overview"),Ee=c(),U=n("p"),He=r("The XGLM model was proposed in "),se=n("a"),ae=r("Few-shot Learning with Multilingual Language Models"),Qe=r(`
by Xi Victoria Lin, Todor Mihaylov, Mikel Artetxe, Tianlu Wang, Shuohui Chen, Daniel Simig, Myle Ott, Naman Goyal,
Shruti Bhosale, Jingfei Du, Ramakanth Pasunuru, Sam Shleifer, Punit Singh Koura, Vishrav Chaudhary, Brian O\u2019Horo,
Jeff Wang, Luke Zettlemoyer, Zornitsa Kozareva, Mona Diab, Veselin Stoyanov, Xian Li.`),Xe=c(),B=n("p"),Ye=r("The abstract from the paper is the following:"),ze=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(),F=n("p"),A=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("."),Fe=c(),C=n("h2"),te=n("a"),R=n("span"),b(ce.$$.fragment),ot=c(),V=n("span"),nt=r("Documentation resources"),Ce=c(),W=n("ul"),Te=n("li"),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 `),Pe=n("a"),$e=r("PretrainedConfig"),Tt=r(" for more information."),kr=c(),b(Nt.$$.fragment),$a=c(),wt=n("h2"),Ut=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 "),Un=n("a"),$r=r("XLNetTokenizer"),xr=r(`. Based on
`),xo=n("a"),Gr=r("SentencePiece"),Er=r("."),Xr=c(),Go=n("p"),zr=r("This tokenizer inherits from "),Wn=n("a"),Fr=r("PreTrainedTokenizer"),Cr=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),qr=c(),ht=n("div"),b(Eo.$$.fragment),jr=c(),vs=n("p"),Pr=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM-RoBERTa sequence has the following format:`),Ar=c(),Xo=n("ul"),Jn=n("li"),Ir=r("single sequence: "),ks=n("code"),Nr=r("<s> X </s>"),Ur=c(),On=n("li"),Wr=r("pair of sequences: "),ys=n("code"),Jr=r("<s> A </s></s> B </s>"),Or=c(),Wt=n("div"),b(zo.$$.fragment),Br=c(),Fo=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(Po.$$.fragment),ei=c(),xe=n("p"),ti=r("Construct a \u201Cfast\u201D XGLM tokenizer (backed by HuggingFace\u2019s "),Ls=n("em"),oi=r("tokenizers"),ni=r(" library). Adapted from "),Dn=n("a"),si=r("RobertaTokenizer"),ai=r(`
and `),Zn=n("a"),ri=r("XLNetTokenizer"),ii=r(`. Based on
`),Ao=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(),Uo=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(Wo.$$.fragment),wi=c(),Es=n("p"),Li=r(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does
not make use of token type ids, therefore a list of zeros is returned.`),Xa=c(),$t=n("h2"),Dt=n("a"),Xs=n("span"),b(Jo.$$.fragment),$i=c(),zs=n("span"),xi=r("XGLMModel"),za=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"),zi=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.)`),Fi=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.`),Pi=c(),Zt=n("p"),Ai=r("Transformer decoder consisting of "),Fs=n("em"),Ii=r("config.num_layers"),Ni=r(" layers. Each layer is a "),Cs=n("code"),Ui=r("XGLMDecoderLayer"),Wi=c(),Ae=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),Fa=c(),Gt=n("h2"),Vt=n("a"),js=n("span"),b(Ro.$$.fragment),Hi=c(),Ps=n("span"),Qi=r("XGLMForCausalLM"),Ca=c(),_e=n("div"),b(Vo.$$.fragment),Yi=c(),As=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(),Us=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 "),Ws=n("em"),Xl=r("config.num_layers"),zl=r(" layers. Each layer is a "),Js=n("code"),Fl=r("TFXGLMDecoderLayer"),Cl=c(),Ne=n("div"),b(an.$$.fragment),ql=c(),zt=n("p"),jl=r("The "),ts=n("a"),Pl=r("TFXGLMModel"),Al=r(" forward method, overrides the "),Os=n("code"),Il=r("__call__"),Nl=r(" special method."),Ul=c(),b(to.$$.fragment),Wl=c(),b(oo.$$.fragment),Pa=c(),Ft=n("h2"),no=n("a"),Bs=n("span"),b(rn.$$.fragment),Jl=c(),Ds=n("span"),Ol=r("TFXGLMForCausalLM"),Aa=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(),Ue=n("div"),b(pn.$$.fragment),od=c(),Ct=n("p"),nd=r("The "),ns=n("a"),sd=r("TFXGLMForCausalLM"),ad=r(" forward method, overrides the "),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(),We=n("div"),b(Mn.$$.fragment),zd=c(),jt=n("p"),Fd=r("The "),ta=n("code"),Cd=r("FlaxXGLMPreTrainedModel"),qd=r(" forward method, overrides the "),oa=n("code"),jd=r("__call__"),Pd=r(" special method."),Ad=c(),b(lo.$$.fragment),Id=c(),b(co.$$.fragment),Ua=c(),Pt=n("h2"),ho=n("a"),na=n("span"),b(Tn.$$.fragment),Nd=c(),sa=n("span"),Ud=r("FlaxXGLMForCausalLM"),Wa=c(),O=n("div"),b(wn.$$.fragment),Wd=c(),aa=n("p"),Jd=r(`The XGLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Od=c(),Ln=n("p"),Bd=r("This model inherits from "),as=n("a"),Dd=r("FlaxPreTrainedModel"),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"),zn=n("a"),rc=r("Parallelization"),ic=c(),Je=n("div"),b(Fn.$$.fragment),lc=c(),At=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),P=s(o,"H2",{class:!0});var qn=a(P);ee=s(qn,"A",{id:!0,class:!0,href:!0});var ga=a(ee);ne=s(ga,"SPAN",{});var _a=a(ne);M(x.$$.fragment,_a),_a.forEach(t),ga.forEach(t),Re=h(qn),S=s(qn,"SPAN",{});var va=a(S);Ve=i(va,"Overview"),va.forEach(t),qn.forEach(t),Ee=h(o),U=s(o,"P",{});var jn=a(U);He=i(jn,"The XGLM model was proposed in "),se=s(jn,"A",{href:!0,rel:!0});var 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),ze=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),F=s(o,"P",{});var It=a(F);A=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),Fe=h(o),C=s(o,"H2",{class:!0});var Oa=a(C);te=s(Oa,"A",{id:!0,class:!0,href:!0});var bc=a(te);R=s(bc,"SPAN",{});var Mc=a(R);M(ce.$$.fragment,Mc),Mc.forEach(t),bc.forEach(t),ot=h(Oa),V=s(Oa,"SPAN",{});var Tc=a(V);nt=i(Tc,"Documentation resources"),Tc.forEach(t),Oa.forEach(t),Ce=h(o),W=s(o,"UL",{});var wc=a(W);Te=s(wc,"LI",{});var Lc=a(Te);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 zc=a(Le);H=i(zc,"facebook/xglm-564M"),zc.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 Fc=a(je);Mt=i(Fc,"PretrainedConfig"),Fc.forEach(t),rt=i(is,` and can be used to control the model outputs. Read the
documentation from `),Pe=s(is,"A",{href:!0});var Cc=a(Pe);$e=i(Cc,"PretrainedConfig"),Cc.forEach(t),Tt=i(is," for more information."),is.forEach(t),kr=h(mo),M(Nt.$$.fragment,mo),mo.forEach(t),$a=h(o),wt=s(o,"H2",{class:!0});var Da=a(wt);Ut=s(Da,"A",{id:!0,class:!0,href:!0});var qc=a(Ut);gs=s(qc,"SPAN",{});var jc=a(gs);M(Lo.$$.fragment,jc),jc.forEach(t),qc.forEach(t),yr=h(Da),_s=s(Da,"SPAN",{});var Pc=a(_s);br=i(Pc,"XGLMTokenizer"),Pc.forEach(t),Da.forEach(t),xa=h(o),J=s(o,"DIV",{class:!0});var 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 Ac=a(Nn);wr=i(Ac,"RobertaTokenizer"),Ac.forEach(t),Lr=i(fo," and "),Un=s(fo,"A",{href:!0});var Ic=a(Un);$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);zr=i(Za,"This tokenizer inherits from "),Wn=s(Za,"A",{href:!0});var Uc=a(Wn);Fr=i(Uc,"PreTrainedTokenizer"),Uc.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 Wc=a(vs);Pr=i(Wc,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM-RoBERTa sequence has the following format:`),Wc.forEach(t),Ar=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),Ur=h(Sa),On=s(Sa,"LI",{});var _c=a(On);Wr=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),Wt=s(ye,"DIV",{class:!0});var Ra=a(Wt);M(zo.$$.fragment,Ra),Br=h(Ra),Fo=s(Ra,"P",{});var Va=a(Fo);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(Po.$$.fragment,ut),ei=h(ut),xe=s(ut,"P",{});var mt=a(xe);ti=i(mt,"Construct a \u201Cfast\u201D XGLM tokenizer (backed by HuggingFace\u2019s "),Ls=s(mt,"EM",{});var Hc=a(Ls);oi=i(Hc,"tokenizers"),Hc.forEach(t),ni=i(mt," library). Adapted from "),Dn=s(mt,"A",{href:!0});var Qc=a(Dn);si=i(Qc,"RobertaTokenizer"),Qc.forEach(t),ai=i(mt,`
and `),Zn=s(mt,"A",{href:!0});var Yc=a(Zn);ri=i(Yc,"XLNetTokenizer"),Yc.forEach(t),ii=i(mt,`. Based on
`),Ao=s(mt,"A",{href:!0,rel:!0});var Kc=a(Ao);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),Uo=s(ds,"UL",{});var Ka=a(Uo);Rn=s(Ka,"LI",{});var vc=a(Rn);vi=i(vc,"single sequence: "),xs=s(vc,"CODE",{});var oh=a(xs);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(Wo.$$.fragment,er),wi=h(er),Es=s(er,"P",{});var sh=a(Es);Li=i(sh,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does
not make use of token type ids, therefore a list of zeros is returned.`),sh.forEach(t),er.forEach(t),ut.forEach(t),Xa=h(o),$t=s(o,"H2",{class:!0});var tr=a($t);Dt=s(tr,"A",{id:!0,class:!0,href:!0});var ah=a(Dt);Xs=s(ah,"SPAN",{});var rh=a(Xs);M(Jo.$$.fragment,rh),rh.forEach(t),ah.forEach(t),$i=h(tr),zs=s(tr,"SPAN",{});var ih=a(zs);xi=i(ih,"XGLMModel"),ih.forEach(t),tr.forEach(t),za=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),zi=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),Fi=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),Pi=h(ft),Zt=s(ft,"P",{});var wa=a(Zt);Ai=i(wa,"Transformer decoder consisting of "),Fs=s(wa,"EM",{});var ch=a(Fs);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);Ui=i(hh,"XGLMDecoderLayer"),hh.forEach(t),wa.forEach(t),Wi=h(ft),Ae=s(ft,"DIV",{class:!0});var go=a(Ae);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),Fa=h(o),Gt=s(o,"H2",{class:!0});var sr=a(Gt);Vt=s(sr,"A",{id:!0,class:!0,href:!0});var mh=a(Vt);js=s(mh,"SPAN",{});var fh=a(js);M(Ro.$$.fragment,fh),fh.forEach(t),mh.forEach(t),Hi=h(sr),Ps=s(sr,"SPAN",{});var gh=a(Ps);Qi=i(gh,"XGLMForCausalLM"),gh.forEach(t),sr.forEach(t),Ca=h(o),_e=s(o,"DIV",{class:!0});var gt=a(_e);M(Vo.$$.fragment,gt),Yi=h(gt),As=s(gt,"P",{});var _h=a(As);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),Us=s(ir,"SPAN",{});var wh=a(Us);vl=i(wh,"TFXGLMModel"),wh.forEach(t),ir.forEach(t),ja=h(o),Q=s(o,"DIV",{class:!0});var Oe=a(Q);M(tn.$$.fragment,Oe),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 "),Ws=s(La,"EM",{});var xh=a(Ws);Xl=i(xh,"config.num_layers"),xh.forEach(t),zl=i(La," layers. Each layer is a "),Js=s(La,"CODE",{});var Gh=a(Js);Fl=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),zt=s(vo,"P",{});var ps=a(zt);jl=i(ps,"The "),ts=s(ps,"A",{href:!0});var Eh=a(ts);Pl=i(Eh,"TFXGLMModel"),Eh.forEach(t),Al=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),Ul=h(vo),M(to.$$.fragment,vo),Wl=h(vo),M(oo.$$.fragment,vo),vo.forEach(t),Oe.forEach(t),Pa=h(o),Ft=s(o,"H2",{class:!0});var cr=a(Ft);no=s(cr,"A",{id:!0,class:!0,href:!0});var zh=a(no);Bs=s(zh,"SPAN",{});var Fh=a(Bs);M(rn.$$.fragment,Fh),Fh.forEach(t),zh.forEach(t),Jl=h(cr),Ds=s(cr,"SPAN",{});var Ch=a(Ds);Ol=i(Ch,"TFXGLMForCausalLM"),Ch.forEach(t),cr.forEach(t),Aa=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 Ph=a(hn);Yl=i(Ph,"tf.keras.Model"),Ph.forEach(t),Kl=i(pr,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),pr.forEach(t),ed=h(Be),M(so.$$.fragment,Be),td=h(Be),Ue=s(Be,"DIV",{class:!0});var ko=a(Ue);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 Ah=a(ns);sd=i(Ah,"TFXGLMForCausalLM"),Ah.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 Uh=a(Rs);M(un.$$.fragment,Uh),Uh.forEach(t),Nh.forEach(t),cd=h(ur),Vs=s(ur,"SPAN",{});var Wh=a(Vs);hd=i(Wh,"FlaxXGLMModel"),Wh.forEach(t),ur.forEach(t),Na=h(o),K=s(o,"DIV",{class:!0});var De=a(K);M(mn.$$.fragment,De),pd=h(De),fn=s(De,"P",{});var mr=a(fn);ud=i(mr,`The bare XGLM Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),ss=s(mr,"A",{href:!0});var Jh=a(ss);md=i(Jh,"FlaxPreTrainedModel"),Jh.forEach(t),fd=i(mr,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),mr.forEach(t),gd=h(De),gn=s(De,"P",{});var fr=a(gn);_d=i(fr,`This model is also a Flax Linen
`),_n=s(fr,"A",{href:!0,rel:!0});var Oh=a(_n);vd=i(Oh,"flax.nn.Module"),Oh.forEach(t),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),We=s(De,"DIV",{class:!0});var bo=a(We);M(Mn.$$.fragment,bo),zd=h(bo),jt=s(bo,"P",{});var ms=a(jt);Fd=i(ms,"The "),ta=s(ms,"CODE",{});var Kh=a(ta);Cd=i(Kh,"FlaxXGLMPreTrainedModel"),Kh.forEach(t),qd=i(ms," forward method, overrides the "),oa=s(ms,"CODE",{});var ep=a(oa);jd=i(ep,"__call__"),ep.forEach(t),Pd=i(ms," special method."),ms.forEach(t),Ad=h(bo),M(lo.$$.fragment,bo),Id=h(bo),M(co.$$.fragment,bo),bo.forEach(t),De.forEach(t),Ua=h(o),Pt=s(o,"H2",{class:!0});var gr=a(Pt);ho=s(gr,"A",{id:!0,class:!0,href:!0});var tp=a(ho);na=s(tp,"SPAN",{});var op=a(na);M(Tn.$$.fragment,op),op.forEach(t),tp.forEach(t),Nd=h(gr),sa=s(gr,"SPAN",{});var np=a(sa);Ud=i(np,"FlaxXGLMForCausalLM"),np.forEach(t),gr.forEach(t),Wa=h(o),O=s(o,"DIV",{class:!0});var be=a(O);M(wn.$$.fragment,be),Wd=h(be),aa=s(be,"P",{});var sp=a(aa);Jd=i(sp,`The XGLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),sp.forEach(t),Od=h(be),Ln=s(be,"P",{});var _r=a(Ln);Bd=i(_r,"This model inherits from "),as=s(_r,"A",{href:!0});var ap=a(as);Dd=i(ap,"FlaxPreTrainedModel"),ap.forEach(t),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);zn=s(mp,"A",{href:!0,rel:!0});var fp=a(zn);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(Fn.$$.fragment,To),lc=h(To),At=s(To,"P",{});var fs=a(At);dc=i(fs,"The "),ha=s(fs,"CODE",{});var gp=a(ha);cc=i(gp,"FlaxXGLMPreTrainedModel"),gp.forEach(t),hc=i(fs," forward method, overrides the "),pa=s(fs,"CODE",{});var _p=a(pa);pc=i(_p,"__call__"),_p.forEach(t),uc=i(fs," special method."),fs.forEach(t),mc=h(To),M(po.$$.fragment,To),fc=h(To),M(uo.$$.fragment,To),To.forEach(t),be.forEach(t),this.h()},h(){d(p,"name","hf:doc:metadata"),d(p,"content",JSON.stringify(Np)),d(m,"id","xglm"),d(m,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(m,"href","#xglm"),d(f,"class","relative group"),d(ee,"id","overview"),d(ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ee,"href","#overview"),d(P,"class","relative group"),d(se,"href","https://arxiv.org/abs/2112.10668"),d(se,"rel","nofollow"),d(re,"href","https://huggingface.co/valhalla"),d(re,"rel","nofollow"),d(le,"href","https://github.com/pytorch/fairseq/tree/main/examples/xglm"),d(le,"rel","nofollow"),d(te,"id","documentation-resources"),d(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(te,"href","#documentation-resources"),d(C,"class","relative group"),d(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.33.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.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(Pe,"href","/docs/transformers/v4.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ut,"id","transformers.XGLMTokenizer"),d(Ut,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ut,"href","#transformers.XGLMTokenizer"),d(wt,"class","relative group"),d(Nn,"href","/docs/transformers/v4.33.0/en/model_doc/roberta#transformers.RobertaTokenizer"),d(Un,"href","/docs/transformers/v4.33.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),d(xo,"href","https://github.com/google/sentencepiece"),d(xo,"rel","nofollow"),d(Wn,"href","/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),d(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Bn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Ot,"id","transformers.XGLMTokenizerFast"),d(Ot,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(Ot,"href","#transformers.XGLMTokenizerFast"),d(Lt,"class","relative group"),d(Dn,"href","/docs/transformers/v4.33.0/en/model_doc/roberta#transformers.RobertaTokenizer"),d(Zn,"href","/docs/transformers/v4.33.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),d(Ao,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),d(Ao,"rel","nofollow"),d(Sn,"href","/docs/transformers/v4.33.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.33.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.33.0/en/model_doc/xglm#transformers.XGLMModel"),d(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(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.33.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.33.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.33.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.33.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(Ft,"class","relative group"),d(os,"href","/docs/transformers/v4.33.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.33.0/en/model_doc/xglm#transformers.TFXGLMForCausalLM"),d(Ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(io,"id","transformers.FlaxXGLMModel"),d(io,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(io,"href","#transformers.FlaxXGLMModel"),d(qt,"class","relative group"),d(ss,"href","/docs/transformers/v4.33.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(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ho,"id","transformers.FlaxXGLMForCausalLM"),d(ho,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),d(ho,"href","#transformers.FlaxXGLMForCausalLM"),d(Pt,"class","relative group"),d(as,"href","/docs/transformers/v4.33.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(zn,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),d(zn,"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,P,_),e(P,ee),e(ee,ne),T(x,ne,null),e(P,Re),e(P,S),e(S,Ve),g(o,Ee,_),g(o,U,_),e(U,He),e(U,se),e(se,ae),e(U,Qe),g(o,Xe,_),g(o,B,_),e(B,Ye),g(o,ze,_),g(o,D,_),e(D,Me),e(Me,Ke),g(o,ve,_),g(o,F,_),e(F,A),e(F,re),e(re,ie),e(F,et),e(F,le),e(le,de),e(F,tt),g(o,Fe,_),g(o,C,_),e(C,te),e(te,R),T(ce,R,null),e(C,ot),e(C,V),e(V,nt),g(o,Ce,_),g(o,W,_),e(W,Te),e(Te,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,Pe),e(Pe,$e),e(ue,Tt),e(j,kr),T(Nt,j,null),g(o,$a,_),g(o,wt,_),e(wt,Ut),e(Ut,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,Un),e(Un,$r),e(it,xr),e(it,xo),e(xo,Gr),e(it,Er),e(J,Xr),e(J,Go),e(Go,zr),e(Go,Wn),e(Wn,Fr),e(Go,Cr),e(J,qr),e(J,ht),T(Eo,ht,null),e(ht,jr),e(ht,vs),e(vs,Pr),e(ht,Ar),e(ht,Xo),e(Xo,Jn),e(Jn,Ir),e(Jn,ks),e(ks,Nr),e(Xo,Ur),e(Xo,On),e(On,Wr),e(On,ys),e(ys,Jr),e(J,Or),e(J,Wt),T(zo,Wt,null),e(Wt,Br),e(Wt,Fo),e(Fo,Dr),e(Fo,bs),e(bs,Zr),e(Fo,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(Po,fe,null),e(fe,ei),e(fe,xe),e(xe,ti),e(xe,Ls),e(Ls,oi),e(xe,ni),e(xe,Dn),e(Dn,si),e(xe,ai),e(xe,Zn),e(Zn,ri),e(xe,ii),e(xe,Ao),e(Ao,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,Uo),e(Uo,Rn),e(Rn,vi),e(Rn,xs),e(xs,ki),e(Uo,yi),e(Uo,Vn),e(Vn,bi),e(Vn,Gs),e(Gs,Mi),e(fe,Ti),e(fe,Bt),T(Wo,Bt,null),e(Bt,wi),e(Bt,Es),e(Es,Li),g(o,Xa,_),g(o,$t,_),e($t,Dt),e(Dt,Xs),T(Jo,Xs,null),e($t,$i),e($t,zs),e(zs,xi),g(o,za,_),g(o,ge,_),T(Oo,ge,null),e(ge,Gi),e(ge,Bo),e(Bo,Ei),e(Bo,Hn),e(Hn,Xi),e(Bo,zi),e(ge,Fi),e(ge,Do),e(Do,Ci),e(Do,Zo),e(Zo,qi),e(Do,ji),e(ge,Pi),e(ge,Zt),e(Zt,Ai),e(Zt,Fs),e(Fs,Ii),e(Zt,Ni),e(Zt,Cs),e(Cs,Ui),e(ge,Wi),e(ge,Ae),T(So,Ae,null),e(Ae,Ji),e(Ae,xt),e(xt,Oi),e(xt,Qn),e(Qn,Bi),e(xt,Di),e(xt,qs),e(qs,Zi),e(xt,Si),e(Ae,Ri),T(St,Ae,null),e(Ae,Vi),T(Rt,Ae,null),g(o,Fa,_),g(o,Gt,_),e(Gt,Vt),e(Vt,js),T(Ro,js,null),e(Gt,Hi),e(Gt,Ps),e(Ps,Qi),g(o,Ca,_),g(o,_e,_),T(Vo,_e,null),e(_e,Yi),e(_e,As),e(As,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,Us),e(Us,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,Ws),e(Ws,Xl),e(eo,zl),e(eo,Js),e(Js,Fl),e(Q,Cl),e(Q,Ne),T(an,Ne,null),e(Ne,ql),e(Ne,zt),e(zt,jl),e(zt,ts),e(ts,Pl),e(zt,Al),e(zt,Os),e(Os,Il),e(zt,Nl),e(Ne,Ul),T(to,Ne,null),e(Ne,Wl),T(oo,Ne,null),g(o,Pa,_),g(o,Ft,_),e(Ft,no),e(no,Bs),T(rn,Bs,null),e(Ft,Jl),e(Ft,Ds),e(Ds,Ol),g(o,Aa,_),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,Ue),T(pn,Ue,null),e(Ue,od),e(Ue,Ct),e(Ct,nd),e(Ct,ns),e(ns,sd),e(Ct,ad),e(Ct,Ss),e(Ss,rd),e(Ct,id),e(Ue,ld),T(ao,Ue,null),e(Ue,dd),T(ro,Ue,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,We),T(Mn,We,null),e(We,zd),e(We,jt),e(jt,Fd),e(jt,ta),e(ta,Cd),e(jt,qd),e(jt,oa),e(oa,jd),e(jt,Pd),e(We,Ad),T(lo,We,null),e(We,Id),T(co,We,null),g(o,Ua,_),g(o,Pt,_),e(Pt,ho),e(ho,na),T(Tn,na,null),e(Pt,Nd),e(Pt,sa),e(sa,Ud),g(o,Wa,_),g(o,O,_),T(wn,O,null),e(O,Wd),e(O,aa),e(aa,Jd),e(O,Od),e(O,Ln),e(Ln,Bd),e(Ln,as),e(as,Dd),e(Ln,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,zn),e(zn,rc),e(O,ic),e(O,Je),T(Fn,Je,null),e(Je,lc),e(Je,At),e(At,dc),e(At,ha),e(ha,cc),e(At,hc),e(At,pa),e(pa,pc),e(At,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(zo.$$.fragment,o),w(Co.$$.fragment,o),w(qo.$$.fragment,o),w(jo.$$.fragment,o),w(Po.$$.fragment,o),w(No.$$.fragment,o),w(Wo.$$.fragment,o),w(Jo.$$.fragment,o),w(Oo.$$.fragment,o),w(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(Fn.$$.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(zo.$$.fragment,o),L(Co.$$.fragment,o),L(qo.$$.fragment,o),L(jo.$$.fragment,o),L(Po.$$.fragment,o),L(No.$$.fragment,o),L(Wo.$$.fragment,o),L(Jo.$$.fragment,o),L(Oo.$$.fragment,o),L(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(Fn.$$.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(P),$(x),o&&t(Ee),o&&t(U),o&&t(Xe),o&&t(B),o&&t(ze),o&&t(D),o&&t(ve),o&&t(F),o&&t(Fe),o&&t(C),$(ce),o&&t(Ce),o&&t(W),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),$(zo),$(Co),$(qo),o&&t(Ga),o&&t(Lt),$(jo),o&&t(Ea),o&&t(fe),$(Po),$(No),$(Wo),o&&t(Xa),o&&t($t),$(Jo),o&&t(za),o&&t(ge),$(Oo),$(So),$(St),$(Rt),o&&t(Fa),o&&t(Gt),$(Ro),o&&t(Ca),o&&t(_e),$(Vo),$(Ko),$(Ht),$(Qt),o&&t(qa),o&&t(Xt),$(en),o&&t(ja),o&&t(Q),$(tn),$(Kt),$(an),$(to),$(oo),o&&t(Pa),o&&t(Ft),$(rn),o&&t(Aa),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(Ua),o&&t(Pt),$(Tn),o&&t(Wa),o&&t(O),$(wn),$(Fn),$(po),$(uo)}}}const Np={local:"xglm",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.XGLMConfig",title:"XGLMConfig"},{local:"transformers.XGLMTokenizer",title:"XGLMTokenizer"},{local:"transformers.XGLMTokenizerFast",title:"XGLMTokenizerFast"},{local:"transformers.XGLMModel",title:"XGLMModel"},{local:"transformers.XGLMForCausalLM",title:"XGLMForCausalLM"},{local:"transformers.TFXGLMModel",title:"TFXGLMModel"},{local:"transformers.TFXGLMForCausalLM",title:"TFXGLMForCausalLM"},{local:"transformers.FlaxXGLMModel",title:"FlaxXGLMModel"},{local:"transformers.FlaxXGLMForCausalLM",title:"FlaxXGLMForCausalLM"}],title:"XGLM"};function Up(z){return Mp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sp extends vp{constructor(p){super();kp(this,p,Up,Ip,yp,{})}}export{Sp as default,Np as metadata};
