import{S as Qe,i as We,s as Xe,F as Ye,e as s,c as d,a as u,d as a,b as z,g as c,H as Ze,I as xe,J as ea,q as Te,o as Se,k as p,w as Je,t,R as aa,m as h,x as Ue,h as o,G as i,y as je,B as Ve,v as ia}from"../../chunks/vendor-hf-doc-builder.js";import{I as ra}from"../../chunks/IconCopyLink-hf-doc-builder.js";function la(b){let n,k;const y=b[3].default,l=Ye(y,b,b[2],null);return{c(){n=s("div"),l&&l.c(),this.h()},l(r){n=d(r,"DIV",{class:!0});var m=u(n);l&&l.l(m),m.forEach(a),this.h()},h(){z(n,"class","course-tip "+(b[0]==="orange"?"course-tip-orange":"")+" bg-gradient-to-br dark:bg-gradient-to-r before:border-"+b[0]+"-500 dark:before:border-"+b[0]+"-800 from-"+b[0]+"-50 dark:from-gray-900 to-white dark:to-gray-950 border border-"+b[0]+"-50 text-"+b[0]+"-700 dark:text-gray-400")},m(r,m){c(r,n,m),l&&l.m(n,null),k=!0},p(r,[m]){l&&l.p&&(!k||m&4)&&Ze(l,y,r,r[2],k?ea(y,r[2],m,null):xe(r[2]),null)},i(r){k||(Te(l,r),k=!0)},o(r){Se(l,r),k=!1},d(r){r&&a(n),l&&l.d(r)}}}function na(b,n,k){let{$$slots:y={},$$scope:l}=n,{warning:r=!1}=n;const m=r?"orange":"green";return b.$$set=E=>{"warning"in E&&k(1,r=E.warning),"$$scope"in E&&k(2,l=E.$$scope)},[m,r,l,y]}class ta extends Qe{constructor(n){super();We(this,n,na,la,Xe,{warning:1})}}function oa(b){let n,k,y,l;return{c(){n=t("\u26A0\uFE0F Model Hub ve \u{1F917} Transformers k\xFCt\xFCphanesinde yeralan b\xFCt\xFCn \xF6zelliklerden yararlanabilmeniz icin, "),k=s("a"),y=t("bir hesap olu\u015Fturman\u0131z\u0131"),l=t(" tavsiye ediyoruz."),this.h()},l(r){n=o(r,"\u26A0\uFE0F Model Hub ve \u{1F917} Transformers k\xFCt\xFCphanesinde yeralan b\xFCt\xFCn \xF6zelliklerden yararlanabilmeniz icin, "),k=d(r,"A",{href:!0});var m=u(k);y=o(m,"bir hesap olu\u015Fturman\u0131z\u0131"),m.forEach(a),l=o(r," tavsiye ediyoruz."),this.h()},h(){z(k,"href","https://huggingface.co/join")},m(r,m){c(r,n,m),c(r,k,m),i(k,y),c(r,l,m)},d(r){r&&a(n),r&&a(k),r&&a(l)}}}function sa(b){let n,k,y,l,r,m,E,N,ee,U,B,S,ae,ie,j,M,re,V,g,I,C,le,ne,te,v,G,oe,se,H,de,me,K,ue,ke,fe,A,R,ye,ce,Q,O,be,W,$,pe,q,he,ge,X,_,ve,F,_e,ze,J,Ee,$e,Y,w,Z;return m=new ra({}),w=new ta({props:{$$slots:{default:[oa]},$$scope:{ctx:b}}}),{c(){n=s("meta"),k=p(),y=s("h1"),l=s("a"),r=s("span"),Je(m.$$.fragment),E=p(),N=s("span"),ee=t("Giri\u015F"),U=p(),B=s("p"),S=s("a"),ae=t("Birinci b\xF6l\xFCmde"),ie=t(" g\xF6rd\xFC\u011F\xFCn\xFCz gibi, Transformer modelleri genellikle olduk\xE7a b\xFCy\xFCkt\xFCr. Milyonlarca, hatta milyarlarca, parametreleri olan bu modellerin e\u011Fitimi ve \xFCretime ge\xE7irilmesi olduk\xE7a karma\u015F\u0131k bir giri\u015Fimdir. Bunun yan\u0131s\u0131ra, hemen hemen her g\xFCn, herbirinin kendine \xF6zg\xFC uygulamas\u0131 olan yeni modellerin yay\u0131nlamas\u0131, bu yeni modellerinin hepsini birden denemeyi daha da zor bir hale getirmektedir."),j=p(),M=s("p"),re=t("\u{1F917} Transformers k\xFCt\xFCphanesi bu sorunu \xE7\xF6zmek i\xE7in olu\u015Fturuldu. Bu k\xFCt\xFCphanenin amac\u0131, herhangi bir Transformer modelini tek bir API (uygulama program\u0131 arabirimi) arac\u0131l\u0131\u011F\u0131 ile y\xFCkleme, e\u011Fitme, ve kaydetmeyi sa\u011Flamakt\u0131r. K\xFCt\xFCphanenin ba\u015Fl\u0131ca \xF6zellikleri \u015Funlard\u0131r:"),V=p(),g=s("ul"),I=s("li"),C=s("strong"),le=t("Kullan\u0131m kolayl\u0131\u011F\u0131"),ne=t(": En son geli\u015Ftirilen NLP modellerini indirme, y\xFCkleme ve kullanma yaln\u0131zca iki sat\u0131r kod ile yap\u0131labilir."),te=p(),v=s("li"),G=s("strong"),oe=t("Esneklik"),se=t(": B\xFCt\xFCn modeller temelinde sadece ya PyTorch "),H=s("code"),de=t("nn.Module"),me=t(" ya da TensorFlow "),K=s("code"),ue=t("tf.keras.Model"),ke=t(" s\u0131n\u0131f\u0131d\u0131r ve her bir model, ait oldu\u011Fu k\xFCt\xFCphanesindeki di\u011Fer herhangi bir model gibi i\u015Flenebilir."),fe=p(),A=s("li"),R=s("strong"),ye=t("Sadelik"),ce=t(": K\xFCt\xFCphane i\xE7erisinde neredeyse hi\xE7 bir soyutlama yap\u0131lmamaktad\u0131r. \u201CHersey tek bir dosya i\xE7erisinde\u201D ifadesi, k\xFCt\xFCphanenin ana kavram\u0131n\u0131 olu\u015Fturuyor. Bir modelin \u201Cforward pass\u201D a\u015Famas\u0131, kodun anla\u015F\u0131l\u0131r olmas\u0131 ve kolayca modifiye edilebilmesini sa\u011Flamak amac\u0131 ile tamamiyle tek bir dosya i\xE7erisinde tan\u0131mlan\u0131r."),Q=p(),O=s("p"),be=t("Bu son \xF6zellik \u{1F917} Transformers k\xFCt\xFCphanesini di\u011Fer makine \xF6\u011Frenmesi k\xFCt\xFCphanelerinden olduk\xE7a farkl\u0131 k\u0131lmaktad\u0131r. Modeller dosyalar aras\u0131nda payla\u015F\u0131lan mod\xFCller \xFCzerinde kurulmam\u0131\u015Ft\u0131r. Bunun yerine, her bir model kendine ait katmanlara sahiptir. Bu \xF6zellik, modelleri ula\u015F\u0131labilir ve anla\u015F\u0131l\u0131r hale getirmenin yan\u0131s\u0131ra, di\u011Fer modelleri etkilemeden, tek bir model \xFCzerinde kolayca deneyler yapabilmenize olanak sa\u011Flamaktad\u0131r."),W=p(),$=s("p"),pe=t("Bu b\xF6l\xFCm, bir model ve simgelele\u015Ftirici (tokenizer) kullanarak, birinci b\xF6l\xFCmde tan\u0131t\u0131lan "),q=s("code"),he=t("pipeline()"),ge=t(` fonksiyonunun bir kopyas\u0131n\u0131 yapmak i\xE7in ba\u015Ftan sona (end-to-end) uygulayaca\u011F\u0131m\u0131z bir \xF6rnekle ba\u015Flamaktad\u0131r.
Bunun ard\u0131ndan, k\xFCt\xFCphanenin model API\u2019\u0131ndan bahsedece\u011Fiz: Model ve konfig\xFCrasyon s\u0131n\u0131flar\u0131na detayl\u0131ca bak\u0131p, bir modeli nas\u0131l y\xFCkleyebilece\u011Finizi ve bir modelin say\u0131sal giri\u015F verilerini nas\u0131l \xE7\u0131k\u0131\u015F \xF6ng\xF6r\xFCleri olarak i\u015Fledi\u011Fini g\xF6rece\u011Fiz.`),X=p(),_=s("p"),ve=t("Daha sonra, "),F=s("code"),_e=t("pipeline()"),ze=t(" fonksiyonunun di\u011Fer ana par\xE7as\u0131 olan simgele\u015Ftirici API\u2019\u0131na g\xF6z ataca\u011F\u0131z. Simgele\u015Ftiriciler, sinir a\u011F\u0131n\u0131n metni say\u0131sal giri\u015F verilerine ve gerekti\u011Finde bu say\u0131sal verileri tekrar metne d\xF6n\xFC\u015Ft\xFCren ilk ve son i\u015Flem a\u015Famalar\u0131ndan sorumludur. Son olarak, birden fazla c\xFCmleyi haz\u0131r bir grup halinde bir modele nas\u0131l g\xF6nderebilece\u011Finizi g\xF6sterip, "),J=s("code"),Ee=t("tokenizer()"),$e=t(" fonksiyonuna yak\u0131ndan bakarak bu b\xF6l\xFCm\xFC tamamlayaca\u011F\u0131z."),Y=p(),Je(w.$$.fragment),this.h()},l(e){const f=aa('[data-svelte="svelte-1phssyn"]',document.head);n=d(f,"META",{name:!0,content:!0}),f.forEach(a),k=h(e),y=d(e,"H1",{class:!0});var P=u(y);l=d(P,"A",{id:!0,class:!0,href:!0});var Me=u(l);r=d(Me,"SPAN",{});var Ie=u(r);Ue(m.$$.fragment,Ie),Ie.forEach(a),Me.forEach(a),E=h(P),N=d(P,"SPAN",{});var Ae=u(N);ee=o(Ae,"Giri\u015F"),Ae.forEach(a),P.forEach(a),U=h(e),B=d(e,"P",{});var we=u(B);S=d(we,"A",{href:!0});var Oe=u(S);ae=o(Oe,"Birinci b\xF6l\xFCmde"),Oe.forEach(a),ie=o(we," g\xF6rd\xFC\u011F\xFCn\xFCz gibi, Transformer modelleri genellikle olduk\xE7a b\xFCy\xFCkt\xFCr. Milyonlarca, hatta milyarlarca, parametreleri olan bu modellerin e\u011Fitimi ve \xFCretime ge\xE7irilmesi olduk\xE7a karma\u015F\u0131k bir giri\u015Fimdir. Bunun yan\u0131s\u0131ra, hemen hemen her g\xFCn, herbirinin kendine \xF6zg\xFC uygulamas\u0131 olan yeni modellerin yay\u0131nlamas\u0131, bu yeni modellerinin hepsini birden denemeyi daha da zor bir hale getirmektedir."),we.forEach(a),j=h(e),M=d(e,"P",{});var De=u(M);re=o(De,"\u{1F917} Transformers k\xFCt\xFCphanesi bu sorunu \xE7\xF6zmek i\xE7in olu\u015Fturuldu. Bu k\xFCt\xFCphanenin amac\u0131, herhangi bir Transformer modelini tek bir API (uygulama program\u0131 arabirimi) arac\u0131l\u0131\u011F\u0131 ile y\xFCkleme, e\u011Fitme, ve kaydetmeyi sa\u011Flamakt\u0131r. K\xFCt\xFCphanenin ba\u015Fl\u0131ca \xF6zellikleri \u015Funlard\u0131r:"),De.forEach(a),V=h(e),g=d(e,"UL",{});var D=u(g);I=d(D,"LI",{});var Be=u(I);C=d(Be,"STRONG",{});var Le=u(C);le=o(Le,"Kullan\u0131m kolayl\u0131\u011F\u0131"),Le.forEach(a),ne=o(Be,": En son geli\u015Ftirilen NLP modellerini indirme, y\xFCkleme ve kullanma yaln\u0131zca iki sat\u0131r kod ile yap\u0131labilir."),Be.forEach(a),te=h(D),v=d(D,"LI",{});var T=u(v);G=d(T,"STRONG",{});var Ne=u(G);oe=o(Ne,"Esneklik"),Ne.forEach(a),se=o(T,": B\xFCt\xFCn modeller temelinde sadece ya PyTorch "),H=d(T,"CODE",{});var Ce=u(H);de=o(Ce,"nn.Module"),Ce.forEach(a),me=o(T," ya da TensorFlow "),K=d(T,"CODE",{});var Ge=u(K);ue=o(Ge,"tf.keras.Model"),Ge.forEach(a),ke=o(T," s\u0131n\u0131f\u0131d\u0131r ve her bir model, ait oldu\u011Fu k\xFCt\xFCphanesindeki di\u011Fer herhangi bir model gibi i\u015Flenebilir."),T.forEach(a),fe=h(D),A=d(D,"LI",{});var Pe=u(A);R=d(Pe,"STRONG",{});var He=u(R);ye=o(He,"Sadelik"),He.forEach(a),ce=o(Pe,": K\xFCt\xFCphane i\xE7erisinde neredeyse hi\xE7 bir soyutlama yap\u0131lmamaktad\u0131r. \u201CHersey tek bir dosya i\xE7erisinde\u201D ifadesi, k\xFCt\xFCphanenin ana kavram\u0131n\u0131 olu\u015Fturuyor. Bir modelin \u201Cforward pass\u201D a\u015Famas\u0131, kodun anla\u015F\u0131l\u0131r olmas\u0131 ve kolayca modifiye edilebilmesini sa\u011Flamak amac\u0131 ile tamamiyle tek bir dosya i\xE7erisinde tan\u0131mlan\u0131r."),Pe.forEach(a),D.forEach(a),Q=h(e),O=d(e,"P",{});var Ke=u(O);be=o(Ke,"Bu son \xF6zellik \u{1F917} Transformers k\xFCt\xFCphanesini di\u011Fer makine \xF6\u011Frenmesi k\xFCt\xFCphanelerinden olduk\xE7a farkl\u0131 k\u0131lmaktad\u0131r. Modeller dosyalar aras\u0131nda payla\u015F\u0131lan mod\xFCller \xFCzerinde kurulmam\u0131\u015Ft\u0131r. Bunun yerine, her bir model kendine ait katmanlara sahiptir. Bu \xF6zellik, modelleri ula\u015F\u0131labilir ve anla\u015F\u0131l\u0131r hale getirmenin yan\u0131s\u0131ra, di\u011Fer modelleri etkilemeden, tek bir model \xFCzerinde kolayca deneyler yapabilmenize olanak sa\u011Flamaktad\u0131r."),Ke.forEach(a),W=h(e),$=d(e,"P",{});var x=u($);pe=o(x,"Bu b\xF6l\xFCm, bir model ve simgelele\u015Ftirici (tokenizer) kullanarak, birinci b\xF6l\xFCmde tan\u0131t\u0131lan "),q=d(x,"CODE",{});var Re=u(q);he=o(Re,"pipeline()"),Re.forEach(a),ge=o(x,` fonksiyonunun bir kopyas\u0131n\u0131 yapmak i\xE7in ba\u015Ftan sona (end-to-end) uygulayaca\u011F\u0131m\u0131z bir \xF6rnekle ba\u015Flamaktad\u0131r.
Bunun ard\u0131ndan, k\xFCt\xFCphanenin model API\u2019\u0131ndan bahsedece\u011Fiz: Model ve konfig\xFCrasyon s\u0131n\u0131flar\u0131na detayl\u0131ca bak\u0131p, bir modeli nas\u0131l y\xFCkleyebilece\u011Finizi ve bir modelin say\u0131sal giri\u015F verilerini nas\u0131l \xE7\u0131k\u0131\u015F \xF6ng\xF6r\xFCleri olarak i\u015Fledi\u011Fini g\xF6rece\u011Fiz.`),x.forEach(a),X=h(e),_=d(e,"P",{});var L=u(_);ve=o(L,"Daha sonra, "),F=d(L,"CODE",{});var qe=u(F);_e=o(qe,"pipeline()"),qe.forEach(a),ze=o(L," fonksiyonunun di\u011Fer ana par\xE7as\u0131 olan simgele\u015Ftirici API\u2019\u0131na g\xF6z ataca\u011F\u0131z. Simgele\u015Ftiriciler, sinir a\u011F\u0131n\u0131n metni say\u0131sal giri\u015F verilerine ve gerekti\u011Finde bu say\u0131sal verileri tekrar metne d\xF6n\xFC\u015Ft\xFCren ilk ve son i\u015Flem a\u015Famalar\u0131ndan sorumludur. Son olarak, birden fazla c\xFCmleyi haz\u0131r bir grup halinde bir modele nas\u0131l g\xF6nderebilece\u011Finizi g\xF6sterip, "),J=d(L,"CODE",{});var Fe=u(J);Ee=o(Fe,"tokenizer()"),Fe.forEach(a),$e=o(L," fonksiyonuna yak\u0131ndan bakarak bu b\xF6l\xFCm\xFC tamamlayaca\u011F\u0131z."),L.forEach(a),Y=h(e),Ue(w.$$.fragment,e),this.h()},h(){z(n,"name","hf:doc:metadata"),z(n,"content",JSON.stringify(da)),z(l,"id","giri"),z(l,"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"),z(l,"href","#giri"),z(y,"class","relative group"),z(S,"href","/course/chapter1")},m(e,f){i(document.head,n),c(e,k,f),c(e,y,f),i(y,l),i(l,r),je(m,r,null),i(y,E),i(y,N),i(N,ee),c(e,U,f),c(e,B,f),i(B,S),i(S,ae),i(B,ie),c(e,j,f),c(e,M,f),i(M,re),c(e,V,f),c(e,g,f),i(g,I),i(I,C),i(C,le),i(I,ne),i(g,te),i(g,v),i(v,G),i(G,oe),i(v,se),i(v,H),i(H,de),i(v,me),i(v,K),i(K,ue),i(v,ke),i(g,fe),i(g,A),i(A,R),i(R,ye),i(A,ce),c(e,Q,f),c(e,O,f),i(O,be),c(e,W,f),c(e,$,f),i($,pe),i($,q),i(q,he),i($,ge),c(e,X,f),c(e,_,f),i(_,ve),i(_,F),i(F,_e),i(_,ze),i(_,J),i(J,Ee),i(_,$e),c(e,Y,f),je(w,e,f),Z=!0},p(e,[f]){const P={};f&2&&(P.$$scope={dirty:f,ctx:e}),w.$set(P)},i(e){Z||(Te(m.$$.fragment,e),Te(w.$$.fragment,e),Z=!0)},o(e){Se(m.$$.fragment,e),Se(w.$$.fragment,e),Z=!1},d(e){a(n),e&&a(k),e&&a(y),Ve(m),e&&a(U),e&&a(B),e&&a(j),e&&a(M),e&&a(V),e&&a(g),e&&a(Q),e&&a(O),e&&a(W),e&&a($),e&&a(X),e&&a(_),e&&a(Y),Ve(w,e)}}}const da={local:"giri",title:"Giri\u015F"};function ma(b){return ia(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class fa extends Qe{constructor(n){super();We(this,n,ma,sa,Xe,{})}}export{fa as default,da as metadata};
