import{s as le,o as ne,n as ie}from"../chunks/scheduler.01eeda35.js";import{S as se,i as oe,g as r,s as i,r as C,A as re,h as m,f as a,c as s,j as ae,u as k,x as c,k as I,y as me,a as l,v as P,d as X,t as E,w as G}from"../chunks/index.6dd51b66.js";import{T as pe}from"../chunks/Tip.de9bae2b.js";import{H as Y,E as ue}from"../chunks/index.58fe8f9d.js";function ce(O){let n,f='XLM-V architecture is the same as XLM-RoBERTa, refer to <a href="xlm-roberta">XLM-RoBERTa documentation</a> for API reference, and examples.';return{c(){n=r("p"),n.innerHTML=f},l(o){n=m(o,"P",{"data-svelte-h":!0}),c(n)!=="svelte-sub3hh"&&(n.innerHTML=f)},m(o,x){l(o,n,x)},p:ie,d(o){o&&a(n)}}}function fe(O){let n,f,o,x,h,J,p,W=`<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/> <img alt="TensorFlow" src="https://img.shields.io/badge/TensorFlow-FF6F00?style=flat&amp;logo=tensorflow&amp;logoColor=white"/> <img alt="Flax" src="https://img.shields.io/badge/Flax-29a79b.svg?style=flat&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAMAAAANxBKoAAAC7lBMVEUAAADg5vYHPVgAoJH+/v76+v39/f9JbLP///9+AIgAnY3///+mcqzt8fXy9fgkXa3Ax9709fr+///9/f8qXq49qp5AaLGMwrv8/P0eW60VWawxYq8yqJzG2dytt9Wyu9elzci519Lf3O3S2efY3OrY0+Xp7PT///////+dqNCexMc6Z7AGpJeGvbenstPZ5ejQ1OfJzOLa7ejh4+/r8fT29vpccbklWK8PVa0AS6ghW63O498vYa+lsdKz1NDRt9Kw1c672tbD3tnAxt7R6OHp5vDe7OrDyuDn6vLl6/EAQKak0MgATakkppo3ZK/Bz9y8w9yzu9jey97axdvHzeG21NHH4trTwthKZrVGZLSUSpuPQJiGAI+GAI8SWKydycLL4d7f2OTi1+S9xNzL0ePT6OLGzeEAo5U0q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8iW4kdka+nEMjxpL2NCwsYNBp+Q61PF43zyDg9Bm9+3NNySn78jMZUUkumqE4Gp7JmFOdP1vc8PpRrzj9+wPinCy8K1PiJ4aYbnTYpCCbDkBSbzhu2QJ1Gd82t8jI8TH51+OzvXoWbnXUOBkNW+0mWFwGcGOUVpU81/n3TOHb5oMt2FgYGjzau0Nif0Ss7Q3XB33hjjQHjHA5E5aOyIQc8CBrLdQSs3j92VG+3nNEjbkbdbBr9zm04ruvw37vh0QKOdeGIkckc80fX3KH/h7PT4BOjgCty8VZ5ux1MoO5Cf5naca2LAsEgehI+drX8o/0Nu+W0m6K/I9gGPd/dfx/EN/wN62AhsBWuAAAAAElFTkSuQmCC
"/>`,N,g,H,d,j=`XLM-V is multilingual language model with a one million token vocabulary trained on 2.5TB of data from Common Crawl (same as XLM-R).
It was introduced in the <a href="https://arxiv.org/abs/2301.10472" rel="nofollow">XLM-V: Overcoming the Vocabulary Bottleneck in Multilingual Masked Language Models</a>
paper by Davis Liang, Hila Gonen, Yuning Mao, Rui Hou, Naman Goyal, Marjan Ghazvininejad, Luke Zettlemoyer and Madian Khabsa.`,Q,v,D="From the abstract of the XLM-V paper:",R,A,F=`<em>Large multilingual language models typically rely on a single vocabulary shared across 100+ languages.
As these models have increased in parameter count and depth, vocabulary size has remained largely unchanged.
This vocabulary bottleneck limits the representational capabilities of multilingual models like XLM-R.
In this paper, we introduce a new approach for scaling to very large multilingual vocabularies by
de-emphasizing token sharing between languages with little lexical overlap and assigning vocabulary capacity
to achieve sufficient coverage for each individual language. Tokenizations using our vocabulary are typically
more semantically meaningful and shorter compared to XLM-R. Leveraging this improved vocabulary, we train XLM-V,
a multilingual language model with a one million token vocabulary. XLM-V outperforms XLM-R on every task we
tested on ranging from natural language inference (XNLI), question answering (MLQA, XQuAD, TyDiQA), and
named entity recognition (WikiAnn) to low-resource tasks (Americas NLI, MasakhaNER).</em>`,V,b,B=`This model was contributed by <a href="https://huggingface.co/stefan-it" rel="nofollow">stefan-it</a>, including detailed experiments with XLM-V on downstream tasks.
The experiments repository can be found <a href="https://github.com/stefan-it/xlm-v-experiments" rel="nofollow">here</a>.`,K,L,S,M,_=`<li>XLM-V is compatible with the XLM-RoBERTa model architecture, only model weights from <a href="https://github.com/facebookresearch/fairseq" rel="nofollow"><code>fairseq</code></a>
library had to be converted.</li> <li>The <code>XLMTokenizer</code> implementation is used to load the vocab and performs tokenization.</li>`,U,w,ee='A XLM-V (base size) model is available under the <a href="https://huggingface.co/facebook/xlm-v-base" rel="nofollow"><code>facebook/xlm-v-base</code></a> identifier.',Z,u,z,T,$,y,q;return h=new Y({props:{title:"XLM-V",local:"xlm-v",headingTag:"h1"}}),g=new Y({props:{title:"Overview",local:"overview",headingTag:"h2"}}),L=new Y({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),u=new pe({props:{$$slots:{default:[ce]},$$scope:{ctx:O}}}),T=new ue({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/xlm-v.md"}}),{c(){n=r("meta"),f=i(),o=r("p"),x=i(),C(h.$$.fragment),J=i(),p=r("div"),p.innerHTML=W,N=i(),C(g.$$.fragment),H=i(),d=r("p"),d.innerHTML=j,Q=i(),v=r("p"),v.textContent=D,R=i(),A=r("p"),A.innerHTML=F,V=i(),b=r("p"),b.innerHTML=B,K=i(),C(L.$$.fragment),S=i(),M=r("ul"),M.innerHTML=_,U=i(),w=r("p"),w.innerHTML=ee,Z=i(),C(u.$$.fragment),z=i(),C(T.$$.fragment),$=i(),y=r("p"),this.h()},l(e){const t=re("svelte-u9bgzb",document.head);n=m(t,"META",{name:!0,content:!0}),t.forEach(a),f=s(e),o=m(e,"P",{}),ae(o).forEach(a),x=s(e),k(h.$$.fragment,e),J=s(e),p=m(e,"DIV",{class:!0,"data-svelte-h":!0}),c(p)!=="svelte-1px1zvi"&&(p.innerHTML=W),N=s(e),k(g.$$.fragment,e),H=s(e),d=m(e,"P",{"data-svelte-h":!0}),c(d)!=="svelte-hcobiv"&&(d.innerHTML=j),Q=s(e),v=m(e,"P",{"data-svelte-h":!0}),c(v)!=="svelte-rlu8sx"&&(v.textContent=D),R=s(e),A=m(e,"P",{"data-svelte-h":!0}),c(A)!=="svelte-pvh528"&&(A.innerHTML=F),V=s(e),b=m(e,"P",{"data-svelte-h":!0}),c(b)!=="svelte-1g4cthl"&&(b.innerHTML=B),K=s(e),k(L.$$.fragment,e),S=s(e),M=m(e,"UL",{"data-svelte-h":!0}),c(M)!=="svelte-h4j5w0"&&(M.innerHTML=_),U=s(e),w=m(e,"P",{"data-svelte-h":!0}),c(w)!=="svelte-1tzrs8"&&(w.innerHTML=ee),Z=s(e),k(u.$$.fragment,e),z=s(e),k(T.$$.fragment,e),$=s(e),y=m(e,"P",{}),ae(y).forEach(a),this.h()},h(){I(n,"name","hf:doc:metadata"),I(n,"content",he),I(p,"class","flex flex-wrap space-x-1")},m(e,t){me(document.head,n),l(e,f,t),l(e,o,t),l(e,x,t),P(h,e,t),l(e,J,t),l(e,p,t),l(e,N,t),P(g,e,t),l(e,H,t),l(e,d,t),l(e,Q,t),l(e,v,t),l(e,R,t),l(e,A,t),l(e,V,t),l(e,b,t),l(e,K,t),P(L,e,t),l(e,S,t),l(e,M,t),l(e,U,t),l(e,w,t),l(e,Z,t),P(u,e,t),l(e,z,t),P(T,e,t),l(e,$,t),l(e,y,t),q=!0},p(e,[t]){const te={};t&2&&(te.$$scope={dirty:t,ctx:e}),u.$set(te)},i(e){q||(X(h.$$.fragment,e),X(g.$$.fragment,e),X(L.$$.fragment,e),X(u.$$.fragment,e),X(T.$$.fragment,e),q=!0)},o(e){E(h.$$.fragment,e),E(g.$$.fragment,e),E(L.$$.fragment,e),E(u.$$.fragment,e),E(T.$$.fragment,e),q=!1},d(e){e&&(a(f),a(o),a(x),a(J),a(p),a(N),a(H),a(d),a(Q),a(v),a(R),a(A),a(V),a(b),a(K),a(S),a(M),a(U),a(w),a(Z),a(z),a($),a(y)),a(n),G(h,e),G(g,e),G(L,e),G(u,e),G(T,e)}}}const he='{"title":"XLM-V","local":"xlm-v","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2}],"depth":1}';function ge(O){return ne(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Le extends se{constructor(n){super(),oe(this,n,ge,fe,le,{})}}export{Le as component};
