import{S as Oe,i as Ue,s as Ke,e as r,k as p,w as ze,t as s,M as We,c as o,d as t,m as h,a as l,x as Je,h as n,b as i,G as e,g as u,y as Fe,L as Qe,q as Ve,o as Xe,B as Ye,v as Ze}from"../chunks/vendor-hf-doc-builder.js";import{I as ea}from"../chunks/IconCopyLink-hf-doc-builder.js";function aa(Be){let m,H,v,g,$,b,X,D,Y,N,G,Z,O,c,I,ee,P,ae,te,M,re,T,oe,le,C,se,x,ne,ie,k,de,A,ce,U,E,pe,L,he,ue,K,f,j,fe,me,q,ve,ge,R,Ee,B,ye,_e,z,y,be,w,Pe,Te,W;return b=new ea({}),{c(){m=r("meta"),H=p(),v=r("h1"),g=r("a"),$=r("span"),ze(b.$$.fragment),X=p(),D=r("span"),Y=s("BERTolog\xEDa"),N=p(),G=r("p"),Z=s(`Hay un creciente campo de estudio empe\xF1ado en la investigaci\xF3n del funcionamiento interno de los transformers de gran escala como BERT
(que algunos llaman \u201CBERTolog\xEDa\u201D). Algunos buenos ejemplos de este campo son:`),O=p(),c=r("ul"),I=r("li"),ee=s(`BERT Rediscovers the Classical NLP Pipeline por Ian Tenney, Dipanjan Das, Ellie Pavlick:
`),P=r("a"),ae=s("https://arxiv.org/abs/1905.05950"),te=p(),M=r("li"),re=s("Are Sixteen Heads Really Better than One? por Paul Michel, Omer Levy, Graham Neubig: "),T=r("a"),oe=s("https://arxiv.org/abs/1905.10650"),le=p(),C=r("li"),se=s(`What Does BERT Look At? An Analysis of BERT\u2019s Attention por Kevin Clark, Urvashi Khandelwal, Omer Levy, Christopher D.
Manning: `),x=r("a"),ne=s("https://arxiv.org/abs/1906.04341"),ie=p(),k=r("li"),de=s("CAT-probing: A Metric-based Approach to Interpret How Pre-trained Models for Programming Language Attend Code Structure: "),A=r("a"),ce=s("https://arxiv.org/abs/2210.04633"),U=p(),E=r("p"),pe=s(`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
(`),L=r("a"),he=s("https://arxiv.org/abs/1905.10650"),ue=s("):"),K=p(),f=r("ul"),j=r("li"),fe=s("accediendo a todos los hidden-states de BERT/GPT/GPT-2,"),me=p(),q=r("li"),ve=s("accediendo a todos los pesos de atenci\xF3n para cada head de BERT/GPT/GPT-2,"),ge=p(),R=r("li"),Ee=s(`adquiriendo los valores de salida y gradientes de las heads para poder computar la m\xE9trica de importancia de las heads y realizar la poda de heads como se explica
en `),B=r("a"),ye=s("https://arxiv.org/abs/1905.10650"),_e=s("."),z=p(),y=r("p"),be=s("Para ayudarte a entender y usar estas features, hemos a\xF1adido un script espec\xEDfico de ejemplo: "),w=r("a"),Pe=s("bertology.py"),Te=s(` mientras extraes informaci\xF3n y cortas un modelo pre-entrenado en
GLUE.`),this.h()},l(a){const d=We('[data-svelte="svelte-1phssyn"]',document.head);m=o(d,"META",{name:!0,content:!0}),d.forEach(t),H=h(a),v=o(a,"H1",{class:!0});var J=l(v);g=o(J,"A",{id:!0,class:!0,href:!0});var we=l(g);$=o(we,"SPAN",{});var Ge=l($);Je(b.$$.fragment,Ge),Ge.forEach(t),we.forEach(t),X=h(J),D=o(J,"SPAN",{});var Ie=l(D);Y=n(Ie,"BERTolog\xEDa"),Ie.forEach(t),J.forEach(t),N=h(a),G=o(a,"P",{});var Me=l(G);Z=n(Me,`Hay un creciente campo de estudio empe\xF1ado en la investigaci\xF3n del funcionamiento interno de los transformers de gran escala como BERT
(que algunos llaman \u201CBERTolog\xEDa\u201D). Algunos buenos ejemplos de este campo son:`),Me.forEach(t),O=h(a),c=o(a,"UL",{});var _=l(c);I=o(_,"LI",{});var xe=l(I);ee=n(xe,`BERT Rediscovers the Classical NLP Pipeline por Ian Tenney, Dipanjan Das, Ellie Pavlick:
`),P=o(xe,"A",{href:!0,rel:!0});var Ce=l(P);ae=n(Ce,"https://arxiv.org/abs/1905.05950"),Ce.forEach(t),xe.forEach(t),te=h(_),M=o(_,"LI",{});var Ae=l(M);re=n(Ae,"Are Sixteen Heads Really Better than One? por Paul Michel, Omer Levy, Graham Neubig: "),T=o(Ae,"A",{href:!0,rel:!0});var ke=l(T);oe=n(ke,"https://arxiv.org/abs/1905.10650"),ke.forEach(t),Ae.forEach(t),le=h(_),C=o(_,"LI",{});var Le=l(C);se=n(Le,`What Does BERT Look At? An Analysis of BERT\u2019s Attention por Kevin Clark, Urvashi Khandelwal, Omer Levy, Christopher D.
Manning: `),x=o(Le,"A",{href:!0,rel:!0});var Se=l(x);ne=n(Se,"https://arxiv.org/abs/1906.04341"),Se.forEach(t),Le.forEach(t),ie=h(_),k=o(_,"LI",{});var Re=l(k);de=n(Re,"CAT-probing: A Metric-based Approach to Interpret How Pre-trained Models for Programming Language Attend Code Structure: "),A=o(Re,"A",{href:!0,rel:!0});var $e=l(A);ce=n($e,"https://arxiv.org/abs/2210.04633"),$e.forEach(t),Re.forEach(t),_.forEach(t),U=h(a),E=o(a,"P",{});var F=l(E);pe=n(F,`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
(`),L=o(F,"A",{href:!0,rel:!0});var De=l(L);he=n(De,"https://arxiv.org/abs/1905.10650"),De.forEach(t),ue=n(F,"):"),F.forEach(t),K=h(a),f=o(a,"UL",{});var S=l(f);j=o(S,"LI",{});var je=l(j);fe=n(je,"accediendo a todos los hidden-states de BERT/GPT/GPT-2,"),je.forEach(t),me=h(S),q=o(S,"LI",{});var qe=l(q);ve=n(qe,"accediendo a todos los pesos de atenci\xF3n para cada head de BERT/GPT/GPT-2,"),qe.forEach(t),ge=h(S),R=o(S,"LI",{});var Q=l(R);Ee=n(Q,`adquiriendo los valores de salida y gradientes de las heads para poder computar la m\xE9trica de importancia de las heads y realizar la poda de heads como se explica
en `),B=o(Q,"A",{href:!0,rel:!0});var He=l(B);ye=n(He,"https://arxiv.org/abs/1905.10650"),He.forEach(t),_e=n(Q,"."),Q.forEach(t),S.forEach(t),z=h(a),y=o(a,"P",{});var V=l(y);be=n(V,"Para ayudarte a entender y usar estas features, hemos a\xF1adido un script espec\xEDfico de ejemplo: "),w=o(V,"A",{href:!0,rel:!0});var Ne=l(w);Pe=n(Ne,"bertology.py"),Ne.forEach(t),Te=n(V,` mientras extraes informaci\xF3n y cortas un modelo pre-entrenado en
GLUE.`),V.forEach(t),this.h()},h(){i(m,"name","hf:doc:metadata"),i(m,"content",JSON.stringify(ta)),i(g,"id","bertologa"),i(g,"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"),i(g,"href","#bertologa"),i(v,"class","relative group"),i(P,"href","https://arxiv.org/abs/1905.05950"),i(P,"rel","nofollow"),i(T,"href","https://arxiv.org/abs/1905.10650"),i(T,"rel","nofollow"),i(x,"href","https://arxiv.org/abs/1906.04341"),i(x,"rel","nofollow"),i(A,"href","https://arxiv.org/abs/2210.04633"),i(A,"rel","nofollow"),i(L,"href","https://arxiv.org/abs/1905.10650"),i(L,"rel","nofollow"),i(B,"href","https://arxiv.org/abs/1905.10650"),i(B,"rel","nofollow"),i(w,"href","https://github.com/huggingface/transformers/tree/main/examples/research_projects/bertology/run_bertology.py"),i(w,"rel","nofollow")},m(a,d){e(document.head,m),u(a,H,d),u(a,v,d),e(v,g),e(g,$),Fe(b,$,null),e(v,X),e(v,D),e(D,Y),u(a,N,d),u(a,G,d),e(G,Z),u(a,O,d),u(a,c,d),e(c,I),e(I,ee),e(I,P),e(P,ae),e(c,te),e(c,M),e(M,re),e(M,T),e(T,oe),e(c,le),e(c,C),e(C,se),e(C,x),e(x,ne),e(c,ie),e(c,k),e(k,de),e(k,A),e(A,ce),u(a,U,d),u(a,E,d),e(E,pe),e(E,L),e(L,he),e(E,ue),u(a,K,d),u(a,f,d),e(f,j),e(j,fe),e(f,me),e(f,q),e(q,ve),e(f,ge),e(f,R),e(R,Ee),e(R,B),e(B,ye),e(R,_e),u(a,z,d),u(a,y,d),e(y,be),e(y,w),e(w,Pe),e(y,Te),W=!0},p:Qe,i(a){W||(Ve(b.$$.fragment,a),W=!0)},o(a){Xe(b.$$.fragment,a),W=!1},d(a){t(m),a&&t(H),a&&t(v),Ye(b),a&&t(N),a&&t(G),a&&t(O),a&&t(c),a&&t(U),a&&t(E),a&&t(K),a&&t(f),a&&t(z),a&&t(y)}}}const ta={local:"bertologa",title:"BERTolog\xEDa"};function ra(Be){return Ze(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class sa extends Oe{constructor(m){super();Ue(this,m,ra,aa,Ke,{})}}export{sa as default,ta as metadata};
