import{s as z,n as J,o as W}from"../chunks/scheduler.36a0863c.js";import{S as F,i as Q,g as r,s as i,u as V,A as X,h as l,f as t,c as p,j as P,v as Y,y as x,k as b,o as w,a as o,w as Z,d as ee,t as te,x as ae}from"../chunks/index.d0f7a4c4.js";import{I as oe}from"../chunks/IconCopyLink.bc5fad79.js";function re(S){let s,E,y,L,n,c,T,d,G,g,j="BERTología",C,h,q=`Hay un creciente campo de estudio empeñado en la investigación del funcionamiento interno de los transformers de gran escala como BERT
(que algunos llaman “BERTología”). Algunos buenos ejemplos de este campo son:`,A,u,N=`<li>BERT Rediscovers the Classical NLP Pipeline por Ian Tenney, Dipanjan Das, Ellie Pavlick:
<a href="https://arxiv.org/abs/1905.05950" rel="nofollow">https://arxiv.org/abs/1905.05950</a></li> <li>Are Sixteen Heads Really Better than One? por Paul Michel, Omer Levy, Graham Neubig: <a href="https://arxiv.org/abs/1905.10650" rel="nofollow">https://arxiv.org/abs/1905.10650</a></li> <li>What Does BERT Look At? An Analysis of BERT’s Attention por Kevin Clark, Urvashi Khandelwal, Omer Levy, Christopher D.
Manning: <a href="https://arxiv.org/abs/1906.04341" rel="nofollow">https://arxiv.org/abs/1906.04341</a></li> <li>CAT-probing: A Metric-based Approach to Interpret How Pre-trained Models for Programming Language Attend Code Structure: <a href="https://arxiv.org/abs/2210.04633" rel="nofollow">https://arxiv.org/abs/2210.04633</a></li>`,M,m,U=`Para asistir al desarrollo de este nuevo campo, hemos incluido algunas features adicionales en los modelos BERT/GPT/GPT-2 para
ayudar a acceder a las representaciones internas, principalmente adaptado de la gran obra de Paul Michel
(<a href="https://arxiv.org/abs/1905.10650" rel="nofollow">https://arxiv.org/abs/1905.10650</a>):`,R,f,D=`<li>accediendo a todos los hidden-states de BERT/GPT/GPT-2,</li> <li>accediendo a todos los pesos de atención para cada head de BERT/GPT/GPT-2,</li> <li>adquiriendo los valores de salida y gradientes de las heads para poder computar la métrica de importancia de las heads y realizar la poda de heads como se explica
en <a href="https://arxiv.org/abs/1905.10650" rel="nofollow">https://arxiv.org/abs/1905.10650</a>.</li>`,H,v,I=`Para ayudarte a entender y usar estas features, hemos añadido un script específico de ejemplo: <a href="https://github.com/huggingface/transformers/tree/main/examples/research_projects/bertology/run_bertology.py" rel="nofollow">bertology.py</a> mientras extraes información y cortas un modelo pre-entrenado en
GLUE.`,B,_,$;return d=new oe({}),{c(){s=r("meta"),E=i(),y=r("p"),L=i(),n=r("h1"),c=r("a"),T=r("span"),V(d.$$.fragment),G=i(),g=r("span"),g.textContent=j,C=i(),h=r("p"),h.textContent=q,A=i(),u=r("ul"),u.innerHTML=N,M=i(),m=r("p"),m.innerHTML=U,R=i(),f=r("ul"),f.innerHTML=D,H=i(),v=r("p"),v.innerHTML=I,B=i(),_=r("p"),this.h()},l(e){const a=X("svelte-1phssyn",document.head);s=l(a,"META",{name:!0,content:!0}),a.forEach(t),E=p(e),y=l(e,"P",{}),P(y).forEach(t),L=p(e),n=l(e,"H1",{class:!0});var k=P(n);c=l(k,"A",{id:!0,class:!0,href:!0});var O=P(c);T=l(O,"SPAN",{});var K=P(T);Y(d.$$.fragment,K),K.forEach(t),O.forEach(t),G=p(k),g=l(k,"SPAN",{"data-svelte-h":!0}),x(g)!=="svelte-te3jbl"&&(g.textContent=j),k.forEach(t),C=p(e),h=l(e,"P",{"data-svelte-h":!0}),x(h)!=="svelte-t8qs96"&&(h.textContent=q),A=p(e),u=l(e,"UL",{"data-svelte-h":!0}),x(u)!=="svelte-1sb7ig0"&&(u.innerHTML=N),M=p(e),m=l(e,"P",{"data-svelte-h":!0}),x(m)!=="svelte-f71qwa"&&(m.innerHTML=U),R=p(e),f=l(e,"UL",{"data-svelte-h":!0}),x(f)!=="svelte-wp6xpp"&&(f.innerHTML=D),H=p(e),v=l(e,"P",{"data-svelte-h":!0}),x(v)!=="svelte-1wml3jh"&&(v.innerHTML=I),B=p(e),_=l(e,"P",{}),P(_).forEach(t),this.h()},h(){b(s,"name","hf:doc:metadata"),b(s,"content",JSON.stringify(le)),b(c,"id","bertologa"),b(c,"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"),b(c,"href","#bertologa"),b(n,"class","relative group")},m(e,a){w(document.head,s),o(e,E,a),o(e,y,a),o(e,L,a),o(e,n,a),w(n,c),w(c,T),Z(d,T,null),w(n,G),w(n,g),o(e,C,a),o(e,h,a),o(e,A,a),o(e,u,a),o(e,M,a),o(e,m,a),o(e,R,a),o(e,f,a),o(e,H,a),o(e,v,a),o(e,B,a),o(e,_,a),$=!0},p:J,i(e){$||(ee(d.$$.fragment,e),$=!0)},o(e){te(d.$$.fragment,e),$=!1},d(e){e&&(t(E),t(y),t(L),t(n),t(C),t(h),t(A),t(u),t(M),t(m),t(R),t(f),t(H),t(v),t(B),t(_)),t(s),ae(d)}}}const le={local:"bertologa",title:"BERTología"};function se(S){return W(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ce extends F{constructor(s){super(),Q(this,s,se,re,z,{})}}export{ce as component};
