import{s as ee,o as te,n as ae}from"../chunks/scheduler.25b97de1.js";import{S as ne,i as ie,g as r,s as l,r as x,A as le,h as m,f as a,c as o,j as Z,u as _,x as w,k as J,y as oe,a as n,v as X,d as k,t as H,w as P}from"../chunks/index.d9030fc9.js";import{T as se}from"../chunks/Tip.baa67368.js";import{H as U,E as re}from"../chunks/EditOnGithub.91d95064.js";function me(R){let i,p='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(){i=r("p"),i.innerHTML=p},l(s){i=m(s,"P",{"data-svelte-h":!0}),w(i)!=="svelte-sub3hh"&&(i.innerHTML=p)},m(s,y){n(s,i,y)},p:ae,d(s){s&&a(i)}}}function ue(R){let i,p,s,y,f,C,c,V,h,D=`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.`,A,d,Q="From the abstract of the XLM-V paper:",E,g,S=`<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>`,z,v,F=`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>.`,B,$,I,b,K=`<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,L,W='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,u,G,M,N,T,O;return f=new U({props:{title:"XLM-V",local:"xlm-v",headingTag:"h1"}}),c=new U({props:{title:"Overview",local:"overview",headingTag:"h2"}}),$=new U({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),u=new se({props:{$$slots:{default:[me]},$$scope:{ctx:R}}}),M=new re({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/xlm-v.md"}}),{c(){i=r("meta"),p=l(),s=r("p"),y=l(),x(f.$$.fragment),C=l(),x(c.$$.fragment),V=l(),h=r("p"),h.innerHTML=D,A=l(),d=r("p"),d.textContent=Q,E=l(),g=r("p"),g.innerHTML=S,z=l(),v=r("p"),v.innerHTML=F,B=l(),x($.$$.fragment),I=l(),b=r("ul"),b.innerHTML=K,j=l(),L=r("p"),L.innerHTML=W,q=l(),x(u.$$.fragment),G=l(),x(M.$$.fragment),N=l(),T=r("p"),this.h()},l(e){const t=le("svelte-u9bgzb",document.head);i=m(t,"META",{name:!0,content:!0}),t.forEach(a),p=o(e),s=m(e,"P",{}),Z(s).forEach(a),y=o(e),_(f.$$.fragment,e),C=o(e),_(c.$$.fragment,e),V=o(e),h=m(e,"P",{"data-svelte-h":!0}),w(h)!=="svelte-hcobiv"&&(h.innerHTML=D),A=o(e),d=m(e,"P",{"data-svelte-h":!0}),w(d)!=="svelte-rlu8sx"&&(d.textContent=Q),E=o(e),g=m(e,"P",{"data-svelte-h":!0}),w(g)!=="svelte-pvh528"&&(g.innerHTML=S),z=o(e),v=m(e,"P",{"data-svelte-h":!0}),w(v)!=="svelte-1g4cthl"&&(v.innerHTML=F),B=o(e),_($.$$.fragment,e),I=o(e),b=m(e,"UL",{"data-svelte-h":!0}),w(b)!=="svelte-h4j5w0"&&(b.innerHTML=K),j=o(e),L=m(e,"P",{"data-svelte-h":!0}),w(L)!=="svelte-1tzrs8"&&(L.innerHTML=W),q=o(e),_(u.$$.fragment,e),G=o(e),_(M.$$.fragment,e),N=o(e),T=m(e,"P",{}),Z(T).forEach(a),this.h()},h(){J(i,"name","hf:doc:metadata"),J(i,"content",pe)},m(e,t){oe(document.head,i),n(e,p,t),n(e,s,t),n(e,y,t),X(f,e,t),n(e,C,t),X(c,e,t),n(e,V,t),n(e,h,t),n(e,A,t),n(e,d,t),n(e,E,t),n(e,g,t),n(e,z,t),n(e,v,t),n(e,B,t),X($,e,t),n(e,I,t),n(e,b,t),n(e,j,t),n(e,L,t),n(e,q,t),X(u,e,t),n(e,G,t),X(M,e,t),n(e,N,t),n(e,T,t),O=!0},p(e,[t]){const Y={};t&2&&(Y.$$scope={dirty:t,ctx:e}),u.$set(Y)},i(e){O||(k(f.$$.fragment,e),k(c.$$.fragment,e),k($.$$.fragment,e),k(u.$$.fragment,e),k(M.$$.fragment,e),O=!0)},o(e){H(f.$$.fragment,e),H(c.$$.fragment,e),H($.$$.fragment,e),H(u.$$.fragment,e),H(M.$$.fragment,e),O=!1},d(e){e&&(a(p),a(s),a(y),a(C),a(V),a(h),a(A),a(d),a(E),a(g),a(z),a(v),a(B),a(I),a(b),a(j),a(L),a(q),a(G),a(N),a(T)),a(i),P(f,e),P(c,e),P($,e),P(u,e),P(M,e)}}}const pe='{"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 fe(R){return te(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ve extends ne{constructor(i){super(),ie(this,i,fe,ue,ee,{})}}export{ve as component};
