import{s as Na,o as qa,n as Ne}from"../chunks/scheduler.9bc65507.js";import{S as Aa,i as Oa,g as n,s as r,u as f,m as Ia,A as Ja,h as s,f as t,c as a,j as h,v as u,y as m,n as Pa,k as l,o,a as d,w as g,d as _,t as v,x as b}from"../chunks/index.78c82d43.js";import{T as Xo}from"../chunks/Tip.87d55b76.js";import{D as I}from"../chunks/Docstring.f3d04bd2.js";import{C as Gt}from"../chunks/CodeBlock.48618ec2.js";import{I as P}from"../chunks/IconCopyLink.bedaa44d.js";import{E as ja}from"../chunks/ExampleCodeBlock.872b014d.js";function Sa(M){let c,y="Examples:",p,k,N;return k=new Gt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFhtb2RDb25maWclMkMlMjBYbW9kTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhbiUyMFgtTU9EJTIwZmFjZWJvb2slMkZ4bW9kLWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwWG1vZENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBmYWNlYm9vayUyRnhtb2QtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwWG1vZE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> XmodConfig, XmodModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing an X-MOD facebook/xmod-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = XmodConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the facebook/xmod-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XmodModel(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(){c=n("p"),c.textContent=y,p=r(),f(k.$$.fragment)},l(T){c=s(T,"P",{"data-svelte-h":!0}),m(c)!=="svelte-kvfsh7"&&(c.textContent=y),p=a(T),u(k.$$.fragment,T)},m(T,V){d(T,c,V),d(T,p,V),g(k,T,V),N=!0},p:Ne,i(T){N||(_(k.$$.fragment,T),N=!0)},o(T){v(k.$$.fragment,T),N=!1},d(T){T&&(t(c),t(p)),b(k,T)}}}function Ea(M){let c,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){c=n("p"),c.innerHTML=y},l(p){c=s(p,"P",{"data-svelte-h":!0}),m(c)!=="svelte-fincs2"&&(c.innerHTML=y)},m(p,k){d(p,c,k)},p:Ne,d(p){p&&t(c)}}}function Ha(M){let c,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){c=n("p"),c.innerHTML=y},l(p){c=s(p,"P",{"data-svelte-h":!0}),m(c)!=="svelte-fincs2"&&(c.innerHTML=y)},m(p,k){d(p,c,k)},p:Ne,d(p){p&&t(c)}}}function Wa(M){let c,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){c=n("p"),c.innerHTML=y},l(p){c=s(p,"P",{"data-svelte-h":!0}),m(c)!=="svelte-fincs2"&&(c.innerHTML=y)},m(p,k){d(p,c,k)},p:Ne,d(p){p&&t(c)}}}function Da(M){let c,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){c=n("p"),c.innerHTML=y},l(p){c=s(p,"P",{"data-svelte-h":!0}),m(c)!=="svelte-fincs2"&&(c.innerHTML=y)},m(p,k){d(p,c,k)},p:Ne,d(p){p&&t(c)}}}function Ua(M){let c,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){c=n("p"),c.innerHTML=y},l(p){c=s(p,"P",{"data-svelte-h":!0}),m(c)!=="svelte-fincs2"&&(c.innerHTML=y)},m(p,k){d(p,c,k)},p:Ne,d(p){p&&t(c)}}}function Za(M){let c,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){c=n("p"),c.innerHTML=y},l(p){c=s(p,"P",{"data-svelte-h":!0}),m(c)!=="svelte-fincs2"&&(c.innerHTML=y)},m(p,k){d(p,c,k)},p:Ne,d(p){p&&t(c)}}}function Ba(M){let c,y=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){c=n("p"),c.innerHTML=y},l(p){c=s(p,"P",{"data-svelte-h":!0}),m(c)!=="svelte-fincs2"&&(c.innerHTML=y)},m(p,k){d(p,c,k)},p:Ne,d(p){p&&t(c)}}}function Qa(M){let c,y,p,k,N,T,V,qe,Qn,Lo,nr="X-MOD",Rt,G,ce,Ft,Ae,Vn,Fo,sr="Overview",Yt,Oe,rr=`The X-MOD model was proposed in <a href="http://dx.doi.org/10.18653/v1/2022.naacl-main.255" rel="nofollow">Lifting the Curse of Multilinguality by Pre-training Modular Transformers</a> by Jonas Pfeiffer, Naman Goyal, Xi Lin, Xian Li, James Cross, Sebastian Riedel, and Mikel Artetxe.
X-MOD extends multilingual masked language models like <a href="xlm-roberta">XLM-R</a> to include language-specific modular components (<em>language adapters</em>) during pre-training. For fine-tuning, the language adapters in each transformer layer are frozen.`,Kt,Je,ar="The abstract from the paper is the following:",en,je,ir="<em>Multilingual pre-trained models are known to suffer from the curse of multilinguality, which causes per-language performance to drop as they cover more languages. We address this issue by introducing language-specific modules, which allows us to grow the total capacity of the model, while keeping the total number of trainable parameters per language constant. In contrast with prior work that learns language-specific components post-hoc, we pre-train the modules of our Cross-lingual Modular (X-MOD) models from the start. Our experiments on natural language inference, named entity recognition and question answering show that our approach not only mitigates the negative interference between languages, but also enables positive transfer, resulting in improved monolingual and cross-lingual performance. Furthermore, our approach enables adding languages post-hoc with no measurable drop in performance, no longer limiting the model usage to the set of pre-trained languages.</em>",on,Se,dr="Tips:",tn,Ee,lr='<li>X-MOD is similar to <a href="xlm-roberta">XLM-R</a>, but a difference is that the input language needs to be specified so that the correct language adapter can be activated.</li> <li>The main models – base and large – have adapters for 81 languages.</li>',nn,He,cr=`This model was contributed by <a href="https://huggingface.co/jvamvas" rel="nofollow">jvamvas</a>.
The original code can be found <a href="https://github.com/facebookresearch/fairseq/tree/58cc6cca18f15e6d56e3f60c959fe4f878960a60/fairseq/models/xmod" rel="nofollow">here</a> and the original documentation is found <a href="https://github.com/facebookresearch/fairseq/tree/58cc6cca18f15e6d56e3f60c959fe4f878960a60/examples/xmod" rel="nofollow">here</a>.`,sn,R,me,zt,We,Gn,zo,mr="Adapter Usage",rn,Y,he,It,De,Rn,Io,hr="Input language",an,Ue,pr="There are two ways to specify the input language:",dn,Ze,fr="<li>By setting a default language before using the model:</li>",ln,Be,cn,pe,ur="<li>By explicitly passing the index of the language adapter for each sample:</li>",mn,Qe,hn,K,fe,Pt,Ve,Yn,Po,gr="Fine-tuning",pn,Ge,fn,ee,ue,Nt,Re,Kn,No,_r="Cross-lingual transfer",un,Ye,gn,oe,ge,qt,Ke,es,qo,vr="Resources",_n,eo,br='<li><a href="../tasks/sequence_classification">Text classification task guide</a></li> <li><a href="../tasks/token_classification">Token classification task guide</a></li> <li><a href="../tasks/question_answering">Question answering task guide</a></li> <li><a href="../tasks/language_modeling">Causal language modeling task guide</a></li> <li><a href="../tasks/masked_language_modeling">Masked language modeling task guide</a></li> <li><a href="../tasks/multiple_choice">Multiple choice task guide</a></li>',vn,te,_e,At,oo,os,Ao,yr="XmodConfig",bn,q,to,ts,Oo,kr=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodModel">XmodModel</a>. It is used to instantiate an X-MOD
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
<a href="https://huggingface.co/facebook/xmod-base" rel="nofollow">facebook/xmod-base</a> architecture.`,ns,Jo,Tr=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,ss,ve,yn,ne,be,Ot,no,rs,jo,wr="XmodModel",kn,w,so,as,So,Mr="The bare X-MOD Model transformer outputting raw hidden-states without any specific head on top.",is,Eo,$r=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,ds,Ho,xr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,ls,Wo,Cr=`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in <em>Attention is
all you need</em>_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`,cs,Do,Xr=`To behave as an decoder the model needs to be initialized with the <code>is_decoder</code> argument of the configuration set
to <code>True</code>. To be used in a Seq2Seq model, the model needs to initialized with both <code>is_decoder</code> argument and
<code>add_cross_attention</code> set to <code>True</code>; an <code>encoder_hidden_states</code> is then expected as an input to the forward pass.`,ms,Uo,Lr='.. _<em>Attention is all you need</em>: <a href="https://arxiv.org/abs/1706.03762" rel="nofollow">https://arxiv.org/abs/1706.03762</a>',hs,A,ro,ps,Zo,Fr='The <a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodModel">XmodModel</a> forward method, overrides the <code>__call__</code> special method.',fs,ye,Tn,se,ke,Jt,ao,us,Bo,zr="XmodForCausalLM",wn,x,io,gs,Qo,Ir="X-MOD Model with a <code>language modeling</code> head on top for CLM fine-tuning.",_s,Vo,Pr=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,vs,Go,Nr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,bs,O,lo,ys,Ro,qr='The <a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodForCausalLM">XmodForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',ks,Te,Mn,re,we,jt,co,Ts,Yo,Ar="XmodForMaskedLM",$n,C,mo,ws,Ko,Or="X-MOD Model with a <code>language modeling</code> head on top.",Ms,et,Jr=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,$s,ot,jr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,xs,J,ho,Cs,tt,Sr='The <a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodForMaskedLM">XmodForMaskedLM</a> forward method, overrides the <code>__call__</code> special method.',Xs,Me,xn,ae,$e,St,po,Ls,nt,Er="XmodForSequenceClassification",Cn,X,fo,Fs,st,Hr=`X-MOD Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`,zs,rt,Wr=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,Is,at,Dr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Ps,j,uo,Ns,it,Ur='The <a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodForSequenceClassification">XmodForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',qs,xe,Xn,ie,Ce,Et,go,As,dt,Zr="XmodForMultipleChoice",Ln,L,_o,Os,lt,Br=`X-MOD Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`,Js,ct,Qr=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,js,mt,Vr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Ss,S,vo,Es,ht,Gr='The <a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodForMultipleChoice">XmodForMultipleChoice</a> forward method, overrides the <code>__call__</code> special method.',Hs,Xe,Fn,de,Le,Ht,bo,Ws,pt,Rr="XmodForTokenClassification",zn,F,yo,Ds,ft,Yr=`X-MOD Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`,Us,ut,Kr=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,Zs,gt,ea=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Bs,E,ko,Qs,_t,oa='The <a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodForTokenClassification">XmodForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Vs,Fe,In,le,ze,Wt,To,Gs,vt,ta="XmodForQuestionAnswering",Pn,z,wo,Rs,bt,na=`X-MOD Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute <code>span start logits</code> and <code>span end logits</code>).`,Ys,yt,sa=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,Ks,kt,ra=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,er,H,Mo,or,Tt,aa='The <a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodForQuestionAnswering">XmodForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',tr,Ie,Nn,Dt,qn;return qe=new P({}),Ae=new P({}),We=new P({}),De=new P({}),Be=new Gt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFhtb2RNb2RlbCUwQSUwQW1vZGVsJTIwJTNEJTIwWG1vZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmYWNlYm9vayUyRnhtb2QtYmFzZSUyMiklMEFtb2RlbC5zZXRfZGVmYXVsdF9sYW5ndWFnZSglMjJlbl9YWCUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> XmodModel

model = XmodModel.from_pretrained(<span class="hljs-string">&quot;facebook/xmod-base&quot;</span>)
model.set_default_language(<span class="hljs-string">&quot;en_XX&quot;</span>)`}}),Qe=new Gt({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFpbnB1dF9pZHMlMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTBBJTIwJTIwJTIwJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVCMCUyQyUyMDU4MSUyQyUyMDEwMjY5JTJDJTIwODMlMkMlMjA5OTk0MiUyQyUyMDEzNiUyQyUyMDYwNzQyJTJDJTIwMjMlMkMlMjA3MCUyQyUyMDgwNTgzJTJDJTIwMTgyNzYlMkMlMjAyJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVCMCUyQyUyMDEzMTAlMkMlMjA0OTA4MyUyQyUyMDQ0MyUyQyUyMDI2OSUyQyUyMDcxJTJDJTIwNTQ4NiUyQyUyMDE2NSUyQyUyMDYwNDI5JTJDJTIwNjYwJTJDJTIwMjMlMkMlMjAyJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTVEJTBBKSUwQWxhbmdfaWRzJTIwJTNEJTIwdG9yY2guTG9uZ1RlbnNvciglMEElMjAlMjAlMjAlMjAlNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAwJTJDJTIwJTIwJTIzJTIwZW5fWFglMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjA4JTJDJTIwJTIwJTIzJTIwZGVfREUlMEElMjAlMjAlMjAlMjAlNUQlMEEpJTBBb3V0cHV0JTIwJTNEJTIwbW9kZWwoaW5wdXRfaWRzJTJDJTIwbGFuZ19pZHMlM0RsYW5nX2lkcyk=",highlighted:`<span class="hljs-keyword">import</span> torch

input_ids = torch.tensor(
    [
        [<span class="hljs-number">0</span>, <span class="hljs-number">581</span>, <span class="hljs-number">10269</span>, <span class="hljs-number">83</span>, <span class="hljs-number">99942</span>, <span class="hljs-number">136</span>, <span class="hljs-number">60742</span>, <span class="hljs-number">23</span>, <span class="hljs-number">70</span>, <span class="hljs-number">80583</span>, <span class="hljs-number">18276</span>, <span class="hljs-number">2</span>],
        [<span class="hljs-number">0</span>, <span class="hljs-number">1310</span>, <span class="hljs-number">49083</span>, <span class="hljs-number">443</span>, <span class="hljs-number">269</span>, <span class="hljs-number">71</span>, <span class="hljs-number">5486</span>, <span class="hljs-number">165</span>, <span class="hljs-number">60429</span>, <span class="hljs-number">660</span>, <span class="hljs-number">23</span>, <span class="hljs-number">2</span>],
    ]
)
lang_ids = torch.LongTensor(
    [
        <span class="hljs-number">0</span>,  <span class="hljs-comment"># en_XX</span>
        <span class="hljs-number">8</span>,  <span class="hljs-comment"># de_DE</span>
    ]
)
output = model(input_ids, lang_ids=lang_ids)`}}),Ve=new P({}),Ge=new Gt({props:{code:"bW9kZWwuZnJlZXplX2VtYmVkZGluZ3NfYW5kX2xhbmd1YWdlX2FkYXB0ZXJzKCklMEElMjMlMjBGaW5lLXR1bmUlMjB0aGUlMjBtb2RlbCUyMC4uLg==",highlighted:`model.freeze_embeddings_and_language_adapters()
<span class="hljs-comment"># Fine-tune the model ...</span>`}}),Re=new P({}),Ye=new Gt({props:{code:"bW9kZWwuc2V0X2RlZmF1bHRfbGFuZ3VhZ2UoJTIyZGVfREUlMjIpJTBBJTIzJTIwRXZhbHVhdGUlMjB0aGUlMjBtb2RlbCUyMG9uJTIwR2VybWFuJTIwZXhhbXBsZXMlMjAuLi4=",highlighted:`model.set_default_language(<span class="hljs-string">&quot;de_DE&quot;</span>)
<span class="hljs-comment"># Evaluate the model on German examples ...</span>`}}),Ke=new P({}),oo=new P({}),to=new I({props:{name:"class transformers.XmodConfig",anchor:"transformers.XmodConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"pre_norm",val:" = False"},{name:"adapter_reduction_factor",val:" = 2"},{name:"adapter_layer_norm",val:" = False"},{name:"adapter_reuse_layer_norm",val:" = True"},{name:"ln_before_adapter",val:" = True"},{name:"languages",val:" = ('en_XX',)"},{name:"default_language",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XmodConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the X-MOD 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.3/en/model_doc/xmod#transformers.XmodModel">XmodModel</a>.`,name:"vocab_size"},{anchor:"transformers.XmodConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.XmodConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.XmodConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.XmodConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.XmodConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</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:"hidden_act"},{anchor:"transformers.XmodConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.XmodConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.XmodConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.XmodConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodModel">XmodModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.XmodConfig.initializer_range",description:`<strong>initializer_range</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:"initializer_range"},{anchor:"transformers.XmodConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.XmodConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.XmodConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.XmodConfig.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). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.XmodConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"},{anchor:"transformers.XmodConfig.pre_norm",description:`<strong>pre_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to apply layer normalization before each block.`,name:"pre_norm"},{anchor:"transformers.XmodConfig.adapter_reduction_factor",description:`<strong>adapter_reduction_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to 2) &#x2014;
The factor by which the dimensionality of the adapter is reduced relative to <code>hidden_size</code>.`,name:"adapter_reduction_factor"},{anchor:"transformers.XmodConfig.adapter_layer_norm",description:`<strong>adapter_layer_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to apply a new layer normalization before the adapter modules (shared across all adapters).`,name:"adapter_layer_norm"},{anchor:"transformers.XmodConfig.adapter_reuse_layer_norm",description:`<strong>adapter_reuse_layer_norm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to reuse the second layer normalization and apply it before the adapter modules as well.`,name:"adapter_reuse_layer_norm"},{anchor:"transformers.XmodConfig.ln_before_adapter",description:`<strong>ln_before_adapter</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to apply the layer normalization before the residual connection around the adapter module.`,name:"ln_before_adapter"},{anchor:"transformers.XmodConfig.languages",description:`<strong>languages</strong> (<code>Iterable[str]</code>, <em>optional</em>, defaults to <code>[&quot;en_XX&quot;]</code>) &#x2014;
An iterable of language codes for which adapter modules should be initialized.`,name:"languages"},{anchor:"transformers.XmodConfig.default_language",description:`<strong>default_language</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Language code of a default language. It will be assumed that the input is in this language if no language
codes are explicitly passed to the forward method.`,name:"default_language"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/xmod/configuration_xmod.py#L40"}}),ve=new ja({props:{anchor:"transformers.XmodConfig.example",$$slots:{default:[Sa]},$$scope:{ctx:M}}}),no=new P({}),so=new I({props:{name:"class transformers.XmodModel",anchor:"transformers.XmodModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.XmodModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodConfig">XmodConfig</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.3/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.3/src/transformers/models/xmod/modeling_xmod.py#L790"}}),ro=new I({props:{name:"forward",anchor:"transformers.XmodModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"lang_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",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:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XmodModel.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.XmodModel.forward.lang_ids",description:`<strong>lang_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of the language adapters that should be activated for each sample, respectively. Default: the index
that corresponds to <code>self.config.default_language</code>.`,name:"lang_ids"},{anchor:"transformers.XmodModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on 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.XmodModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XmodModel.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.XmodModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.XmodModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</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.XmodModel.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.XmodModel.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.XmodModel.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.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XmodModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.XmodModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.XmodModel.forward.past_key_values",description:"<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors &#x2014;",name:"past_key_values"},{anchor:"transformers.XmodModel.forward.of",description:`<strong>of</strong> shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"of"},{anchor:"transformers.XmodModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/xmod/modeling_xmod.py#L836"}}),ye=new Xo({props:{$$slots:{default:[Ea]},$$scope:{ctx:M}}}),ao=new P({}),io=new I({props:{name:"class transformers.XmodForCausalLM",anchor:"transformers.XmodForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XmodForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodConfig">XmodConfig</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.3/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.3/src/transformers/models/xmod/modeling_xmod.py#L982"}}),lo=new I({props:{name:"forward",anchor:"transformers.XmodForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"lang_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Tuple[typing.Tuple[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XmodForCausalLM.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.XmodForCausalLM.forward.lang_ids",description:`<strong>lang_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of the language adapters that should be activated for each sample, respectively. Default: the index
that corresponds to <code>self.config.default_language</code>.`,name:"lang_ids"},{anchor:"transformers.XmodForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on 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.XmodForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XmodForCausalLM.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.XmodForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.XmodForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</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.XmodForCausalLM.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.XmodForCausalLM.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.XmodForCausalLM.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.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XmodForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.XmodForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.XmodForCausalLM.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 left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.XmodForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.XmodForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).</p>
<p>Returns &#x2014; <code>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</code> or <code>tuple(torch.FloatTensor)</code></p>
<p>Example &#x2014;`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/xmod/modeling_xmod.py#L1006"}}),Te=new Xo({props:{$$slots:{default:[Ha]},$$scope:{ctx:M}}}),co=new P({}),mo=new I({props:{name:"class transformers.XmodForMaskedLM",anchor:"transformers.XmodForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XmodForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodConfig">XmodConfig</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.3/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.3/src/transformers/models/xmod/modeling_xmod.py#L1139"}}),ho=new I({props:{name:"forward",anchor:"transformers.XmodForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"lang_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.XmodForMaskedLM.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.XmodForMaskedLM.forward.lang_ids",description:`<strong>lang_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of the language adapters that should be activated for each sample, respectively. Default: the index
that corresponds to <code>self.config.default_language</code>.`,name:"lang_ids"},{anchor:"transformers.XmodForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on 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.XmodForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XmodForMaskedLM.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.XmodForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.XmodForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</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.XmodForMaskedLM.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.XmodForMaskedLM.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.XmodForMaskedLM.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.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XmodForMaskedLM.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 be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.XmodForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/xmod/modeling_xmod.py#L1166"}}),Me=new Xo({props:{$$slots:{default:[Wa]},$$scope:{ctx:M}}}),po=new P({}),fo=new I({props:{name:"class transformers.XmodForSequenceClassification",anchor:"transformers.XmodForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XmodForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodConfig">XmodConfig</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.3/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.3/src/transformers/models/xmod/modeling_xmod.py#L1266"}}),uo=new I({props:{name:"forward",anchor:"transformers.XmodForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"lang_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.XmodForSequenceClassification.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.XmodForSequenceClassification.forward.lang_ids",description:`<strong>lang_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of the language adapters that should be activated for each sample, respectively. Default: the index
that corresponds to <code>self.config.default_language</code>.`,name:"lang_ids"},{anchor:"transformers.XmodForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on 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.XmodForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XmodForSequenceClassification.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.XmodForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.XmodForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</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.XmodForSequenceClassification.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.XmodForSequenceClassification.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.XmodForSequenceClassification.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.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XmodForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/xmod/modeling_xmod.py#L1279"}}),xe=new Xo({props:{$$slots:{default:[Da]},$$scope:{ctx:M}}}),go=new P({}),_o=new I({props:{name:"class transformers.XmodForMultipleChoice",anchor:"transformers.XmodForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XmodForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodConfig">XmodConfig</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.3/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.3/src/transformers/models/xmod/modeling_xmod.py#L1359"}}),vo=new I({props:{name:"forward",anchor:"transformers.XmodForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"lang_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = 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.XmodForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.XmodForMultipleChoice.forward.lang_ids",description:`<strong>lang_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of the language adapters that should be activated for each sample, respectively. Default: the index
that corresponds to <code>self.config.default_language</code>.`,name:"lang_ids"},{anchor:"transformers.XmodForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, 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.XmodForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XmodForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, 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.XmodForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.XmodForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, 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.XmodForMultipleChoice.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.XmodForMultipleChoice.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.XmodForMultipleChoice.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.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XmodForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/xmod/modeling_xmod.py#L1371"}}),Xe=new Xo({props:{$$slots:{default:[Ua]},$$scope:{ctx:M}}}),bo=new P({}),yo=new I({props:{name:"class transformers.XmodForTokenClassification",anchor:"transformers.XmodForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XmodForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodConfig">XmodConfig</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.3/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.3/src/transformers/models/xmod/modeling_xmod.py#L1448"}}),ko=new I({props:{name:"forward",anchor:"transformers.XmodForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"lang_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.XmodForTokenClassification.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.XmodForTokenClassification.forward.lang_ids",description:`<strong>lang_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of the language adapters that should be activated for each sample, respectively. Default: the index
that corresponds to <code>self.config.default_language</code>.`,name:"lang_ids"},{anchor:"transformers.XmodForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on 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.XmodForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XmodForTokenClassification.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.XmodForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.XmodForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</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.XmodForTokenClassification.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.XmodForTokenClassification.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.XmodForTokenClassification.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.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XmodForTokenClassification.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 token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/xmod/modeling_xmod.py#L1464"}}),Fe=new Xo({props:{$$slots:{default:[Za]},$$scope:{ctx:M}}}),To=new P({}),wo=new I({props:{name:"class transformers.XmodForQuestionAnswering",anchor:"transformers.XmodForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XmodForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/xmod#transformers.XmodConfig">XmodConfig</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.3/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.3/src/transformers/models/xmod/modeling_xmod.py#L1550"}}),Mo=new I({props:{name:"forward",anchor:"transformers.XmodForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"lang_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = 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.XmodForQuestionAnswering.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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.XmodForQuestionAnswering.forward.lang_ids",description:`<strong>lang_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of the language adapters that should be activated for each sample, respectively. Default: the index
that corresponds to <code>self.config.default_language</code>.`,name:"lang_ids"},{anchor:"transformers.XmodForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on 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.XmodForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XmodForQuestionAnswering.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.XmodForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-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.XmodForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</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.XmodForQuestionAnswering.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.XmodForQuestionAnswering.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.XmodForQuestionAnswering.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.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XmodForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.XmodForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/xmod/modeling_xmod.py#L1562"}}),Ie=new Xo({props:{$$slots:{default:[Ba]},$$scope:{ctx:M}}}),{c(){c=n("meta"),y=r(),p=n("p"),k=r(),N=n("h1"),T=n("a"),V=n("span"),f(qe.$$.fragment),Qn=r(),Lo=n("span"),Lo.textContent=nr,Rt=r(),G=n("h2"),ce=n("a"),Ft=n("span"),f(Ae.$$.fragment),Vn=r(),Fo=n("span"),Fo.textContent=sr,Yt=r(),Oe=n("p"),Oe.innerHTML=rr,Kt=r(),Je=n("p"),Je.textContent=ar,en=r(),je=n("p"),je.innerHTML=ir,on=r(),Se=n("p"),Se.textContent=dr,tn=r(),Ee=n("ul"),Ee.innerHTML=lr,nn=r(),He=n("p"),He.innerHTML=cr,sn=r(),R=n("h2"),me=n("a"),zt=n("span"),f(We.$$.fragment),Gn=r(),zo=n("span"),zo.textContent=mr,rn=r(),Y=n("h3"),he=n("a"),It=n("span"),f(De.$$.fragment),Rn=r(),Io=n("span"),Io.textContent=hr,an=r(),Ue=n("p"),Ue.textContent=pr,dn=r(),Ze=n("ol"),Ze.innerHTML=fr,ln=r(),f(Be.$$.fragment),cn=r(),pe=n("ol"),pe.innerHTML=ur,mn=r(),f(Qe.$$.fragment),hn=r(),K=n("h3"),fe=n("a"),Pt=n("span"),f(Ve.$$.fragment),Yn=r(),Po=n("span"),Po.textContent=gr,pn=Ia(`

The paper recommends that the embedding layer and the language adapters are frozen during fine-tuning. A method for doing this is provided:

	`),f(Ge.$$.fragment),fn=r(),ee=n("h3"),ue=n("a"),Nt=n("span"),f(Re.$$.fragment),Kn=r(),No=n("span"),No.textContent=_r,un=Ia(`

After fine-tuning, zero-shot cross-lingual transfer can be tested by activating the language adapter of the target language:

	`),f(Ye.$$.fragment),gn=r(),oe=n("h2"),ge=n("a"),qt=n("span"),f(Ke.$$.fragment),es=r(),qo=n("span"),qo.textContent=vr,_n=r(),eo=n("ul"),eo.innerHTML=br,vn=r(),te=n("h2"),_e=n("a"),At=n("span"),f(oo.$$.fragment),os=r(),Ao=n("span"),Ao.textContent=yr,bn=r(),q=n("div"),f(to.$$.fragment),ts=r(),Oo=n("p"),Oo.innerHTML=kr,ns=r(),Jo=n("p"),Jo.innerHTML=Tr,ss=r(),f(ve.$$.fragment),yn=r(),ne=n("h2"),be=n("a"),Ot=n("span"),f(no.$$.fragment),rs=r(),jo=n("span"),jo.textContent=wr,kn=r(),w=n("div"),f(so.$$.fragment),as=r(),So=n("p"),So.textContent=Mr,is=r(),Eo=n("p"),Eo.innerHTML=$r,ds=r(),Ho=n("p"),Ho.innerHTML=xr,ls=r(),Wo=n("p"),Wo.innerHTML=Cr,cs=r(),Do=n("p"),Do.innerHTML=Xr,ms=r(),Uo=n("p"),Uo.innerHTML=Lr,hs=r(),A=n("div"),f(ro.$$.fragment),ps=r(),Zo=n("p"),Zo.innerHTML=Fr,fs=r(),f(ye.$$.fragment),Tn=r(),se=n("h2"),ke=n("a"),Jt=n("span"),f(ao.$$.fragment),us=r(),Bo=n("span"),Bo.textContent=zr,wn=r(),x=n("div"),f(io.$$.fragment),gs=r(),Qo=n("p"),Qo.innerHTML=Ir,_s=r(),Vo=n("p"),Vo.innerHTML=Pr,vs=r(),Go=n("p"),Go.innerHTML=Nr,bs=r(),O=n("div"),f(lo.$$.fragment),ys=r(),Ro=n("p"),Ro.innerHTML=qr,ks=r(),f(Te.$$.fragment),Mn=r(),re=n("h2"),we=n("a"),jt=n("span"),f(co.$$.fragment),Ts=r(),Yo=n("span"),Yo.textContent=Ar,$n=r(),C=n("div"),f(mo.$$.fragment),ws=r(),Ko=n("p"),Ko.innerHTML=Or,Ms=r(),et=n("p"),et.innerHTML=Jr,$s=r(),ot=n("p"),ot.innerHTML=jr,xs=r(),J=n("div"),f(ho.$$.fragment),Cs=r(),tt=n("p"),tt.innerHTML=Sr,Xs=r(),f(Me.$$.fragment),xn=r(),ae=n("h2"),$e=n("a"),St=n("span"),f(po.$$.fragment),Ls=r(),nt=n("span"),nt.textContent=Er,Cn=r(),X=n("div"),f(fo.$$.fragment),Fs=r(),st=n("p"),st.textContent=Hr,zs=r(),rt=n("p"),rt.innerHTML=Wr,Is=r(),at=n("p"),at.innerHTML=Dr,Ps=r(),j=n("div"),f(uo.$$.fragment),Ns=r(),it=n("p"),it.innerHTML=Ur,qs=r(),f(xe.$$.fragment),Xn=r(),ie=n("h2"),Ce=n("a"),Et=n("span"),f(go.$$.fragment),As=r(),dt=n("span"),dt.textContent=Zr,Ln=r(),L=n("div"),f(_o.$$.fragment),Os=r(),lt=n("p"),lt.textContent=Br,Js=r(),ct=n("p"),ct.innerHTML=Qr,js=r(),mt=n("p"),mt.innerHTML=Vr,Ss=r(),S=n("div"),f(vo.$$.fragment),Es=r(),ht=n("p"),ht.innerHTML=Gr,Hs=r(),f(Xe.$$.fragment),Fn=r(),de=n("h2"),Le=n("a"),Ht=n("span"),f(bo.$$.fragment),Ws=r(),pt=n("span"),pt.textContent=Rr,zn=r(),F=n("div"),f(yo.$$.fragment),Ds=r(),ft=n("p"),ft.textContent=Yr,Us=r(),ut=n("p"),ut.innerHTML=Kr,Zs=r(),gt=n("p"),gt.innerHTML=ea,Bs=r(),E=n("div"),f(ko.$$.fragment),Qs=r(),_t=n("p"),_t.innerHTML=oa,Vs=r(),f(Fe.$$.fragment),In=r(),le=n("h2"),ze=n("a"),Wt=n("span"),f(To.$$.fragment),Gs=r(),vt=n("span"),vt.textContent=ta,Pn=r(),z=n("div"),f(wo.$$.fragment),Rs=r(),bt=n("p"),bt.innerHTML=na,Ys=r(),yt=n("p"),yt.innerHTML=sa,Ks=r(),kt=n("p"),kt.innerHTML=ra,er=r(),H=n("div"),f(Mo.$$.fragment),or=r(),Tt=n("p"),Tt.innerHTML=aa,tr=r(),f(Ie.$$.fragment),Nn=r(),Dt=n("p"),this.h()},l(e){const i=Ja("svelte-1phssyn",document.head);c=s(i,"META",{name:!0,content:!0}),i.forEach(t),y=a(e),p=s(e,"P",{}),h(p).forEach(t),k=a(e),N=s(e,"H1",{class:!0});var $o=h(N);T=s($o,"A",{id:!0,class:!0,href:!0});var Ut=h(T);V=s(Ut,"SPAN",{});var Zt=h(V);u(qe.$$.fragment,Zt),Zt.forEach(t),Ut.forEach(t),Qn=a($o),Lo=s($o,"SPAN",{"data-svelte-h":!0}),m(Lo)!=="svelte-rj9s7y"&&(Lo.textContent=nr),$o.forEach(t),Rt=a(e),G=s(e,"H2",{class:!0});var xo=h(G);ce=s(xo,"A",{id:!0,class:!0,href:!0});var Bt=h(ce);Ft=s(Bt,"SPAN",{});var Qt=h(Ft);u(Ae.$$.fragment,Qt),Qt.forEach(t),Bt.forEach(t),Vn=a(xo),Fo=s(xo,"SPAN",{"data-svelte-h":!0}),m(Fo)!=="svelte-1jsw1pg"&&(Fo.textContent=sr),xo.forEach(t),Yt=a(e),Oe=s(e,"P",{"data-svelte-h":!0}),m(Oe)!=="svelte-1vmoovo"&&(Oe.innerHTML=rr),Kt=a(e),Je=s(e,"P",{"data-svelte-h":!0}),m(Je)!=="svelte-vfdo9a"&&(Je.textContent=ar),en=a(e),je=s(e,"P",{"data-svelte-h":!0}),m(je)!=="svelte-1ce41kp"&&(je.innerHTML=ir),on=a(e),Se=s(e,"P",{"data-svelte-h":!0}),m(Se)!=="svelte-axv494"&&(Se.textContent=dr),tn=a(e),Ee=s(e,"UL",{"data-svelte-h":!0}),m(Ee)!=="svelte-gqhdug"&&(Ee.innerHTML=lr),nn=a(e),He=s(e,"P",{"data-svelte-h":!0}),m(He)!=="svelte-17wcokr"&&(He.innerHTML=cr),sn=a(e),R=s(e,"H2",{class:!0});var Co=h(R);me=s(Co,"A",{id:!0,class:!0,href:!0});var Vt=h(me);zt=s(Vt,"SPAN",{});var ia=h(zt);u(We.$$.fragment,ia),ia.forEach(t),Vt.forEach(t),Gn=a(Co),zo=s(Co,"SPAN",{"data-svelte-h":!0}),m(zo)!=="svelte-doqaof"&&(zo.textContent=mr),Co.forEach(t),rn=a(e),Y=s(e,"H3",{class:!0});var An=h(Y);he=s(An,"A",{id:!0,class:!0,href:!0});var da=h(he);It=s(da,"SPAN",{});var la=h(It);u(De.$$.fragment,la),la.forEach(t),da.forEach(t),Rn=a(An),Io=s(An,"SPAN",{"data-svelte-h":!0}),m(Io)!=="svelte-1xnj0pb"&&(Io.textContent=hr),An.forEach(t),an=a(e),Ue=s(e,"P",{"data-svelte-h":!0}),m(Ue)!=="svelte-1bi3hxf"&&(Ue.textContent=pr),dn=a(e),Ze=s(e,"OL",{"data-svelte-h":!0}),m(Ze)!=="svelte-1nun6oj"&&(Ze.innerHTML=fr),ln=a(e),u(Be.$$.fragment,e),cn=a(e),pe=s(e,"OL",{start:!0,"data-svelte-h":!0}),m(pe)!=="svelte-1m276jh"&&(pe.innerHTML=ur),mn=a(e),u(Qe.$$.fragment,e),hn=a(e),K=s(e,"H3",{class:!0});var On=h(K);fe=s(On,"A",{id:!0,class:!0,href:!0});var ca=h(fe);Pt=s(ca,"SPAN",{});var ma=h(Pt);u(Ve.$$.fragment,ma),ma.forEach(t),ca.forEach(t),Yn=a(On),Po=s(On,"SPAN",{"data-svelte-h":!0}),m(Po)!=="svelte-nl2q21"&&(Po.textContent=gr),On.forEach(t),pn=Pa(e,`

The paper recommends that the embedding layer and the language adapters are frozen during fine-tuning. A method for doing this is provided:

	`),u(Ge.$$.fragment,e),fn=a(e),ee=s(e,"H3",{class:!0});var Jn=h(ee);ue=s(Jn,"A",{id:!0,class:!0,href:!0});var ha=h(ue);Nt=s(ha,"SPAN",{});var pa=h(Nt);u(Re.$$.fragment,pa),pa.forEach(t),ha.forEach(t),Kn=a(Jn),No=s(Jn,"SPAN",{"data-svelte-h":!0}),m(No)!=="svelte-1j5nfgn"&&(No.textContent=_r),Jn.forEach(t),un=Pa(e,`

After fine-tuning, zero-shot cross-lingual transfer can be tested by activating the language adapter of the target language:

	`),u(Ye.$$.fragment,e),gn=a(e),oe=s(e,"H2",{class:!0});var jn=h(oe);ge=s(jn,"A",{id:!0,class:!0,href:!0});var fa=h(ge);qt=s(fa,"SPAN",{});var ua=h(qt);u(Ke.$$.fragment,ua),ua.forEach(t),fa.forEach(t),es=a(jn),qo=s(jn,"SPAN",{"data-svelte-h":!0}),m(qo)!=="svelte-w4zzv6"&&(qo.textContent=vr),jn.forEach(t),_n=a(e),eo=s(e,"UL",{"data-svelte-h":!0}),m(eo)!=="svelte-p1b16m"&&(eo.innerHTML=br),vn=a(e),te=s(e,"H2",{class:!0});var Sn=h(te);_e=s(Sn,"A",{id:!0,class:!0,href:!0});var ga=h(_e);At=s(ga,"SPAN",{});var _a=h(At);u(oo.$$.fragment,_a),_a.forEach(t),ga.forEach(t),os=a(Sn),Ao=s(Sn,"SPAN",{"data-svelte-h":!0}),m(Ao)!=="svelte-haho87"&&(Ao.textContent=yr),Sn.forEach(t),bn=a(e),q=s(e,"DIV",{class:!0});var Pe=h(q);u(to.$$.fragment,Pe),ts=a(Pe),Oo=s(Pe,"P",{"data-svelte-h":!0}),m(Oo)!=="svelte-1fjpb6w"&&(Oo.innerHTML=kr),ns=a(Pe),Jo=s(Pe,"P",{"data-svelte-h":!0}),m(Jo)!=="svelte-cfh5wl"&&(Jo.innerHTML=Tr),ss=a(Pe),u(ve.$$.fragment,Pe),Pe.forEach(t),yn=a(e),ne=s(e,"H2",{class:!0});var En=h(ne);be=s(En,"A",{id:!0,class:!0,href:!0});var va=h(be);Ot=s(va,"SPAN",{});var ba=h(Ot);u(no.$$.fragment,ba),ba.forEach(t),va.forEach(t),rs=a(En),jo=s(En,"SPAN",{"data-svelte-h":!0}),m(jo)!=="svelte-1dv4jwe"&&(jo.textContent=wr),En.forEach(t),kn=a(e),w=s(e,"DIV",{class:!0});var $=h(w);u(so.$$.fragment,$),as=a($),So=s($,"P",{"data-svelte-h":!0}),m(So)!=="svelte-1534uvs"&&(So.textContent=Mr),is=a($),Eo=s($,"P",{"data-svelte-h":!0}),m(Eo)!=="svelte-ev63c"&&(Eo.innerHTML=$r),ds=a($),Ho=s($,"P",{"data-svelte-h":!0}),m(Ho)!=="svelte-hswkmf"&&(Ho.innerHTML=xr),ls=a($),Wo=s($,"P",{"data-svelte-h":!0}),m(Wo)!=="svelte-rehfhh"&&(Wo.innerHTML=Cr),cs=a($),Do=s($,"P",{"data-svelte-h":!0}),m(Do)!=="svelte-174erte"&&(Do.innerHTML=Xr),ms=a($),Uo=s($,"P",{"data-svelte-h":!0}),m(Uo)!=="svelte-p9qvd1"&&(Uo.innerHTML=Lr),hs=a($),A=s($,"DIV",{class:!0});var wt=h(A);u(ro.$$.fragment,wt),ps=a(wt),Zo=s(wt,"P",{"data-svelte-h":!0}),m(Zo)!=="svelte-13hwvfd"&&(Zo.innerHTML=Fr),fs=a(wt),u(ye.$$.fragment,wt),wt.forEach(t),$.forEach(t),Tn=a(e),se=s(e,"H2",{class:!0});var Hn=h(se);ke=s(Hn,"A",{id:!0,class:!0,href:!0});var ya=h(ke);Jt=s(ya,"SPAN",{});var ka=h(Jt);u(ao.$$.fragment,ka),ka.forEach(t),ya.forEach(t),us=a(Hn),Bo=s(Hn,"SPAN",{"data-svelte-h":!0}),m(Bo)!=="svelte-1493t4e"&&(Bo.textContent=zr),Hn.forEach(t),wn=a(e),x=s(e,"DIV",{class:!0});var W=h(x);u(io.$$.fragment,W),gs=a(W),Qo=s(W,"P",{"data-svelte-h":!0}),m(Qo)!=="svelte-dygsvo"&&(Qo.innerHTML=Ir),_s=a(W),Vo=s(W,"P",{"data-svelte-h":!0}),m(Vo)!=="svelte-ev63c"&&(Vo.innerHTML=Pr),vs=a(W),Go=s(W,"P",{"data-svelte-h":!0}),m(Go)!=="svelte-hswkmf"&&(Go.innerHTML=Nr),bs=a(W),O=s(W,"DIV",{class:!0});var Mt=h(O);u(lo.$$.fragment,Mt),ys=a(Mt),Ro=s(Mt,"P",{"data-svelte-h":!0}),m(Ro)!=="svelte-cpay5"&&(Ro.innerHTML=qr),ks=a(Mt),u(Te.$$.fragment,Mt),Mt.forEach(t),W.forEach(t),Mn=a(e),re=s(e,"H2",{class:!0});var Wn=h(re);we=s(Wn,"A",{id:!0,class:!0,href:!0});var Ta=h(we);jt=s(Ta,"SPAN",{});var wa=h(jt);u(co.$$.fragment,wa),wa.forEach(t),Ta.forEach(t),Ts=a(Wn),Yo=s(Wn,"SPAN",{"data-svelte-h":!0}),m(Yo)!=="svelte-tv6ng6"&&(Yo.textContent=Ar),Wn.forEach(t),$n=a(e),C=s(e,"DIV",{class:!0});var D=h(C);u(mo.$$.fragment,D),ws=a(D),Ko=s(D,"P",{"data-svelte-h":!0}),m(Ko)!=="svelte-aus8gn"&&(Ko.innerHTML=Or),Ms=a(D),et=s(D,"P",{"data-svelte-h":!0}),m(et)!=="svelte-ev63c"&&(et.innerHTML=Jr),$s=a(D),ot=s(D,"P",{"data-svelte-h":!0}),m(ot)!=="svelte-hswkmf"&&(ot.innerHTML=jr),xs=a(D),J=s(D,"DIV",{class:!0});var $t=h(J);u(ho.$$.fragment,$t),Cs=a($t),tt=s($t,"P",{"data-svelte-h":!0}),m(tt)!=="svelte-q8tkw5"&&(tt.innerHTML=Sr),Xs=a($t),u(Me.$$.fragment,$t),$t.forEach(t),D.forEach(t),xn=a(e),ae=s(e,"H2",{class:!0});var Dn=h(ae);$e=s(Dn,"A",{id:!0,class:!0,href:!0});var Ma=h($e);St=s(Ma,"SPAN",{});var $a=h(St);u(po.$$.fragment,$a),$a.forEach(t),Ma.forEach(t),Ls=a(Dn),nt=s(Dn,"SPAN",{"data-svelte-h":!0}),m(nt)!=="svelte-1wvsjn1"&&(nt.textContent=Er),Dn.forEach(t),Cn=a(e),X=s(e,"DIV",{class:!0});var U=h(X);u(fo.$$.fragment,U),Fs=a(U),st=s(U,"P",{"data-svelte-h":!0}),m(st)!=="svelte-1vluxlz"&&(st.textContent=Hr),zs=a(U),rt=s(U,"P",{"data-svelte-h":!0}),m(rt)!=="svelte-ev63c"&&(rt.innerHTML=Wr),Is=a(U),at=s(U,"P",{"data-svelte-h":!0}),m(at)!=="svelte-hswkmf"&&(at.innerHTML=Dr),Ps=a(U),j=s(U,"DIV",{class:!0});var xt=h(j);u(uo.$$.fragment,xt),Ns=a(xt),it=s(xt,"P",{"data-svelte-h":!0}),m(it)!=="svelte-1g37o61"&&(it.innerHTML=Ur),qs=a(xt),u(xe.$$.fragment,xt),xt.forEach(t),U.forEach(t),Xn=a(e),ie=s(e,"H2",{class:!0});var Un=h(ie);Ce=s(Un,"A",{id:!0,class:!0,href:!0});var xa=h(Ce);Et=s(xa,"SPAN",{});var Ca=h(Et);u(go.$$.fragment,Ca),Ca.forEach(t),xa.forEach(t),As=a(Un),dt=s(Un,"SPAN",{"data-svelte-h":!0}),m(dt)!=="svelte-1fxxruj"&&(dt.textContent=Zr),Un.forEach(t),Ln=a(e),L=s(e,"DIV",{class:!0});var Z=h(L);u(_o.$$.fragment,Z),Os=a(Z),lt=s(Z,"P",{"data-svelte-h":!0}),m(lt)!=="svelte-1mpcjkj"&&(lt.textContent=Br),Js=a(Z),ct=s(Z,"P",{"data-svelte-h":!0}),m(ct)!=="svelte-ev63c"&&(ct.innerHTML=Qr),js=a(Z),mt=s(Z,"P",{"data-svelte-h":!0}),m(mt)!=="svelte-hswkmf"&&(mt.innerHTML=Vr),Ss=a(Z),S=s(Z,"DIV",{class:!0});var Ct=h(S);u(vo.$$.fragment,Ct),Es=a(Ct),ht=s(Ct,"P",{"data-svelte-h":!0}),m(ht)!=="svelte-yjbdid"&&(ht.innerHTML=Gr),Hs=a(Ct),u(Xe.$$.fragment,Ct),Ct.forEach(t),Z.forEach(t),Fn=a(e),de=s(e,"H2",{class:!0});var Zn=h(de);Le=s(Zn,"A",{id:!0,class:!0,href:!0});var Xa=h(Le);Ht=s(Xa,"SPAN",{});var La=h(Ht);u(bo.$$.fragment,La),La.forEach(t),Xa.forEach(t),Ws=a(Zn),pt=s(Zn,"SPAN",{"data-svelte-h":!0}),m(pt)!=="svelte-1d0fkd9"&&(pt.textContent=Rr),Zn.forEach(t),zn=a(e),F=s(e,"DIV",{class:!0});var B=h(F);u(yo.$$.fragment,B),Ds=a(B),ft=s(B,"P",{"data-svelte-h":!0}),m(ft)!=="svelte-1lcpzd2"&&(ft.textContent=Yr),Us=a(B),ut=s(B,"P",{"data-svelte-h":!0}),m(ut)!=="svelte-ev63c"&&(ut.innerHTML=Kr),Zs=a(B),gt=s(B,"P",{"data-svelte-h":!0}),m(gt)!=="svelte-hswkmf"&&(gt.innerHTML=ea),Bs=a(B),E=s(B,"DIV",{class:!0});var Xt=h(E);u(ko.$$.fragment,Xt),Qs=a(Xt),_t=s(Xt,"P",{"data-svelte-h":!0}),m(_t)!=="svelte-1y0h6vl"&&(_t.innerHTML=oa),Vs=a(Xt),u(Fe.$$.fragment,Xt),Xt.forEach(t),B.forEach(t),In=a(e),le=s(e,"H2",{class:!0});var Bn=h(le);ze=s(Bn,"A",{id:!0,class:!0,href:!0});var Fa=h(ze);Wt=s(Fa,"SPAN",{});var za=h(Wt);u(To.$$.fragment,za),za.forEach(t),Fa.forEach(t),Gs=a(Bn),vt=s(Bn,"SPAN",{"data-svelte-h":!0}),m(vt)!=="svelte-x04g8o"&&(vt.textContent=ta),Bn.forEach(t),Pn=a(e),z=s(e,"DIV",{class:!0});var Q=h(z);u(wo.$$.fragment,Q),Rs=a(Q),bt=s(Q,"P",{"data-svelte-h":!0}),m(bt)!=="svelte-pvcgqo"&&(bt.innerHTML=na),Ys=a(Q),yt=s(Q,"P",{"data-svelte-h":!0}),m(yt)!=="svelte-ev63c"&&(yt.innerHTML=sa),Ks=a(Q),kt=s(Q,"P",{"data-svelte-h":!0}),m(kt)!=="svelte-hswkmf"&&(kt.innerHTML=ra),er=a(Q),H=s(Q,"DIV",{class:!0});var Lt=h(H);u(Mo.$$.fragment,Lt),or=a(Lt),Tt=s(Lt,"P",{"data-svelte-h":!0}),m(Tt)!=="svelte-1e62uvz"&&(Tt.innerHTML=aa),tr=a(Lt),u(Ie.$$.fragment,Lt),Lt.forEach(t),Q.forEach(t),Nn=a(e),Dt=s(e,"P",{}),h(Dt).forEach(t),this.h()},h(){l(c,"name","hf:doc:metadata"),l(c,"content",JSON.stringify(Va)),l(T,"id","xmod"),l(T,"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"),l(T,"href","#xmod"),l(N,"class","relative group"),l(ce,"id","overview"),l(ce,"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"),l(ce,"href","#overview"),l(G,"class","relative group"),l(me,"id","adapter-usage"),l(me,"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"),l(me,"href","#adapter-usage"),l(R,"class","relative group"),l(he,"id","input-language"),l(he,"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"),l(he,"href","#input-language"),l(Y,"class","relative group"),l(pe,"start","2"),l(fe,"id","finetuning"),l(fe,"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"),l(fe,"href","#finetuning"),l(K,"class","relative group"),l(ue,"id","crosslingual-transfer"),l(ue,"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"),l(ue,"href","#crosslingual-transfer"),l(ee,"class","relative group"),l(ge,"id","resources"),l(ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),l(ge,"href","#resources"),l(oe,"class","relative group"),l(_e,"id","transformers.XmodConfig"),l(_e,"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"),l(_e,"href","#transformers.XmodConfig"),l(te,"class","relative group"),l(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(be,"id","transformers.XmodModel"),l(be,"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"),l(be,"href","#transformers.XmodModel"),l(ne,"class","relative group"),l(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ke,"id","transformers.XmodForCausalLM"),l(ke,"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"),l(ke,"href","#transformers.XmodForCausalLM"),l(se,"class","relative group"),l(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(we,"id","transformers.XmodForMaskedLM"),l(we,"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"),l(we,"href","#transformers.XmodForMaskedLM"),l(re,"class","relative group"),l(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l($e,"id","transformers.XmodForSequenceClassification"),l($e,"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"),l($e,"href","#transformers.XmodForSequenceClassification"),l(ae,"class","relative group"),l(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Ce,"id","transformers.XmodForMultipleChoice"),l(Ce,"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"),l(Ce,"href","#transformers.XmodForMultipleChoice"),l(ie,"class","relative group"),l(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Le,"id","transformers.XmodForTokenClassification"),l(Le,"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"),l(Le,"href","#transformers.XmodForTokenClassification"),l(de,"class","relative group"),l(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ze,"id","transformers.XmodForQuestionAnswering"),l(ze,"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"),l(ze,"href","#transformers.XmodForQuestionAnswering"),l(le,"class","relative group"),l(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,i){o(document.head,c),d(e,y,i),d(e,p,i),d(e,k,i),d(e,N,i),o(N,T),o(T,V),g(qe,V,null),o(N,Qn),o(N,Lo),d(e,Rt,i),d(e,G,i),o(G,ce),o(ce,Ft),g(Ae,Ft,null),o(G,Vn),o(G,Fo),d(e,Yt,i),d(e,Oe,i),d(e,Kt,i),d(e,Je,i),d(e,en,i),d(e,je,i),d(e,on,i),d(e,Se,i),d(e,tn,i),d(e,Ee,i),d(e,nn,i),d(e,He,i),d(e,sn,i),d(e,R,i),o(R,me),o(me,zt),g(We,zt,null),o(R,Gn),o(R,zo),d(e,rn,i),d(e,Y,i),o(Y,he),o(he,It),g(De,It,null),o(Y,Rn),o(Y,Io),d(e,an,i),d(e,Ue,i),d(e,dn,i),d(e,Ze,i),d(e,ln,i),g(Be,e,i),d(e,cn,i),d(e,pe,i),d(e,mn,i),g(Qe,e,i),d(e,hn,i),d(e,K,i),o(K,fe),o(fe,Pt),g(Ve,Pt,null),o(K,Yn),o(K,Po),d(e,pn,i),g(Ge,e,i),d(e,fn,i),d(e,ee,i),o(ee,ue),o(ue,Nt),g(Re,Nt,null),o(ee,Kn),o(ee,No),d(e,un,i),g(Ye,e,i),d(e,gn,i),d(e,oe,i),o(oe,ge),o(ge,qt),g(Ke,qt,null),o(oe,es),o(oe,qo),d(e,_n,i),d(e,eo,i),d(e,vn,i),d(e,te,i),o(te,_e),o(_e,At),g(oo,At,null),o(te,os),o(te,Ao),d(e,bn,i),d(e,q,i),g(to,q,null),o(q,ts),o(q,Oo),o(q,ns),o(q,Jo),o(q,ss),g(ve,q,null),d(e,yn,i),d(e,ne,i),o(ne,be),o(be,Ot),g(no,Ot,null),o(ne,rs),o(ne,jo),d(e,kn,i),d(e,w,i),g(so,w,null),o(w,as),o(w,So),o(w,is),o(w,Eo),o(w,ds),o(w,Ho),o(w,ls),o(w,Wo),o(w,cs),o(w,Do),o(w,ms),o(w,Uo),o(w,hs),o(w,A),g(ro,A,null),o(A,ps),o(A,Zo),o(A,fs),g(ye,A,null),d(e,Tn,i),d(e,se,i),o(se,ke),o(ke,Jt),g(ao,Jt,null),o(se,us),o(se,Bo),d(e,wn,i),d(e,x,i),g(io,x,null),o(x,gs),o(x,Qo),o(x,_s),o(x,Vo),o(x,vs),o(x,Go),o(x,bs),o(x,O),g(lo,O,null),o(O,ys),o(O,Ro),o(O,ks),g(Te,O,null),d(e,Mn,i),d(e,re,i),o(re,we),o(we,jt),g(co,jt,null),o(re,Ts),o(re,Yo),d(e,$n,i),d(e,C,i),g(mo,C,null),o(C,ws),o(C,Ko),o(C,Ms),o(C,et),o(C,$s),o(C,ot),o(C,xs),o(C,J),g(ho,J,null),o(J,Cs),o(J,tt),o(J,Xs),g(Me,J,null),d(e,xn,i),d(e,ae,i),o(ae,$e),o($e,St),g(po,St,null),o(ae,Ls),o(ae,nt),d(e,Cn,i),d(e,X,i),g(fo,X,null),o(X,Fs),o(X,st),o(X,zs),o(X,rt),o(X,Is),o(X,at),o(X,Ps),o(X,j),g(uo,j,null),o(j,Ns),o(j,it),o(j,qs),g(xe,j,null),d(e,Xn,i),d(e,ie,i),o(ie,Ce),o(Ce,Et),g(go,Et,null),o(ie,As),o(ie,dt),d(e,Ln,i),d(e,L,i),g(_o,L,null),o(L,Os),o(L,lt),o(L,Js),o(L,ct),o(L,js),o(L,mt),o(L,Ss),o(L,S),g(vo,S,null),o(S,Es),o(S,ht),o(S,Hs),g(Xe,S,null),d(e,Fn,i),d(e,de,i),o(de,Le),o(Le,Ht),g(bo,Ht,null),o(de,Ws),o(de,pt),d(e,zn,i),d(e,F,i),g(yo,F,null),o(F,Ds),o(F,ft),o(F,Us),o(F,ut),o(F,Zs),o(F,gt),o(F,Bs),o(F,E),g(ko,E,null),o(E,Qs),o(E,_t),o(E,Vs),g(Fe,E,null),d(e,In,i),d(e,le,i),o(le,ze),o(ze,Wt),g(To,Wt,null),o(le,Gs),o(le,vt),d(e,Pn,i),d(e,z,i),g(wo,z,null),o(z,Rs),o(z,bt),o(z,Ys),o(z,yt),o(z,Ks),o(z,kt),o(z,er),o(z,H),g(Mo,H,null),o(H,or),o(H,Tt),o(H,tr),g(Ie,H,null),d(e,Nn,i),d(e,Dt,i),qn=!0},p(e,[i]){const $o={};i&2&&($o.$$scope={dirty:i,ctx:e}),ve.$set($o);const Ut={};i&2&&(Ut.$$scope={dirty:i,ctx:e}),ye.$set(Ut);const Zt={};i&2&&(Zt.$$scope={dirty:i,ctx:e}),Te.$set(Zt);const xo={};i&2&&(xo.$$scope={dirty:i,ctx:e}),Me.$set(xo);const Bt={};i&2&&(Bt.$$scope={dirty:i,ctx:e}),xe.$set(Bt);const Qt={};i&2&&(Qt.$$scope={dirty:i,ctx:e}),Xe.$set(Qt);const Co={};i&2&&(Co.$$scope={dirty:i,ctx:e}),Fe.$set(Co);const Vt={};i&2&&(Vt.$$scope={dirty:i,ctx:e}),Ie.$set(Vt)},i(e){qn||(_(qe.$$.fragment,e),_(Ae.$$.fragment,e),_(We.$$.fragment,e),_(De.$$.fragment,e),_(Be.$$.fragment,e),_(Qe.$$.fragment,e),_(Ve.$$.fragment,e),_(Ge.$$.fragment,e),_(Re.$$.fragment,e),_(Ye.$$.fragment,e),_(Ke.$$.fragment,e),_(oo.$$.fragment,e),_(to.$$.fragment,e),_(ve.$$.fragment,e),_(no.$$.fragment,e),_(so.$$.fragment,e),_(ro.$$.fragment,e),_(ye.$$.fragment,e),_(ao.$$.fragment,e),_(io.$$.fragment,e),_(lo.$$.fragment,e),_(Te.$$.fragment,e),_(co.$$.fragment,e),_(mo.$$.fragment,e),_(ho.$$.fragment,e),_(Me.$$.fragment,e),_(po.$$.fragment,e),_(fo.$$.fragment,e),_(uo.$$.fragment,e),_(xe.$$.fragment,e),_(go.$$.fragment,e),_(_o.$$.fragment,e),_(vo.$$.fragment,e),_(Xe.$$.fragment,e),_(bo.$$.fragment,e),_(yo.$$.fragment,e),_(ko.$$.fragment,e),_(Fe.$$.fragment,e),_(To.$$.fragment,e),_(wo.$$.fragment,e),_(Mo.$$.fragment,e),_(Ie.$$.fragment,e),qn=!0)},o(e){v(qe.$$.fragment,e),v(Ae.$$.fragment,e),v(We.$$.fragment,e),v(De.$$.fragment,e),v(Be.$$.fragment,e),v(Qe.$$.fragment,e),v(Ve.$$.fragment,e),v(Ge.$$.fragment,e),v(Re.$$.fragment,e),v(Ye.$$.fragment,e),v(Ke.$$.fragment,e),v(oo.$$.fragment,e),v(to.$$.fragment,e),v(ve.$$.fragment,e),v(no.$$.fragment,e),v(so.$$.fragment,e),v(ro.$$.fragment,e),v(ye.$$.fragment,e),v(ao.$$.fragment,e),v(io.$$.fragment,e),v(lo.$$.fragment,e),v(Te.$$.fragment,e),v(co.$$.fragment,e),v(mo.$$.fragment,e),v(ho.$$.fragment,e),v(Me.$$.fragment,e),v(po.$$.fragment,e),v(fo.$$.fragment,e),v(uo.$$.fragment,e),v(xe.$$.fragment,e),v(go.$$.fragment,e),v(_o.$$.fragment,e),v(vo.$$.fragment,e),v(Xe.$$.fragment,e),v(bo.$$.fragment,e),v(yo.$$.fragment,e),v(ko.$$.fragment,e),v(Fe.$$.fragment,e),v(To.$$.fragment,e),v(wo.$$.fragment,e),v(Mo.$$.fragment,e),v(Ie.$$.fragment,e),qn=!1},d(e){e&&(t(y),t(p),t(k),t(N),t(Rt),t(G),t(Yt),t(Oe),t(Kt),t(Je),t(en),t(je),t(on),t(Se),t(tn),t(Ee),t(nn),t(He),t(sn),t(R),t(rn),t(Y),t(an),t(Ue),t(dn),t(Ze),t(ln),t(cn),t(pe),t(mn),t(hn),t(K),t(pn),t(fn),t(ee),t(un),t(gn),t(oe),t(_n),t(eo),t(vn),t(te),t(bn),t(q),t(yn),t(ne),t(kn),t(w),t(Tn),t(se),t(wn),t(x),t(Mn),t(re),t($n),t(C),t(xn),t(ae),t(Cn),t(X),t(Xn),t(ie),t(Ln),t(L),t(Fn),t(de),t(zn),t(F),t(In),t(le),t(Pn),t(z),t(Nn),t(Dt)),t(c),b(qe),b(Ae),b(We),b(De),b(Be,e),b(Qe,e),b(Ve),b(Ge,e),b(Re),b(Ye,e),b(Ke),b(oo),b(to),b(ve),b(no),b(so),b(ro),b(ye),b(ao),b(io),b(lo),b(Te),b(co),b(mo),b(ho),b(Me),b(po),b(fo),b(uo),b(xe),b(go),b(_o),b(vo),b(Xe),b(bo),b(yo),b(ko),b(Fe),b(To),b(wo),b(Mo),b(Ie)}}}const Va={local:"xmod",sections:[{local:"overview",title:"Overview"},{local:"adapter-usage",sections:[{local:"input-language",title:"Input language"},{local:"finetuning",title:"Fine-tuning"},{local:"crosslingual-transfer",title:"Cross-lingual transfer"}],title:"Adapter Usage"},{local:"resources",title:"Resources"},{local:"transformers.XmodConfig",title:"XmodConfig"},{local:"transformers.XmodModel",title:"XmodModel"},{local:"transformers.XmodForCausalLM",title:"XmodForCausalLM"},{local:"transformers.XmodForMaskedLM",title:"XmodForMaskedLM"},{local:"transformers.XmodForSequenceClassification",title:"XmodForSequenceClassification"},{local:"transformers.XmodForMultipleChoice",title:"XmodForMultipleChoice"},{local:"transformers.XmodForTokenClassification",title:"XmodForTokenClassification"},{local:"transformers.XmodForQuestionAnswering",title:"XmodForQuestionAnswering"}],title:"X-MOD"};function Ga(M){return qa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class si extends Aa{constructor(c){super(),Oa(this,c,Ga,Qa,Na,{})}}export{si as component};
