import{s as K,n as V,o as W}from"../chunks/scheduler.cc52f4b9.js";import{S as X,i as Z,e as r,s as l,c as v,h as ee,a as s,d as i,b as a,f as J,g as C,j as z,k as O,l as te,m as n,n as w,t as T,o as E,p as M}from"../chunks/index.d2856393.js";import{C as ie,H as ne,E as le}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.8ffb7edb.js";import{Y as ae}from"../chunks/Youtube.00df107c.js";import{C as oe}from"../chunks/CourseFloatingBanner.59eb3fdc.js";function re(N){let o,P,x,L,m,y,p,R,f,H,c,q,d,Q="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>.",B,u,Y="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.",S,$,D="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.",A,h,F="Alcuni esempi di modelli di questo tipo includono:",I,g,G='<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>',U,_,j,b,k;return m=new ie({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),p=new ne({props:{title:"Modelli encoder",local:"modelli-encoder",headingTag:"h1"}}),f=new oe({props:{chapter:1,classNames:"absolute z-10 right-0 top-0"}}),c=new ae({props:{id:"MUqNwgPjJvQ"}}),_=new le({props:{source:"https://github.com/huggingface/course/blob/main/chapters/it/chapter1/5.mdx"}}),{c(){o=r("meta"),P=l(),x=r("p"),L=l(),v(m.$$.fragment),y=l(),v(p.$$.fragment),R=l(),v(f.$$.fragment),H=l(),v(c.$$.fragment),q=l(),d=r("p"),d.innerHTML=Q,B=l(),u=r("p"),u.textContent=Y,S=l(),$=r("p"),$.textContent=D,A=l(),h=r("p"),h.textContent=F,I=l(),g=r("ul"),g.innerHTML=G,U=l(),v(_.$$.fragment),j=l(),b=r("p"),this.h()},l(e){const t=ee("svelte-u9bgzb",document.head);o=s(t,"META",{name:!0,content:!0}),t.forEach(i),P=a(e),x=s(e,"P",{}),J(x).forEach(i),L=a(e),C(m.$$.fragment,e),y=a(e),C(p.$$.fragment,e),R=a(e),C(f.$$.fragment,e),H=a(e),C(c.$$.fragment,e),q=a(e),d=s(e,"P",{"data-svelte-h":!0}),z(d)!=="svelte-1x22878"&&(d.innerHTML=Q),B=a(e),u=s(e,"P",{"data-svelte-h":!0}),z(u)!=="svelte-c8x68b"&&(u.textContent=Y),S=a(e),$=s(e,"P",{"data-svelte-h":!0}),z($)!=="svelte-tdphia"&&($.textContent=D),A=a(e),h=s(e,"P",{"data-svelte-h":!0}),z(h)!=="svelte-11m5d4t"&&(h.textContent=F),I=a(e),g=s(e,"UL",{"data-svelte-h":!0}),z(g)!=="svelte-18kzzol"&&(g.innerHTML=G),U=a(e),C(_.$$.fragment,e),j=a(e),b=s(e,"P",{}),J(b).forEach(i),this.h()},h(){O(o,"name","hf:doc:metadata"),O(o,"content",se)},m(e,t){te(document.head,o),n(e,P,t),n(e,x,t),n(e,L,t),w(m,e,t),n(e,y,t),w(p,e,t),n(e,R,t),w(f,e,t),n(e,H,t),w(c,e,t),n(e,q,t),n(e,d,t),n(e,B,t),n(e,u,t),n(e,S,t),n(e,$,t),n(e,A,t),n(e,h,t),n(e,I,t),n(e,g,t),n(e,U,t),w(_,e,t),n(e,j,t),n(e,b,t),k=!0},p:V,i(e){k||(T(m.$$.fragment,e),T(p.$$.fragment,e),T(f.$$.fragment,e),T(c.$$.fragment,e),T(_.$$.fragment,e),k=!0)},o(e){E(m.$$.fragment,e),E(p.$$.fragment,e),E(f.$$.fragment,e),E(c.$$.fragment,e),E(_.$$.fragment,e),k=!1},d(e){e&&(i(P),i(x),i(L),i(y),i(R),i(H),i(q),i(d),i(B),i(u),i(S),i($),i(A),i(h),i(I),i(g),i(U),i(j),i(b)),i(o),M(m,e),M(p,e),M(f,e),M(c,e),M(_,e)}}}const se='{"title":"Modelli encoder","local":"modelli-encoder","sections":[],"depth":1}';function me(N){return W(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $e extends X{constructor(o){super(),Z(this,o,me,re,K,{})}}export{$e as component};
