import{s as me,o as de,n as ve}from"../chunks/scheduler.9bc65507.js";import{S as we,i as ge,g as r,s as l,u as K,A as be,h as o,f as t,c as h,j as T,v as Q,y as m,k as c,o as w,a as n,w as V,d as X,t as Z,x as ee}from"../chunks/index.78c82d43.js";import{T as Te}from"../chunks/Tip.87d55b76.js";import{I as ce}from"../chunks/IconCopyLink.bedaa44d.js";function _e(O){let s,_="This model is in maintenance mode only, so we won’t accept any new PRs changing its code.",u,p,f=`If you run into any issues running this model, please reinstall the last version that supported this model: v4.30.0.
You can do so by running the following command: <code>pip install -U transformers==4.30.0</code>.`;return{c(){s=r("p"),s.textContent=_,u=l(),p=r("p"),p.innerHTML=f},l(i){s=o(i,"P",{"data-svelte-h":!0}),m(s)!=="svelte-lwu440"&&(s.textContent=_),u=h(i),p=o(i,"P",{"data-svelte-h":!0}),m(p)!=="svelte-4042uy"&&(p.innerHTML=f)},m(i,d){n(i,s,d),n(i,u,d),n(i,p,d)},p:ve,d(i){i&&(t(s),t(u),t(p))}}}function xe(O){let s,_,u,p,f,i,d,x,Y,L,te="BORT",S,g,I,v,b,H,y,F,A,ae="Overview",U,$,ne=`The BORT model was proposed in <a href="https://arxiv.org/abs/2010.10499" rel="nofollow">Optimal Subarchitecture Extraction for BERT</a> by
Adrian de Wynter and Daniel J. Perry. It is an optimal subset of architectural parameters for the BERT, which the
authors refer to as “Bort”.`,z,R,re="The abstract from the paper is the following:",N,E,oe=`<em>We extract an optimal subset of architectural parameters for the BERT architecture from Devlin et al. (2018) by
applying recent breakthroughs in algorithms for neural architecture search. This optimal subset, which we refer to as
“Bort”, is demonstrably smaller, having an effective (that is, not counting the embedding layer) size of 5.5% the
original BERT-large architecture, and 16% of the net size. Bort is also able to be pretrained in 288 GPU hours, which
is 1.2% of the time required to pretrain the highest-performing BERT parametric architectural variant, RoBERTa-large
(Liu et al., 2019), and about 33% of that of the world-record, in GPU hours, required to train BERT-large on the same
hardware. It is also 7.9x faster on a CPU, as well as being better performing than other compressed variants of the
architecture, and some of the non-compressed variants: it obtains performance improvements of between 0.3% and 31%,
absolute, with respect to BERT-large, on multiple public natural language understanding (NLU) benchmarks.</em>`,q,P,ie="Tips:",j,B,se=`<li>BORT’s model architecture is based on BERT, so one can refer to <a href="bert">BERT’s documentation page</a> for the
model’s API as well as usage examples.</li> <li>BORT uses the RoBERTa tokenizer instead of the BERT tokenizer, so one can refer to <a href="roberta">RoBERTa’s documentation page</a> for the tokenizer’s API as well as usage examples.</li> <li>BORT requires a specific fine-tuning algorithm, called <a href="https://adewynter.github.io/notes/bort_algorithms_and_applications.html#fine-tuning-with-algebraic-topology" rel="nofollow">Agora</a> ,
that is sadly not open-sourced yet. It would be very useful for the community, if someone tries to implement the
algorithm to make BORT fine-tuning work.</li>`,D,C,le='This model was contributed by <a href="https://huggingface.co/stefan-it" rel="nofollow">stefan-it</a>. The original code can be found <a href="https://github.com/alexa/bort/" rel="nofollow">here</a>.',G,M,J;return x=new ce({}),g=new Te({props:{warning:!0,$$slots:{default:[_e]},$$scope:{ctx:O}}}),y=new ce({}),{c(){s=r("meta"),_=l(),u=r("p"),p=l(),f=r("h1"),i=r("a"),d=r("span"),K(x.$$.fragment),Y=l(),L=r("span"),L.textContent=te,S=l(),K(g.$$.fragment),I=l(),v=r("h2"),b=r("a"),H=r("span"),K(y.$$.fragment),F=l(),A=r("span"),A.textContent=ae,U=l(),$=r("p"),$.innerHTML=ne,z=l(),R=r("p"),R.textContent=re,N=l(),E=r("p"),E.innerHTML=oe,q=l(),P=r("p"),P.textContent=ie,j=l(),B=r("ul"),B.innerHTML=se,D=l(),C=r("p"),C.innerHTML=le,G=l(),M=r("p"),this.h()},l(e){const a=be("svelte-1phssyn",document.head);s=o(a,"META",{name:!0,content:!0}),a.forEach(t),_=h(e),u=o(e,"P",{}),T(u).forEach(t),p=h(e),f=o(e,"H1",{class:!0});var k=T(f);i=o(k,"A",{id:!0,class:!0,href:!0});var he=T(i);d=o(he,"SPAN",{});var pe=T(d);Q(x.$$.fragment,pe),pe.forEach(t),he.forEach(t),Y=h(k),L=o(k,"SPAN",{"data-svelte-h":!0}),m(L)!=="svelte-1fkr4s6"&&(L.textContent=te),k.forEach(t),S=h(e),Q(g.$$.fragment,e),I=h(e),v=o(e,"H2",{class:!0});var W=T(v);b=o(W,"A",{id:!0,class:!0,href:!0});var fe=T(b);H=o(fe,"SPAN",{});var ue=T(H);Q(y.$$.fragment,ue),ue.forEach(t),fe.forEach(t),F=h(W),A=o(W,"SPAN",{"data-svelte-h":!0}),m(A)!=="svelte-1jsw1pg"&&(A.textContent=ae),W.forEach(t),U=h(e),$=o(e,"P",{"data-svelte-h":!0}),m($)!=="svelte-1ekxxrt"&&($.innerHTML=ne),z=h(e),R=o(e,"P",{"data-svelte-h":!0}),m(R)!=="svelte-vfdo9a"&&(R.textContent=re),N=h(e),E=o(e,"P",{"data-svelte-h":!0}),m(E)!=="svelte-1vfe3y"&&(E.innerHTML=oe),q=h(e),P=o(e,"P",{"data-svelte-h":!0}),m(P)!=="svelte-axv494"&&(P.textContent=ie),j=h(e),B=o(e,"UL",{"data-svelte-h":!0}),m(B)!=="svelte-1jfpz0i"&&(B.innerHTML=se),D=h(e),C=o(e,"P",{"data-svelte-h":!0}),m(C)!=="svelte-n8ivge"&&(C.innerHTML=le),G=h(e),M=o(e,"P",{}),T(M).forEach(t),this.h()},h(){c(s,"name","hf:doc:metadata"),c(s,"content",JSON.stringify(ye)),c(i,"id","bort"),c(i,"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"),c(i,"href","#bort"),c(f,"class","relative group"),c(b,"id","overview"),c(b,"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"),c(b,"href","#overview"),c(v,"class","relative group")},m(e,a){w(document.head,s),n(e,_,a),n(e,u,a),n(e,p,a),n(e,f,a),w(f,i),w(i,d),V(x,d,null),w(f,Y),w(f,L),n(e,S,a),V(g,e,a),n(e,I,a),n(e,v,a),w(v,b),w(b,H),V(y,H,null),w(v,F),w(v,A),n(e,U,a),n(e,$,a),n(e,z,a),n(e,R,a),n(e,N,a),n(e,E,a),n(e,q,a),n(e,P,a),n(e,j,a),n(e,B,a),n(e,D,a),n(e,C,a),n(e,G,a),n(e,M,a),J=!0},p(e,[a]){const k={};a&2&&(k.$$scope={dirty:a,ctx:e}),g.$set(k)},i(e){J||(X(x.$$.fragment,e),X(g.$$.fragment,e),X(y.$$.fragment,e),J=!0)},o(e){Z(x.$$.fragment,e),Z(g.$$.fragment,e),Z(y.$$.fragment,e),J=!1},d(e){e&&(t(_),t(u),t(p),t(f),t(S),t(I),t(v),t(U),t($),t(z),t(R),t(N),t(E),t(q),t(P),t(j),t(B),t(D),t(C),t(G),t(M)),t(s),ee(x),ee(g,e),ee(y)}}}const ye={local:"bort",sections:[{local:"overview",title:"Overview"}],title:"BORT"};function $e(O){return de(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ce extends we{constructor(s){super(),ge(this,s,$e,xe,me,{})}}export{Ce as component};
