import{s as V,o as X,n as Z}from"../chunks/scheduler.25b97de1.js";import{S as ee,i as te,g as h,s as o,r as y,A as ae,h as u,f as a,c as s,j as K,u as B,x,k as Q,y as ne,a as n,v as E,d as P,t as L,w as C}from"../chunks/index.d9030fc9.js";import{T as re}from"../chunks/Tip.baa67368.js";import{H as D,E as ie}from"../chunks/EditOnGithub.91d95064.js";function oe(H){let r,c="This model is in maintenance mode only, we do not accept any new PRs changing its code.",f,l,p=`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(){r=h("p"),r.textContent=c,f=o(),l=h("p"),l.innerHTML=p},l(i){r=u(i,"P",{"data-svelte-h":!0}),x(r)!=="svelte-11xtczr"&&(r.textContent=c),f=s(i),l=u(i,"P",{"data-svelte-h":!0}),x(l)!=="svelte-4042uy"&&(l.innerHTML=p)},m(i,m){n(i,r,m),n(i,f,m),n(i,l,m)},p:Z,d(i){i&&(a(r),a(f),a(l))}}}function se(H){let r,c,f,l,p,i,m,M,d,O,g,W=`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”.`,k,$,j="The abstract from the paper is the following:",U,b,J=`<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>`,z,T,N='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>.',A,v,I,w,Y=`<li>BORT’s model architecture is based on BERT, refer to <a href="bert">BERT’s documentation page</a> for the
model’s API reference as well as usage examples.</li> <li>BORT uses the RoBERTa tokenizer instead of the BERT tokenizer, refer to <a href="roberta">RoBERTa’s documentation page</a> for the tokenizer’s API reference 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>`,q,_,S,R,G;return p=new D({props:{title:"BORT",local:"bort",headingTag:"h1"}}),m=new re({props:{warning:!0,$$slots:{default:[oe]},$$scope:{ctx:H}}}),d=new D({props:{title:"Overview",local:"overview",headingTag:"h2"}}),v=new D({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),_=new ie({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/bort.md"}}),{c(){r=h("meta"),c=o(),f=h("p"),l=o(),y(p.$$.fragment),i=o(),y(m.$$.fragment),M=o(),y(d.$$.fragment),O=o(),g=h("p"),g.innerHTML=W,k=o(),$=h("p"),$.textContent=j,U=o(),b=h("p"),b.innerHTML=J,z=o(),T=h("p"),T.innerHTML=N,A=o(),y(v.$$.fragment),I=o(),w=h("ul"),w.innerHTML=Y,q=o(),y(_.$$.fragment),S=o(),R=h("p"),this.h()},l(e){const t=ae("svelte-u9bgzb",document.head);r=u(t,"META",{name:!0,content:!0}),t.forEach(a),c=s(e),f=u(e,"P",{}),K(f).forEach(a),l=s(e),B(p.$$.fragment,e),i=s(e),B(m.$$.fragment,e),M=s(e),B(d.$$.fragment,e),O=s(e),g=u(e,"P",{"data-svelte-h":!0}),x(g)!=="svelte-1ekxxrt"&&(g.innerHTML=W),k=s(e),$=u(e,"P",{"data-svelte-h":!0}),x($)!=="svelte-vfdo9a"&&($.textContent=j),U=s(e),b=u(e,"P",{"data-svelte-h":!0}),x(b)!=="svelte-1vfe3y"&&(b.innerHTML=J),z=s(e),T=u(e,"P",{"data-svelte-h":!0}),x(T)!=="svelte-n8ivge"&&(T.innerHTML=N),A=s(e),B(v.$$.fragment,e),I=s(e),w=u(e,"UL",{"data-svelte-h":!0}),x(w)!=="svelte-1tf6va0"&&(w.innerHTML=Y),q=s(e),B(_.$$.fragment,e),S=s(e),R=u(e,"P",{}),K(R).forEach(a),this.h()},h(){Q(r,"name","hf:doc:metadata"),Q(r,"content",le)},m(e,t){ne(document.head,r),n(e,c,t),n(e,f,t),n(e,l,t),E(p,e,t),n(e,i,t),E(m,e,t),n(e,M,t),E(d,e,t),n(e,O,t),n(e,g,t),n(e,k,t),n(e,$,t),n(e,U,t),n(e,b,t),n(e,z,t),n(e,T,t),n(e,A,t),E(v,e,t),n(e,I,t),n(e,w,t),n(e,q,t),E(_,e,t),n(e,S,t),n(e,R,t),G=!0},p(e,[t]){const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),m.$set(F)},i(e){G||(P(p.$$.fragment,e),P(m.$$.fragment,e),P(d.$$.fragment,e),P(v.$$.fragment,e),P(_.$$.fragment,e),G=!0)},o(e){L(p.$$.fragment,e),L(m.$$.fragment,e),L(d.$$.fragment,e),L(v.$$.fragment,e),L(_.$$.fragment,e),G=!1},d(e){e&&(a(c),a(f),a(l),a(i),a(M),a(O),a(g),a(k),a($),a(U),a(b),a(z),a(T),a(A),a(I),a(w),a(q),a(S),a(R)),a(r),C(p,e),C(m,e),C(d,e),C(v,e),C(_,e)}}}const le='{"title":"BORT","local":"bort","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2}],"depth":1}';function me(H){return X(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ce extends ee{constructor(r){super(),te(this,r,me,se,V,{})}}export{ce as component};
