import{s as J,n as O,o as K}from"../chunks/scheduler.37c15a92.js";import{S as V,i as W,g as r,s as i,r as q,A as X,h as s,f as a,c as l,j as F,u as A,x as b,k as G,y as Z,a as o,v as B,d as S,t as I,w as U}from"../chunks/index.2bf4358c.js";import{Y as ee}from"../chunks/Youtube.1e50a667.js";import{C as te}from"../chunks/CourseFloatingBanner.9ff4c771.js";import{H as ae,E as oe}from"../chunks/getInferenceSnippets.ebf8be91.js";function ie(j){let n,v,_,w,m,z,p,C,c,E,f,k="I modelli encoder utilizzano solo l’encoder di un modello Transformer. In ogni fase, gli attention layer hanno accesso a tutte le parole della frase di partenza. Questi modelli sono spesso caratterizzati come aventi attenzione “bi-direzionale” e chiamati <em>auto-encoding models</em>.",T,d,N="Solitamente, il pre-addestramento di questi modelli consiste nel corrompere una determinata frase (ad esempio, nascondendone casualmente alcune parole) e incaricare il modello di ritrovare o ricostruire la frase di partenza.",P,u,Q="I modelli encoder sono particolarmente appropriati per compiti che richiedono la comprensione di frasi intere, quali la classificazione di frasi, riconoscimento delle entità nominate (e in senso più ampio, la classificazione di parole), e l’estrazione di risposte da un contesto.",M,h,Y="Alcuni esempi di modelli di questo tipo includono:",L,$,D='<li><a href="https://huggingface.co/transformers/model_doc/albert.html" rel="nofollow">ALBERT</a></li> <li><a href="https://huggingface.co/transformers/model_doc/bert.html" rel="nofollow">BERT</a></li> <li><a href="https://huggingface.co/transformers/model_doc/distilbert.html" rel="nofollow">DistilBERT</a></li> <li><a href="https://huggingface.co/transformers/model_doc/electra.html" rel="nofollow">ELECTRA</a></li> <li><a href="https://huggingface.co/transformers/model_doc/roberta.html" rel="nofollow">RoBERTa</a></li>',R,g,y,x,H;return m=new ae({props:{title:"Modelli encoder",local:"modelli-encoder",headingTag:"h1"}}),p=new te({props:{chapter:1,classNames:"absolute z-10 right-0 top-0"}}),c=new ee({props:{id:"MUqNwgPjJvQ"}}),g=new oe({props:{source:"https://github.com/huggingface/course/blob/main/chapters/it/chapter1/5.mdx"}}),{c(){n=r("meta"),v=i(),_=r("p"),w=i(),q(m.$$.fragment),z=i(),q(p.$$.fragment),C=i(),q(c.$$.fragment),E=i(),f=r("p"),f.innerHTML=k,T=i(),d=r("p"),d.textContent=N,P=i(),u=r("p"),u.textContent=Q,M=i(),h=r("p"),h.textContent=Y,L=i(),$=r("ul"),$.innerHTML=D,R=i(),q(g.$$.fragment),y=i(),x=r("p"),this.h()},l(e){const t=X("svelte-u9bgzb",document.head);n=s(t,"META",{name:!0,content:!0}),t.forEach(a),v=l(e),_=s(e,"P",{}),F(_).forEach(a),w=l(e),A(m.$$.fragment,e),z=l(e),A(p.$$.fragment,e),C=l(e),A(c.$$.fragment,e),E=l(e),f=s(e,"P",{"data-svelte-h":!0}),b(f)!=="svelte-1x22878"&&(f.innerHTML=k),T=l(e),d=s(e,"P",{"data-svelte-h":!0}),b(d)!=="svelte-c8x68b"&&(d.textContent=N),P=l(e),u=s(e,"P",{"data-svelte-h":!0}),b(u)!=="svelte-tdphia"&&(u.textContent=Q),M=l(e),h=s(e,"P",{"data-svelte-h":!0}),b(h)!=="svelte-11m5d4t"&&(h.textContent=Y),L=l(e),$=s(e,"UL",{"data-svelte-h":!0}),b($)!=="svelte-18kzzol"&&($.innerHTML=D),R=l(e),A(g.$$.fragment,e),y=l(e),x=s(e,"P",{}),F(x).forEach(a),this.h()},h(){G(n,"name","hf:doc:metadata"),G(n,"content",le)},m(e,t){Z(document.head,n),o(e,v,t),o(e,_,t),o(e,w,t),B(m,e,t),o(e,z,t),B(p,e,t),o(e,C,t),B(c,e,t),o(e,E,t),o(e,f,t),o(e,T,t),o(e,d,t),o(e,P,t),o(e,u,t),o(e,M,t),o(e,h,t),o(e,L,t),o(e,$,t),o(e,R,t),B(g,e,t),o(e,y,t),o(e,x,t),H=!0},p:O,i(e){H||(S(m.$$.fragment,e),S(p.$$.fragment,e),S(c.$$.fragment,e),S(g.$$.fragment,e),H=!0)},o(e){I(m.$$.fragment,e),I(p.$$.fragment,e),I(c.$$.fragment,e),I(g.$$.fragment,e),H=!1},d(e){e&&(a(v),a(_),a(w),a(z),a(C),a(E),a(f),a(T),a(d),a(P),a(u),a(M),a(h),a(L),a($),a(R),a(y),a(x)),a(n),U(m,e),U(p,e),U(c,e),U(g,e)}}}const le='{"title":"Modelli encoder","local":"modelli-encoder","sections":[],"depth":1}';function ne(j){return K(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class fe extends V{constructor(n){super(),W(this,n,ne,ie,J,{})}}export{fe as component};
