import{S as Hc,i as Bc,s as Lc,e as i,k as u,w as p,t as a,M as Gc,c,d as n,m as g,a as o,x as f,h as s,b as l,N as $t,G as e,g as r,y as v,L as Fc,q as d,o as y,B as b,v as jc}from"../../chunks/vendor-hf-doc-builder.js";import{Y as zc}from"../../chunks/Youtube-hf-doc-builder.js";import{I as Yt}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as pi}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as Kc}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";function Jc(fi){let T,Pn,$,q,Xt,J,Oe,Zt,He,Cn,U,An,R,Nn,W,Q,Be,Le,qn,Y,X,vi,Sn,k,Ge,xt,Fe,je,Z,ze,Ke,Vn,w,Je,tt,Ue,Re,nt,We,Qe,Dn,S,Ye,et,Xe,Ze,In,V,th,ht,nh,eh,On,x,D,tn,it,hh,nn,ih,Hn,Mt,ch,Bn,ct,Ln,I,rh,rt,oh,ah,Gn,ot,Fn,at,jn,O,sh,Pt,lh,uh,zn,Ct,gh,Kn,st,lt,di,Jn,At,mh,Un,ut,gt,yi,Rn,Nt,ph,Wn,mt,pt,bi,Qn,qt,fh,Yn,_,en,vh,dh,M,yh,hn,bh,kh,cn,wh,_h,Eh,rn,Th,Xn,St,$h,Zn,P,H,on,ft,xh,an,Mh,te,B,Ph,sn,Ch,Ah,ne,Vt,ln,Nh,ee,Dt,qh,he,It,un,Sh,ie,E,Vh,gn,Dh,Ih,mn,Oh,Hh,ce,Ot,pn,Bh,re,Ht,Lh,oe,Bt,fn,Gh,ae,Lt,Fh,se,C,L,vn,vt,jh,dn,zh,le,Gt,Kh,ue,dt,yt,ki,ge,G,Jh,yn,Uh,Rh,me,A,F,bn,bt,Wh,kn,Qh,pe,m,Yh,wn,Xh,Zh,_n,ti,ni,En,ei,hi,fe,kt,wt,wi,ve,Ft,ii,de,jt,Tn,ci,ye,zt,ri,be,N,j,$n,_t,oi,xn,ai,ke,z,si,Mn,li,ui,we,Et,Tt,_i,_e,Kt,gi,Ee;return J=new Yt({}),U=new Kc({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/vi/chapter8/section3.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/vi/chapter8/section3.ipynb"}]}}),R=new zc({props:{id:"S2EEG3JIt2A"}}),it=new Yt({}),ct=new pi({props:{code:`from transformers import AutoTokenizer, AutoModel

model_checkpoint = "distilbert-base-uncased"
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
model = AutoModel.from_pretrained(model_checkpoint)`,highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModel

model_checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
model = AutoModel.from_pretrained(model_checkpoint)`}}),ot=new pi({props:{code:`text = """
Generation One is a retroactive term for the Transformers characters that
appeared between 1984 and 1993. The Transformers began with the 1980s Japanese
toy lines Micro Change and Diaclone. They presented robots able to transform
into everyday vehicles, electronic items or weapons. Hasbro bought the Micro
Change and Diaclone toys, and partnered with Takara. Marvel Comics was hired by
Hasbro to create the backstory; editor-in-chief Jim Shooter wrote an overall
story, and gave the task of creating the characthers to writer Dennis O'Neil.
Unhappy with O'Neil's work (although O'Neil created the name "Optimus Prime"),
Shooter chose Bob Budiansky to create the characters.

The Transformers mecha were largely designed by Sh\u014Dji Kawamori, the creator of
the Japanese mecha anime franchise Macross (which was adapted into the Robotech
franchise in North America). Kawamori came up with the idea of transforming
mechs while working on the Diaclone and Macross franchises in the early 1980s
(such as the VF-1 Valkyrie in Macross and Robotech), with his Diaclone mechs
later providing the basis for Transformers.

The primary concept of Generation One is that the heroic Optimus Prime, the
villainous Megatron, and their finest soldiers crash land on pre-historic Earth
in the Ark and the Nemesis before awakening in 1985, Cybertron hurtling through
the Neutral zone as an effect of the war. The Marvel comic was originally part
of the main Marvel Universe, with appearances from Spider-Man and Nick Fury,
plus some cameos, as well as a visit to the Savage Land.

The Transformers TV series began around the same time. Produced by Sunbow
Productions and Marvel Productions, later Hasbro Productions, from the start it
contradicted Budiansky's backstories. The TV series shows the Autobots looking
for new energy sources, and crash landing as the Decepticons attack. Marvel
interpreted the Autobots as destroying a rogue asteroid approaching Cybertron.
Shockwave is loyal to Megatron in the TV series, keeping Cybertron in a
stalemate during his absence, but in the comic book he attempts to take command
of the Decepticons. The TV series would also differ wildly from the origins
Budiansky had created for the Dinobots, the Decepticon turned Autobot Jetfire
(known as Skyfire on TV), the Constructicons (who combine to form
Devastator),[19][20] and Omega Supreme. The Marvel comic establishes early on
that Prime wields the Creation Matrix, which gives life to machines. In the
second season, the two-part episode The Key to Vector Sigma introduced the
ancient Vector Sigma computer, which served the same original purpose as the
Creation Matrix (giving life to Transformers), and its guardian Alpha Trion.
"""

inputs = tokenizer(text, return_tensors="pt")
logits = model(**inputs).logits`,highlighted:`text = <span class="hljs-string">&quot;&quot;&quot;
Generation One is a retroactive term for the Transformers characters that
appeared between 1984 and 1993. The Transformers began with the 1980s Japanese
toy lines Micro Change and Diaclone. They presented robots able to transform
into everyday vehicles, electronic items or weapons. Hasbro bought the Micro
Change and Diaclone toys, and partnered with Takara. Marvel Comics was hired by
Hasbro to create the backstory; editor-in-chief Jim Shooter wrote an overall
story, and gave the task of creating the characthers to writer Dennis O&#x27;Neil.
Unhappy with O&#x27;Neil&#x27;s work (although O&#x27;Neil created the name &quot;Optimus Prime&quot;),
Shooter chose Bob Budiansky to create the characters.

The Transformers mecha were largely designed by Sh\u014Dji Kawamori, the creator of
the Japanese mecha anime franchise Macross (which was adapted into the Robotech
franchise in North America). Kawamori came up with the idea of transforming
mechs while working on the Diaclone and Macross franchises in the early 1980s
(such as the VF-1 Valkyrie in Macross and Robotech), with his Diaclone mechs
later providing the basis for Transformers.

The primary concept of Generation One is that the heroic Optimus Prime, the
villainous Megatron, and their finest soldiers crash land on pre-historic Earth
in the Ark and the Nemesis before awakening in 1985, Cybertron hurtling through
the Neutral zone as an effect of the war. The Marvel comic was originally part
of the main Marvel Universe, with appearances from Spider-Man and Nick Fury,
plus some cameos, as well as a visit to the Savage Land.

The Transformers TV series began around the same time. Produced by Sunbow
Productions and Marvel Productions, later Hasbro Productions, from the start it
contradicted Budiansky&#x27;s backstories. The TV series shows the Autobots looking
for new energy sources, and crash landing as the Decepticons attack. Marvel
interpreted the Autobots as destroying a rogue asteroid approaching Cybertron.
Shockwave is loyal to Megatron in the TV series, keeping Cybertron in a
stalemate during his absence, but in the comic book he attempts to take command
of the Decepticons. The TV series would also differ wildly from the origins
Budiansky had created for the Dinobots, the Decepticon turned Autobot Jetfire
(known as Skyfire on TV), the Constructicons (who combine to form
Devastator),[19][20] and Omega Supreme. The Marvel comic establishes early on
that Prime wields the Creation Matrix, which gives life to machines. In the
second season, the two-part episode The Key to Vector Sigma introduced the
ancient Vector Sigma computer, which served the same original purpose as the
Creation Matrix (giving life to Transformers), and its guardian Alpha Trion.
&quot;&quot;&quot;</span>

inputs = tokenizer(text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
logits = model(**inputs).logits`}}),at=new pi({props:{code:"IndexError: index out of range in self",highlighted:'IndexError: index out of <span class="hljs-built_in">range</span> <span class="hljs-keyword">in</span> self'}}),ft=new Yt({}),vt=new Yt({}),bt=new Yt({}),_t=new Yt({}),{c(){T=i("meta"),Pn=u(),$=i("h1"),q=i("a"),Xt=i("span"),p(J.$$.fragment),Oe=u(),Zt=i("span"),He=a("Y\xEAu c\u1EA7u tr\u1EE3 gi\xFAp tr\xEAn di\u1EC5n \u0111\xE0n"),Cn=u(),p(U.$$.fragment),An=u(),p(R.$$.fragment),Nn=u(),W=i("p"),Q=i("a"),Be=a("Di\u1EC5n \u0111\xE0n Hugging Face"),Le=a(" l\xE0 n\u01A1i tuy\u1EC7t v\u1EDDi \u0111\u1EC3 nh\u1EADn \u0111\u01B0\u1EE3c s\u1EF1 gi\xFAp \u0111\u1EE1 t\u1EEB c\xE1c nh\xF3m ngu\u1ED3n m\u1EDF v\xE0 c\u1ED9ng \u0111\u1ED3ng Hugging Face. Trang ch\u1EE7 lu\xF4n tr\xF4ng nh\u01B0 sau:"),qn=u(),Y=i("div"),X=i("img"),Sn=u(),k=i("p"),Ge=a("\u1EDE b\xEAn tay tr\xE1i, b\u1EA1n c\xF3 th\u1EC3 th\u1EA5y t\u1EA5t c\u1EA3 c\xE1c danh m\u1EE5c m\xE0 c\xE1c ch\u1EE7 \u0111\u1EC1 kh\xE1c nhau \u0111\u01B0\u1EE3c nh\xF3m l\u1EA1i, trong khi b\xEAn tay ph\u1EA3i hi\u1EC3n th\u1ECB c\xE1c ch\u1EE7 \u0111\u1EC1 g\u1EA7n \u0111\xE2y nh\u1EA5t. Ch\u1EE7 \u0111\u1EC1 l\xE0 m\u1ED9t b\xE0i \u0111\u0103ng c\xF3 ch\u1EE9a ti\xEAu \u0111\u1EC1, danh m\u1EE5c v\xE0 m\xF4 t\u1EA3; n\xF3 kh\xE1 gi\u1ED1ng v\u1EDBi \u0111\u1ECBnh d\u1EA1ng v\u1EA5n \u0111\u1EC1 GitHub m\xE0 ch\xFAng ta \u0111\xE3 th\u1EA5y khi t\u1EA1o t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a ri\xEAng m\xECnh trong "),xt=i("a"),Fe=a("Ch\u01B0\u01A1ng 5"),je=a(". Nh\u01B0 t\xEAn cho th\u1EA5y, danh m\u1EE5c "),Z=i("a"),ze=a("Beginners"),Ke=a(" ch\u1EE7 y\u1EBFu d\xE0nh cho nh\u1EEFng ng\u01B0\u1EDDi m\u1EDBi b\u1EAFt \u0111\u1EA7u v\u1EDBi h\u1EC7 sinh th\xE1i v\xE0 th\u01B0 vi\u1EC7n Hugging Face. M\u1ECDi c\xE2u h\u1ECFi tr\xEAn b\u1EA5t k\u1EF3 th\u01B0 vi\u1EC7n n\xE0o \u0111\u1EC1u \u0111\u01B0\u1EE3c hoan ngh\xEAnh \u1EDF \u0111\xF3, c\xF3 th\u1EC3 l\xE0 \u0111\u1EC3 g\u1EE1 l\u1ED7i m\u1ED9t s\u1ED1 m\xE3 ho\u1EB7c \u0111\u1EC3 y\xEAu c\u1EA7u tr\u1EE3 gi\xFAp v\u1EC1 c\xE1ch th\u1EF1c hi\u1EC7n \u0111i\u1EC1u g\xEC \u0111\xF3. (\u0110i\u1EC1u \u0111\xF3 n\xF3i r\u1EB1ng, n\u1EBFu c\xE2u h\u1ECFi c\u1EE7a b\u1EA1n li\xEAn quan \u0111\u1EBFn m\u1ED9t th\u01B0 vi\u1EC7n c\u1EE5 th\u1EC3, b\u1EA1n c\xF3 th\u1EC3 n\xEAn chuy\u1EC3n \u0111\u1EBFn danh m\u1EE5c th\u01B0 vi\u1EC7n t\u01B0\u01A1ng \u1EE9ng tr\xEAn di\u1EC5n \u0111\xE0n.)"),Vn=u(),w=i("p"),Je=a("T\u01B0\u01A1ng t\u1EF1, danh m\u1EE5c "),tt=i("a"),Ue=a("Intermediate"),Re=a("v\xE0 "),nt=i("a"),We=a("Research"),Qe=a(" d\xE0nh cho c\xE1c c\xE2u h\u1ECFi n\xE2ng cao h\u01A1n , v\xED d\u1EE5 v\u1EC1 th\u01B0 vi\u1EC7n ho\u1EB7c m\u1ED9t s\u1ED1 nghi\xEAn c\u1EE9u NLP m\u1EDBi th\xFA v\u1ECB m\xE0 b\u1EA1n mu\u1ED1n th\u1EA3o lu\u1EADn."),Dn=u(),S=i("p"),Ye=a("V\xE0 \u0111\u01B0\u01A1ng nhi\xEAn, ch\xFAng ta c\u0169ng n\xEAn \u0111\u1EC1 c\u1EADp \u0111\u1EBFn danh m\u1EE5c "),et=i("a"),Xe=a("Course"),Ze=a(", n\u01A1i b\u1EA1n c\xF3 th\u1EC3 \u0111\u1EB7t b\u1EA5t k\u1EF3 c\xE2u h\u1ECFi n\xE0o li\xEAn quan \u0111\u1EBFn kh\xF3a h\u1ECDc Hugging Face!"),In=u(),V=i("p"),th=a("Khi b\u1EA1n \u0111\xE3 ch\u1ECDn m\u1ED9t danh m\u1EE5c, b\u1EA1n s\u1EBD s\u1EB5n s\xE0ng vi\u1EBFt ch\u1EE7 \u0111\u1EC1 \u0111\u1EA7u ti\xEAn c\u1EE7a m\xECnh. B\u1EA1n c\xF3 th\u1EC3 t\xECm th\u1EA5y m\u1ED9t s\u1ED1 "),ht=i("a"),nh=a("h\u01B0\u1EDBng d\u1EABn"),eh=a(" trong di\u1EC5n \u0111\xE0n v\u1EC1 c\xE1ch th\u1EF1c hi\u1EC7n vi\u1EC7c n\xE0y v\xE0 trong ph\u1EA7n n\xE0y ch\xFAng ta s\u1EBD xem x\xE9t m\u1ED9t s\u1ED1 t\xEDnh n\u0103ng t\u1EA1o n\xEAn m\u1ED9t ch\u1EE7 \u0111\u1EC1 hay."),On=u(),x=i("h2"),D=i("a"),tn=i("span"),p(it.$$.fragment),hh=u(),nn=i("span"),ih=a("Vi\u1EBFt m\u1ED9t b\xE0i \u0111\u0103ng t\u1ED1t tr\xEAn di\u1EC5n \u0111\xE0n"),Hn=u(),Mt=i("p"),ch=a("Nh\u01B0 m\u1ED9t v\xED d\u1EE5, gi\u1EA3 s\u1EED r\u1EB1ng ch\xFAng ta \u0111ang c\u1ED1 g\u1EAFng t\u1EA1o c\xE1c bi\u1EC3u di\u1EC5n t\u1EEB c\xE1c b\xE0i vi\u1EBFt tr\xEAn Wikipedia \u0111\u1EC3 t\u1EA1o m\u1ED9t c\xF4ng c\u1EE5 t\xECm ki\u1EBFm t\xF9y ch\u1EC9nh. Nh\u01B0 th\u01B0\u1EDDng l\u1EC7, ch\xFAng ta t\u1EA3i tokenizer v\xE0 m\xF4 h\xECnh nh\u01B0 sau:"),Bn=u(),p(ct.$$.fragment),Ln=u(),I=i("p"),rh=a("Gi\u1EDD gi\u1EA3 s\u1EED ta \u0111ang c\u1ED1 nh\xFAng to\xE0n b\u1ED9 ph\u1EA7n n\xE0y c\u1EE7a "),rt=i("a"),oh=a("Wikipedia"),ah=a(" l\xEAn Transformers:"),Gn=u(),p(ot.$$.fragment),Fn=u(),p(at.$$.fragment),jn=u(),O=i("p"),sh=a("R\u1EA5t ti\u1EBFc, ch\xFAng ta \u0111\xE3 g\u1EB7p s\u1EF1 c\u1ED1 - v\xE0 th\xF4ng b\xE1o l\u1ED7i kh\xF3 hi\u1EC3u h\u01A1n nhi\u1EC1u so v\u1EDBi nh\u1EEFng th\xF4ng b\xE1o ch\xFAng ta th\u1EA5y trong "),Pt=i("a"),lh=a("ph\u1EA7n 2"),uh=a("! Ch\xFAng ta kh\xF4ng th\u1EC3 th\u1EF1c hi\u1EC7n \u0111\u01B0\u1EE3c to\xE0n b\u1ED9 qu\xE1 tr\xECnh truy v\u1EBFt, v\xEC v\u1EADy ch\xFAng ta quy\u1EBFt \u0111\u1ECBnh chuy\u1EC3n sang di\u1EC5n \u0111\xE0n Hugging Face \u0111\u1EC3 \u0111\u01B0\u1EE3c tr\u1EE3 gi\xFAp. L\xE0m th\u1EBF n\xE0o ch\xFAng ta c\xF3 th\u1EC3 t\u1EA1o ra ch\u1EE7 \u0111\u1EC1?"),zn=u(),Ct=i("p"),gh=a("\u0110\u1EC3 b\u1EAFt \u0111\u1EA7u, ch\xFAng ta c\u1EA7n nh\u1EA5p v\xE0o n\xFAt \u201CNew Topic\u201D hay \u201CCh\u1EE7 \u0111\u1EC1 m\u1EDBi\u201D \u1EDF g\xF3c tr\xEAn b\xEAn ph\u1EA3i (l\u01B0u \xFD r\u1EB1ng \u0111\u1EC3 t\u1EA1o ch\u1EE7 \u0111\u1EC1, ch\xFAng ta c\u1EA7n \u0111\u0103ng nh\u1EADp):"),Kn=u(),st=i("div"),lt=i("img"),Jn=u(),At=i("p"),mh=a("Thao t\xE1c n\xE0y s\u1EBD hi\u1EC3n th\u1ECB m\u1ED9t giao di\u1EC7n vi\u1EBFt, n\u01A1i ch\xFAng ta c\xF3 th\u1EC3 nh\u1EADp ti\xEAu \u0111\u1EC1 c\u1EE7a ch\u1EE7 \u0111\u1EC1 c\u1EE7a m\xECnh, ch\u1ECDn m\u1ED9t danh m\u1EE5c v\xE0 so\u1EA1n th\u1EA3o n\u1ED9i dung:"),Un=u(),ut=i("div"),gt=i("img"),Rn=u(),Nt=i("p"),ph=a("V\xEC l\u1ED7i d\u01B0\u1EDDng nh\u01B0 ch\u1EC9 x\u1EA3y ra v\u1EDBi \u{1F917} Transformers, n\xEAn ch\xFAng ta s\u1EBD ch\u1ECDn l\u1ED7i n\xE0y cho danh m\u1EE5c. N\u1ED7 l\u1EF1c \u0111\u1EA7u ti\xEAn c\u1EE7a ch\xFAng ta trong vi\u1EC7c gi\u1EA3i th\xEDch v\u1EA5n \u0111\u1EC1 c\xF3 th\u1EC3 tr\xF4ng gi\u1ED1ng nh\u01B0 sau:"),Wn=u(),mt=i("div"),pt=i("img"),Qn=u(),qt=i("p"),fh=a("M\u1EB7c d\xF9 ch\u1EE7 \u0111\u1EC1 n\xE0y ch\u1EE9a th\xF4ng b\xE1o l\u1ED7i m\xE0 ch\xFAng t\xF4i c\u1EA7n tr\u1EE3 gi\xFAp, nh\u01B0ng c\xF3 m\u1ED9t s\u1ED1 v\u1EA5n \u0111\u1EC1 v\u1EDBi c\xE1ch vi\u1EBFt:"),Yn=u(),_=i("ol"),en=i("li"),vh=a("Ti\xEAu \u0111\u1EC1 kh\xF4ng mang t\xEDnh m\xF4 t\u1EA3 cao, v\xEC v\u1EADy b\u1EA5t k\u1EF3 ai duy\u1EC7t di\u1EC5n \u0111\xE0n s\u1EBD kh\xF4ng th\u1EC3 bi\u1EBFt ch\u1EE7 \u0111\u1EC1 l\xE0 g\xEC n\u1EBFu kh\xF4ng \u0111\u1ECDc ph\u1EA7n n\u1ED9i dung."),dh=u(),M=i("li"),yh=a("Ph\u1EA7n th\xE2n kh\xF4ng cung c\u1EA5p \u0111\u1EE7 th\xF4ng tin v\u1EC1 "),hn=i("em"),bh=a("n\u01A1i"),kh=a(" b\u1EAFt ngu\u1ED3n l\u1ED7i v\xE0 "),cn=i("em"),wh=a("c\xE1ch"),_h=a(" \u0111\u1EC3 t\u1EA1o l\u1EA1i l\u1ED7i \u0111\xF3."),Eh=u(),rn=i("li"),Th=a("Ch\u1EE7 \u0111\u1EC1 g\u1EAFn th\u1EBB tr\u1EF1c ti\u1EBFp m\u1ED9t v\xE0i ng\u01B0\u1EDDi v\u1EDBi gi\u1ECDng \u0111i\u1EC7u h\u01A1i kh\u1EAFt khe."),Xn=u(),St=i("p"),$h=a("C\xE1c ch\u1EE7 \u0111\u1EC1 nh\u01B0 th\u1EBF n\xE0y kh\xF4ng c\xF3 kh\u1EA3 n\u0103ng nh\u1EADn \u0111\u01B0\u1EE3c c\xE2u tr\u1EA3 l\u1EDDi nhanh (n\u1EBFu h\u1ECD nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t c\xE2u tr\u1EA3 l\u1EDDi n\xE0o \u0111\xF3), v\xEC v\u1EADy h\xE3y xem c\xE1ch ch\xFAng ta c\xF3 th\u1EC3 c\u1EA3i thi\u1EC7n n\xF3. Ch\xFAng ta s\u1EBD b\u1EAFt \u0111\u1EA7u v\u1EDBi v\u1EA5n \u0111\u1EC1 \u0111\u1EA7u ti\xEAn l\xE0 ch\u1ECDn m\u1ED9t ti\xEAu \u0111\u1EC1 hay."),Zn=u(),P=i("h3"),H=i("a"),on=i("span"),p(ft.$$.fragment),xh=u(),an=i("span"),Mh=a("Choosing a descriptive title"),te=u(),B=i("p"),Ph=a("N\u1EBFu b\u1EA1n \u0111ang c\u1ED1 g\u1EAFng nh\u1EADn tr\u1EE3 gi\xFAp v\u1EC1 m\u1ED9t l\u1ED7i trong m\xE3 c\u1EE7a m\xECnh, m\u1ED9t nguy\xEAn t\u1EAFc chung l\xE0 \u0111\u01B0a \u0111\u1EE7 th\xF4ng tin v\xE0o ti\xEAu \u0111\u1EC1 \u0111\u1EC3 ng\u01B0\u1EDDi kh\xE1c c\xF3 th\u1EC3 nhanh ch\xF3ng x\xE1c \u0111\u1ECBnh xem h\u1ECD c\xF3 ngh\u0129 r\u1EB1ng h\u1ECD c\xF3 th\u1EC3 tr\u1EA3 l\u1EDDi c\xE2u h\u1ECFi c\u1EE7a b\u1EA1n hay kh\xF4ng. Trong v\xED d\u1EE5 \u0111ang ch\u1EA1y c\u1EE7a m\xECnh, ch\xFAng ta bi\u1EBFt t\xEAn c\u1EE7a ngo\u1EA1i l\u1EC7 \u0111ang \u0111\u01B0\u1EE3c n\xEAu ra v\xE0 c\xF3 m\u1ED9t s\u1ED1 g\u1EE3i \xFD r\u1EB1ng n\xF3 \u0111\u01B0\u1EE3c k\xEDch ho\u1EA1t trong ph\u1EA7n truy\u1EC1n th\u1EB3ng c\u1EE7a m\xF4 h\xECnh, n\u01A1i ch\xFAng t\xF4i g\u1ECDi l\xE0 "),sn=i("code"),Ch=a("model(**inputs)"),Ah=a(". \u0110\u1EC3 th\xF4ng b\xE1o \u0111i\u1EC1u n\xE0y, m\u1ED9t ti\xEAu \u0111\u1EC1 c\xF3 th\u1EC3 c\xF3 l\xE0:"),ne=u(),Vt=i("blockquote"),ln=i("p"),Nh=a("Source of IndexError in the AutoModel forward pass?"),ee=u(),Dt=i("p"),qh=a("hay"),he=u(),It=i("blockquote"),un=i("p"),Sh=a("Ngu\u1ED3n c\u1EE7a IndexError trong th\u1EBB chuy\u1EC3n ti\u1EBFp AutoModel?"),ie=u(),E=i("p"),Vh=a("Ti\xEAu \u0111\u1EC1 n\xE0y cho ng\u01B0\u1EDDi \u0111\u1ECDc bi\u1EBFt b\u1EA1n ngh\u0129 r\u1EB1ng l\u1ED7i \u0111\u1EBFn t\u1EEB "),gn=i("em"),Dh=a("\u0111\xE2u"),Ih=a(" v\xE0 n\u1EBFu h\u1ECD \u0111\xE3 g\u1EB7p ph\u1EA3i "),mn=i("code"),Oh=a("IndexError"),Hh=a(" tr\u01B0\u1EDBc \u0111\xF3, th\xEC r\u1EA5t c\xF3 th\u1EC3 h\u1ECD s\u1EBD bi\u1EBFt c\xE1ch g\u1EE1 l\u1ED7i n\xF3. T\u1EA5t nhi\xEAn, ti\xEAu \u0111\u1EC1 c\xF3 th\u1EC3 l\xE0 b\u1EA5t k\u1EF3 th\u1EE9 g\xEC b\u1EA1n mu\u1ED1n v\xE0 c\xE1c bi\u1EBFn th\u1EC3 kh\xE1c nh\u01B0:"),ce=u(),Ot=i("blockquote"),pn=i("p"),Bh=a("Why does my model produce an IndexError?"),re=u(),Ht=i("p"),Lh=a("hay"),oe=u(),Bt=i("blockquote"),fn=i("p"),Gh=a("T\u1EA1i sao m\xF4 h\xECnh c\u1EE7a t\xF4i t\u1EA1o ra m\u1ED9t IndexError?"),ae=u(),Lt=i("p"),Fh=a("c\u0169ng c\xF3 th\u1EC3 \u1ED5n. B\xE2y gi\u1EDD ch\xFAng ta \u0111\xE3 c\xF3 m\u1ED9t ti\xEAu \u0111\u1EC1 m\xF4 t\u1EA3, h\xE3y xem c\xE1ch c\u1EA3i thi\u1EC7n n\u1ED9i d\u1EE5ng ph\u1EA7n th\xE2n b\xE0i."),se=u(),C=i("h3"),L=i("a"),vn=i("span"),p(vt.$$.fragment),jh=u(),dn=i("span"),zh=a("\u0110\u1ECBnh d\u1EA1ng c\xE1c \u0111o\u1EA1n m\xE3 c\u1EE7a b\u1EA1n"),le=u(),Gt=i("p"),Kh=a("\u0110\u1ECDc m\xE3 ngu\u1ED3n \u0111\xE3 \u0111\u1EE7 kh\xF3 trong IDE, nh\u01B0ng c\xF2n kh\xF3 h\u01A1n khi m\xE3 \u0111\u01B0\u1EE3c sao ch\xE9p v\xE0 d\xE1n d\u01B0\u1EDBi d\u1EA1ng v\u0103n b\u1EA3n thu\u1EA7n t\xFAy! May m\u1EAFn thay, c\xE1c di\u1EC5n \u0111\xE0n v\u1EC1 Hugging Face h\u1ED7 tr\u1EE3 vi\u1EC7c s\u1EED d\u1EE5ng Markdown, v\xEC v\u1EADy b\u1EA1n n\xEAn lu\xF4n \u0111\u1EB7t c\xE1c kh\u1ED1i m\xE3 c\u1EE7a m\xECnh b\u1EB1ng ba d\u1EA5u g\u1EA1ch ng\u01B0\u1EE3c (```) \u0111\u1EC3 d\u1EC5 \u0111\u1ECDc h\u01A1n. H\xE3y l\xE0m \u0111i\u1EC1u n\xE0y \u0111\u1EC3 s\u1EEDa ch\u1EEFa th\xF4ng b\xE1o l\u1ED7i - v\xE0 trong khi ch\xFAng ta x\u1EED l\xFD n\xF3, h\xE3y l\xE0m cho ph\u1EA7n n\u1ED9i dung l\u1ECBch s\u1EF1 h\u01A1n m\u1ED9t ch\xFAt so v\u1EDBi phi\xEAn b\u1EA3n g\u1ED1c c\u1EE7a m\xECnh:"),ue=u(),dt=i("div"),yt=i("img"),ge=u(),G=i("p"),Jh=a("Nh\u01B0 b\u1EA1n c\xF3 th\u1EC3 th\u1EA5y trong \u1EA3nh ch\u1EE5p m\xE0n h\xECnh, vi\u1EC7c bao b\u1ECDc c\xE1c kh\u1ED1i m\xE3 trong d\u1EA5u g\u1EA1ch ng\u01B0\u1EE3c s\u1EBD chuy\u1EC3n v\u0103n b\u1EA3n th\xF4 th\xE0nh m\xE3 \u0111\u01B0\u1EE3c \u0111\u1ECBnh d\u1EA1ng, ho\xE0n ch\u1EC9nh v\u1EDBi ki\u1EC3u m\xE0u! C\u0169ng l\u01B0u \xFD r\u1EB1ng c\xE1c d\u1EA5u g\u1EA1ch ng\u01B0\u1EE3c \u0111\u01A1n l\u1EBB c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng \u0111\u1EC3 \u0111\u1ECBnh d\u1EA1ng c\xE1c bi\u1EBFn n\u1ED9i tuy\u1EBFn, gi\u1ED1ng nh\u01B0 ch\xFAng t\xF4i \u0111\xE3 l\xE0m cho "),yn=i("code"),Uh=a("distilbert-base-unsased"),Rh=a(". Ch\u1EE7 \u0111\u1EC1 n\xE0y c\xF3 v\u1EBB t\u1ED1t h\u01A1n nhi\u1EC1u v\xE0 v\u1EDBi m\u1ED9t ch\xFAt may m\u1EAFn, ch\xFAng ta c\xF3 th\u1EC3 t\xECm th\u1EA5y ai \u0111\xF3 trong c\u1ED9ng \u0111\u1ED3ng c\xF3 th\u1EC3 \u0111o\xE1n \u0111\u01B0\u1EE3c l\u1ED7i l\xE0 g\xEC. Tuy nhi\xEAn, thay v\xEC d\u1EF1a v\xE0o may m\u1EAFn, ch\xFAng ta h\xE3y l\xE0m cho cu\u1ED9c s\u1ED1ng d\u1EC5 d\xE0ng h\u01A1n b\u1EB1ng c\xE1ch \u0111\u01B0a v\xE0o chi ti\u1EBFt \u0111\u1EA7y \u0111\u1EE7 c\xE1c truy v\u1EBFt c\u1EE7a n\xF3!"),me=u(),A=i("h3"),F=i("a"),bn=i("span"),p(bt.$$.fragment),Wh=u(),kn=i("span"),Qh=a("Bao g\u1ED3m to\xE0n b\u1ED9 truy v\u1EBFt"),pe=u(),m=i("p"),Yh=a("V\xEC d\xF2ng cu\u1ED1i c\xF9ng c\u1EE7a b\u1EA3n truy v\u1EBFt th\u01B0\u1EDDng \u0111\u1EE7 \u0111\u1EC3 g\u1EE1 l\u1ED7i \u0111o\u1EA1n m\xE3 c\u1EE7a ri\xEAng b\u1EA1n, n\xEAn b\u1EA1n c\xF3 th\u1EC3 ch\u1EC9 cung c\u1EA5p d\xF2ng \u0111\xF3 trong ch\u1EE7 \u0111\u1EC1 c\u1EE7a m\xECnh \u0111\u1EC3 \u201Cti\u1EBFt ki\u1EC7m dung l\u01B0\u1EE3ng\u201D. M\u1EB7c d\xF9 c\xF3 ch\u1EE7 \xFD t\u1ED1t, \u0111i\u1EC1u n\xE0y th\u1EF1c s\u1EF1 khi\u1EBFn ng\u01B0\u1EDDi kh\xE1c c\xF3 th\u1EC3 "),wn=i("em"),Xh=a("kh\xF3"),Zh=a(" g\u1EE1 l\u1ED7i v\u1EA5n \u0111\u1EC1 "),_n=i("em"),ti=a("h\u01A1n"),ni=a(" v\xEC th\xF4ng tin cao h\u01A1n trong b\u1EA3n truy xu\u1EA5t c\xF3 th\u1EC3 th\u1EF1c s\u1EF1 h\u1EEFu \xEDch. V\xEC v\u1EADy, m\u1ED9t ph\u01B0\u01A1ng ph\xE1p hay l\xE0 sao ch\xE9p v\xE0 d\xE1n "),En=i("em"),ei=a("to\xE0n b\u1ED9"),hi=a(" d\u1EA5u v\u1EBFt, \u0111\u1ED3ng th\u1EDDi \u0111\u1EA3m b\u1EA3o r\u1EB1ng n\xF3 \u0111\u01B0\u1EE3c \u0111\u1ECBnh d\u1EA1ng \u0111\u1ED9c \u0111\xE1o. V\xEC nh\u1EEFng l\u1EA7n truy xu\u1EA5t n\xE0y c\xF3 th\u1EC3 m\u1EA5t nhi\u1EC1u th\u1EDDi gian, m\u1ED9t s\u1ED1 ng\u01B0\u1EDDi th\xEDch hi\u1EC3n th\u1ECB ch\xFAng sau khi h\u1ECD \u0111\xE3 gi\u1EA3i th\xEDch m\xE3 ngu\u1ED3n. L\xE0m th\xF4i n\xE0o. B\xE2y gi\u1EDD, ch\u1EE7 \u0111\u1EC1 di\u1EC5n \u0111\xE0n c\u1EE7a ch\xFAng ta tr\xF4ng gi\u1ED1ng nh\u01B0 sau:"),fe=u(),kt=i("div"),wt=i("img"),ve=u(),Ft=i("p"),ii=a("\u0110i\u1EC1u n\xE0y c\xF3 nhi\u1EC1u th\xF4ng tin h\u01A1n v\xE0 m\u1ED9t ng\u01B0\u1EDDi \u0111\u1ECDc c\u1EA9n th\u1EADn c\xF3 th\u1EC3 ch\u1EC9 ra r\u1EB1ng v\u1EA5n \u0111\u1EC1 d\u01B0\u1EDDng nh\u01B0 l\xE0 do chuy\u1EC3n m\u1ED9t \u0111\u1EA7u v\xE0o d\xE0i v\xEC d\xF2ng n\xE0y trong b\u1EA3n truy xu\u1EA5t:"),de=u(),jt=i("blockquote"),Tn=i("p"),ci=a("Token indices sequence length is longer than the specified maximum sequence length for this model (583 > 512)."),ye=u(),zt=i("p"),ri=a("Tuy nhi\xEAn, ch\xFAng ta c\xF3 th\u1EC3 khi\u1EBFn m\u1ECDi th\u1EE9 tr\u1EDF n\xEAn d\u1EC5 d\xE0ng h\u01A1n v\u1EDBi h\u1ECD b\u1EB1ng c\xE1ch cung c\u1EA5p m\xE3 th\u1EF1c \u0111\xE3 g\xE2y ra l\u1ED7i. H\xE3y l\xE0m \u0111i\u1EC1u \u0111\xF3 ngay b\xE2y gi\u1EDD."),be=u(),N=i("h3"),j=i("a"),$n=i("span"),p(_t.$$.fragment),oi=u(),xn=i("span"),ai=a("Cung c\u1EA5p m\u1ED9t v\xED d\u1EE5 c\xF3 th\u1EC3 t\xE1i t\u1EA1o"),ke=u(),z=i("p"),si=a("N\u1EBFu b\u1EA1n \u0111\xE3 t\u1EEBng c\u1ED1 g\u1EAFng g\u1EE1 l\u1ED7i \u0111o\u1EA1n m\xE3 c\u1EE7a ng\u01B0\u1EDDi kh\xE1c, tr\u01B0\u1EDBc ti\xEAn c\xF3 th\u1EC3 b\u1EA1n \u0111\xE3 c\u1ED1 g\u1EAFng t\u1EA1o l\u1EA1i s\u1EF1 c\u1ED1 m\xE0 h\u1ECD \u0111\xE3 b\xE1o c\xE1o \u0111\u1EC3 b\u1EA1n c\xF3 th\u1EC3 b\u1EAFt \u0111\u1EA7u l\xE0m vi\u1EC7c theo c\xE1ch c\u1EE7a m\xECnh th\xF4ng qua truy xu\u1EA5t \u0111\u1EC3 x\xE1c \u0111\u1ECBnh l\u1ED7i. N\xF3 kh\xF4ng kh\xE1c g\xEC khi n\xF3i \u0111\u1EBFn (ho\u1EB7c cung c\u1EA5p) h\u1ED7 tr\u1EE3 tr\xEAn c\xE1c di\u1EC5n \u0111\xE0n, v\xEC v\u1EADy s\u1EBD th\u1EF1c s\u1EF1 h\u1EEFu \xEDch n\u1EBFu b\u1EA1n c\xF3 th\u1EC3 cung c\u1EA5p m\u1ED9t v\xED d\u1EE5 nh\u1ECF m\xF4 t\u1EA3 l\u1EA1i l\u1ED7i. M\u1ED9t n\u1EEDa th\u1EDDi gian, ch\u1EC9 c\u1EA7n \u0111i qua b\xE0i t\u1EADp n\xE0y s\u1EBD gi\xFAp b\u1EA1n nh\u1EADn ra \u0111i\u1EC1u g\xEC \u0111ang x\u1EA3y ra. Trong m\u1ECDi tr\u01B0\u1EDDng h\u1EE3p, ph\u1EA7n c\xF2n thi\u1EBFu trong v\xED d\u1EE5 c\u1EE7a ch\xFAng ta l\xE0 hi\u1EC3n th\u1ECB "),Mn=i("em"),li=a("c\xE1c \u0111\u1EA7u v\xE0o"),ui=a(" m\xE0 ta \u0111\xE3 cung c\u1EA5p cho m\xF4 h\xECnh. L\xE0m \u0111i\u1EC1u \u0111\xF3 cho ch\xFAng ta m\u1ED9t c\xE1i g\xEC \u0111\xF3 gi\u1ED1ng nh\u01B0 v\xED d\u1EE5 \u0111\xE3 ho\xE0n th\xE0nh sau:"),we=u(),Et=i("div"),Tt=i("img"),_e=u(),Kt=i("p"),gi=a("Ch\u1EE7 \u0111\u1EC1 n\xE0y hi\u1EC7n ch\u1EE9a kh\xE1 nhi\u1EC1u th\xF4ng tin v\xE0 n\xF3 \u0111\u01B0\u1EE3c vi\u1EBFt theo c\xE1ch c\xF3 nhi\u1EC1u kh\u1EA3 n\u0103ng thu h\xFAt s\u1EF1 ch\xFA \xFD c\u1EE7a c\u1ED9ng \u0111\u1ED3ng v\xE0 nh\u1EADn \u0111\u01B0\u1EE3c c\xE2u tr\u1EA3 l\u1EDDi h\u1EEFu \xEDch. V\u1EDBi nh\u1EEFng h\u01B0\u1EDBng d\u1EABn c\u01A1 b\u1EA3n n\xE0y, gi\u1EDD \u0111\xE2y b\u1EA1n c\xF3 th\u1EC3 t\u1EA1o c\xE1c ch\u1EE7 \u0111\u1EC1 tuy\u1EC7t v\u1EDDi \u0111\u1EC3 t\xECm c\xE2u tr\u1EA3 l\u1EDDi cho c\xE1c c\xE2u h\u1ECFi v\u1EC1 \u{1F917} Transformers c\u1EE7a m\xECnh!"),this.h()},l(t){const h=Gc('[data-svelte="svelte-1phssyn"]',document.head);T=c(h,"META",{name:!0,content:!0}),h.forEach(n),Pn=g(t),$=c(t,"H1",{class:!0});var Te=o($);q=c(Te,"A",{id:!0,class:!0,href:!0});var Ei=o(q);Xt=c(Ei,"SPAN",{});var Ti=o(Xt);f(J.$$.fragment,Ti),Ti.forEach(n),Ei.forEach(n),Oe=g(Te),Zt=c(Te,"SPAN",{});var $i=o(Zt);He=s($i,"Y\xEAu c\u1EA7u tr\u1EE3 gi\xFAp tr\xEAn di\u1EC5n \u0111\xE0n"),$i.forEach(n),Te.forEach(n),Cn=g(t),f(U.$$.fragment,t),An=g(t),f(R.$$.fragment,t),Nn=g(t),W=c(t,"P",{});var mi=o(W);Q=c(mi,"A",{href:!0,rel:!0});var xi=o(Q);Be=s(xi,"Di\u1EC5n \u0111\xE0n Hugging Face"),xi.forEach(n),Le=s(mi," l\xE0 n\u01A1i tuy\u1EC7t v\u1EDDi \u0111\u1EC3 nh\u1EADn \u0111\u01B0\u1EE3c s\u1EF1 gi\xFAp \u0111\u1EE1 t\u1EEB c\xE1c nh\xF3m ngu\u1ED3n m\u1EDF v\xE0 c\u1ED9ng \u0111\u1ED3ng Hugging Face. Trang ch\u1EE7 lu\xF4n tr\xF4ng nh\u01B0 sau:"),mi.forEach(n),qn=g(t),Y=c(t,"DIV",{class:!0});var Mi=o(Y);X=c(Mi,"IMG",{src:!0,alt:!0,width:!0}),Mi.forEach(n),Sn=g(t),k=c(t,"P",{});var Jt=o(k);Ge=s(Jt,"\u1EDE b\xEAn tay tr\xE1i, b\u1EA1n c\xF3 th\u1EC3 th\u1EA5y t\u1EA5t c\u1EA3 c\xE1c danh m\u1EE5c m\xE0 c\xE1c ch\u1EE7 \u0111\u1EC1 kh\xE1c nhau \u0111\u01B0\u1EE3c nh\xF3m l\u1EA1i, trong khi b\xEAn tay ph\u1EA3i hi\u1EC3n th\u1ECB c\xE1c ch\u1EE7 \u0111\u1EC1 g\u1EA7n \u0111\xE2y nh\u1EA5t. Ch\u1EE7 \u0111\u1EC1 l\xE0 m\u1ED9t b\xE0i \u0111\u0103ng c\xF3 ch\u1EE9a ti\xEAu \u0111\u1EC1, danh m\u1EE5c v\xE0 m\xF4 t\u1EA3; n\xF3 kh\xE1 gi\u1ED1ng v\u1EDBi \u0111\u1ECBnh d\u1EA1ng v\u1EA5n \u0111\u1EC1 GitHub m\xE0 ch\xFAng ta \u0111\xE3 th\u1EA5y khi t\u1EA1o t\u1EADp d\u1EEF li\u1EC7u c\u1EE7a ri\xEAng m\xECnh trong "),xt=c(Jt,"A",{href:!0});var Pi=o(xt);Fe=s(Pi,"Ch\u01B0\u01A1ng 5"),Pi.forEach(n),je=s(Jt,". Nh\u01B0 t\xEAn cho th\u1EA5y, danh m\u1EE5c "),Z=c(Jt,"A",{href:!0,rel:!0});var Ci=o(Z);ze=s(Ci,"Beginners"),Ci.forEach(n),Ke=s(Jt," ch\u1EE7 y\u1EBFu d\xE0nh cho nh\u1EEFng ng\u01B0\u1EDDi m\u1EDBi b\u1EAFt \u0111\u1EA7u v\u1EDBi h\u1EC7 sinh th\xE1i v\xE0 th\u01B0 vi\u1EC7n Hugging Face. M\u1ECDi c\xE2u h\u1ECFi tr\xEAn b\u1EA5t k\u1EF3 th\u01B0 vi\u1EC7n n\xE0o \u0111\u1EC1u \u0111\u01B0\u1EE3c hoan ngh\xEAnh \u1EDF \u0111\xF3, c\xF3 th\u1EC3 l\xE0 \u0111\u1EC3 g\u1EE1 l\u1ED7i m\u1ED9t s\u1ED1 m\xE3 ho\u1EB7c \u0111\u1EC3 y\xEAu c\u1EA7u tr\u1EE3 gi\xFAp v\u1EC1 c\xE1ch th\u1EF1c hi\u1EC7n \u0111i\u1EC1u g\xEC \u0111\xF3. (\u0110i\u1EC1u \u0111\xF3 n\xF3i r\u1EB1ng, n\u1EBFu c\xE2u h\u1ECFi c\u1EE7a b\u1EA1n li\xEAn quan \u0111\u1EBFn m\u1ED9t th\u01B0 vi\u1EC7n c\u1EE5 th\u1EC3, b\u1EA1n c\xF3 th\u1EC3 n\xEAn chuy\u1EC3n \u0111\u1EBFn danh m\u1EE5c th\u01B0 vi\u1EC7n t\u01B0\u01A1ng \u1EE9ng tr\xEAn di\u1EC5n \u0111\xE0n.)"),Jt.forEach(n),Vn=g(t),w=c(t,"P",{});var Ut=o(w);Je=s(Ut,"T\u01B0\u01A1ng t\u1EF1, danh m\u1EE5c "),tt=c(Ut,"A",{href:!0,rel:!0});var Ai=o(tt);Ue=s(Ai,"Intermediate"),Ai.forEach(n),Re=s(Ut,"v\xE0 "),nt=c(Ut,"A",{href:!0,rel:!0});var Ni=o(nt);We=s(Ni,"Research"),Ni.forEach(n),Qe=s(Ut," d\xE0nh cho c\xE1c c\xE2u h\u1ECFi n\xE2ng cao h\u01A1n , v\xED d\u1EE5 v\u1EC1 th\u01B0 vi\u1EC7n ho\u1EB7c m\u1ED9t s\u1ED1 nghi\xEAn c\u1EE9u NLP m\u1EDBi th\xFA v\u1ECB m\xE0 b\u1EA1n mu\u1ED1n th\u1EA3o lu\u1EADn."),Ut.forEach(n),Dn=g(t),S=c(t,"P",{});var $e=o(S);Ye=s($e,"V\xE0 \u0111\u01B0\u01A1ng nhi\xEAn, ch\xFAng ta c\u0169ng n\xEAn \u0111\u1EC1 c\u1EADp \u0111\u1EBFn danh m\u1EE5c "),et=c($e,"A",{href:!0,rel:!0});var qi=o(et);Xe=s(qi,"Course"),qi.forEach(n),Ze=s($e,", n\u01A1i b\u1EA1n c\xF3 th\u1EC3 \u0111\u1EB7t b\u1EA5t k\u1EF3 c\xE2u h\u1ECFi n\xE0o li\xEAn quan \u0111\u1EBFn kh\xF3a h\u1ECDc Hugging Face!"),$e.forEach(n),In=g(t),V=c(t,"P",{});var xe=o(V);th=s(xe,"Khi b\u1EA1n \u0111\xE3 ch\u1ECDn m\u1ED9t danh m\u1EE5c, b\u1EA1n s\u1EBD s\u1EB5n s\xE0ng vi\u1EBFt ch\u1EE7 \u0111\u1EC1 \u0111\u1EA7u ti\xEAn c\u1EE7a m\xECnh. B\u1EA1n c\xF3 th\u1EC3 t\xECm th\u1EA5y m\u1ED9t s\u1ED1 "),ht=c(xe,"A",{href:!0,rel:!0});var Si=o(ht);nh=s(Si,"h\u01B0\u1EDBng d\u1EABn"),Si.forEach(n),eh=s(xe," trong di\u1EC5n \u0111\xE0n v\u1EC1 c\xE1ch th\u1EF1c hi\u1EC7n vi\u1EC7c n\xE0y v\xE0 trong ph\u1EA7n n\xE0y ch\xFAng ta s\u1EBD xem x\xE9t m\u1ED9t s\u1ED1 t\xEDnh n\u0103ng t\u1EA1o n\xEAn m\u1ED9t ch\u1EE7 \u0111\u1EC1 hay."),xe.forEach(n),On=g(t),x=c(t,"H2",{class:!0});var Me=o(x);D=c(Me,"A",{id:!0,class:!0,href:!0});var Vi=o(D);tn=c(Vi,"SPAN",{});var Di=o(tn);f(it.$$.fragment,Di),Di.forEach(n),Vi.forEach(n),hh=g(Me),nn=c(Me,"SPAN",{});var Ii=o(nn);ih=s(Ii,"Vi\u1EBFt m\u1ED9t b\xE0i \u0111\u0103ng t\u1ED1t tr\xEAn di\u1EC5n \u0111\xE0n"),Ii.forEach(n),Me.forEach(n),Hn=g(t),Mt=c(t,"P",{});var Oi=o(Mt);ch=s(Oi,"Nh\u01B0 m\u1ED9t v\xED d\u1EE5, gi\u1EA3 s\u1EED r\u1EB1ng ch\xFAng ta \u0111ang c\u1ED1 g\u1EAFng t\u1EA1o c\xE1c bi\u1EC3u di\u1EC5n t\u1EEB c\xE1c b\xE0i vi\u1EBFt tr\xEAn Wikipedia \u0111\u1EC3 t\u1EA1o m\u1ED9t c\xF4ng c\u1EE5 t\xECm ki\u1EBFm t\xF9y ch\u1EC9nh. Nh\u01B0 th\u01B0\u1EDDng l\u1EC7, ch\xFAng ta t\u1EA3i tokenizer v\xE0 m\xF4 h\xECnh nh\u01B0 sau:"),Oi.forEach(n),Bn=g(t),f(ct.$$.fragment,t),Ln=g(t),I=c(t,"P",{});var Pe=o(I);rh=s(Pe,"Gi\u1EDD gi\u1EA3 s\u1EED ta \u0111ang c\u1ED1 nh\xFAng to\xE0n b\u1ED9 ph\u1EA7n n\xE0y c\u1EE7a "),rt=c(Pe,"A",{href:!0,rel:!0});var Hi=o(rt);oh=s(Hi,"Wikipedia"),Hi.forEach(n),ah=s(Pe," l\xEAn Transformers:"),Pe.forEach(n),Gn=g(t),f(ot.$$.fragment,t),Fn=g(t),f(at.$$.fragment,t),jn=g(t),O=c(t,"P",{});var Ce=o(O);sh=s(Ce,"R\u1EA5t ti\u1EBFc, ch\xFAng ta \u0111\xE3 g\u1EB7p s\u1EF1 c\u1ED1 - v\xE0 th\xF4ng b\xE1o l\u1ED7i kh\xF3 hi\u1EC3u h\u01A1n nhi\u1EC1u so v\u1EDBi nh\u1EEFng th\xF4ng b\xE1o ch\xFAng ta th\u1EA5y trong "),Pt=c(Ce,"A",{href:!0});var Bi=o(Pt);lh=s(Bi,"ph\u1EA7n 2"),Bi.forEach(n),uh=s(Ce,"! Ch\xFAng ta kh\xF4ng th\u1EC3 th\u1EF1c hi\u1EC7n \u0111\u01B0\u1EE3c to\xE0n b\u1ED9 qu\xE1 tr\xECnh truy v\u1EBFt, v\xEC v\u1EADy ch\xFAng ta quy\u1EBFt \u0111\u1ECBnh chuy\u1EC3n sang di\u1EC5n \u0111\xE0n Hugging Face \u0111\u1EC3 \u0111\u01B0\u1EE3c tr\u1EE3 gi\xFAp. L\xE0m th\u1EBF n\xE0o ch\xFAng ta c\xF3 th\u1EC3 t\u1EA1o ra ch\u1EE7 \u0111\u1EC1?"),Ce.forEach(n),zn=g(t),Ct=c(t,"P",{});var Li=o(Ct);gh=s(Li,"\u0110\u1EC3 b\u1EAFt \u0111\u1EA7u, ch\xFAng ta c\u1EA7n nh\u1EA5p v\xE0o n\xFAt \u201CNew Topic\u201D hay \u201CCh\u1EE7 \u0111\u1EC1 m\u1EDBi\u201D \u1EDF g\xF3c tr\xEAn b\xEAn ph\u1EA3i (l\u01B0u \xFD r\u1EB1ng \u0111\u1EC3 t\u1EA1o ch\u1EE7 \u0111\u1EC1, ch\xFAng ta c\u1EA7n \u0111\u0103ng nh\u1EADp):"),Li.forEach(n),Kn=g(t),st=c(t,"DIV",{class:!0});var Gi=o(st);lt=c(Gi,"IMG",{src:!0,alt:!0,width:!0}),Gi.forEach(n),Jn=g(t),At=c(t,"P",{});var Fi=o(At);mh=s(Fi,"Thao t\xE1c n\xE0y s\u1EBD hi\u1EC3n th\u1ECB m\u1ED9t giao di\u1EC7n vi\u1EBFt, n\u01A1i ch\xFAng ta c\xF3 th\u1EC3 nh\u1EADp ti\xEAu \u0111\u1EC1 c\u1EE7a ch\u1EE7 \u0111\u1EC1 c\u1EE7a m\xECnh, ch\u1ECDn m\u1ED9t danh m\u1EE5c v\xE0 so\u1EA1n th\u1EA3o n\u1ED9i dung:"),Fi.forEach(n),Un=g(t),ut=c(t,"DIV",{class:!0});var ji=o(ut);gt=c(ji,"IMG",{src:!0,alt:!0,width:!0}),ji.forEach(n),Rn=g(t),Nt=c(t,"P",{});var zi=o(Nt);ph=s(zi,"V\xEC l\u1ED7i d\u01B0\u1EDDng nh\u01B0 ch\u1EC9 x\u1EA3y ra v\u1EDBi \u{1F917} Transformers, n\xEAn ch\xFAng ta s\u1EBD ch\u1ECDn l\u1ED7i n\xE0y cho danh m\u1EE5c. N\u1ED7 l\u1EF1c \u0111\u1EA7u ti\xEAn c\u1EE7a ch\xFAng ta trong vi\u1EC7c gi\u1EA3i th\xEDch v\u1EA5n \u0111\u1EC1 c\xF3 th\u1EC3 tr\xF4ng gi\u1ED1ng nh\u01B0 sau:"),zi.forEach(n),Wn=g(t),mt=c(t,"DIV",{class:!0});var Ki=o(mt);pt=c(Ki,"IMG",{src:!0,alt:!0,width:!0}),Ki.forEach(n),Qn=g(t),qt=c(t,"P",{});var Ji=o(qt);fh=s(Ji,"M\u1EB7c d\xF9 ch\u1EE7 \u0111\u1EC1 n\xE0y ch\u1EE9a th\xF4ng b\xE1o l\u1ED7i m\xE0 ch\xFAng t\xF4i c\u1EA7n tr\u1EE3 gi\xFAp, nh\u01B0ng c\xF3 m\u1ED9t s\u1ED1 v\u1EA5n \u0111\u1EC1 v\u1EDBi c\xE1ch vi\u1EBFt:"),Ji.forEach(n),Yn=g(t),_=c(t,"OL",{});var Rt=o(_);en=c(Rt,"LI",{});var Ui=o(en);vh=s(Ui,"Ti\xEAu \u0111\u1EC1 kh\xF4ng mang t\xEDnh m\xF4 t\u1EA3 cao, v\xEC v\u1EADy b\u1EA5t k\u1EF3 ai duy\u1EC7t di\u1EC5n \u0111\xE0n s\u1EBD kh\xF4ng th\u1EC3 bi\u1EBFt ch\u1EE7 \u0111\u1EC1 l\xE0 g\xEC n\u1EBFu kh\xF4ng \u0111\u1ECDc ph\u1EA7n n\u1ED9i dung."),Ui.forEach(n),dh=g(Rt),M=c(Rt,"LI",{});var Wt=o(M);yh=s(Wt,"Ph\u1EA7n th\xE2n kh\xF4ng cung c\u1EA5p \u0111\u1EE7 th\xF4ng tin v\u1EC1 "),hn=c(Wt,"EM",{});var Ri=o(hn);bh=s(Ri,"n\u01A1i"),Ri.forEach(n),kh=s(Wt," b\u1EAFt ngu\u1ED3n l\u1ED7i v\xE0 "),cn=c(Wt,"EM",{});var Wi=o(cn);wh=s(Wi,"c\xE1ch"),Wi.forEach(n),_h=s(Wt," \u0111\u1EC3 t\u1EA1o l\u1EA1i l\u1ED7i \u0111\xF3."),Wt.forEach(n),Eh=g(Rt),rn=c(Rt,"LI",{});var Qi=o(rn);Th=s(Qi,"Ch\u1EE7 \u0111\u1EC1 g\u1EAFn th\u1EBB tr\u1EF1c ti\u1EBFp m\u1ED9t v\xE0i ng\u01B0\u1EDDi v\u1EDBi gi\u1ECDng \u0111i\u1EC7u h\u01A1i kh\u1EAFt khe."),Qi.forEach(n),Rt.forEach(n),Xn=g(t),St=c(t,"P",{});var Yi=o(St);$h=s(Yi,"C\xE1c ch\u1EE7 \u0111\u1EC1 nh\u01B0 th\u1EBF n\xE0y kh\xF4ng c\xF3 kh\u1EA3 n\u0103ng nh\u1EADn \u0111\u01B0\u1EE3c c\xE2u tr\u1EA3 l\u1EDDi nhanh (n\u1EBFu h\u1ECD nh\u1EADn \u0111\u01B0\u1EE3c m\u1ED9t c\xE2u tr\u1EA3 l\u1EDDi n\xE0o \u0111\xF3), v\xEC v\u1EADy h\xE3y xem c\xE1ch ch\xFAng ta c\xF3 th\u1EC3 c\u1EA3i thi\u1EC7n n\xF3. Ch\xFAng ta s\u1EBD b\u1EAFt \u0111\u1EA7u v\u1EDBi v\u1EA5n \u0111\u1EC1 \u0111\u1EA7u ti\xEAn l\xE0 ch\u1ECDn m\u1ED9t ti\xEAu \u0111\u1EC1 hay."),Yi.forEach(n),Zn=g(t),P=c(t,"H3",{class:!0});var Ae=o(P);H=c(Ae,"A",{id:!0,class:!0,href:!0});var Xi=o(H);on=c(Xi,"SPAN",{});var Zi=o(on);f(ft.$$.fragment,Zi),Zi.forEach(n),Xi.forEach(n),xh=g(Ae),an=c(Ae,"SPAN",{});var tc=o(an);Mh=s(tc,"Choosing a descriptive title"),tc.forEach(n),Ae.forEach(n),te=g(t),B=c(t,"P",{});var Ne=o(B);Ph=s(Ne,"N\u1EBFu b\u1EA1n \u0111ang c\u1ED1 g\u1EAFng nh\u1EADn tr\u1EE3 gi\xFAp v\u1EC1 m\u1ED9t l\u1ED7i trong m\xE3 c\u1EE7a m\xECnh, m\u1ED9t nguy\xEAn t\u1EAFc chung l\xE0 \u0111\u01B0a \u0111\u1EE7 th\xF4ng tin v\xE0o ti\xEAu \u0111\u1EC1 \u0111\u1EC3 ng\u01B0\u1EDDi kh\xE1c c\xF3 th\u1EC3 nhanh ch\xF3ng x\xE1c \u0111\u1ECBnh xem h\u1ECD c\xF3 ngh\u0129 r\u1EB1ng h\u1ECD c\xF3 th\u1EC3 tr\u1EA3 l\u1EDDi c\xE2u h\u1ECFi c\u1EE7a b\u1EA1n hay kh\xF4ng. Trong v\xED d\u1EE5 \u0111ang ch\u1EA1y c\u1EE7a m\xECnh, ch\xFAng ta bi\u1EBFt t\xEAn c\u1EE7a ngo\u1EA1i l\u1EC7 \u0111ang \u0111\u01B0\u1EE3c n\xEAu ra v\xE0 c\xF3 m\u1ED9t s\u1ED1 g\u1EE3i \xFD r\u1EB1ng n\xF3 \u0111\u01B0\u1EE3c k\xEDch ho\u1EA1t trong ph\u1EA7n truy\u1EC1n th\u1EB3ng c\u1EE7a m\xF4 h\xECnh, n\u01A1i ch\xFAng t\xF4i g\u1ECDi l\xE0 "),sn=c(Ne,"CODE",{});var nc=o(sn);Ch=s(nc,"model(**inputs)"),nc.forEach(n),Ah=s(Ne,". \u0110\u1EC3 th\xF4ng b\xE1o \u0111i\u1EC1u n\xE0y, m\u1ED9t ti\xEAu \u0111\u1EC1 c\xF3 th\u1EC3 c\xF3 l\xE0:"),Ne.forEach(n),ne=g(t),Vt=c(t,"BLOCKQUOTE",{});var ec=o(Vt);ln=c(ec,"P",{});var hc=o(ln);Nh=s(hc,"Source of IndexError in the AutoModel forward pass?"),hc.forEach(n),ec.forEach(n),ee=g(t),Dt=c(t,"P",{});var ic=o(Dt);qh=s(ic,"hay"),ic.forEach(n),he=g(t),It=c(t,"BLOCKQUOTE",{});var cc=o(It);un=c(cc,"P",{});var rc=o(un);Sh=s(rc,"Ngu\u1ED3n c\u1EE7a IndexError trong th\u1EBB chuy\u1EC3n ti\u1EBFp AutoModel?"),rc.forEach(n),cc.forEach(n),ie=g(t),E=c(t,"P",{});var Qt=o(E);Vh=s(Qt,"Ti\xEAu \u0111\u1EC1 n\xE0y cho ng\u01B0\u1EDDi \u0111\u1ECDc bi\u1EBFt b\u1EA1n ngh\u0129 r\u1EB1ng l\u1ED7i \u0111\u1EBFn t\u1EEB "),gn=c(Qt,"EM",{});var oc=o(gn);Dh=s(oc,"\u0111\xE2u"),oc.forEach(n),Ih=s(Qt," v\xE0 n\u1EBFu h\u1ECD \u0111\xE3 g\u1EB7p ph\u1EA3i "),mn=c(Qt,"CODE",{});var ac=o(mn);Oh=s(ac,"IndexError"),ac.forEach(n),Hh=s(Qt," tr\u01B0\u1EDBc \u0111\xF3, th\xEC r\u1EA5t c\xF3 th\u1EC3 h\u1ECD s\u1EBD bi\u1EBFt c\xE1ch g\u1EE1 l\u1ED7i n\xF3. T\u1EA5t nhi\xEAn, ti\xEAu \u0111\u1EC1 c\xF3 th\u1EC3 l\xE0 b\u1EA5t k\u1EF3 th\u1EE9 g\xEC b\u1EA1n mu\u1ED1n v\xE0 c\xE1c bi\u1EBFn th\u1EC3 kh\xE1c nh\u01B0:"),Qt.forEach(n),ce=g(t),Ot=c(t,"BLOCKQUOTE",{});var sc=o(Ot);pn=c(sc,"P",{});var lc=o(pn);Bh=s(lc,"Why does my model produce an IndexError?"),lc.forEach(n),sc.forEach(n),re=g(t),Ht=c(t,"P",{});var uc=o(Ht);Lh=s(uc,"hay"),uc.forEach(n),oe=g(t),Bt=c(t,"BLOCKQUOTE",{});var gc=o(Bt);fn=c(gc,"P",{});var mc=o(fn);Gh=s(mc,"T\u1EA1i sao m\xF4 h\xECnh c\u1EE7a t\xF4i t\u1EA1o ra m\u1ED9t IndexError?"),mc.forEach(n),gc.forEach(n),ae=g(t),Lt=c(t,"P",{});var pc=o(Lt);Fh=s(pc,"c\u0169ng c\xF3 th\u1EC3 \u1ED5n. B\xE2y gi\u1EDD ch\xFAng ta \u0111\xE3 c\xF3 m\u1ED9t ti\xEAu \u0111\u1EC1 m\xF4 t\u1EA3, h\xE3y xem c\xE1ch c\u1EA3i thi\u1EC7n n\u1ED9i d\u1EE5ng ph\u1EA7n th\xE2n b\xE0i."),pc.forEach(n),se=g(t),C=c(t,"H3",{class:!0});var qe=o(C);L=c(qe,"A",{id:!0,class:!0,href:!0});var fc=o(L);vn=c(fc,"SPAN",{});var vc=o(vn);f(vt.$$.fragment,vc),vc.forEach(n),fc.forEach(n),jh=g(qe),dn=c(qe,"SPAN",{});var dc=o(dn);zh=s(dc,"\u0110\u1ECBnh d\u1EA1ng c\xE1c \u0111o\u1EA1n m\xE3 c\u1EE7a b\u1EA1n"),dc.forEach(n),qe.forEach(n),le=g(t),Gt=c(t,"P",{});var yc=o(Gt);Kh=s(yc,"\u0110\u1ECDc m\xE3 ngu\u1ED3n \u0111\xE3 \u0111\u1EE7 kh\xF3 trong IDE, nh\u01B0ng c\xF2n kh\xF3 h\u01A1n khi m\xE3 \u0111\u01B0\u1EE3c sao ch\xE9p v\xE0 d\xE1n d\u01B0\u1EDBi d\u1EA1ng v\u0103n b\u1EA3n thu\u1EA7n t\xFAy! May m\u1EAFn thay, c\xE1c di\u1EC5n \u0111\xE0n v\u1EC1 Hugging Face h\u1ED7 tr\u1EE3 vi\u1EC7c s\u1EED d\u1EE5ng Markdown, v\xEC v\u1EADy b\u1EA1n n\xEAn lu\xF4n \u0111\u1EB7t c\xE1c kh\u1ED1i m\xE3 c\u1EE7a m\xECnh b\u1EB1ng ba d\u1EA5u g\u1EA1ch ng\u01B0\u1EE3c (```) \u0111\u1EC3 d\u1EC5 \u0111\u1ECDc h\u01A1n. H\xE3y l\xE0m \u0111i\u1EC1u n\xE0y \u0111\u1EC3 s\u1EEDa ch\u1EEFa th\xF4ng b\xE1o l\u1ED7i - v\xE0 trong khi ch\xFAng ta x\u1EED l\xFD n\xF3, h\xE3y l\xE0m cho ph\u1EA7n n\u1ED9i dung l\u1ECBch s\u1EF1 h\u01A1n m\u1ED9t ch\xFAt so v\u1EDBi phi\xEAn b\u1EA3n g\u1ED1c c\u1EE7a m\xECnh:"),yc.forEach(n),ue=g(t),dt=c(t,"DIV",{class:!0});var bc=o(dt);yt=c(bc,"IMG",{src:!0,alt:!0,width:!0}),bc.forEach(n),ge=g(t),G=c(t,"P",{});var Se=o(G);Jh=s(Se,"Nh\u01B0 b\u1EA1n c\xF3 th\u1EC3 th\u1EA5y trong \u1EA3nh ch\u1EE5p m\xE0n h\xECnh, vi\u1EC7c bao b\u1ECDc c\xE1c kh\u1ED1i m\xE3 trong d\u1EA5u g\u1EA1ch ng\u01B0\u1EE3c s\u1EBD chuy\u1EC3n v\u0103n b\u1EA3n th\xF4 th\xE0nh m\xE3 \u0111\u01B0\u1EE3c \u0111\u1ECBnh d\u1EA1ng, ho\xE0n ch\u1EC9nh v\u1EDBi ki\u1EC3u m\xE0u! C\u0169ng l\u01B0u \xFD r\u1EB1ng c\xE1c d\u1EA5u g\u1EA1ch ng\u01B0\u1EE3c \u0111\u01A1n l\u1EBB c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng \u0111\u1EC3 \u0111\u1ECBnh d\u1EA1ng c\xE1c bi\u1EBFn n\u1ED9i tuy\u1EBFn, gi\u1ED1ng nh\u01B0 ch\xFAng t\xF4i \u0111\xE3 l\xE0m cho "),yn=c(Se,"CODE",{});var kc=o(yn);Uh=s(kc,"distilbert-base-unsased"),kc.forEach(n),Rh=s(Se,". Ch\u1EE7 \u0111\u1EC1 n\xE0y c\xF3 v\u1EBB t\u1ED1t h\u01A1n nhi\u1EC1u v\xE0 v\u1EDBi m\u1ED9t ch\xFAt may m\u1EAFn, ch\xFAng ta c\xF3 th\u1EC3 t\xECm th\u1EA5y ai \u0111\xF3 trong c\u1ED9ng \u0111\u1ED3ng c\xF3 th\u1EC3 \u0111o\xE1n \u0111\u01B0\u1EE3c l\u1ED7i l\xE0 g\xEC. Tuy nhi\xEAn, thay v\xEC d\u1EF1a v\xE0o may m\u1EAFn, ch\xFAng ta h\xE3y l\xE0m cho cu\u1ED9c s\u1ED1ng d\u1EC5 d\xE0ng h\u01A1n b\u1EB1ng c\xE1ch \u0111\u01B0a v\xE0o chi ti\u1EBFt \u0111\u1EA7y \u0111\u1EE7 c\xE1c truy v\u1EBFt c\u1EE7a n\xF3!"),Se.forEach(n),me=g(t),A=c(t,"H3",{class:!0});var Ve=o(A);F=c(Ve,"A",{id:!0,class:!0,href:!0});var wc=o(F);bn=c(wc,"SPAN",{});var _c=o(bn);f(bt.$$.fragment,_c),_c.forEach(n),wc.forEach(n),Wh=g(Ve),kn=c(Ve,"SPAN",{});var Ec=o(kn);Qh=s(Ec,"Bao g\u1ED3m to\xE0n b\u1ED9 truy v\u1EBFt"),Ec.forEach(n),Ve.forEach(n),pe=g(t),m=c(t,"P",{});var K=o(m);Yh=s(K,"V\xEC d\xF2ng cu\u1ED1i c\xF9ng c\u1EE7a b\u1EA3n truy v\u1EBFt th\u01B0\u1EDDng \u0111\u1EE7 \u0111\u1EC3 g\u1EE1 l\u1ED7i \u0111o\u1EA1n m\xE3 c\u1EE7a ri\xEAng b\u1EA1n, n\xEAn b\u1EA1n c\xF3 th\u1EC3 ch\u1EC9 cung c\u1EA5p d\xF2ng \u0111\xF3 trong ch\u1EE7 \u0111\u1EC1 c\u1EE7a m\xECnh \u0111\u1EC3 \u201Cti\u1EBFt ki\u1EC7m dung l\u01B0\u1EE3ng\u201D. M\u1EB7c d\xF9 c\xF3 ch\u1EE7 \xFD t\u1ED1t, \u0111i\u1EC1u n\xE0y th\u1EF1c s\u1EF1 khi\u1EBFn ng\u01B0\u1EDDi kh\xE1c c\xF3 th\u1EC3 "),wn=c(K,"EM",{});var Tc=o(wn);Xh=s(Tc,"kh\xF3"),Tc.forEach(n),Zh=s(K," g\u1EE1 l\u1ED7i v\u1EA5n \u0111\u1EC1 "),_n=c(K,"EM",{});var $c=o(_n);ti=s($c,"h\u01A1n"),$c.forEach(n),ni=s(K," v\xEC th\xF4ng tin cao h\u01A1n trong b\u1EA3n truy xu\u1EA5t c\xF3 th\u1EC3 th\u1EF1c s\u1EF1 h\u1EEFu \xEDch. V\xEC v\u1EADy, m\u1ED9t ph\u01B0\u01A1ng ph\xE1p hay l\xE0 sao ch\xE9p v\xE0 d\xE1n "),En=c(K,"EM",{});var xc=o(En);ei=s(xc,"to\xE0n b\u1ED9"),xc.forEach(n),hi=s(K," d\u1EA5u v\u1EBFt, \u0111\u1ED3ng th\u1EDDi \u0111\u1EA3m b\u1EA3o r\u1EB1ng n\xF3 \u0111\u01B0\u1EE3c \u0111\u1ECBnh d\u1EA1ng \u0111\u1ED9c \u0111\xE1o. V\xEC nh\u1EEFng l\u1EA7n truy xu\u1EA5t n\xE0y c\xF3 th\u1EC3 m\u1EA5t nhi\u1EC1u th\u1EDDi gian, m\u1ED9t s\u1ED1 ng\u01B0\u1EDDi th\xEDch hi\u1EC3n th\u1ECB ch\xFAng sau khi h\u1ECD \u0111\xE3 gi\u1EA3i th\xEDch m\xE3 ngu\u1ED3n. L\xE0m th\xF4i n\xE0o. B\xE2y gi\u1EDD, ch\u1EE7 \u0111\u1EC1 di\u1EC5n \u0111\xE0n c\u1EE7a ch\xFAng ta tr\xF4ng gi\u1ED1ng nh\u01B0 sau:"),K.forEach(n),fe=g(t),kt=c(t,"DIV",{class:!0});var Mc=o(kt);wt=c(Mc,"IMG",{src:!0,alt:!0,width:!0}),Mc.forEach(n),ve=g(t),Ft=c(t,"P",{});var Pc=o(Ft);ii=s(Pc,"\u0110i\u1EC1u n\xE0y c\xF3 nhi\u1EC1u th\xF4ng tin h\u01A1n v\xE0 m\u1ED9t ng\u01B0\u1EDDi \u0111\u1ECDc c\u1EA9n th\u1EADn c\xF3 th\u1EC3 ch\u1EC9 ra r\u1EB1ng v\u1EA5n \u0111\u1EC1 d\u01B0\u1EDDng nh\u01B0 l\xE0 do chuy\u1EC3n m\u1ED9t \u0111\u1EA7u v\xE0o d\xE0i v\xEC d\xF2ng n\xE0y trong b\u1EA3n truy xu\u1EA5t:"),Pc.forEach(n),de=g(t),jt=c(t,"BLOCKQUOTE",{});var Cc=o(jt);Tn=c(Cc,"P",{});var Ac=o(Tn);ci=s(Ac,"Token indices sequence length is longer than the specified maximum sequence length for this model (583 > 512)."),Ac.forEach(n),Cc.forEach(n),ye=g(t),zt=c(t,"P",{});var Nc=o(zt);ri=s(Nc,"Tuy nhi\xEAn, ch\xFAng ta c\xF3 th\u1EC3 khi\u1EBFn m\u1ECDi th\u1EE9 tr\u1EDF n\xEAn d\u1EC5 d\xE0ng h\u01A1n v\u1EDBi h\u1ECD b\u1EB1ng c\xE1ch cung c\u1EA5p m\xE3 th\u1EF1c \u0111\xE3 g\xE2y ra l\u1ED7i. H\xE3y l\xE0m \u0111i\u1EC1u \u0111\xF3 ngay b\xE2y gi\u1EDD."),Nc.forEach(n),be=g(t),N=c(t,"H3",{class:!0});var De=o(N);j=c(De,"A",{id:!0,class:!0,href:!0});var qc=o(j);$n=c(qc,"SPAN",{});var Sc=o($n);f(_t.$$.fragment,Sc),Sc.forEach(n),qc.forEach(n),oi=g(De),xn=c(De,"SPAN",{});var Vc=o(xn);ai=s(Vc,"Cung c\u1EA5p m\u1ED9t v\xED d\u1EE5 c\xF3 th\u1EC3 t\xE1i t\u1EA1o"),Vc.forEach(n),De.forEach(n),ke=g(t),z=c(t,"P",{});var Ie=o(z);si=s(Ie,"N\u1EBFu b\u1EA1n \u0111\xE3 t\u1EEBng c\u1ED1 g\u1EAFng g\u1EE1 l\u1ED7i \u0111o\u1EA1n m\xE3 c\u1EE7a ng\u01B0\u1EDDi kh\xE1c, tr\u01B0\u1EDBc ti\xEAn c\xF3 th\u1EC3 b\u1EA1n \u0111\xE3 c\u1ED1 g\u1EAFng t\u1EA1o l\u1EA1i s\u1EF1 c\u1ED1 m\xE0 h\u1ECD \u0111\xE3 b\xE1o c\xE1o \u0111\u1EC3 b\u1EA1n c\xF3 th\u1EC3 b\u1EAFt \u0111\u1EA7u l\xE0m vi\u1EC7c theo c\xE1ch c\u1EE7a m\xECnh th\xF4ng qua truy xu\u1EA5t \u0111\u1EC3 x\xE1c \u0111\u1ECBnh l\u1ED7i. N\xF3 kh\xF4ng kh\xE1c g\xEC khi n\xF3i \u0111\u1EBFn (ho\u1EB7c cung c\u1EA5p) h\u1ED7 tr\u1EE3 tr\xEAn c\xE1c di\u1EC5n \u0111\xE0n, v\xEC v\u1EADy s\u1EBD th\u1EF1c s\u1EF1 h\u1EEFu \xEDch n\u1EBFu b\u1EA1n c\xF3 th\u1EC3 cung c\u1EA5p m\u1ED9t v\xED d\u1EE5 nh\u1ECF m\xF4 t\u1EA3 l\u1EA1i l\u1ED7i. M\u1ED9t n\u1EEDa th\u1EDDi gian, ch\u1EC9 c\u1EA7n \u0111i qua b\xE0i t\u1EADp n\xE0y s\u1EBD gi\xFAp b\u1EA1n nh\u1EADn ra \u0111i\u1EC1u g\xEC \u0111ang x\u1EA3y ra. Trong m\u1ECDi tr\u01B0\u1EDDng h\u1EE3p, ph\u1EA7n c\xF2n thi\u1EBFu trong v\xED d\u1EE5 c\u1EE7a ch\xFAng ta l\xE0 hi\u1EC3n th\u1ECB "),Mn=c(Ie,"EM",{});var Dc=o(Mn);li=s(Dc,"c\xE1c \u0111\u1EA7u v\xE0o"),Dc.forEach(n),ui=s(Ie," m\xE0 ta \u0111\xE3 cung c\u1EA5p cho m\xF4 h\xECnh. L\xE0m \u0111i\u1EC1u \u0111\xF3 cho ch\xFAng ta m\u1ED9t c\xE1i g\xEC \u0111\xF3 gi\u1ED1ng nh\u01B0 v\xED d\u1EE5 \u0111\xE3 ho\xE0n th\xE0nh sau:"),Ie.forEach(n),we=g(t),Et=c(t,"DIV",{class:!0});var Ic=o(Et);Tt=c(Ic,"IMG",{src:!0,alt:!0,width:!0}),Ic.forEach(n),_e=g(t),Kt=c(t,"P",{});var Oc=o(Kt);gi=s(Oc,"Ch\u1EE7 \u0111\u1EC1 n\xE0y hi\u1EC7n ch\u1EE9a kh\xE1 nhi\u1EC1u th\xF4ng tin v\xE0 n\xF3 \u0111\u01B0\u1EE3c vi\u1EBFt theo c\xE1ch c\xF3 nhi\u1EC1u kh\u1EA3 n\u0103ng thu h\xFAt s\u1EF1 ch\xFA \xFD c\u1EE7a c\u1ED9ng \u0111\u1ED3ng v\xE0 nh\u1EADn \u0111\u01B0\u1EE3c c\xE2u tr\u1EA3 l\u1EDDi h\u1EEFu \xEDch. V\u1EDBi nh\u1EEFng h\u01B0\u1EDBng d\u1EABn c\u01A1 b\u1EA3n n\xE0y, gi\u1EDD \u0111\xE2y b\u1EA1n c\xF3 th\u1EC3 t\u1EA1o c\xE1c ch\u1EE7 \u0111\u1EC1 tuy\u1EC7t v\u1EDDi \u0111\u1EC3 t\xECm c\xE2u tr\u1EA3 l\u1EDDi cho c\xE1c c\xE2u h\u1ECFi v\u1EC1 \u{1F917} Transformers c\u1EE7a m\xECnh!"),Oc.forEach(n),this.h()},h(){l(T,"name","hf:doc:metadata"),l(T,"content",JSON.stringify(Uc)),l(q,"id","yu-cu-tr-gip-trn-din-n"),l(q,"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"),l(q,"href","#yu-cu-tr-gip-trn-din-n"),l($,"class","relative group"),l(Q,"href","https://discuss.huggingface.co"),l(Q,"rel","nofollow"),$t(X.src,vi="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forums.png")||l(X,"src",vi),l(X,"alt","The Hugging Face forums."),l(X,"width","100%"),l(Y,"class","flex justify-center"),l(xt,"href","/course/chapter5"),l(Z,"href","https://discuss.huggingface.co/c/beginners/5"),l(Z,"rel","nofollow"),l(tt,"href","https://discuss.huggingface.co/c/intermediate/6"),l(tt,"rel","nofollow"),l(nt,"href","https://discuss.huggingface.co/c/research/7"),l(nt,"rel","nofollow"),l(et,"href","https://discuss.huggingface.co/c/course/20"),l(et,"rel","nofollow"),l(ht,"href","https://discuss.huggingface.co/t/how-to-request-support/3128"),l(ht,"rel","nofollow"),l(D,"id","vit-mt-bi-ng-tt-trn-din-n"),l(D,"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"),l(D,"href","#vit-mt-bi-ng-tt-trn-din-n"),l(x,"class","relative group"),l(rt,"href","https://en.wikipedia.org/wiki/Transformers"),l(rt,"rel","nofollow"),l(Pt,"href","/course/chapter8/section2"),$t(lt.src,di="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forums-new-topic.png")||l(lt,"src",di),l(lt,"alt","Creating a new forum topic."),l(lt,"width","100%"),l(st,"class","flex justify-center"),$t(gt.src,yi="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forum-topic01.png")||l(gt,"src",yi),l(gt,"alt","The interface for creating a forum topic."),l(gt,"width","100%"),l(ut,"class","flex justify-center"),$t(pt.src,bi="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forum-topic02.png")||l(pt,"src",bi),l(pt,"alt","Drafting the content for a new forum topic."),l(pt,"width","100%"),l(mt,"class","flex justify-center"),l(H,"id","choosing-a-descriptive-title"),l(H,"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"),l(H,"href","#choosing-a-descriptive-title"),l(P,"class","relative group"),l(L,"id","nh-dng-cc-on-m-ca-bn"),l(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"),l(L,"href","#nh-dng-cc-on-m-ca-bn"),l(C,"class","relative group"),$t(yt.src,ki="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forum-topic03.png")||l(yt,"src",ki),l(yt,"alt","Our revised forum topic, with proper code formatting."),l(yt,"width","100%"),l(dt,"class","flex justify-center"),l(F,"id","bao-gm-ton-b-truy-vt"),l(F,"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"),l(F,"href","#bao-gm-ton-b-truy-vt"),l(A,"class","relative group"),$t(wt.src,wi="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forum-topic04.png")||l(wt,"src",wi),l(wt,"alt","Our example forum topic, with the complete traceback."),l(wt,"width","100%"),l(kt,"class","flex justify-center"),l(j,"id","cung-cp-mt-v-d-c-th-ti-to"),l(j,"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"),l(j,"href","#cung-cp-mt-v-d-c-th-ti-to"),l(N,"class","relative group"),$t(Tt.src,_i="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter8/forum-topic05.png")||l(Tt,"src",_i),l(Tt,"alt","The final version of our forum topic."),l(Tt,"width","100%"),l(Et,"class","flex justify-center")},m(t,h){e(document.head,T),r(t,Pn,h),r(t,$,h),e($,q),e(q,Xt),v(J,Xt,null),e($,Oe),e($,Zt),e(Zt,He),r(t,Cn,h),v(U,t,h),r(t,An,h),v(R,t,h),r(t,Nn,h),r(t,W,h),e(W,Q),e(Q,Be),e(W,Le),r(t,qn,h),r(t,Y,h),e(Y,X),r(t,Sn,h),r(t,k,h),e(k,Ge),e(k,xt),e(xt,Fe),e(k,je),e(k,Z),e(Z,ze),e(k,Ke),r(t,Vn,h),r(t,w,h),e(w,Je),e(w,tt),e(tt,Ue),e(w,Re),e(w,nt),e(nt,We),e(w,Qe),r(t,Dn,h),r(t,S,h),e(S,Ye),e(S,et),e(et,Xe),e(S,Ze),r(t,In,h),r(t,V,h),e(V,th),e(V,ht),e(ht,nh),e(V,eh),r(t,On,h),r(t,x,h),e(x,D),e(D,tn),v(it,tn,null),e(x,hh),e(x,nn),e(nn,ih),r(t,Hn,h),r(t,Mt,h),e(Mt,ch),r(t,Bn,h),v(ct,t,h),r(t,Ln,h),r(t,I,h),e(I,rh),e(I,rt),e(rt,oh),e(I,ah),r(t,Gn,h),v(ot,t,h),r(t,Fn,h),v(at,t,h),r(t,jn,h),r(t,O,h),e(O,sh),e(O,Pt),e(Pt,lh),e(O,uh),r(t,zn,h),r(t,Ct,h),e(Ct,gh),r(t,Kn,h),r(t,st,h),e(st,lt),r(t,Jn,h),r(t,At,h),e(At,mh),r(t,Un,h),r(t,ut,h),e(ut,gt),r(t,Rn,h),r(t,Nt,h),e(Nt,ph),r(t,Wn,h),r(t,mt,h),e(mt,pt),r(t,Qn,h),r(t,qt,h),e(qt,fh),r(t,Yn,h),r(t,_,h),e(_,en),e(en,vh),e(_,dh),e(_,M),e(M,yh),e(M,hn),e(hn,bh),e(M,kh),e(M,cn),e(cn,wh),e(M,_h),e(_,Eh),e(_,rn),e(rn,Th),r(t,Xn,h),r(t,St,h),e(St,$h),r(t,Zn,h),r(t,P,h),e(P,H),e(H,on),v(ft,on,null),e(P,xh),e(P,an),e(an,Mh),r(t,te,h),r(t,B,h),e(B,Ph),e(B,sn),e(sn,Ch),e(B,Ah),r(t,ne,h),r(t,Vt,h),e(Vt,ln),e(ln,Nh),r(t,ee,h),r(t,Dt,h),e(Dt,qh),r(t,he,h),r(t,It,h),e(It,un),e(un,Sh),r(t,ie,h),r(t,E,h),e(E,Vh),e(E,gn),e(gn,Dh),e(E,Ih),e(E,mn),e(mn,Oh),e(E,Hh),r(t,ce,h),r(t,Ot,h),e(Ot,pn),e(pn,Bh),r(t,re,h),r(t,Ht,h),e(Ht,Lh),r(t,oe,h),r(t,Bt,h),e(Bt,fn),e(fn,Gh),r(t,ae,h),r(t,Lt,h),e(Lt,Fh),r(t,se,h),r(t,C,h),e(C,L),e(L,vn),v(vt,vn,null),e(C,jh),e(C,dn),e(dn,zh),r(t,le,h),r(t,Gt,h),e(Gt,Kh),r(t,ue,h),r(t,dt,h),e(dt,yt),r(t,ge,h),r(t,G,h),e(G,Jh),e(G,yn),e(yn,Uh),e(G,Rh),r(t,me,h),r(t,A,h),e(A,F),e(F,bn),v(bt,bn,null),e(A,Wh),e(A,kn),e(kn,Qh),r(t,pe,h),r(t,m,h),e(m,Yh),e(m,wn),e(wn,Xh),e(m,Zh),e(m,_n),e(_n,ti),e(m,ni),e(m,En),e(En,ei),e(m,hi),r(t,fe,h),r(t,kt,h),e(kt,wt),r(t,ve,h),r(t,Ft,h),e(Ft,ii),r(t,de,h),r(t,jt,h),e(jt,Tn),e(Tn,ci),r(t,ye,h),r(t,zt,h),e(zt,ri),r(t,be,h),r(t,N,h),e(N,j),e(j,$n),v(_t,$n,null),e(N,oi),e(N,xn),e(xn,ai),r(t,ke,h),r(t,z,h),e(z,si),e(z,Mn),e(Mn,li),e(z,ui),r(t,we,h),r(t,Et,h),e(Et,Tt),r(t,_e,h),r(t,Kt,h),e(Kt,gi),Ee=!0},p:Fc,i(t){Ee||(d(J.$$.fragment,t),d(U.$$.fragment,t),d(R.$$.fragment,t),d(it.$$.fragment,t),d(ct.$$.fragment,t),d(ot.$$.fragment,t),d(at.$$.fragment,t),d(ft.$$.fragment,t),d(vt.$$.fragment,t),d(bt.$$.fragment,t),d(_t.$$.fragment,t),Ee=!0)},o(t){y(J.$$.fragment,t),y(U.$$.fragment,t),y(R.$$.fragment,t),y(it.$$.fragment,t),y(ct.$$.fragment,t),y(ot.$$.fragment,t),y(at.$$.fragment,t),y(ft.$$.fragment,t),y(vt.$$.fragment,t),y(bt.$$.fragment,t),y(_t.$$.fragment,t),Ee=!1},d(t){n(T),t&&n(Pn),t&&n($),b(J),t&&n(Cn),b(U,t),t&&n(An),b(R,t),t&&n(Nn),t&&n(W),t&&n(qn),t&&n(Y),t&&n(Sn),t&&n(k),t&&n(Vn),t&&n(w),t&&n(Dn),t&&n(S),t&&n(In),t&&n(V),t&&n(On),t&&n(x),b(it),t&&n(Hn),t&&n(Mt),t&&n(Bn),b(ct,t),t&&n(Ln),t&&n(I),t&&n(Gn),b(ot,t),t&&n(Fn),b(at,t),t&&n(jn),t&&n(O),t&&n(zn),t&&n(Ct),t&&n(Kn),t&&n(st),t&&n(Jn),t&&n(At),t&&n(Un),t&&n(ut),t&&n(Rn),t&&n(Nt),t&&n(Wn),t&&n(mt),t&&n(Qn),t&&n(qt),t&&n(Yn),t&&n(_),t&&n(Xn),t&&n(St),t&&n(Zn),t&&n(P),b(ft),t&&n(te),t&&n(B),t&&n(ne),t&&n(Vt),t&&n(ee),t&&n(Dt),t&&n(he),t&&n(It),t&&n(ie),t&&n(E),t&&n(ce),t&&n(Ot),t&&n(re),t&&n(Ht),t&&n(oe),t&&n(Bt),t&&n(ae),t&&n(Lt),t&&n(se),t&&n(C),b(vt),t&&n(le),t&&n(Gt),t&&n(ue),t&&n(dt),t&&n(ge),t&&n(G),t&&n(me),t&&n(A),b(bt),t&&n(pe),t&&n(m),t&&n(fe),t&&n(kt),t&&n(ve),t&&n(Ft),t&&n(de),t&&n(jt),t&&n(ye),t&&n(zt),t&&n(be),t&&n(N),b(_t),t&&n(ke),t&&n(z),t&&n(we),t&&n(Et),t&&n(_e),t&&n(Kt)}}}const Uc={local:"yu-cu-tr-gip-trn-din-n",sections:[{local:"vit-mt-bi-ng-tt-trn-din-n",sections:[{local:"choosing-a-descriptive-title",title:"Choosing a descriptive title"},{local:"nh-dng-cc-on-m-ca-bn",title:"\u0110\u1ECBnh d\u1EA1ng c\xE1c \u0111o\u1EA1n m\xE3 c\u1EE7a b\u1EA1n"},{local:"bao-gm-ton-b-truy-vt",title:"Bao g\u1ED3m to\xE0n b\u1ED9 truy v\u1EBFt"},{local:"cung-cp-mt-v-d-c-th-ti-to",title:"Cung c\u1EA5p m\u1ED9t v\xED d\u1EE5 c\xF3 th\u1EC3 t\xE1i t\u1EA1o"}],title:"Vi\u1EBFt m\u1ED9t b\xE0i \u0111\u0103ng t\u1ED1t tr\xEAn di\u1EC5n \u0111\xE0n"}],title:"Y\xEAu c\u1EA7u tr\u1EE3 gi\xFAp tr\xEAn di\u1EC5n \u0111\xE0n"};function Rc(fi){return jc(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class tr extends Hc{constructor(T){super();Bc(this,T,Rc,Jc,Lc,{})}}export{tr as default,Uc as metadata};
