import{s as fe,n as de,o as ge}from"../chunks/scheduler.9bc65507.js";import{S as we,i as ye,g as l,s as o,u as se,A as be,h as i,f as t,c as r,j as d,v as he,y as m,k as s,o as p,a as n,w as ue,d as ce,t as me,x as pe}from"../chunks/index.78c82d43.js";import{I as ve}from"../chunks/IconCopyLink.bedaa44d.js";function Le(F){let h,H,X,E,u,v,$,g,Q,C,J="XLM-V",V,c,f,P,w,U,T,K="Overview",N,y,W=`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.`,R,b,Y="From the abstract of the XLM-V paper:",z,L,Z=`<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>`,S,x,ee="Tips:",I,M,te=`<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>`,j,_,ae='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.',q,k,ne=`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>.`,O,A,B;return g=new ve({}),w=new ve({}),{c(){h=l("meta"),H=o(),X=l("p"),E=o(),u=l("h1"),v=l("a"),$=l("span"),se(g.$$.fragment),Q=o(),C=l("span"),C.textContent=J,V=o(),c=l("h2"),f=l("a"),P=l("span"),se(w.$$.fragment),U=o(),T=l("span"),T.textContent=K,N=o(),y=l("p"),y.innerHTML=W,R=o(),b=l("p"),b.textContent=Y,z=o(),L=l("p"),L.innerHTML=Z,S=o(),x=l("p"),x.textContent=ee,I=o(),M=l("ul"),M.innerHTML=te,j=o(),_=l("p"),_.innerHTML=ae,q=o(),k=l("p"),k.innerHTML=ne,O=o(),A=l("p"),this.h()},l(e){const a=be("svelte-1phssyn",document.head);h=i(a,"META",{name:!0,content:!0}),a.forEach(t),H=r(e),X=i(e,"P",{}),d(X).forEach(t),E=r(e),u=i(e,"H1",{class:!0});var D=d(u);v=i(D,"A",{id:!0,class:!0,href:!0});var le=d(v);$=i(le,"SPAN",{});var ie=d($);he(g.$$.fragment,ie),ie.forEach(t),le.forEach(t),Q=r(D),C=i(D,"SPAN",{"data-svelte-h":!0}),m(C)!=="svelte-w2deu3"&&(C.textContent=J),D.forEach(t),V=r(e),c=i(e,"H2",{class:!0});var G=d(c);f=i(G,"A",{id:!0,class:!0,href:!0});var oe=d(f);P=i(oe,"SPAN",{});var re=d(P);he(w.$$.fragment,re),re.forEach(t),oe.forEach(t),U=r(G),T=i(G,"SPAN",{"data-svelte-h":!0}),m(T)!=="svelte-1jsw1pg"&&(T.textContent=K),G.forEach(t),N=r(e),y=i(e,"P",{"data-svelte-h":!0}),m(y)!=="svelte-hcobiv"&&(y.innerHTML=W),R=r(e),b=i(e,"P",{"data-svelte-h":!0}),m(b)!=="svelte-rlu8sx"&&(b.textContent=Y),z=r(e),L=i(e,"P",{"data-svelte-h":!0}),m(L)!=="svelte-pvh528"&&(L.innerHTML=Z),S=r(e),x=i(e,"P",{"data-svelte-h":!0}),m(x)!=="svelte-axv494"&&(x.textContent=ee),I=r(e),M=i(e,"UL",{"data-svelte-h":!0}),m(M)!=="svelte-h4j5w0"&&(M.innerHTML=te),j=r(e),_=i(e,"P",{"data-svelte-h":!0}),m(_)!=="svelte-1tzrs8"&&(_.innerHTML=ae),q=r(e),k=i(e,"P",{"data-svelte-h":!0}),m(k)!=="svelte-1g4cthl"&&(k.innerHTML=ne),O=r(e),A=i(e,"P",{}),d(A).forEach(t),this.h()},h(){s(h,"name","hf:doc:metadata"),s(h,"content",JSON.stringify(xe)),s(v,"id","xlmv"),s(v,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(v,"href","#xlmv"),s(u,"class","relative group"),s(f,"id","overview"),s(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),s(f,"href","#overview"),s(c,"class","relative group")},m(e,a){p(document.head,h),n(e,H,a),n(e,X,a),n(e,E,a),n(e,u,a),p(u,v),p(v,$),ue(g,$,null),p(u,Q),p(u,C),n(e,V,a),n(e,c,a),p(c,f),p(f,P),ue(w,P,null),p(c,U),p(c,T),n(e,N,a),n(e,y,a),n(e,R,a),n(e,b,a),n(e,z,a),n(e,L,a),n(e,S,a),n(e,x,a),n(e,I,a),n(e,M,a),n(e,j,a),n(e,_,a),n(e,q,a),n(e,k,a),n(e,O,a),n(e,A,a),B=!0},p:de,i(e){B||(ce(g.$$.fragment,e),ce(w.$$.fragment,e),B=!0)},o(e){me(g.$$.fragment,e),me(w.$$.fragment,e),B=!1},d(e){e&&(t(H),t(X),t(E),t(u),t(V),t(c),t(N),t(y),t(R),t(b),t(z),t(L),t(S),t(x),t(I),t(M),t(j),t(_),t(q),t(k),t(O),t(A)),t(h),pe(g),pe(w)}}}const xe={local:"xlmv",sections:[{local:"overview",title:"Overview"}],title:"XLM-V"};function Me(F){return ge(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Te extends we{constructor(h){super(),ye(this,h,Me,Le,fe,{})}}export{Te as component};
