import{s as W,n as Y,o as Z}from"../chunks/scheduler.9bc65507.js";import{S as J,i as ee,g as o,s as i,r as B,A as te,h as s,f as a,c as l,j as D,u as G,x as b,k as O,y as ae,a as n,v as Q,d as S,t as U,w as F}from"../chunks/index.707bf1b6.js";import{H as K}from"../chunks/Heading.342b1fa6.js";function ne(z){let r,w,L,y,m,x,u,T,c,A=`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.`,_,p,R="From the abstract of the XLM-V paper:",k,h,E=`<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>`,X,f,j="Tips:",$,d,q=`<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>`,C,v,I='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.',H,g,N=`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>.`,P,M,V;return m=new K({props:{title:"XLM-V",local:"xlm-v",headingTag:"h1"}}),u=new K({props:{title:"Overview",local:"overview",headingTag:"h2"}}),{c(){r=o("meta"),w=i(),L=o("p"),y=i(),B(m.$$.fragment),x=i(),B(u.$$.fragment),T=i(),c=o("p"),c.innerHTML=A,_=i(),p=o("p"),p.textContent=R,k=i(),h=o("p"),h.innerHTML=E,X=i(),f=o("p"),f.textContent=j,$=i(),d=o("ul"),d.innerHTML=q,C=i(),v=o("p"),v.innerHTML=I,H=i(),g=o("p"),g.innerHTML=N,P=i(),M=o("p"),this.h()},l(e){const t=te("svelte-u9bgzb",document.head);r=s(t,"META",{name:!0,content:!0}),t.forEach(a),w=l(e),L=s(e,"P",{}),D(L).forEach(a),y=l(e),G(m.$$.fragment,e),x=l(e),G(u.$$.fragment,e),T=l(e),c=s(e,"P",{"data-svelte-h":!0}),b(c)!=="svelte-hcobiv"&&(c.innerHTML=A),_=l(e),p=s(e,"P",{"data-svelte-h":!0}),b(p)!=="svelte-rlu8sx"&&(p.textContent=R),k=l(e),h=s(e,"P",{"data-svelte-h":!0}),b(h)!=="svelte-pvh528"&&(h.innerHTML=E),X=l(e),f=s(e,"P",{"data-svelte-h":!0}),b(f)!=="svelte-axv494"&&(f.textContent=j),$=l(e),d=s(e,"UL",{"data-svelte-h":!0}),b(d)!=="svelte-h4j5w0"&&(d.innerHTML=q),C=l(e),v=s(e,"P",{"data-svelte-h":!0}),b(v)!=="svelte-1tzrs8"&&(v.innerHTML=I),H=l(e),g=s(e,"P",{"data-svelte-h":!0}),b(g)!=="svelte-1g4cthl"&&(g.innerHTML=N),P=l(e),M=s(e,"P",{}),D(M).forEach(a),this.h()},h(){O(r,"name","hf:doc:metadata"),O(r,"content",ie)},m(e,t){ae(document.head,r),n(e,w,t),n(e,L,t),n(e,y,t),Q(m,e,t),n(e,x,t),Q(u,e,t),n(e,T,t),n(e,c,t),n(e,_,t),n(e,p,t),n(e,k,t),n(e,h,t),n(e,X,t),n(e,f,t),n(e,$,t),n(e,d,t),n(e,C,t),n(e,v,t),n(e,H,t),n(e,g,t),n(e,P,t),n(e,M,t),V=!0},p:Y,i(e){V||(S(m.$$.fragment,e),S(u.$$.fragment,e),V=!0)},o(e){U(m.$$.fragment,e),U(u.$$.fragment,e),V=!1},d(e){e&&(a(w),a(L),a(y),a(x),a(T),a(c),a(_),a(p),a(k),a(h),a(X),a(f),a($),a(d),a(C),a(v),a(H),a(g),a(P),a(M)),a(r),F(m,e),F(u,e)}}}const ie='{"title":"XLM-V","local":"xlm-v","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2}],"depth":1}';function le(z){return Z(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class me extends J{constructor(r){super(),ee(this,r,le,ne,W,{})}}export{me as component};
