import{s as Lt,n as Pt,o as Ot}from"../chunks/scheduler.71ff668b.js";import{S as Kt,i as tl,g as y,s as n,r as M,A as ll,h as T,f as s,c as a,j as Dt,u as i,x as U,k as Ht,y as sl,a as e,v as J,d as p,t as o,w as u}from"../chunks/index.e0973da1.js";import{C as H}from"../chunks/CodeBlock.0c9622a3.js";import{C as el}from"../chunks/CourseFloatingBanner.69eb4e28.js";import{H as r,E as nl}from"../chunks/getInferenceSnippets.25cce923.js";function al(Gt){let m,O,L,K,j,tt,c,lt,h,St="대화 템플릿은 언어 모델과 사용자 간 상호작용을 구조화하는 데 필수적입니다. 이 템플릿은 대화에 일관된 형식을 제공하여, 모델이 각 메시지의 맥락과 역할을 이해하고 적절한 응답 패턴을 유지할 수 있도록 합니다.",st,g,et,f,Zt="기본 모델은 다음 토큰을 예측하기 위해 대량의 원시 텍스트 데이터로 학습되는 반면, 지시 모델은 특정 지시를 따르고 대화를 나눌 수 있도록 미세 조정된 모델입니다. 예를 들어, <code>SmolLM2-135M</code>은 기본 모델이고, <code>SmolLM2-135M-Instruct</code>는 이를 지시 조정한 변형 모델입니다.",nt,I,zt="기본 모델이 지시 모델처럼 동작하도록 만들기 위해서는 모델이 이해할 수 있는 방식으로 프롬프트를 일관되게 만들어야 합니다. 이때 대화 템플릿이 유용합니다. ChatML은 이러한 템플릿 형식 중 하나로 대화를 구조화하고 명확한 역할 지시자(시스템, 사용자, 어시스턴트)를 제공합니다.",at,$,vt="기본 모델은 서로 다른 대화 템플릿으로 미세 조정될 수 있으므로, 지시 모델을 사용할 때는 반드시 해당 모델에 적합한 대화 템플릿을 사용하는 것이 중요합니다.",Mt,w,it,C,Et="대화 템플릿의 핵심은 언어 모델과 소통할 때 대화가 어떤 형식으로 이루어져야 하는지 정의하는 것입니다. 템플릿에는 시스템 수준의 지침, 사용자 메시지, 어시스턴트의 응답이 포함되어 있으며, 모델이 이해할 수 있는 구조화된 형식을 제공합니다. 이러한 구조는 상호작용의 일관성을 유지하고, 모델이 다양한 유형의 입력에 적절히 응답하도록 돕습니다. 아래는 채팅 템플릿의 예시입니다:",Jt,d,pt,q,xt='<code>transformers</code> 라이브러리는 모델의 토크나이저와 관련하여 대화 템플릿을 자동으로 처리해줍니다. 대화 템플릿이 transformers에서 어떻게 구성되는지 자세히 알아보려면 <a href="https://huggingface.co/docs/transformers/en/chat_templating#how-do-i-use-chat-templates" rel="nofollow">여기</a>를 참고하세요. 우리가 메시지를 올바른 형식으로 구조화하기만 하면 나머지는 토크나이저가 처리합니다. 아래는 기본적인 대화 예시입니다:',ot,b,ut,N,Xt="위 예시를 자세히 보면서 대화 템플릿 형식에 어떻게 매핑되는지 살펴봅시다.",yt,V,Tt,Q,At="시스템 메시지는 모델의 기본 동작 방식을 설정합니다. 이는 이후 모든 상호작용에 영향을 미치는 지속적인 지침이 됩니다.",Ut,B,mt,G,rt,S,_t="대화 템플릿은 대화 기록을 통해 맥락을 유지하며, 사용자와 어시스턴트 간의 이전 대화를 저장합니다. 이를 통해 더욱 일관된 멀티 턴 대화가 가능해집니다:",jt,Z,ct,z,ht,v,Rt="transformers 라이브러리는 대화 템플릿을 위한 내장 기능을 지원합니다.사용 방법은 다음과 같습니다:",gt,E,ft,x,It,X,kt="메시지 유형별로 원하는 형식을 설정할 수 있습니다. 예를 들어, 역할에 따라 특수 토큰을 추가하거나 형식을 지정할 수 있습니다:",$t,A,wt,_,Ct,R,Yt="템플릿은 문맥을 유지하면서 복잡한 멀티 턴 대화도 처리할 수 있습니다:",dt,k,qt,Y,Wt='⏭️ <a href="./supervised_fine_tuning.md">다음: Supervised Fine-Tuning</a>',bt,W,Nt,F,Ft='<li><a href="https://huggingface.co/docs/transformers/main/en/chat_templating" rel="nofollow">Hugging Face Chat Templating Guide</a></li> <li><a href="https://huggingface.co/docs/transformers" rel="nofollow">Transformers Documentation</a></li> <li><a href="https://github.com/chujiezheng/chat_templates" rel="nofollow">Chat Templates Examples Repository</a></li>',Vt,D,Qt,P,Bt;return j=new r({props:{title:"대화 템플릿(Chat Templates)",local:"대화-템플릿chat-templates",headingTag:"h1"}}),c=new el({props:{chapter:10,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/smol-course/blob/main/notebooks/ko/1_instruction_tuning/chat_templates_example.ipynb"}]}}),g=new r({props:{title:"기본 모델 vs 지시 모델",local:"기본-모델-vs-지시-모델",headingTag:"h2"}}),w=new r({props:{title:"대화 템플릿 이해하기",local:"대화-템플릿-이해하기",headingTag:"h2"}}),d=new H({props:{code:"JTNDJTdDaW1fc3RhcnQlN0MlM0V1c2VyJTBBJUVDJTk1JTg4JUVCJTg1JTk1JUVEJTk1JTk4JUVDJTg0JUI4JUVDJTlBJTk0ISUzQyU3Q2ltX2VuZCU3QyUzRSUwQSUzQyU3Q2ltX3N0YXJ0JTdDJTNFYXNzaXN0YW50JTBBJUVCJUE3JThDJUVCJTgyJTk4JUVDJTg0JTlDJTIwJUVCJUIwJTk4JUVBJUIwJTkxJUVDJThBJUI1JUVCJThCJTg4JUVCJThCJUE0ISUzQyU3Q2ltX2VuZCU3QyUzRSUwQSUzQyU3Q2ltX3N0YXJ0JTdDJTNFdXNlciUwQSVFQyVBNyU4OCVFQiVBQyVCOCVFQyU5RCU4NCUyMCVFRCU5NSVCNCVFQiU4RiU4NCUyMCVFQiU5MCVBMCVFQSVCOSU4QyVFQyU5QSU5NCUzRiUzQyU3Q2ltX2VuZCU3QyUzRSUwQSUzQyU3Q2ltX3N0YXJ0JTdDJTNFYXNzaXN0YW50",highlighted:`&lt;|im_start|&gt;user
안녕하세요!&lt;|im_end|&gt;
&lt;|im_start|&gt;assistant
만나서 반갑습니다!&lt;|im_end|&gt;
&lt;|im_start|&gt;user
질문을 해도 될까요?&lt;|im_end|&gt;
&lt;|im_start|&gt;assistant`,wrap:!1}}),b=new H({props:{code:"bWVzc2FnZXMlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIyc3lzdGVtJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMllvdSUyMGFyZSUyMGElMjBoZWxwZnVsJTIwYXNzaXN0YW50JTIwZm9jdXNlZCUyMG9uJTIwdGVjaG5pY2FsJTIwdG9waWNzLiUyMiU3RCUyQyUwQSUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMkNhbiUyMHlvdSUyMGV4cGxhaW4lMjB3aGF0JTIwYSUyMGNoYXQlMjB0ZW1wbGF0ZSUyMGlzJTNGJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMmFzc2lzdGFudCUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJBJTIwY2hhdCUyMHRlbXBsYXRlJTIwc3RydWN0dXJlcyUyMGNvbnZlcnNhdGlvbnMlMjBiZXR3ZWVuJTIwdXNlcnMlMjBhbmQlMjBBSSUyMG1vZGVscy4uLiUyMiU3RCUwQSU1RA==",highlighted:`messages = [
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;system&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;You are a helpful assistant focused on technical topics.&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Can you explain what a chat template is?&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;assistant&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;A chat template structures conversations between users and AI models...&quot;</span>}
]`,wrap:!1}}),V=new r({props:{title:"시스템 메시지",local:"시스템-메시지",headingTag:"h2"}}),B=new H({props:{code:"c3lzdGVtX21lc3NhZ2UlMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjAlMjJyb2xlJTIyJTNBJTIwJTIyc3lzdGVtJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMllvdSUyMGFyZSUyMGElMjBwcm9mZXNzaW9uYWwlMjBjdXN0b21lciUyMHNlcnZpY2UlMjBhZ2VudC4lMjBBbHdheXMlMjBiZSUyMHBvbGl0ZSUyQyUyMGNsZWFyJTJDJTIwYW5kJTIwaGVscGZ1bC4lMjIlMEElN0Q=",highlighted:`system_message = {
    <span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;system&quot;</span>,
    <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;You are a professional customer service agent. Always be polite, clear, and helpful.&quot;</span>
}`,wrap:!1}}),G=new r({props:{title:"대화",local:"대화",headingTag:"h2"}}),Z=new H({props:{code:"Y29udmVyc2F0aW9uJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIySSUyMG5lZWQlMjBoZWxwJTIwd2l0aCUyMG15JTIwb3JkZXIlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIyYXNzaXN0YW50JTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMkknZCUyMGJlJTIwaGFwcHklMjB0byUyMGhlbHAuJTIwQ291bGQlMjB5b3UlMjBwcm92aWRlJTIweW91ciUyMG9yZGVyJTIwbnVtYmVyJTNGJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIySXQncyUyME9SREVSLTEyMyUyMiU3RCUyQyUwQSU1RA==",highlighted:`conversation = [
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;I need help with my order&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;assistant&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;I&#x27;d be happy to help. Could you provide your order number?&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;It&#x27;s ORDER-123&quot;</span>},
]`,wrap:!1}}),z=new r({props:{title:"Transformers 기반 구현",local:"transformers-기반-구현",headingTag:"h2"}}),E=new H({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJIdWdnaW5nRmFjZVRCJTJGU21vbExNMi0xMzVNLUluc3RydWN0JTIyKSUwQSUwQW1lc3NhZ2VzJTIwJTNEJTIwJTVCJTBBJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnN5c3RlbSUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJZb3UlMjBhcmUlMjBhJTIwaGVscGZ1bCUyMGNvZGluZyUyMGFzc2lzdGFudC4lMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIydXNlciUyMiUyQyUyMCUyMmNvbnRlbnQlMjIlM0ElMjAlMjJXcml0ZSUyMGElMjBQeXRob24lMjBmdW5jdGlvbiUyMHRvJTIwc29ydCUyMGElMjBsaXN0JTIyJTdEJTJDJTBBJTVEJTBBJTBBJTIzJTIwJUVCJThDJTgwJUVEJTk5JTk0JTIwJUVEJTg1JTlDJUVEJTk0JThDJUVCJUE2JUJGJTIwJUVDJUEwJTgxJUVDJTlBJUE5JTBBZm9ybWF0dGVkX2NoYXQlMjAlM0QlMjB0b2tlbml6ZXIuYXBwbHlfY2hhdF90ZW1wbGF0ZSglMEElMjAlMjAlMjAlMjBtZXNzYWdlcyUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplJTNERmFsc2UlMkMlMEElMjAlMjAlMjAlMjBhZGRfZ2VuZXJhdGlvbl9wcm9tcHQlM0RUcnVlJTBBKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;HuggingFaceTB/SmolLM2-135M-Instruct&quot;</span>)

messages = [
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;system&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;You are a helpful coding assistant.&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Write a Python function to sort a list&quot;</span>},
]

<span class="hljs-comment"># 대화 템플릿 적용</span>
formatted_chat = tokenizer.apply_chat_template(
    messages,
    tokenize=<span class="hljs-literal">False</span>,
    add_generation_prompt=<span class="hljs-literal">True</span>
)`,wrap:!1}}),x=new r({props:{title:"사용자 정의 형식",local:"사용자-정의-형식",headingTag:"h2"}}),A=new H({props:{code:"dGVtcGxhdGUlMjAlM0QlMjAlMjIlMjIlMjIlMEElM0MlN0NzeXN0ZW0lN0MlM0UlN0JzeXN0ZW1fbWVzc2FnZSU3RCUwQSUzQyU3Q3VzZXIlN0MlM0UlN0J1c2VyX21lc3NhZ2UlN0QlMEElM0MlN0Nhc3Npc3RhbnQlN0MlM0UlN0Jhc3Npc3RhbnRfbWVzc2FnZSU3RCUwQSUyMiUyMiUyMi5sc3RyaXAoKQ==",highlighted:`template = <span class="hljs-string">&quot;&quot;&quot;
&lt;|system|&gt;{system_message}
&lt;|user|&gt;{user_message}
&lt;|assistant|&gt;{assistant_message}
&quot;&quot;&quot;</span>.lstrip()`,wrap:!1}}),_=new r({props:{title:"멀티 턴 지원",local:"멀티-턴-지원",headingTag:"h2"}}),k=new H({props:{code:"bWVzc2FnZXMlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIyc3lzdGVtJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMllvdSUyMGFyZSUyMGElMjBtYXRoJTIwdHV0b3IuJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwJTdCJTIycm9sZSUyMiUzQSUyMCUyMnVzZXIlMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwJTIyV2hhdCUyMGlzJTIwY2FsY3VsdXMlM0YlMjIlN0QlMkMlMEElMjAlMjAlMjAlMjAlN0IlMjJyb2xlJTIyJTNBJTIwJTIyYXNzaXN0YW50JTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMkNhbGN1bHVzJTIwaXMlMjBhJTIwYnJhbmNoJTIwb2YlMjBtYXRoZW1hdGljcy4uLiUyMiU3RCUyQyUwQSUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMkNhbiUyMHlvdSUyMGdpdmUlMjBtZSUyMGFuJTIwZXhhbXBsZSUzRiUyMiU3RCUyQyUwQSU1RA==",highlighted:`messages = [
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;system&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;You are a math tutor.&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;What is calculus?&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;assistant&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Calculus is a branch of mathematics...&quot;</span>},
    {<span class="hljs-string">&quot;role&quot;</span>: <span class="hljs-string">&quot;user&quot;</span>, <span class="hljs-string">&quot;content&quot;</span>: <span class="hljs-string">&quot;Can you give me an example?&quot;</span>},
]`,wrap:!1}}),W=new r({props:{title:"참고",local:"참고",headingTag:"h2"}}),D=new nl({props:{source:"https://github.com/huggingface/smol-course/blob/main/units/ko/unit1/2.md"}}),{c(){m=y("meta"),O=n(),L=y("p"),K=n(),M(j.$$.fragment),tt=n(),M(c.$$.fragment),lt=n(),h=y("p"),h.textContent=St,st=n(),M(g.$$.fragment),et=n(),f=y("p"),f.innerHTML=Zt,nt=n(),I=y("p"),I.textContent=zt,at=n(),$=y("p"),$.textContent=vt,Mt=n(),M(w.$$.fragment),it=n(),C=y("p"),C.textContent=Et,Jt=n(),M(d.$$.fragment),pt=n(),q=y("p"),q.innerHTML=xt,ot=n(),M(b.$$.fragment),ut=n(),N=y("p"),N.textContent=Xt,yt=n(),M(V.$$.fragment),Tt=n(),Q=y("p"),Q.textContent=At,Ut=n(),M(B.$$.fragment),mt=n(),M(G.$$.fragment),rt=n(),S=y("p"),S.textContent=_t,jt=n(),M(Z.$$.fragment),ct=n(),M(z.$$.fragment),ht=n(),v=y("p"),v.textContent=Rt,gt=n(),M(E.$$.fragment),ft=n(),M(x.$$.fragment),It=n(),X=y("p"),X.textContent=kt,$t=n(),M(A.$$.fragment),wt=n(),M(_.$$.fragment),Ct=n(),R=y("p"),R.textContent=Yt,dt=n(),M(k.$$.fragment),qt=n(),Y=y("p"),Y.innerHTML=Wt,bt=n(),M(W.$$.fragment),Nt=n(),F=y("ul"),F.innerHTML=Ft,Vt=n(),M(D.$$.fragment),Qt=n(),P=y("p"),this.h()},l(t){const l=ll("svelte-u9bgzb",document.head);m=T(l,"META",{name:!0,content:!0}),l.forEach(s),O=a(t),L=T(t,"P",{}),Dt(L).forEach(s),K=a(t),i(j.$$.fragment,t),tt=a(t),i(c.$$.fragment,t),lt=a(t),h=T(t,"P",{"data-svelte-h":!0}),U(h)!=="svelte-1nb11f0"&&(h.textContent=St),st=a(t),i(g.$$.fragment,t),et=a(t),f=T(t,"P",{"data-svelte-h":!0}),U(f)!=="svelte-1gez13w"&&(f.innerHTML=Zt),nt=a(t),I=T(t,"P",{"data-svelte-h":!0}),U(I)!=="svelte-imzj7x"&&(I.textContent=zt),at=a(t),$=T(t,"P",{"data-svelte-h":!0}),U($)!=="svelte-4m2whd"&&($.textContent=vt),Mt=a(t),i(w.$$.fragment,t),it=a(t),C=T(t,"P",{"data-svelte-h":!0}),U(C)!=="svelte-1h8ildj"&&(C.textContent=Et),Jt=a(t),i(d.$$.fragment,t),pt=a(t),q=T(t,"P",{"data-svelte-h":!0}),U(q)!=="svelte-grtmou"&&(q.innerHTML=xt),ot=a(t),i(b.$$.fragment,t),ut=a(t),N=T(t,"P",{"data-svelte-h":!0}),U(N)!=="svelte-k4uyxc"&&(N.textContent=Xt),yt=a(t),i(V.$$.fragment,t),Tt=a(t),Q=T(t,"P",{"data-svelte-h":!0}),U(Q)!=="svelte-ftcw56"&&(Q.textContent=At),Ut=a(t),i(B.$$.fragment,t),mt=a(t),i(G.$$.fragment,t),rt=a(t),S=T(t,"P",{"data-svelte-h":!0}),U(S)!=="svelte-1nj4j94"&&(S.textContent=_t),jt=a(t),i(Z.$$.fragment,t),ct=a(t),i(z.$$.fragment,t),ht=a(t),v=T(t,"P",{"data-svelte-h":!0}),U(v)!=="svelte-1fho30b"&&(v.textContent=Rt),gt=a(t),i(E.$$.fragment,t),ft=a(t),i(x.$$.fragment,t),It=a(t),X=T(t,"P",{"data-svelte-h":!0}),U(X)!=="svelte-15ndmaz"&&(X.textContent=kt),$t=a(t),i(A.$$.fragment,t),wt=a(t),i(_.$$.fragment,t),Ct=a(t),R=T(t,"P",{"data-svelte-h":!0}),U(R)!=="svelte-1tnxylv"&&(R.textContent=Yt),dt=a(t),i(k.$$.fragment,t),qt=a(t),Y=T(t,"P",{"data-svelte-h":!0}),U(Y)!=="svelte-y9d81k"&&(Y.innerHTML=Wt),bt=a(t),i(W.$$.fragment,t),Nt=a(t),F=T(t,"UL",{"data-svelte-h":!0}),U(F)!=="svelte-1xxwjgh"&&(F.innerHTML=Ft),Vt=a(t),i(D.$$.fragment,t),Qt=a(t),P=T(t,"P",{}),Dt(P).forEach(s),this.h()},h(){Ht(m,"name","hf:doc:metadata"),Ht(m,"content",Ml)},m(t,l){sl(document.head,m),e(t,O,l),e(t,L,l),e(t,K,l),J(j,t,l),e(t,tt,l),J(c,t,l),e(t,lt,l),e(t,h,l),e(t,st,l),J(g,t,l),e(t,et,l),e(t,f,l),e(t,nt,l),e(t,I,l),e(t,at,l),e(t,$,l),e(t,Mt,l),J(w,t,l),e(t,it,l),e(t,C,l),e(t,Jt,l),J(d,t,l),e(t,pt,l),e(t,q,l),e(t,ot,l),J(b,t,l),e(t,ut,l),e(t,N,l),e(t,yt,l),J(V,t,l),e(t,Tt,l),e(t,Q,l),e(t,Ut,l),J(B,t,l),e(t,mt,l),J(G,t,l),e(t,rt,l),e(t,S,l),e(t,jt,l),J(Z,t,l),e(t,ct,l),J(z,t,l),e(t,ht,l),e(t,v,l),e(t,gt,l),J(E,t,l),e(t,ft,l),J(x,t,l),e(t,It,l),e(t,X,l),e(t,$t,l),J(A,t,l),e(t,wt,l),J(_,t,l),e(t,Ct,l),e(t,R,l),e(t,dt,l),J(k,t,l),e(t,qt,l),e(t,Y,l),e(t,bt,l),J(W,t,l),e(t,Nt,l),e(t,F,l),e(t,Vt,l),J(D,t,l),e(t,Qt,l),e(t,P,l),Bt=!0},p:Pt,i(t){Bt||(p(j.$$.fragment,t),p(c.$$.fragment,t),p(g.$$.fragment,t),p(w.$$.fragment,t),p(d.$$.fragment,t),p(b.$$.fragment,t),p(V.$$.fragment,t),p(B.$$.fragment,t),p(G.$$.fragment,t),p(Z.$$.fragment,t),p(z.$$.fragment,t),p(E.$$.fragment,t),p(x.$$.fragment,t),p(A.$$.fragment,t),p(_.$$.fragment,t),p(k.$$.fragment,t),p(W.$$.fragment,t),p(D.$$.fragment,t),Bt=!0)},o(t){o(j.$$.fragment,t),o(c.$$.fragment,t),o(g.$$.fragment,t),o(w.$$.fragment,t),o(d.$$.fragment,t),o(b.$$.fragment,t),o(V.$$.fragment,t),o(B.$$.fragment,t),o(G.$$.fragment,t),o(Z.$$.fragment,t),o(z.$$.fragment,t),o(E.$$.fragment,t),o(x.$$.fragment,t),o(A.$$.fragment,t),o(_.$$.fragment,t),o(k.$$.fragment,t),o(W.$$.fragment,t),o(D.$$.fragment,t),Bt=!1},d(t){t&&(s(O),s(L),s(K),s(tt),s(lt),s(h),s(st),s(et),s(f),s(nt),s(I),s(at),s($),s(Mt),s(it),s(C),s(Jt),s(pt),s(q),s(ot),s(ut),s(N),s(yt),s(Tt),s(Q),s(Ut),s(mt),s(rt),s(S),s(jt),s(ct),s(ht),s(v),s(gt),s(ft),s(It),s(X),s($t),s(wt),s(Ct),s(R),s(dt),s(qt),s(Y),s(bt),s(Nt),s(F),s(Vt),s(Qt),s(P)),s(m),u(j,t),u(c,t),u(g,t),u(w,t),u(d,t),u(b,t),u(V,t),u(B,t),u(G,t),u(Z,t),u(z,t),u(E,t),u(x,t),u(A,t),u(_,t),u(k,t),u(W,t),u(D,t)}}}const Ml='{"title":"대화 템플릿(Chat Templates)","local":"대화-템플릿chat-templates","sections":[{"title":"기본 모델 vs 지시 모델","local":"기본-모델-vs-지시-모델","sections":[],"depth":2},{"title":"대화 템플릿 이해하기","local":"대화-템플릿-이해하기","sections":[],"depth":2},{"title":"시스템 메시지","local":"시스템-메시지","sections":[],"depth":2},{"title":"대화","local":"대화","sections":[],"depth":2},{"title":"Transformers 기반 구현","local":"transformers-기반-구현","sections":[],"depth":2},{"title":"사용자 정의 형식","local":"사용자-정의-형식","sections":[],"depth":2},{"title":"멀티 턴 지원","local":"멀티-턴-지원","sections":[],"depth":2},{"title":"참고","local":"참고","sections":[],"depth":2}],"depth":1}';function il(Gt){return Ot(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Tl extends Kt{constructor(m){super(),tl(this,m,il,al,Lt,{})}}export{Tl as component};
