import{s as ee,o as te,n as ae}from"../chunks/scheduler.18a86fab.js";import{S as re,i as ne,g as m,s as o,r as L,A as se,h as f,f as a,c as i,j as _,u as O,x as d,k as H,y as oe,a as r,v as C,d as R,t as G,w as J}from"../chunks/index.98837b22.js";import{T as ie}from"../chunks/Tip.77304350.js";import{H as z}from"../chunks/Heading.7e7e0c5b.js";import{E as le}from"../chunks/index.499f366c.js";function pe(M){let n,g="This model is in maintenance mode only, we do not accept any new PRs changing its code.",h,l,u=`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(){n=m("p"),n.textContent=g,h=o(),l=m("p"),l.innerHTML=u},l(s){n=f(s,"P",{"data-svelte-h":!0}),d(n)!=="svelte-11xtczr"&&(n.textContent=g),h=i(s),l=f(s,"P",{"data-svelte-h":!0}),d(l)!=="svelte-4042uy"&&(l.innerHTML=u)},m(s,p){r(s,n,p),r(s,h,p),r(s,l,p)},p:ae,d(s){s&&(a(n),a(h),a(l))}}}function me(M){let n,g,h,l,u,s,p,Y=`<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/> <img alt="TensorFlow" src="https://img.shields.io/badge/TensorFlow-FF6F00?style=flat&amp;logo=tensorflow&amp;logoColor=white"/> <img alt="Flax" src="https://img.shields.io/badge/Flax-29a79b.svg?style=flat&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAMAAAANxBKoAAAC7lBMVEUAAADg5vYHPVgAoJH+/v76+v39/f9JbLP///9+AIgAnY3///+mcqzt8fXy9fgkXa3Ax9709fr+///9/f8qXq49qp5AaLGMwrv8/P0eW60VWawxYq8yqJzG2dytt9Wyu9elzci519Lf3O3S2efY3OrY0+Xp7PT///////+dqNCexMc6Z7AGpJeGvbenstPZ5ejQ1OfJzOLa7ejh4+/r8fT29vpccbklWK8PVa0AS6ghW63O498vYa+lsdKz1NDRt9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locdSjZCp9cPUhLF9EZ3KKzURepMEtCDPP3VcWFx4UIiZIklIpFNfHpdEafIF2aRmOcrUmjohbT2WUllbmRvgfbythbQO3222fpDJoufaQPncYYuqoGtUEsCJZL6/3PR5b4syeSjZMQG/T2maGANlXT2v8S4AULWaUkCxfLyW8iW4kdka+nEMjxpL2NCwsYNBp+Q61PF43zyDg9Bm9+3NNySn78jMZUUkumqE4Gp7JmFOdP1vc8PpRrzj9+wPinCy8K1PiJ4aYbnTYpCCbDkBSbzhu2QJ1Gd82t8jI8TH51+OzvXoWbnXUOBkNW+0mWFwGcGOUVpU81/n3TOHb5oMt2FgYGjzau0Nif0Ss7Q3XB33hjjQHjHA5E5aOyIQc8CBrLdQSs3j92VG+3nNEjbkbdbBr9zm04ruvw37vh0QKOdeGIkckc80fX3KH/h7PT4BOjgCty8VZ5ux1MoO5Cf5naca2LAsEgehI+drX8o/0Nu+W0m6K/I9gGPd/dfx/EN/wN62AhsBWuAAAAAElFTkSuQmCC
"/>`,U,c,B,v,N,b,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”.`,S,A,D="The abstract from the paper is the following:",k,T,V=`<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>`,K,w,X='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>.',Z,x,I,y,j=`<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,E,$,P,q;return u=new z({props:{title:"BORT",local:"bort",headingTag:"h1"}}),c=new ie({props:{warning:!0,$$slots:{default:[pe]},$$scope:{ctx:M}}}),v=new z({props:{title:"Overview",local:"overview",headingTag:"h2"}}),x=new z({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),E=new le({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/bort.md"}}),{c(){n=m("meta"),g=o(),h=m("p"),l=o(),L(u.$$.fragment),s=o(),p=m("div"),p.innerHTML=Y,U=o(),L(c.$$.fragment),B=o(),L(v.$$.fragment),N=o(),b=m("p"),b.innerHTML=W,S=o(),A=m("p"),A.textContent=D,k=o(),T=m("p"),T.innerHTML=V,K=o(),w=m("p"),w.innerHTML=X,Z=o(),L(x.$$.fragment),I=o(),y=m("ul"),y.innerHTML=j,Q=o(),L(E.$$.fragment),$=o(),P=m("p"),this.h()},l(e){const t=se("svelte-u9bgzb",document.head);n=f(t,"META",{name:!0,content:!0}),t.forEach(a),g=i(e),h=f(e,"P",{}),_(h).forEach(a),l=i(e),O(u.$$.fragment,e),s=i(e),p=f(e,"DIV",{class:!0,"data-svelte-h":!0}),d(p)!=="svelte-1px1zvi"&&(p.innerHTML=Y),U=i(e),O(c.$$.fragment,e),B=i(e),O(v.$$.fragment,e),N=i(e),b=f(e,"P",{"data-svelte-h":!0}),d(b)!=="svelte-1ekxxrt"&&(b.innerHTML=W),S=i(e),A=f(e,"P",{"data-svelte-h":!0}),d(A)!=="svelte-vfdo9a"&&(A.textContent=D),k=i(e),T=f(e,"P",{"data-svelte-h":!0}),d(T)!=="svelte-1vfe3y"&&(T.innerHTML=V),K=i(e),w=f(e,"P",{"data-svelte-h":!0}),d(w)!=="svelte-n8ivge"&&(w.innerHTML=X),Z=i(e),O(x.$$.fragment,e),I=i(e),y=f(e,"UL",{"data-svelte-h":!0}),d(y)!=="svelte-1tf6va0"&&(y.innerHTML=j),Q=i(e),O(E.$$.fragment,e),$=i(e),P=f(e,"P",{}),_(P).forEach(a),this.h()},h(){H(n,"name","hf:doc:metadata"),H(n,"content",fe),H(p,"class","flex flex-wrap space-x-1")},m(e,t){oe(document.head,n),r(e,g,t),r(e,h,t),r(e,l,t),C(u,e,t),r(e,s,t),r(e,p,t),r(e,U,t),C(c,e,t),r(e,B,t),C(v,e,t),r(e,N,t),r(e,b,t),r(e,S,t),r(e,A,t),r(e,k,t),r(e,T,t),r(e,K,t),r(e,w,t),r(e,Z,t),C(x,e,t),r(e,I,t),r(e,y,t),r(e,Q,t),C(E,e,t),r(e,$,t),r(e,P,t),q=!0},p(e,[t]){const F={};t&2&&(F.$$scope={dirty:t,ctx:e}),c.$set(F)},i(e){q||(R(u.$$.fragment,e),R(c.$$.fragment,e),R(v.$$.fragment,e),R(x.$$.fragment,e),R(E.$$.fragment,e),q=!0)},o(e){G(u.$$.fragment,e),G(c.$$.fragment,e),G(v.$$.fragment,e),G(x.$$.fragment,e),G(E.$$.fragment,e),q=!1},d(e){e&&(a(g),a(h),a(l),a(s),a(p),a(U),a(B),a(N),a(b),a(S),a(A),a(k),a(T),a(K),a(w),a(Z),a(I),a(y),a(Q),a($),a(P)),a(n),J(u,e),J(c,e),J(v,e),J(x,e),J(E,e)}}}const fe='{"title":"BORT","local":"bort","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2}],"depth":1}';function he(M){return te(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class be extends re{constructor(n){super(),ne(this,n,he,me,ee,{})}}export{be as component};
