import{s as hs,o as fs,n as le}from"../chunks/scheduler.9bc65507.js";import{S as us,i as gs,g as d,s as n,r as p,A as _s,h as l,f as t,c as s,j as $,u as h,x as c,k as y,y as a,a as i,v as f,d as u,t as g,w as _}from"../chunks/index.707bf1b6.js";import{T as eo}from"../chunks/Tip.c2ecdbf4.js";import{D as q}from"../chunks/Docstring.17db21ae.js";import{C as Do}from"../chunks/CodeBlock.54a9f38d.js";import{E as bs}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as x}from"../chunks/Heading.342b1fa6.js";function vs(w){let r,b="Examples:",m,v,j;return v=new Do({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`,wrap:!1}}),{c(){r=d("p"),r.textContent=b,m=n(),p(v.$$.fragment)},l(T){r=l(T,"P",{"data-svelte-h":!0}),c(r)!=="svelte-kvfsh7"&&(r.textContent=b),m=s(T),h(v.$$.fragment,T)},m(T,W){i(T,r,W),i(T,m,W),f(v,T,W),j=!0},p:le,i(T){j||(u(v.$$.fragment,T),j=!0)},o(T){g(v.$$.fragment,T),j=!1},d(T){T&&(t(r),t(m)),_(v,T)}}}function ks(w){let r,b=`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(){r=d("p"),r.innerHTML=b},l(m){r=l(m,"P",{"data-svelte-h":!0}),c(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(m,v){i(m,r,v)},p:le,d(m){m&&t(r)}}}function Ts(w){let r,b=`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(){r=d("p"),r.innerHTML=b},l(m){r=l(m,"P",{"data-svelte-h":!0}),c(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(m,v){i(m,r,v)},p:le,d(m){m&&t(r)}}}function Ms(w){let r,b=`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(){r=d("p"),r.innerHTML=b},l(m){r=l(m,"P",{"data-svelte-h":!0}),c(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(m,v){i(m,r,v)},p:le,d(m){m&&t(r)}}}function ws(w){let r,b=`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(){r=d("p"),r.innerHTML=b},l(m){r=l(m,"P",{"data-svelte-h":!0}),c(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(m,v){i(m,r,v)},p:le,d(m){m&&t(r)}}}function ys(w){let r,b=`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(){r=d("p"),r.innerHTML=b},l(m){r=l(m,"P",{"data-svelte-h":!0}),c(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(m,v){i(m,r,v)},p:le,d(m){m&&t(r)}}}function $s(w){let r,b=`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(){r=d("p"),r.innerHTML=b},l(m){r=l(m,"P",{"data-svelte-h":!0}),c(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(m,v){i(m,r,v)},p:le,d(m){m&&t(r)}}}function xs(w){let r,b=`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(){r=d("p"),r.innerHTML=b},l(m){r=l(m,"P",{"data-svelte-h":!0}),c(r)!=="svelte-fincs2"&&(r.innerHTML=b)},m(m,v){i(m,r,v)},p:le,d(m){m&&t(r)}}}function Cs(w){let r,b,m,v,j,T,W,Ho,ce,Mn=`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.`,Ao,me,wn="The abstract from the paper is the following:",So,pe,yn="<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>",Uo,he,$n=`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>.`,Eo,fe,Bo,ue,xn="Tips:",Zo,ge,Cn='<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>',Qo,_e,Vo,be,Go,ve,Xn="There are two ways to specify the input language:",Ro,ke,zn="<li>By setting a default language before using the model:</li>",Yo,Te,Ko,ee,Ln="<li>By explicitly passing the index of the language adapter for each sample:</li>",et,Me,ot,we,tt,ye,Fn="The paper recommends that the embedding layer and the language adapters are frozen during fine-tuning. A method for doing this is provided:",nt,$e,st,xe,at,Ce,In="After fine-tuning, zero-shot cross-lingual transfer can be tested by activating the language adapter of the target language:",rt,Xe,it,ze,dt,Le,qn='<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>',lt,Fe,ct,P,Ie,Ct,oo,Pn=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.39.1/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.`,Xt,to,On=`Configuration objects inherit from <a href="/docs/transformers/v4.39.1/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.39.1/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,zt,oe,mt,qe,pt,k,Pe,Lt,no,Jn="The bare X-MOD Model transformer outputting raw hidden-states without any specific head on top.",Ft,so,Nn=`This model inherits from <a href="/docs/transformers/v4.39.1/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.)`,It,ao,jn=`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.`,qt,ro,Wn=`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.`,Pt,io,Dn=`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.`,Ot,lo,Hn='.. _<em>Attention is all you need</em>: <a href="https://arxiv.org/abs/1706.03762" rel="nofollow">https://arxiv.org/abs/1706.03762</a>',Jt,H,Oe,Nt,co,An='The <a href="/docs/transformers/v4.39.1/en/model_doc/xmod#transformers.XmodModel">XmodModel</a> forward method, overrides the <code>__call__</code> special method.',jt,te,ht,Je,ft,C,Ne,Wt,mo,Sn="X-MOD Model with a <code>language modeling</code> head on top for CLM fine-tuning.",Dt,po,Un=`This model inherits from <a href="/docs/transformers/v4.39.1/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.)`,Ht,ho,En=`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.`,At,A,je,St,fo,Bn='The <a href="/docs/transformers/v4.39.1/en/model_doc/xmod#transformers.XmodForCausalLM">XmodForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',Ut,ne,ut,We,gt,X,De,Et,uo,Zn="X-MOD Model with a <code>language modeling</code> head on top.",Bt,go,Qn=`This model inherits from <a href="/docs/transformers/v4.39.1/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.)`,Zt,_o,Vn=`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.`,Qt,S,He,Vt,bo,Gn='The <a href="/docs/transformers/v4.39.1/en/model_doc/xmod#transformers.XmodForMaskedLM">XmodForMaskedLM</a> forward method, overrides the <code>__call__</code> special method.',Gt,se,_t,Ae,bt,z,Se,Rt,vo,Rn=`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.`,Yt,ko,Yn=`This model inherits from <a href="/docs/transformers/v4.39.1/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.)`,Kt,To,Kn=`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.`,en,U,Ue,on,Mo,es='The <a href="/docs/transformers/v4.39.1/en/model_doc/xmod#transformers.XmodForSequenceClassification">XmodForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',tn,ae,vt,Ee,kt,L,Be,nn,wo,os=`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.`,sn,yo,ts=`This model inherits from <a href="/docs/transformers/v4.39.1/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.)`,an,$o,ns=`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.`,rn,E,Ze,dn,xo,ss='The <a href="/docs/transformers/v4.39.1/en/model_doc/xmod#transformers.XmodForMultipleChoice">XmodForMultipleChoice</a> forward method, overrides the <code>__call__</code> special method.',ln,re,Tt,Qe,Mt,F,Ve,cn,Co,as=`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.`,mn,Xo,rs=`This model inherits from <a href="/docs/transformers/v4.39.1/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.)`,pn,zo,is=`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.`,hn,B,Ge,fn,Lo,ds='The <a href="/docs/transformers/v4.39.1/en/model_doc/xmod#transformers.XmodForTokenClassification">XmodForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',un,ie,wt,Re,yt,I,Ye,gn,Fo,ls=`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>).`,_n,Io,cs=`This model inherits from <a href="/docs/transformers/v4.39.1/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.)`,bn,qo,ms=`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.`,vn,Z,Ke,kn,Po,ps='The <a href="/docs/transformers/v4.39.1/en/model_doc/xmod#transformers.XmodForQuestionAnswering">XmodForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',Tn,de,$t,Wo,xt;return j=new x({props:{title:"X-MOD",local:"x-mod",headingTag:"h1"}}),W=new x({props:{title:"Overview",local:"overview",headingTag:"h2"}}),fe=new x({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),_e=new x({props:{title:"Adapter Usage",local:"adapter-usage",headingTag:"h2"}}),be=new x({props:{title:"Input language",local:"input-language",headingTag:"h3"}}),Te=new Do({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>)`,wrap:!1}}),Me=new Do({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)`,wrap:!1}}),we=new x({props:{title:"Fine-tuning",local:"fine-tuning",headingTag:"h3"}}),$e=new Do({props:{code:"bW9kZWwuZnJlZXplX2VtYmVkZGluZ3NfYW5kX2xhbmd1YWdlX2FkYXB0ZXJzKCklMEElMjMlMjBGaW5lLXR1bmUlMjB0aGUlMjBtb2RlbCUyMC4uLg==",highlighted:`model.freeze_embeddings_and_language_adapters()
<span class="hljs-comment"># Fine-tune the model ...</span>`,wrap:!1}}),xe=new x({props:{title:"Cross-lingual transfer",local:"cross-lingual-transfer",headingTag:"h3"}}),Xe=new Do({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>`,wrap:!1}}),ze=new x({props:{title:"Resources",local:"resources",headingTag:"h2"}}),Fe=new x({props:{title:"XmodConfig",local:"transformers.XmodConfig",headingTag:"h2"}}),Ie=new q({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.39.1/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.39.1/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.39.1/src/transformers/models/xmod/configuration_xmod.py#L40"}}),oe=new bs({props:{anchor:"transformers.XmodConfig.example",$$slots:{default:[vs]},$$scope:{ctx:w}}}),qe=new x({props:{title:"XmodModel",local:"transformers.XmodModel",headingTag:"h2"}}),Pe=new q({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.39.1/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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L776"}}),Oe=new q({props:{name:"forward",anchor:"transformers.XmodModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"lang_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"encoder_hidden_states",val:": Optional = None"},{name:"encoder_attention_mask",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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.39.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L826"}}),te=new eo({props:{$$slots:{default:[ks]},$$scope:{ctx:w}}}),Je=new x({props:{title:"XmodForCausalLM",local:"transformers.XmodForCausalLM",headingTag:"h2"}}),Ne=new q({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.39.1/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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L968"}}),je=new q({props:{name:"forward",anchor:"transformers.XmodForCausalLM.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"lang_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"encoder_hidden_states",val:": Optional = None"},{name:"encoder_attention_mask",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"past_key_values",val:": Tuple = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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.39.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L996"}}),ne=new eo({props:{$$slots:{default:[Ts]},$$scope:{ctx:w}}}),We=new x({props:{title:"XmodForMaskedLM",local:"transformers.XmodForMaskedLM",headingTag:"h2"}}),De=new q({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.39.1/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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L1136"}}),He=new q({props:{name:"forward",anchor:"transformers.XmodForMaskedLM.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"lang_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"encoder_hidden_states",val:": Optional = None"},{name:"encoder_attention_mask",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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.39.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L1167"}}),se=new eo({props:{$$slots:{default:[Ms]},$$scope:{ctx:w}}}),Ae=new x({props:{title:"XmodForSequenceClassification",local:"transformers.XmodForSequenceClassification",headingTag:"h2"}}),Se=new q({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.39.1/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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L1260"}}),Ue=new q({props:{name:"forward",anchor:"transformers.XmodForSequenceClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"lang_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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.39.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L1280"}}),ae=new eo({props:{$$slots:{default:[ws]},$$scope:{ctx:w}}}),Ee=new x({props:{title:"XmodForMultipleChoice",local:"transformers.XmodForMultipleChoice",headingTag:"h2"}}),Be=new q({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.39.1/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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L1353"}}),Ze=new q({props:{name:"forward",anchor:"transformers.XmodForMultipleChoice.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"lang_ids",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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.39.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L1372"}}),re=new eo({props:{$$slots:{default:[ys]},$$scope:{ctx:w}}}),Qe=new x({props:{title:"XmodForTokenClassification",local:"transformers.XmodForTokenClassification",headingTag:"h2"}}),Ve=new q({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.39.1/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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L1442"}}),Ge=new q({props:{name:"forward",anchor:"transformers.XmodForTokenClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"lang_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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.39.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L1465"}}),ie=new eo({props:{$$slots:{default:[$s]},$$scope:{ctx:w}}}),Re=new x({props:{title:"XmodForQuestionAnswering",local:"transformers.XmodForQuestionAnswering",headingTag:"h2"}}),Ye=new q({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.39.1/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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L1544"}}),Ke=new q({props:{name:"forward",anchor:"transformers.XmodForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"lang_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"start_positions",val:": Optional = None"},{name:"end_positions",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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.39.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.39.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.39.1/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.39.1/src/transformers/models/xmod/modeling_xmod.py#L1563"}}),de=new eo({props:{$$slots:{default:[xs]},$$scope:{ctx:w}}}),{c(){r=d("meta"),b=n(),m=d("p"),v=n(),p(j.$$.fragment),T=n(),p(W.$$.fragment),Ho=n(),ce=d("p"),ce.innerHTML=Mn,Ao=n(),me=d("p"),me.textContent=wn,So=n(),pe=d("p"),pe.innerHTML=yn,Uo=n(),he=d("p"),he.innerHTML=$n,Eo=n(),p(fe.$$.fragment),Bo=n(),ue=d("p"),ue.textContent=xn,Zo=n(),ge=d("ul"),ge.innerHTML=Cn,Qo=n(),p(_e.$$.fragment),Vo=n(),p(be.$$.fragment),Go=n(),ve=d("p"),ve.textContent=Xn,Ro=n(),ke=d("ol"),ke.innerHTML=zn,Yo=n(),p(Te.$$.fragment),Ko=n(),ee=d("ol"),ee.innerHTML=Ln,et=n(),p(Me.$$.fragment),ot=n(),p(we.$$.fragment),tt=n(),ye=d("p"),ye.textContent=Fn,nt=n(),p($e.$$.fragment),st=n(),p(xe.$$.fragment),at=n(),Ce=d("p"),Ce.textContent=In,rt=n(),p(Xe.$$.fragment),it=n(),p(ze.$$.fragment),dt=n(),Le=d("ul"),Le.innerHTML=qn,lt=n(),p(Fe.$$.fragment),ct=n(),P=d("div"),p(Ie.$$.fragment),Ct=n(),oo=d("p"),oo.innerHTML=Pn,Xt=n(),to=d("p"),to.innerHTML=On,zt=n(),p(oe.$$.fragment),mt=n(),p(qe.$$.fragment),pt=n(),k=d("div"),p(Pe.$$.fragment),Lt=n(),no=d("p"),no.textContent=Jn,Ft=n(),so=d("p"),so.innerHTML=Nn,It=n(),ao=d("p"),ao.innerHTML=jn,qt=n(),ro=d("p"),ro.innerHTML=Wn,Pt=n(),io=d("p"),io.innerHTML=Dn,Ot=n(),lo=d("p"),lo.innerHTML=Hn,Jt=n(),H=d("div"),p(Oe.$$.fragment),Nt=n(),co=d("p"),co.innerHTML=An,jt=n(),p(te.$$.fragment),ht=n(),p(Je.$$.fragment),ft=n(),C=d("div"),p(Ne.$$.fragment),Wt=n(),mo=d("p"),mo.innerHTML=Sn,Dt=n(),po=d("p"),po.innerHTML=Un,Ht=n(),ho=d("p"),ho.innerHTML=En,At=n(),A=d("div"),p(je.$$.fragment),St=n(),fo=d("p"),fo.innerHTML=Bn,Ut=n(),p(ne.$$.fragment),ut=n(),p(We.$$.fragment),gt=n(),X=d("div"),p(De.$$.fragment),Et=n(),uo=d("p"),uo.innerHTML=Zn,Bt=n(),go=d("p"),go.innerHTML=Qn,Zt=n(),_o=d("p"),_o.innerHTML=Vn,Qt=n(),S=d("div"),p(He.$$.fragment),Vt=n(),bo=d("p"),bo.innerHTML=Gn,Gt=n(),p(se.$$.fragment),_t=n(),p(Ae.$$.fragment),bt=n(),z=d("div"),p(Se.$$.fragment),Rt=n(),vo=d("p"),vo.textContent=Rn,Yt=n(),ko=d("p"),ko.innerHTML=Yn,Kt=n(),To=d("p"),To.innerHTML=Kn,en=n(),U=d("div"),p(Ue.$$.fragment),on=n(),Mo=d("p"),Mo.innerHTML=es,tn=n(),p(ae.$$.fragment),vt=n(),p(Ee.$$.fragment),kt=n(),L=d("div"),p(Be.$$.fragment),nn=n(),wo=d("p"),wo.textContent=os,sn=n(),yo=d("p"),yo.innerHTML=ts,an=n(),$o=d("p"),$o.innerHTML=ns,rn=n(),E=d("div"),p(Ze.$$.fragment),dn=n(),xo=d("p"),xo.innerHTML=ss,ln=n(),p(re.$$.fragment),Tt=n(),p(Qe.$$.fragment),Mt=n(),F=d("div"),p(Ve.$$.fragment),cn=n(),Co=d("p"),Co.textContent=as,mn=n(),Xo=d("p"),Xo.innerHTML=rs,pn=n(),zo=d("p"),zo.innerHTML=is,hn=n(),B=d("div"),p(Ge.$$.fragment),fn=n(),Lo=d("p"),Lo.innerHTML=ds,un=n(),p(ie.$$.fragment),wt=n(),p(Re.$$.fragment),yt=n(),I=d("div"),p(Ye.$$.fragment),gn=n(),Fo=d("p"),Fo.innerHTML=ls,_n=n(),Io=d("p"),Io.innerHTML=cs,bn=n(),qo=d("p"),qo.innerHTML=ms,vn=n(),Z=d("div"),p(Ke.$$.fragment),kn=n(),Po=d("p"),Po.innerHTML=ps,Tn=n(),p(de.$$.fragment),$t=n(),Wo=d("p"),this.h()},l(e){const o=_s("svelte-u9bgzb",document.head);r=l(o,"META",{name:!0,content:!0}),o.forEach(t),b=s(e),m=l(e,"P",{}),$(m).forEach(t),v=s(e),h(j.$$.fragment,e),T=s(e),h(W.$$.fragment,e),Ho=s(e),ce=l(e,"P",{"data-svelte-h":!0}),c(ce)!=="svelte-1vmoovo"&&(ce.innerHTML=Mn),Ao=s(e),me=l(e,"P",{"data-svelte-h":!0}),c(me)!=="svelte-vfdo9a"&&(me.textContent=wn),So=s(e),pe=l(e,"P",{"data-svelte-h":!0}),c(pe)!=="svelte-1ce41kp"&&(pe.innerHTML=yn),Uo=s(e),he=l(e,"P",{"data-svelte-h":!0}),c(he)!=="svelte-17wcokr"&&(he.innerHTML=$n),Eo=s(e),h(fe.$$.fragment,e),Bo=s(e),ue=l(e,"P",{"data-svelte-h":!0}),c(ue)!=="svelte-axv494"&&(ue.textContent=xn),Zo=s(e),ge=l(e,"UL",{"data-svelte-h":!0}),c(ge)!=="svelte-gqhdug"&&(ge.innerHTML=Cn),Qo=s(e),h(_e.$$.fragment,e),Vo=s(e),h(be.$$.fragment,e),Go=s(e),ve=l(e,"P",{"data-svelte-h":!0}),c(ve)!=="svelte-1bi3hxf"&&(ve.textContent=Xn),Ro=s(e),ke=l(e,"OL",{"data-svelte-h":!0}),c(ke)!=="svelte-1nun6oj"&&(ke.innerHTML=zn),Yo=s(e),h(Te.$$.fragment,e),Ko=s(e),ee=l(e,"OL",{start:!0,"data-svelte-h":!0}),c(ee)!=="svelte-1m276jh"&&(ee.innerHTML=Ln),et=s(e),h(Me.$$.fragment,e),ot=s(e),h(we.$$.fragment,e),tt=s(e),ye=l(e,"P",{"data-svelte-h":!0}),c(ye)!=="svelte-1p51yb4"&&(ye.textContent=Fn),nt=s(e),h($e.$$.fragment,e),st=s(e),h(xe.$$.fragment,e),at=s(e),Ce=l(e,"P",{"data-svelte-h":!0}),c(Ce)!=="svelte-1fqdbu1"&&(Ce.textContent=In),rt=s(e),h(Xe.$$.fragment,e),it=s(e),h(ze.$$.fragment,e),dt=s(e),Le=l(e,"UL",{"data-svelte-h":!0}),c(Le)!=="svelte-p1b16m"&&(Le.innerHTML=qn),lt=s(e),h(Fe.$$.fragment,e),ct=s(e),P=l(e,"DIV",{class:!0});var D=$(P);h(Ie.$$.fragment,D),Ct=s(D),oo=l(D,"P",{"data-svelte-h":!0}),c(oo)!=="svelte-913c6o"&&(oo.innerHTML=Pn),Xt=s(D),to=l(D,"P",{"data-svelte-h":!0}),c(to)!=="svelte-1nrxf0l"&&(to.innerHTML=On),zt=s(D),h(oe.$$.fragment,D),D.forEach(t),mt=s(e),h(qe.$$.fragment,e),pt=s(e),k=l(e,"DIV",{class:!0});var M=$(k);h(Pe.$$.fragment,M),Lt=s(M),no=l(M,"P",{"data-svelte-h":!0}),c(no)!=="svelte-1534uvs"&&(no.textContent=Jn),Ft=s(M),so=l(M,"P",{"data-svelte-h":!0}),c(so)!=="svelte-1t3ln5c"&&(so.innerHTML=Nn),It=s(M),ao=l(M,"P",{"data-svelte-h":!0}),c(ao)!=="svelte-hswkmf"&&(ao.innerHTML=jn),qt=s(M),ro=l(M,"P",{"data-svelte-h":!0}),c(ro)!=="svelte-rehfhh"&&(ro.innerHTML=Wn),Pt=s(M),io=l(M,"P",{"data-svelte-h":!0}),c(io)!=="svelte-174erte"&&(io.innerHTML=Dn),Ot=s(M),lo=l(M,"P",{"data-svelte-h":!0}),c(lo)!=="svelte-p9qvd1"&&(lo.innerHTML=Hn),Jt=s(M),H=l(M,"DIV",{class:!0});var R=$(H);h(Oe.$$.fragment,R),Nt=s(R),co=l(R,"P",{"data-svelte-h":!0}),c(co)!=="svelte-1jzqds1"&&(co.innerHTML=An),jt=s(R),h(te.$$.fragment,R),R.forEach(t),M.forEach(t),ht=s(e),h(Je.$$.fragment,e),ft=s(e),C=l(e,"DIV",{class:!0});var O=$(C);h(Ne.$$.fragment,O),Wt=s(O),mo=l(O,"P",{"data-svelte-h":!0}),c(mo)!=="svelte-dygsvo"&&(mo.innerHTML=Sn),Dt=s(O),po=l(O,"P",{"data-svelte-h":!0}),c(po)!=="svelte-1t3ln5c"&&(po.innerHTML=Un),Ht=s(O),ho=l(O,"P",{"data-svelte-h":!0}),c(ho)!=="svelte-hswkmf"&&(ho.innerHTML=En),At=s(O),A=l(O,"DIV",{class:!0});var Y=$(A);h(je.$$.fragment,Y),St=s(Y),fo=l(Y,"P",{"data-svelte-h":!0}),c(fo)!=="svelte-5m9jz9"&&(fo.innerHTML=Bn),Ut=s(Y),h(ne.$$.fragment,Y),Y.forEach(t),O.forEach(t),ut=s(e),h(We.$$.fragment,e),gt=s(e),X=l(e,"DIV",{class:!0});var J=$(X);h(De.$$.fragment,J),Et=s(J),uo=l(J,"P",{"data-svelte-h":!0}),c(uo)!=="svelte-aus8gn"&&(uo.innerHTML=Zn),Bt=s(J),go=l(J,"P",{"data-svelte-h":!0}),c(go)!=="svelte-1t3ln5c"&&(go.innerHTML=Qn),Zt=s(J),_o=l(J,"P",{"data-svelte-h":!0}),c(_o)!=="svelte-hswkmf"&&(_o.innerHTML=Vn),Qt=s(J),S=l(J,"DIV",{class:!0});var K=$(S);h(He.$$.fragment,K),Vt=s(K),bo=l(K,"P",{"data-svelte-h":!0}),c(bo)!=="svelte-1g4ov9p"&&(bo.innerHTML=Gn),Gt=s(K),h(se.$$.fragment,K),K.forEach(t),J.forEach(t),_t=s(e),h(Ae.$$.fragment,e),bt=s(e),z=l(e,"DIV",{class:!0});var N=$(z);h(Se.$$.fragment,N),Rt=s(N),vo=l(N,"P",{"data-svelte-h":!0}),c(vo)!=="svelte-1vluxlz"&&(vo.textContent=Rn),Yt=s(N),ko=l(N,"P",{"data-svelte-h":!0}),c(ko)!=="svelte-1t3ln5c"&&(ko.innerHTML=Yn),Kt=s(N),To=l(N,"P",{"data-svelte-h":!0}),c(To)!=="svelte-hswkmf"&&(To.innerHTML=Kn),en=s(N),U=l(N,"DIV",{class:!0});var Oo=$(U);h(Ue.$$.fragment,Oo),on=s(Oo),Mo=l(Oo,"P",{"data-svelte-h":!0}),c(Mo)!=="svelte-1wl16ip"&&(Mo.innerHTML=es),tn=s(Oo),h(ae.$$.fragment,Oo),Oo.forEach(t),N.forEach(t),vt=s(e),h(Ee.$$.fragment,e),kt=s(e),L=l(e,"DIV",{class:!0});var Q=$(L);h(Be.$$.fragment,Q),nn=s(Q),wo=l(Q,"P",{"data-svelte-h":!0}),c(wo)!=="svelte-1mpcjkj"&&(wo.textContent=os),sn=s(Q),yo=l(Q,"P",{"data-svelte-h":!0}),c(yo)!=="svelte-1t3ln5c"&&(yo.innerHTML=ts),an=s(Q),$o=l(Q,"P",{"data-svelte-h":!0}),c($o)!=="svelte-hswkmf"&&($o.innerHTML=ns),rn=s(Q),E=l(Q,"DIV",{class:!0});var Jo=$(E);h(Ze.$$.fragment,Jo),dn=s(Jo),xo=l(Jo,"P",{"data-svelte-h":!0}),c(xo)!=="svelte-m6v3hp"&&(xo.innerHTML=ss),ln=s(Jo),h(re.$$.fragment,Jo),Jo.forEach(t),Q.forEach(t),Tt=s(e),h(Qe.$$.fragment,e),Mt=s(e),F=l(e,"DIV",{class:!0});var V=$(F);h(Ve.$$.fragment,V),cn=s(V),Co=l(V,"P",{"data-svelte-h":!0}),c(Co)!=="svelte-1lcpzd2"&&(Co.textContent=as),mn=s(V),Xo=l(V,"P",{"data-svelte-h":!0}),c(Xo)!=="svelte-1t3ln5c"&&(Xo.innerHTML=rs),pn=s(V),zo=l(V,"P",{"data-svelte-h":!0}),c(zo)!=="svelte-hswkmf"&&(zo.innerHTML=is),hn=s(V),B=l(V,"DIV",{class:!0});var No=$(B);h(Ge.$$.fragment,No),fn=s(No),Lo=l(No,"P",{"data-svelte-h":!0}),c(Lo)!=="svelte-1s81s4p"&&(Lo.innerHTML=ds),un=s(No),h(ie.$$.fragment,No),No.forEach(t),V.forEach(t),wt=s(e),h(Re.$$.fragment,e),yt=s(e),I=l(e,"DIV",{class:!0});var G=$(I);h(Ye.$$.fragment,G),gn=s(G),Fo=l(G,"P",{"data-svelte-h":!0}),c(Fo)!=="svelte-pvcgqo"&&(Fo.innerHTML=ls),_n=s(G),Io=l(G,"P",{"data-svelte-h":!0}),c(Io)!=="svelte-1t3ln5c"&&(Io.innerHTML=cs),bn=s(G),qo=l(G,"P",{"data-svelte-h":!0}),c(qo)!=="svelte-hswkmf"&&(qo.innerHTML=ms),vn=s(G),Z=l(G,"DIV",{class:!0});var jo=$(Z);h(Ke.$$.fragment,jo),kn=s(jo),Po=l(jo,"P",{"data-svelte-h":!0}),c(Po)!=="svelte-1gisb7b"&&(Po.innerHTML=ps),Tn=s(jo),h(de.$$.fragment,jo),jo.forEach(t),G.forEach(t),$t=s(e),Wo=l(e,"P",{}),$(Wo).forEach(t),this.h()},h(){y(r,"name","hf:doc:metadata"),y(r,"content",Xs),y(ee,"start","2"),y(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),y(I,"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,o){a(document.head,r),i(e,b,o),i(e,m,o),i(e,v,o),f(j,e,o),i(e,T,o),f(W,e,o),i(e,Ho,o),i(e,ce,o),i(e,Ao,o),i(e,me,o),i(e,So,o),i(e,pe,o),i(e,Uo,o),i(e,he,o),i(e,Eo,o),f(fe,e,o),i(e,Bo,o),i(e,ue,o),i(e,Zo,o),i(e,ge,o),i(e,Qo,o),f(_e,e,o),i(e,Vo,o),f(be,e,o),i(e,Go,o),i(e,ve,o),i(e,Ro,o),i(e,ke,o),i(e,Yo,o),f(Te,e,o),i(e,Ko,o),i(e,ee,o),i(e,et,o),f(Me,e,o),i(e,ot,o),f(we,e,o),i(e,tt,o),i(e,ye,o),i(e,nt,o),f($e,e,o),i(e,st,o),f(xe,e,o),i(e,at,o),i(e,Ce,o),i(e,rt,o),f(Xe,e,o),i(e,it,o),f(ze,e,o),i(e,dt,o),i(e,Le,o),i(e,lt,o),f(Fe,e,o),i(e,ct,o),i(e,P,o),f(Ie,P,null),a(P,Ct),a(P,oo),a(P,Xt),a(P,to),a(P,zt),f(oe,P,null),i(e,mt,o),f(qe,e,o),i(e,pt,o),i(e,k,o),f(Pe,k,null),a(k,Lt),a(k,no),a(k,Ft),a(k,so),a(k,It),a(k,ao),a(k,qt),a(k,ro),a(k,Pt),a(k,io),a(k,Ot),a(k,lo),a(k,Jt),a(k,H),f(Oe,H,null),a(H,Nt),a(H,co),a(H,jt),f(te,H,null),i(e,ht,o),f(Je,e,o),i(e,ft,o),i(e,C,o),f(Ne,C,null),a(C,Wt),a(C,mo),a(C,Dt),a(C,po),a(C,Ht),a(C,ho),a(C,At),a(C,A),f(je,A,null),a(A,St),a(A,fo),a(A,Ut),f(ne,A,null),i(e,ut,o),f(We,e,o),i(e,gt,o),i(e,X,o),f(De,X,null),a(X,Et),a(X,uo),a(X,Bt),a(X,go),a(X,Zt),a(X,_o),a(X,Qt),a(X,S),f(He,S,null),a(S,Vt),a(S,bo),a(S,Gt),f(se,S,null),i(e,_t,o),f(Ae,e,o),i(e,bt,o),i(e,z,o),f(Se,z,null),a(z,Rt),a(z,vo),a(z,Yt),a(z,ko),a(z,Kt),a(z,To),a(z,en),a(z,U),f(Ue,U,null),a(U,on),a(U,Mo),a(U,tn),f(ae,U,null),i(e,vt,o),f(Ee,e,o),i(e,kt,o),i(e,L,o),f(Be,L,null),a(L,nn),a(L,wo),a(L,sn),a(L,yo),a(L,an),a(L,$o),a(L,rn),a(L,E),f(Ze,E,null),a(E,dn),a(E,xo),a(E,ln),f(re,E,null),i(e,Tt,o),f(Qe,e,o),i(e,Mt,o),i(e,F,o),f(Ve,F,null),a(F,cn),a(F,Co),a(F,mn),a(F,Xo),a(F,pn),a(F,zo),a(F,hn),a(F,B),f(Ge,B,null),a(B,fn),a(B,Lo),a(B,un),f(ie,B,null),i(e,wt,o),f(Re,e,o),i(e,yt,o),i(e,I,o),f(Ye,I,null),a(I,gn),a(I,Fo),a(I,_n),a(I,Io),a(I,bn),a(I,qo),a(I,vn),a(I,Z),f(Ke,Z,null),a(Z,kn),a(Z,Po),a(Z,Tn),f(de,Z,null),i(e,$t,o),i(e,Wo,o),xt=!0},p(e,[o]){const D={};o&2&&(D.$$scope={dirty:o,ctx:e}),oe.$set(D);const M={};o&2&&(M.$$scope={dirty:o,ctx:e}),te.$set(M);const R={};o&2&&(R.$$scope={dirty:o,ctx:e}),ne.$set(R);const O={};o&2&&(O.$$scope={dirty:o,ctx:e}),se.$set(O);const Y={};o&2&&(Y.$$scope={dirty:o,ctx:e}),ae.$set(Y);const J={};o&2&&(J.$$scope={dirty:o,ctx:e}),re.$set(J);const K={};o&2&&(K.$$scope={dirty:o,ctx:e}),ie.$set(K);const N={};o&2&&(N.$$scope={dirty:o,ctx:e}),de.$set(N)},i(e){xt||(u(j.$$.fragment,e),u(W.$$.fragment,e),u(fe.$$.fragment,e),u(_e.$$.fragment,e),u(be.$$.fragment,e),u(Te.$$.fragment,e),u(Me.$$.fragment,e),u(we.$$.fragment,e),u($e.$$.fragment,e),u(xe.$$.fragment,e),u(Xe.$$.fragment,e),u(ze.$$.fragment,e),u(Fe.$$.fragment,e),u(Ie.$$.fragment,e),u(oe.$$.fragment,e),u(qe.$$.fragment,e),u(Pe.$$.fragment,e),u(Oe.$$.fragment,e),u(te.$$.fragment,e),u(Je.$$.fragment,e),u(Ne.$$.fragment,e),u(je.$$.fragment,e),u(ne.$$.fragment,e),u(We.$$.fragment,e),u(De.$$.fragment,e),u(He.$$.fragment,e),u(se.$$.fragment,e),u(Ae.$$.fragment,e),u(Se.$$.fragment,e),u(Ue.$$.fragment,e),u(ae.$$.fragment,e),u(Ee.$$.fragment,e),u(Be.$$.fragment,e),u(Ze.$$.fragment,e),u(re.$$.fragment,e),u(Qe.$$.fragment,e),u(Ve.$$.fragment,e),u(Ge.$$.fragment,e),u(ie.$$.fragment,e),u(Re.$$.fragment,e),u(Ye.$$.fragment,e),u(Ke.$$.fragment,e),u(de.$$.fragment,e),xt=!0)},o(e){g(j.$$.fragment,e),g(W.$$.fragment,e),g(fe.$$.fragment,e),g(_e.$$.fragment,e),g(be.$$.fragment,e),g(Te.$$.fragment,e),g(Me.$$.fragment,e),g(we.$$.fragment,e),g($e.$$.fragment,e),g(xe.$$.fragment,e),g(Xe.$$.fragment,e),g(ze.$$.fragment,e),g(Fe.$$.fragment,e),g(Ie.$$.fragment,e),g(oe.$$.fragment,e),g(qe.$$.fragment,e),g(Pe.$$.fragment,e),g(Oe.$$.fragment,e),g(te.$$.fragment,e),g(Je.$$.fragment,e),g(Ne.$$.fragment,e),g(je.$$.fragment,e),g(ne.$$.fragment,e),g(We.$$.fragment,e),g(De.$$.fragment,e),g(He.$$.fragment,e),g(se.$$.fragment,e),g(Ae.$$.fragment,e),g(Se.$$.fragment,e),g(Ue.$$.fragment,e),g(ae.$$.fragment,e),g(Ee.$$.fragment,e),g(Be.$$.fragment,e),g(Ze.$$.fragment,e),g(re.$$.fragment,e),g(Qe.$$.fragment,e),g(Ve.$$.fragment,e),g(Ge.$$.fragment,e),g(ie.$$.fragment,e),g(Re.$$.fragment,e),g(Ye.$$.fragment,e),g(Ke.$$.fragment,e),g(de.$$.fragment,e),xt=!1},d(e){e&&(t(b),t(m),t(v),t(T),t(Ho),t(ce),t(Ao),t(me),t(So),t(pe),t(Uo),t(he),t(Eo),t(Bo),t(ue),t(Zo),t(ge),t(Qo),t(Vo),t(Go),t(ve),t(Ro),t(ke),t(Yo),t(Ko),t(ee),t(et),t(ot),t(tt),t(ye),t(nt),t(st),t(at),t(Ce),t(rt),t(it),t(dt),t(Le),t(lt),t(ct),t(P),t(mt),t(pt),t(k),t(ht),t(ft),t(C),t(ut),t(gt),t(X),t(_t),t(bt),t(z),t(vt),t(kt),t(L),t(Tt),t(Mt),t(F),t(wt),t(yt),t(I),t($t),t(Wo)),t(r),_(j,e),_(W,e),_(fe,e),_(_e,e),_(be,e),_(Te,e),_(Me,e),_(we,e),_($e,e),_(xe,e),_(Xe,e),_(ze,e),_(Fe,e),_(Ie),_(oe),_(qe,e),_(Pe),_(Oe),_(te),_(Je,e),_(Ne),_(je),_(ne),_(We,e),_(De),_(He),_(se),_(Ae,e),_(Se),_(Ue),_(ae),_(Ee,e),_(Be),_(Ze),_(re),_(Qe,e),_(Ve),_(Ge),_(ie),_(Re,e),_(Ye),_(Ke),_(de)}}}const Xs='{"title":"X-MOD","local":"x-mod","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Adapter Usage","local":"adapter-usage","sections":[{"title":"Input language","local":"input-language","sections":[],"depth":3},{"title":"Fine-tuning","local":"fine-tuning","sections":[],"depth":3},{"title":"Cross-lingual transfer","local":"cross-lingual-transfer","sections":[],"depth":3}],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"XmodConfig","local":"transformers.XmodConfig","sections":[],"depth":2},{"title":"XmodModel","local":"transformers.XmodModel","sections":[],"depth":2},{"title":"XmodForCausalLM","local":"transformers.XmodForCausalLM","sections":[],"depth":2},{"title":"XmodForMaskedLM","local":"transformers.XmodForMaskedLM","sections":[],"depth":2},{"title":"XmodForSequenceClassification","local":"transformers.XmodForSequenceClassification","sections":[],"depth":2},{"title":"XmodForMultipleChoice","local":"transformers.XmodForMultipleChoice","sections":[],"depth":2},{"title":"XmodForTokenClassification","local":"transformers.XmodForTokenClassification","sections":[],"depth":2},{"title":"XmodForQuestionAnswering","local":"transformers.XmodForQuestionAnswering","sections":[],"depth":2}],"depth":1}';function zs(w){return fs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ns extends us{constructor(r){super(),gs(this,r,zs,Cs,hs,{})}}export{Ns as component};
