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