import{s as Bt,o as Lt,n as Ft}from"../chunks/scheduler.cc52f4b9.js";import{S as Xt,i as Yt,e as f,s as c,c as J,h as Pt,a as T,d as n,b as M,f as zt,g as U,j as b,k as js,l as qt,m as a,n as j,o,u as L,t as m,p as d,q as Kt,r as Ot,v as F}from"../chunks/index.ccfa71ad.js";import{T as St}from"../chunks/Tip.b150ffa7.js";import{C as en,H as Tl,E as ln}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.bf6e17b3.js";import{Y as Rt}from"../chunks/Youtube.6232240b.js";import{C as h}from"../chunks/CodeBlock.d683ceb4.js";import{C as Wt}from"../chunks/CourseFloatingBanner.23e5afab.js";import{F as sn}from"../chunks/FrameworkSwitchCourse.4d190e14.js";function tn(y){let s,r;return s=new Wt({props:{chapter:2,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/en/chapter2/section2_tf.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/en/chapter2/section2_tf.ipynb"}]}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function nn(y){let s,r;return s=new Wt({props:{chapter:2,classNames:"absolute z-10 right-0 top-0",notebooks:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/en/chapter2/section2_pt.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/en/chapter2/section2_pt.ipynb"}]}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function an(y){let s;return{c(){s=Kt("PyTorch를 사용하는지, TensorFlow를 사용하는지에 따라 내용이 약간 달라지는 첫 번째 섹션입니다. 제목 상단 스위치를 이용해 선호하는 플랫폼을 선택하세요!")},l(r){s=Ot(r,"PyTorch를 사용하는지, TensorFlow를 사용하는지에 따라 내용이 약간 달라지는 첫 번째 섹션입니다. 제목 상단 스위치를 이용해 선호하는 플랫폼을 선택하세요!")},m(r,l){a(r,s,l)},d(r){r&&n(s)}}}function rn(y){let s,r;return s=new Rt({props:{id:"wVN12smEvqg"}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function pn(y){let s,r;return s=new Rt({props:{id:"1pedAIvTWXk"}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function cn(y){let s,r;return s=new h({props:{code:"cmF3X2lucHV0cyUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMkkndmUlMjBiZWVuJTIwd2FpdGluZyUyMGZvciUyMGElMjBIdWdnaW5nRmFjZSUyMGNvdXJzZSUyMG15JTIwd2hvbGUlMjBsaWZlLiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMkklMjBoYXRlJTIwdGhpcyUyMHNvJTIwbXVjaCElMjIlMkMlMEElNUQlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocmF3X2lucHV0cyUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwdHJ1bmNhdGlvbiUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQXByaW50KGlucHV0cyk=",highlighted:`raw_inputs = [
    <span class="hljs-string">&quot;I&#x27;ve been waiting for a HuggingFace course my whole life.&quot;</span>,
    <span class="hljs-string">&quot;I hate this so much!&quot;</span>,
]
inputs = tokenizer(raw_inputs, padding=<span class="hljs-literal">True</span>, truncation=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-built_in">print</span>(inputs)`,wrap:!1}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function Mn(y){let s,r;return s=new h({props:{code:"cmF3X2lucHV0cyUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMkkndmUlMjBiZWVuJTIwd2FpdGluZyUyMGZvciUyMGElMjBIdWdnaW5nRmFjZSUyMGNvdXJzZSUyMG15JTIwd2hvbGUlMjBsaWZlLiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMkklMjBoYXRlJTIwdGhpcyUyMHNvJTIwbXVjaCElMjIlMkMlMEElNUQlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocmF3X2lucHV0cyUyQyUyMHBhZGRpbmclM0RUcnVlJTJDJTIwdHJ1bmNhdGlvbiUzRFRydWUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXByaW50KGlucHV0cyk=",highlighted:`raw_inputs = [
    <span class="hljs-string">&quot;I&#x27;ve been waiting for a HuggingFace course my whole life.&quot;</span>,
    <span class="hljs-string">&quot;I hate this so much!&quot;</span>,
]
inputs = tokenizer(raw_inputs, padding=<span class="hljs-literal">True</span>, truncation=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-built_in">print</span>(inputs)`,wrap:!1}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function un(y){let s,r="TensorFlow tensor로 지정했을 때의 결과입니다.",l,i,u;return i=new h({props:{code:"JTdCJTBBJTIwJTIwJTIwJTIwJ2lucHV0X2lkcyclM0ElMjAlM0N0Zi5UZW5zb3IlM0ElMjBzaGFwZSUzRCgyJTJDJTIwMTYpJTJDJTIwZHR5cGUlM0RpbnQzMiUyQyUyMG51bXB5JTNEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYXJyYXkoJTVCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVCJTIwJTIwMTAxJTJDJTIwJTIwMTA0NSUyQyUyMCUyMDEwMDUlMkMlMjAlMjAyMzEwJTJDJTIwJTIwMjA0MiUyQyUyMCUyMDM0MDMlMkMlMjAlMjAyMDA1JTJDJTIwJTIwMTAzNyUyQyUyMDE3NjYyJTJDJTIwMTIxNzIlMkMlMjAlMjAyNjA3JTJDJTIwJTIwMjAyNiUyQyUyMCUyMDI4NzglMkMlMjAlMjAyMTY2JTJDJTIwJTIwMTAxMiUyQyUyMCUyMCUyMDEwMiU1RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU1QiUyMCUyMDEwMSUyQyUyMCUyMDEwNDUlMkMlMjAlMjA1MjIzJTJDJTIwJTIwMjAyMyUyQyUyMCUyMDIwNjElMkMlMjAlMjAyMTcyJTJDJTIwJTIwJTIwOTk5JTJDJTIwJTIwJTIwMTAyJTJDJTIwJTIwJTIwJTIwJTIwMCUyQyUyMCUyMCUyMCUyMCUyMDAlMkMlMjAlMjAlMjAlMjAlMjAwJTJDJTIwJTIwJTIwJTIwJTIwMCUyQyUyMCUyMCUyMCUyMCUyMDAlMkMlMjAlMjAlMjAlMjAlMjAwJTJDJTIwJTIwJTIwJTIwJTIwMCUyQyUyMCUyMCUyMCUyMCUyMDAlNUQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUQlMkMlMjBkdHlwZSUzRGludDMyKSUzRSUyQyUyMCUwQSUyMCUyMCUyMCUyMCdhdHRlbnRpb25fbWFzayclM0ElMjAlM0N0Zi5UZW5zb3IlM0ElMjBzaGFwZSUzRCgyJTJDJTIwMTYpJTJDJTIwZHR5cGUlM0RpbnQzMiUyQyUyMG51bXB5JTNEJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYXJyYXkoJTVCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVCMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTJDJTIwMSU1RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU1QjElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTJDJTIwMCUyQyUyMDAlMkMlMjAwJTJDJTIwMCUyQyUyMDAlMkMlMjAwJTJDJTIwMCUyQyUyMDAlNUQlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUQlMkMlMjBkdHlwZSUzRGludDMyKSUzRSUwQSU3RA==",highlighted:`{
    <span class="hljs-string">&#x27;input_ids&#x27;</span>: &lt;tf.Tensor: shape=(<span class="hljs-number">2</span>, <span class="hljs-number">16</span>), dtype=int32, numpy=
        array([
            [  <span class="hljs-number">101</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">1005</span>,  <span class="hljs-number">2310</span>,  <span class="hljs-number">2042</span>,  <span class="hljs-number">3403</span>,  <span class="hljs-number">2005</span>,  <span class="hljs-number">1037</span>, <span class="hljs-number">17662</span>, <span class="hljs-number">12172</span>,  <span class="hljs-number">2607</span>,  <span class="hljs-number">2026</span>,  <span class="hljs-number">2878</span>,  <span class="hljs-number">2166</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>],
            [  <span class="hljs-number">101</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">5223</span>,  <span class="hljs-number">2023</span>,  <span class="hljs-number">2061</span>,  <span class="hljs-number">2172</span>,   <span class="hljs-number">999</span>,   <span class="hljs-number">102</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>]
        ], dtype=int32)&gt;, 
    <span class="hljs-string">&#x27;attention_mask&#x27;</span>: &lt;tf.Tensor: shape=(<span class="hljs-number">2</span>, <span class="hljs-number">16</span>), dtype=int32, numpy=
        array([
            [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
            [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]
        ], dtype=int32)&gt;
}`,wrap:!1}}),{c(){s=f("p"),s.textContent=r,l=c(),J(i.$$.fragment)},l(p){s=T(p,"P",{"data-svelte-h":!0}),b(s)!=="svelte-1bekqba"&&(s.textContent=r),l=M(p),U(i.$$.fragment,p)},m(p,w){a(p,s,w),a(p,l,w),j(i,p,w),u=!0},i(p){u||(m(i.$$.fragment,p),u=!0)},o(p){o(i.$$.fragment,p),u=!1},d(p){p&&(n(s),n(l)),d(i,p)}}}function on(y){let s,r="PyTorch tensor로 지정했을 때의 결과입니다.",l,i,u;return i=new h({props:{code:"JTdCJTBBJTIwJTIwJTIwJTIwJ2lucHV0X2lkcyclM0ElMjB0ZW5zb3IoJTVCJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVCJTIwJTIwMTAxJTJDJTIwJTIwMTA0NSUyQyUyMCUyMDEwMDUlMkMlMjAlMjAyMzEwJTJDJTIwJTIwMjA0MiUyQyUyMCUyMDM0MDMlMkMlMjAlMjAyMDA1JTJDJTIwJTIwMTAzNyUyQyUyMDE3NjYyJTJDJTIwMTIxNzIlMkMlMjAyNjA3JTJDJTIwJTIwMjAyNiUyQyUyMCUyMDI4NzglMkMlMjAlMjAyMTY2JTJDJTIwJTIwMTAxMiUyQyUyMCUyMCUyMDEwMiU1RCUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCU1QiUyMCUyMDEwMSUyQyUyMCUyMDEwNDUlMkMlMjAlMjA1MjIzJTJDJTIwJTIwMjAyMyUyQyUyMCUyMDIwNjElMkMlMjAlMjAyMTcyJTJDJTIwJTIwJTIwOTk5JTJDJTIwJTIwJTIwMTAyJTJDJTIwJTIwJTIwJTIwJTIwMCUyQyUyMCUyMCUyMCUyMCUyMDAlMkMlMjAlMjAlMjAlMjAlMjAwJTJDJTIwJTIwJTIwJTIwJTIwMCUyQyUyMCUyMCUyMCUyMCUyMDAlMkMlMjAlMjAlMjAlMjAlMjAwJTJDJTIwJTIwJTIwJTIwJTIwMCUyQyUyMCUyMCUyMCUyMCUyMDAlNUQlMEElMjAlMjAlMjAlMjAlNUQpJTJDJTIwJTBBJTIwJTIwJTIwJTIwJ2F0dGVudGlvbl9tYXNrJyUzQSUyMHRlbnNvciglNUIlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUIxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVCMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAxJTJDJTIwMSUyQyUyMDElMkMlMjAwJTJDJTIwMCUyQyUyMDAlMkMlMjAwJTJDJTIwMCUyQyUyMDAlMkMlMjAwJTJDJTIwMCU1RCUwQSUyMCUyMCUyMCUyMCU1RCklMEElN0Q=",highlighted:`{
    <span class="hljs-string">&#x27;input_ids&#x27;</span>: tensor([
        [  <span class="hljs-number">101</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">1005</span>,  <span class="hljs-number">2310</span>,  <span class="hljs-number">2042</span>,  <span class="hljs-number">3403</span>,  <span class="hljs-number">2005</span>,  <span class="hljs-number">1037</span>, <span class="hljs-number">17662</span>, <span class="hljs-number">12172</span>, <span class="hljs-number">2607</span>,  <span class="hljs-number">2026</span>,  <span class="hljs-number">2878</span>,  <span class="hljs-number">2166</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>],
        [  <span class="hljs-number">101</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">5223</span>,  <span class="hljs-number">2023</span>,  <span class="hljs-number">2061</span>,  <span class="hljs-number">2172</span>,   <span class="hljs-number">999</span>,   <span class="hljs-number">102</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>,     <span class="hljs-number">0</span>]
    ]), 
    <span class="hljs-string">&#x27;attention_mask&#x27;</span>: tensor([
        [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
        [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, <span class="hljs-number">0</span>]
    ])
}`,wrap:!1}}),{c(){s=f("p"),s.textContent=r,l=c(),J(i.$$.fragment)},l(p){s=T(p,"P",{"data-svelte-h":!0}),b(s)!=="svelte-224u1o"&&(s.textContent=r),l=M(p),U(i.$$.fragment,p)},m(p,w){a(p,s,w),a(p,l,w),j(i,p,w),u=!0},i(p){u||(m(i.$$.fragment,p),u=!0)},o(p){o(i.$$.fragment,p),u=!1},d(p){p&&(n(s),n(l)),d(i,p)}}}function mn(y){let s,r="토크나이저를 다운받은 방식과 동일한 방식으로 사전학습된 모델을 다운받을 수 있습니다. 🤗 Transformers는 <code>from_pretrained</code> 메서드를 가진 <code>TFAutoModel</code> 클래스를 제공합니다.",l,i,u;return i=new h({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsJTBBJTBBY2hlY2twb2ludCUyMCUzRCUyMCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkLWZpbmV0dW5lZC1zc3QtMi1lbmdsaXNoJTIyJTBBbW9kZWwlMjAlM0QlMjBURkF1dG9Nb2RlbC5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModel

checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>
model = TFAutoModel.from_pretrained(checkpoint)`,wrap:!1}}),{c(){s=f("p"),s.innerHTML=r,l=c(),J(i.$$.fragment)},l(p){s=T(p,"P",{"data-svelte-h":!0}),b(s)!=="svelte-14kzkj4"&&(s.innerHTML=r),l=M(p),U(i.$$.fragment,p)},m(p,w){a(p,s,w),a(p,l,w),j(i,p,w),u=!0},i(p){u||(m(i.$$.fragment,p),u=!0)},o(p){o(i.$$.fragment,p),u=!1},d(p){p&&(n(s),n(l)),d(i,p)}}}function yn(y){let s,r="토크나이저를 다운받은 방식과 동일한 방식으로 사전학습된 모델을 다운받을 수 있습니다. 🤗 Transformers는 <code>from_pretrained</code> 메서드를 가진 <code>AutoModel</code> 클래스를 제공합니다.",l,i,u;return i=new h({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbCUwQSUwQWNoZWNrcG9pbnQlMjAlM0QlMjAlMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZC1maW5ldHVuZWQtc3N0LTItZW5nbGlzaCUyMiUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModel

checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>
model = AutoModel.from_pretrained(checkpoint)`,wrap:!1}}),{c(){s=f("p"),s.innerHTML=r,l=c(),J(i.$$.fragment)},l(p){s=T(p,"P",{"data-svelte-h":!0}),b(s)!=="svelte-9oefvu"&&(s.innerHTML=r),l=M(p),U(i.$$.fragment,p)},m(p,w){a(p,s,w),a(p,l,w),j(i,p,w),u=!0},i(p){u||(m(i.$$.fragment,p),u=!0)},o(p){o(i.$$.fragment,p),u=!1},d(p){p&&(n(s),n(l)),d(i,p)}}}function fn(y){let s,r,l,i;return s=new h({props:{code:"b3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMEFwcmludChvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlLnNoYXBlKQ==",highlighted:`outputs = model(inputs)
<span class="hljs-built_in">print</span>(outputs.last_hidden_state.shape)`,wrap:!1}}),l=new h({props:{code:"KDIlMkMlMjAxNiUyQyUyMDc2OCk=",highlighted:'(<span class="hljs-number">2</span>, <span class="hljs-number">16</span>, <span class="hljs-number">768</span>)',wrap:!1}}),{c(){J(s.$$.fragment),r=c(),J(l.$$.fragment)},l(u){U(s.$$.fragment,u),r=M(u),U(l.$$.fragment,u)},m(u,p){j(s,u,p),a(u,r,p),j(l,u,p),i=!0},i(u){i||(m(s.$$.fragment,u),m(l.$$.fragment,u),i=!0)},o(u){o(s.$$.fragment,u),o(l.$$.fragment,u),i=!1},d(u){u&&n(r),d(s,u),d(l,u)}}}function Tn(y){let s,r,l,i;return s=new h({props:{code:"b3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQXByaW50KG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUuc2hhcGUp",highlighted:`outputs = model(**inputs)
<span class="hljs-built_in">print</span>(outputs.last_hidden_state.shape)`,wrap:!1}}),l=new h({props:{code:"dG9yY2guU2l6ZSglNUIyJTJDJTIwMTYlMkMlMjA3NjglNUQp",highlighted:'torch.Size([<span class="hljs-number">2</span>, <span class="hljs-number">16</span>, <span class="hljs-number">768</span>])',wrap:!1}}),{c(){J(s.$$.fragment),r=c(),J(l.$$.fragment)},l(u){U(s.$$.fragment,u),r=M(u),U(l.$$.fragment,u)},m(u,p){j(s,u,p),a(u,r,p),j(l,u,p),i=!0},i(u){i||(m(s.$$.fragment,u),m(l.$$.fragment,u),i=!0)},o(u){o(s.$$.fragment,u),o(l.$$.fragment,u),i=!1},d(u){u&&n(r),d(s,u),d(l,u)}}}function bn(y){let s,r="이 예제를 위해서는 문장을 긍정 또는 부정으로 분류할 수 있게 하는 시퀀스 분류 헤드를 가진 모델이 필요합니다. 따라서 <code>AutoModel</code> 클래스가 아닌 <code>TFAutoModelForSequenceClassification</code>을 사용할 것입니다.",l,i,u;return i=new h({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQWNoZWNrcG9pbnQlMjAlM0QlMjAlMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZC1maW5ldHVuZWQtc3N0LTItZW5nbGlzaCUyMiUwQW1vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForSequenceClassification

checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>
model = TFAutoModelForSequenceClassification.from_pretrained(checkpoint)
outputs = model(inputs)`,wrap:!1}}),{c(){s=f("p"),s.innerHTML=r,l=c(),J(i.$$.fragment)},l(p){s=T(p,"P",{"data-svelte-h":!0}),b(s)!=="svelte-1xxwnzw"&&(s.innerHTML=r),l=M(p),U(i.$$.fragment,p)},m(p,w){a(p,s,w),a(p,l,w),j(i,p,w),u=!0},i(p){u||(m(i.$$.fragment,p),u=!0)},o(p){o(i.$$.fragment,p),u=!1},d(p){p&&(n(s),n(l)),d(i,p)}}}function Jn(y){let s,r="이 예제를 위해서는 문장을 긍정 또는 부정으로 분류할 수 있게 하는 시퀀스 분류 헤드를 가진 모델이 필요합니다. 따라서 <code>AutoModel</code> 클래스가 아닌 <code>AutoModelForSequenceClassification</code>을 사용할 것입니다.",l,i,u;return i=new h({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFjaGVja3BvaW50JTIwJTNEJTIwJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQtZmluZXR1bmVkLXNzdC0yLWVuZ2xpc2glMjIlMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKGNoZWNrcG9pbnQpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSequenceClassification

checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>
model = AutoModelForSequenceClassification.from_pretrained(checkpoint)
outputs = model(**inputs)`,wrap:!1}}),{c(){s=f("p"),s.innerHTML=r,l=c(),J(i.$$.fragment)},l(p){s=T(p,"P",{"data-svelte-h":!0}),b(s)!=="svelte-vxxqdi"&&(s.innerHTML=r),l=M(p),U(i.$$.fragment,p)},m(p,w){a(p,s,w),a(p,l,w),j(i,p,w),u=!0},i(p){u||(m(i.$$.fragment,p),u=!0)},o(p){o(i.$$.fragment,p),u=!1},d(p){p&&(n(s),n(l)),d(i,p)}}}function Un(y){let s,r;return s=new h({props:{code:"KDIlMkMlMjAyKQ==",highlighted:'(<span class="hljs-number">2</span>, <span class="hljs-number">2</span>)',wrap:!1}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function jn(y){let s,r;return s=new h({props:{code:"dG9yY2guU2l6ZSglNUIyJTJDJTIwMiU1RCk=",highlighted:'torch.Size([<span class="hljs-number">2</span>, <span class="hljs-number">2</span>])',wrap:!1}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function dn(y){let s,r;return s=new h({props:{code:"JTNDdGYuVGVuc29yJTNBJTIwc2hhcGUlM0QoMiUyQyUyMDIpJTJDJTIwZHR5cGUlM0RmbG9hdDMyJTJDJTIwbnVtcHklM0QlMEElMjAlMjAlMjAlMjBhcnJheSglNUIlNUItMS41NjA2OTkxJTJDJTIwJTIwMS42MTIyODQyJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVCJTIwNC4xNjkyMzElMjAlMkMlMjAtMy4zNDY0NDcyJTVEJTVEJTJDJTIwZHR5cGUlM0RmbG9hdDMyKSUzRQ==",highlighted:`&lt;tf.Tensor: shape=(<span class="hljs-number">2</span>, <span class="hljs-number">2</span>), dtype=float32, numpy=
    array([[-<span class="hljs-number">1.5606991</span>,  <span class="hljs-number">1.6122842</span>],
           [ <span class="hljs-number">4.169231</span> , -<span class="hljs-number">3.3464472</span>]], dtype=float32)&gt;`,wrap:!1}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function wn(y){let s,r;return s=new h({props:{code:"dGVuc29yKCU1QiU1Qi0xLjU2MDclMkMlMjAlMjAxLjYxMjMlNUQlMkMlMEElMjAlMjAlMjAlMjAlMjAlMjAlMjAlMjAlNUIlMjA0LjE2OTIlMkMlMjAtMy4zNDY0JTVEJTVEJTJDJTIwZ3JhZF9mbiUzRCUzQ0FkZG1tQmFja3dhcmQlM0Up",highlighted:`tensor([[-<span class="hljs-number">1.5607</span>,  <span class="hljs-number">1.6123</span>],
        [ <span class="hljs-number">4.1692</span>, -<span class="hljs-number">3.3464</span>]], grad_fn=&lt;AddmmBackward&gt;)`,wrap:!1}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function hn(y){let s,r;return s=new h({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEFwcmVkaWN0aW9ucyUyMCUzRCUyMHRmLm1hdGguc29mdG1heChvdXRwdXRzLmxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEFwcmludChwcmVkaWN0aW9ucyk=",highlighted:`<span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

predictions = tf.math.softmax(outputs.logits, axis=-<span class="hljs-number">1</span>)
<span class="hljs-built_in">print</span>(predictions)`,wrap:!1}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function $n(y){let s,r;return s=new h({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEFwcmVkaWN0aW9ucyUyMCUzRCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwuc29mdG1heChvdXRwdXRzLmxvZ2l0cyUyQyUyMGRpbSUzRC0xKSUwQXByaW50KHByZWRpY3Rpb25zKQ==",highlighted:`<span class="hljs-keyword">import</span> torch

predictions = torch.nn.functional.softmax(outputs.logits, dim=-<span class="hljs-number">1</span>)
<span class="hljs-built_in">print</span>(predictions)`,wrap:!1}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function _n(y){let s,r;return s=new h({props:{code:"dGYuVGVuc29yKCUwQSU1QiU1QjQuMDE5NTE2NzFlLTAyJTIwOS41OTgwNDgzM2UtMDElNUQlMEElMjAlNUI5Ljk5NDU1ODdlLTAxJTIwNS40NDE4NDI0ZS0wNCU1RCU1RCUyQyUyMHNoYXBlJTNEKDIlMkMlMjAyKSUyQyUyMGR0eXBlJTNEZmxvYXQzMik=",highlighted:`tf.Tensor(
[[<span class="hljs-number">4.01951671e-02</span> <span class="hljs-number">9.59804833e-01</span>]
 [<span class="hljs-number">9.9945587e-01</span> <span class="hljs-number">5.4418424e-04</span>]], shape=(<span class="hljs-number">2</span>, <span class="hljs-number">2</span>), dtype=float32)`,wrap:!1}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function Cn(y){let s,r;return s=new h({props:{code:"dGVuc29yKCU1QiU1QjQuMDE5NWUtMDIlMkMlMjA5LjU5ODBlLTAxJTVEJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTVCOS45OTQ2ZS0wMSUyQyUyMDUuNDQxOGUtMDQlNUQlNUQlMkMlMjBncmFkX2ZuJTNEJTNDU29mdG1heEJhY2t3YXJkJTNFKQ==",highlighted:`tensor([[<span class="hljs-number">4.0195e-02</span>, <span class="hljs-number">9.5980e-01</span>],
        [<span class="hljs-number">9.9946e-01</span>, <span class="hljs-number">5.4418e-04</span>]], grad_fn=&lt;SoftmaxBackward&gt;)`,wrap:!1}}),{c(){J(s.$$.fragment)},l(l){U(s.$$.fragment,l)},m(l,i){j(s,l,i),r=!0},i(l){r||(m(s.$$.fragment,l),r=!0)},o(l){o(s.$$.fragment,l),r=!1},d(l){d(s,l)}}}function kn(y){let s,r="✏️ <strong>직접 해보세요!</strong> 2개 이상의 문장을 골라 <code>sentiment-analysis</code> 파이프라인을 적용해보세요. 이 챕터에서 본 내용을 그대로 수행해보고 같은 결과가 나오는지 확인해보세요!";return{c(){s=f("p"),s.innerHTML=r},l(l){s=T(l,"P",{"data-svelte-h":!0}),b(s)!=="svelte-1t16ayp"&&(s.innerHTML=r)},m(l,i){a(l,s,i)},p:Ft,d(l){l&&n(s)}}}function In(y){let s,r,l,i,u,p,w,Jl,K,Ul,$,_,al,X,jl,C,k,rl,O,vs='완전한 예제를 이용해, 아래의 <a href="/course/chapter1">제1단원</a> 코드를 수행했을 때 뒤에서 어떤 일이 일어나고 있는지 알아봅시다.',dl,ee,wl,le,Qs="다음과 같은 출력이 나오게 됩니다.",hl,se,$l,te,Ns='<a href="/course/chapter1">제1단원</a>에서 확인했듯이, 이 파이프라인 그룹은 세 단계(전처리, 입력을 모델에 넘겨주는 것, 후처리)를 함께 수행합니다.',_l,Y,Ds='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter2/full_nlp_pipeline.svg" alt="The full NLP pipeline: tokenization of text, conversion to IDs, and inference through the Transformer model and the model head."/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter2/full_nlp_pipeline-dark.svg" alt="The full NLP pipeline: tokenization of text, conversion to IDs, and inference through the Transformer model and the model head."/>',Cl,ne,Es="각 단계에 대해 빠르게 살펴보겠습니다.",kl,ae,Il,re,Gs="다른 신경망처럼 Transformer 모델도 원시 텍스트를 바로 처리할 수 없기 때문에 파이프라인의 첫 번째 단계는 텍스트 입력을 모델이 이해할 수 있는 숫자로 변환하는 것입니다. 이 과정을 위해 다음 기능들을 수행하는 <em>토크나이저</em>를 사용합니다.",gl,pe,Vs="<li>입력을 <em>토큰</em>이라고 부르는 단어나 하위 단어, 또는 심볼(예-구두점)로 분할</li> <li>각 토큰을 하나의 정수에 매핑</li> <li>모델에 유용할 수 있는 부가적인 입력 추가</li>",Al,ie,Zs='이 모든 전처리 과정은 모델이 사전학습될 때와 완전히 동일한 방식으로 진행되어야 하기 때문에 <a href="https://huggingface.co/models" rel="nofollow">Model Hub</a>에서 정보를 다운로드 해야합니다. 전처리를 위해 <code>AutoTokenizer</code> 클래스와 AutoTokenizer의 <code>from_pretrained()</code> 메서드를 사용합니다. 모델의 체크포인트 이름을 사용하여 모델의 토크나이저와 연관된 데이터를 자동으로 가져와 저장합니다. (따라서 아래 코드를 처음 실행할 때만 다운로드됩니다.)',xl,ce,Hs='<code>sentiment-analysis</code> 파이프라인의 기본 체크포인트는 <code>distilbert-base-uncased-finetuned-sst-2-english</code>(모델 카드 확인은 <a href="https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english" rel="nofollow">여기</a>서 가능)이므로 아래 코드를 실행합니다.',vl,Me,Ql,ue,zs="토크나이저가 있다면 문장을 토크나이저에 입력하여 우리의 모델에 전달할 준비가 된 딕셔너리를 출력으로 얻게 됩니다! 남은 것은 입력 ID 목록을 tensor로 변환하는 것입니다.",Nl,oe,Ss="여러분은 어떤 ML 프레임워크-PyTorch나 TensorFlow, 또는 몇몇 모델을 위한 Flax-가 백엔드로 사용되는지 걱정하지 않고 🤗 Transformers를 사용할 수 있습니다. 하지만 Transformer 모델은 <em>tensor</em>만을 입력으로 받습니다. 만약 tensor에 대해 처음 들어봤다면, NumPy 배열을 생각하면 됩니다. NumPy 배열은 스칼라(0D), 벡터(1D), 행렬(2D) 또는 더 많은 차원을 가질 수 있습니다. 이것은 사실상 텐서입니다. 다른 ML 프레임워크의 텐서도 유사하게 동작하며, NumPy 배열처럼 인스턴스화가 쉽습니다.",Dl,me,Rs="얻고자 하는 tensor의 타입(PyTorch, TensorFlow, 일반 NumPy)을 지정하기 위해, <code>return_tensors</code> 전달인자를 사용합니다.",El,I,g,pl,ye,Ws="padding과 truncation에 대해 벌써 걱정하지 마세요. 나중에 설명하도록 하겠습니다. 여기서 기억해야 할 중요한 점은 하나의 문장 또는 여러 개의 문장 리스트를 토크나이저 함수로 전달할 수 있을 뿐만 아니라 얻고 싶은 텐서 유형까지 지정할 수 있다는 것입니다. (텐서 유형이 지정되지 않으면 이중 리스트를 결과로 얻게 됩니다)",Gl,A,x,il,fe,Bs="출력은 <code>input_ids</code>와 <code>attention_mask</code> 두 개의 키를 갖는 딕셔너리입니다. <code>input_ids</code>는 각 문장 내 토큰의 고유 식별자인 정수로 이루어진 2개의 행(한 행이 하나의 문장)을 가지고 있습니다. <code>attention_mask</code>는 이 챕터의 뒤쪽에서 설명할 것입니다.",Vl,Te,Zl,v,Q,cl,be,Ls="이 코드 스니펫에서 이전 파이프라인에서 사용된 것과 동일한 체크포인트를 다운로드(실제로는 이미 저장되어 있어야 합니다.)하고 그것으로 모델을 인스턴스화했습니다.",Hl,Je,Fs="해당 아키텍처는 기본 Transformer 모듈만 포함하고 있습니다. 입력이 주어지면 <em>features</em>라고도 불리는 <em>hidden states</em>를 출력합니다. 각 모델의 입력에 대해 <strong>Transformer 모델에 의해 수행된 입력의 문맥적 이해</strong>로 표현할 수 있는 고차원 벡터를 가져옵니다.",zl,Ue,Xs="이 내용이 이해되지 않더라도 걱정하지 마세요. 뒤에서 설명할 것입니다.",Sl,je,Ys='이러한 hidden states는 그 자체로 유용할 수 있지만 일반적으로 <em>head</em>라고 알려진 모델의 다른 부분에 입력으로 들어갑니다. <a href="/course/chapter1">제1단원</a>에서, 동일한 구조로 다른 태스크를 수행할 수 있었는데 이 태스크들은 서로 다른 헤드와 연관되어 있습니다.',Rl,de,Wl,we,Ps="Transformer 모듈에 의한 출력 벡터는 일반적으로 크며 보통 3개의 차원을 가집니다.",Bl,he,qs="<li><strong>Batch size</strong>: 한 번에 처리되는 시퀀스의 수 (예제에서는 2)</li> <li><strong>Sequence length</strong>: 시퀀스의 숫자 표현 길이 (예제에서는 16)</li> <li><strong>Hidden size</strong>: 각 모델 입력 벡터 차원</li>",Ll,$e,Ks="위에서 마지막 값으로 인해 “고차원”이라고 불립니다. hidden size는 매우 클 수 있습니다 (작은 모델은 768이 일반적이며 큰 모델은 3072나 그 이상의 값이 될 수 있습니다)",Fl,_e,Os="전처리 과정을 거친 입력을 모델로 넘기면 아래 결과를 확인할 수 있습니다.",Xl,N,D,Ml,Ce,et="🤗 Transformers 모델의 출력은 <code>namedtuple</code> 또는 딕셔너리 형태입니다. 속성이나 키(<code>outputs[&quot;last_hidden_state&quot;]</code>)를 이용해 요소에 접근할 수 있고 찾고자 하는 것의 정확한 위치를 안다면 인덱스(<code>outputs[0]</code>)도 사용할 수 있습니다.",Yl,ke,Pl,Ie,lt="모델 헤드는 hidden state의 고차원 벡터를 입력으로 받아 다른 차원으로 투영합니다. 모델 헤드는 보통 하나 이상의 선형 레이어로 이루어져 있습니다.",ql,P,st='<img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter2/transformer_and_head.svg" alt="A Transformer network alongside its head."/> <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface-course/documentation-images/resolve/main/en/chapter2/transformer_and_head-dark.svg" alt="A Transformer network alongside its head."/>',Kl,ge,tt="Transformer 모델의 출력은 처리할 모델 헤드로 바로 전달됩니다.",Ol,Ae,nt="이 다이어그램에서, 모델은 모델의 임베딩 레이어와 후속 레이어로 표현됩니다. 임베딩 레이어는 토큰화된 각각의 입력 ID를 연관된 토큰을 나타내는 벡터로 변환합니다. 후속 레이어는 문장의 최종 표현을 만들기 위해 어텐션 메커니즘을 이용해 이 벡터들을 처리합니다.",es,xe,at="🤗 Transformer에는 다양한 아키텍처가 있으며, 각각의 아키텍처는 특정 작업을 처리하도록 설계되었습니다. 아래는 일부 아키텍처입니다.",ls,ve,rt="<li><code>*Model</code> (retrieve the hidden states)</li> <li><code>*ForCausalLM</code></li> <li><code>*ForMaskedLM</code></li> <li><code>*ForMultipleChoice</code></li> <li><code>*ForQuestionAnswering</code></li> <li><code>*ForSequenceClassification</code></li> <li><code>*ForTokenClassification</code></li> <li>그 외 🤗</li>",ss,E,G,ul,Qe,pt="출력 형태를 보면 차원이 훨씬 적은 것을 알 수 있습니다. 모델 헤드는 이전에 봤던 고차원 벡터를 입력으로 받아 2개의 값(레이블 당 하나)으로 이루어진 벡터를 출력합니다.",ts,Ne,ns,V,Z,ol,De,it="우리는 2개의 문장과 2개의 레이블만 있기 때문에 모델로부터 얻은 출력 형태는 2 x 2입니다.",as,Ee,rs,Ge,ct="모델의 출력 값이 그 자체로 의미있는 것은 아닙니다. 한 번 보도록 합시다.",ps,Ve,is,H,z,ml,Ze,Mt='모델은 첫 번째 문장에 대해 <code>[-1.5607, 1.6123]</code>으로 예측했고 두 번째 문장에 대해 <code>[ 4.1692, -3.3464]</code>으로 예측했습니다. 이 값들은 확률이 아니라 모델의 마지막 층에 의해 출력된 정규화되지 않은 점수인 <em>logits</em>입니다. 확률로 변환되기 위해 logits은 <a href="https://en.wikipedia.org/wiki/Softmax_function" rel="nofollow">SoftMax</a> 층을 거쳐야 합니다. 학습을 위한 손실 함수가 일반적으로 SoftMax와 같은 마지막 활성함수와 교차 엔트로피와 같은 실제 손실 함수를 모두 사용하기 때문에 모든 🤗 Transformers 모델의 출력은 logit입니다.',cs,S,R,yl,W,B,fl,He,ut="모델은 첫 번째 문장에 대해 <code>[0.0402, 0.9598]</code>로 예측했고 두 번째 모델에 대해 <code>[0.9995, 0.0005]</code>로 예측했습니다. 이 값들은 확실하게 확률값입니다.",Ms,ze,ot="각 위치에 해당하는 레이블을 얻기 위해, 모델 config의 <code>id2label</code> 속성을 살펴봅시다. Config에 대한 더 많은 내용은 다음 섹션에서 진행됩니다.",us,Se,os,Re,ms,We,mt="모델의 예측 결과를 아래처럼 결론 지을 수 있습니다.",ys,Be,yt="<li>첫 번째 문장: NEGATIVE: 0.0402, POSITIVE: 0.9598</li> <li>두 번째 문장: NEGATIVE: 0.9995, POSITIVE: 0.0005</li>",fs,Le,ft="파이프라인 세 단계-토크나이저를 이용한 전처리, 모델에 입력 넣어주기, 후처리-를 성공적으로 재현했습니다! 이제 각 단계별로 좀 더 깊게 알아보는 시간을 가져봅시다.",Ts,q,bs,Fe,Js,bl,Us;u=new sn({props:{fw:y[0]}}),w=new en({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),K=new Tl({props:{title:"파이프라인 내부 동작 과정",local:"behind-the-pipeline",headingTag:"h1"}});const Tt=[nn,tn],Xe=[];function bt(e,t){return e[0]==="pt"?0:1}$=bt(y),_=Xe[$]=Tt[$](y),X=new St({props:{$$slots:{default:[an]},$$scope:{ctx:y}}});const Jt=[pn,rn],Ye=[];function Ut(e,t){return e[0]==="pt"?0:1}C=Ut(y),k=Ye[C]=Jt[C](y),ee=new h({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKCUyMnNlbnRpbWVudC1hbmFseXNpcyUyMiklMEFjbGFzc2lmaWVyKCUwQSUyMCUyMCUyMCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMkkndmUlMjBiZWVuJTIwd2FpdGluZyUyMGZvciUyMGElMjBIdWdnaW5nRmFjZSUyMGNvdXJzZSUyMG15JTIwd2hvbGUlMjBsaWZlLiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMkklMjBoYXRlJTIwdGhpcyUyMHNvJTIwbXVjaCElMjIlMkMlMEElMjAlMjAlMjAlMjAlNUQlMEEp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

classifier = pipeline(<span class="hljs-string">&quot;sentiment-analysis&quot;</span>)
classifier(
    [
        <span class="hljs-string">&quot;I&#x27;ve been waiting for a HuggingFace course my whole life.&quot;</span>,
        <span class="hljs-string">&quot;I hate this so much!&quot;</span>,
    ]
)`,wrap:!1}}),se=new h({props:{code:"JTVCJTdCJ2xhYmVsJyUzQSUyMCdQT1NJVElWRSclMkMlMjAnc2NvcmUnJTNBJTIwMC45NTk4MDQ3MTM3MjYwNDM3JTdEJTJDJTBBJTIwJTdCJ2xhYmVsJyUzQSUyMCdORUdBVElWRSclMkMlMjAnc2NvcmUnJTNBJTIwMC45OTk0NTU4MDk1OTMyMDA3JTdEJTVE",highlighted:`[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;POSITIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9598047137260437</span>},
 {<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;NEGATIVE&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9994558095932007</span>}]`,wrap:!1}}),ae=new Tl({props:{title:"토크나이저를 이용한 전처리",local:"preprocessing-with-a-tokenizer",headingTag:"h2"}}),Me=new h({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEFjaGVja3BvaW50JTIwJTNEJTIwJTIyZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQtZmluZXR1bmVkLXNzdC0yLWVuZ2xpc2glMjIlMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

checkpoint = <span class="hljs-string">&quot;distilbert-base-uncased-finetuned-sst-2-english&quot;</span>
tokenizer = AutoTokenizer.from_pretrained(checkpoint)`,wrap:!1}});const jt=[Mn,cn],Pe=[];function dt(e,t){return e[0]==="pt"?0:1}I=dt(y),g=Pe[I]=jt[I](y);const wt=[on,un],qe=[];function ht(e,t){return e[0]==="pt"?0:1}A=ht(y),x=qe[A]=wt[A](y),Te=new Tl({props:{title:"모델 살펴보기",local:"going-through-the-model",headingTag:"h2"}});const $t=[yn,mn],Ke=[];function _t(e,t){return e[0]==="pt"?0:1}v=_t(y),Q=Ke[v]=$t[v](y),de=new Tl({props:{title:"고차원 벡터란?",local:"a-high-dimensional-vector",headingTag:"h3"}});const Ct=[Tn,fn],Oe=[];function kt(e,t){return e[0]==="pt"?0:1}N=kt(y),D=Oe[N]=Ct[N](y),ke=new Tl({props:{title:"모델 헤드: 숫자로 이해하기",local:"model-heads-making-sense-out-of-numbers",headingTag:"h3"}});const It=[Jn,bn],el=[];function gt(e,t){return e[0]==="pt"?0:1}E=gt(y),G=el[E]=It[E](y),Ne=new h({props:{code:"cHJpbnQob3V0cHV0cy5sb2dpdHMuc2hhcGUp",highlighted:'<span class="hljs-built_in">print</span>(outputs.logits.shape)',wrap:!1}});const At=[jn,Un],ll=[];function xt(e,t){return e[0]==="pt"?0:1}V=xt(y),Z=ll[V]=At[V](y),Ee=new Tl({props:{title:"출력 후처리",local:"postprocessing-the-output",headingTag:"h2"}}),Ve=new h({props:{code:"cHJpbnQob3V0cHV0cy5sb2dpdHMp",highlighted:'<span class="hljs-built_in">print</span>(outputs.logits)',wrap:!1}});const vt=[wn,dn],sl=[];function Qt(e,t){return e[0]==="pt"?0:1}H=Qt(y),z=sl[H]=vt[H](y);const Nt=[$n,hn],tl=[];function Dt(e,t){return e[0]==="pt"?0:1}S=Dt(y),R=tl[S]=Nt[S](y);const Et=[Cn,_n],nl=[];function Gt(e,t){return e[0]==="pt"?0:1}return W=Gt(y),B=nl[W]=Et[W](y),Se=new h({props:{code:"bW9kZWwuY29uZmlnLmlkMmxhYmVs",highlighted:"model.config.id2label",wrap:!1}}),Re=new h({props:{code:"JTdCMCUzQSUyMCdORUdBVElWRSclMkMlMjAxJTNBJTIwJ1BPU0lUSVZFJyU3RA==",highlighted:'{<span class="hljs-number">0</span>: <span class="hljs-string">&#x27;NEGATIVE&#x27;</span>, <span class="hljs-number">1</span>: <span class="hljs-string">&#x27;POSITIVE&#x27;</span>}',wrap:!1}}),q=new St({props:{$$slots:{default:[kn]},$$scope:{ctx:y}}}),Fe=new ln({props:{source:"https://github.com/huggingface/course/blob/main/chapters/ko/chapter2/2.mdx"}}),{c(){s=f("meta"),r=c(),l=f("p"),i=c(),J(u.$$.fragment),p=c(),J(w.$$.fragment),Jl=c(),J(K.$$.fragment),Ul=c(),_.c(),al=c(),J(X.$$.fragment),jl=c(),k.c(),rl=c(),O=f("p"),O.innerHTML=vs,dl=c(),J(ee.$$.fragment),wl=c(),le=f("p"),le.textContent=Qs,hl=c(),J(se.$$.fragment),$l=c(),te=f("p"),te.innerHTML=Ns,_l=c(),Y=f("div"),Y.innerHTML=Ds,Cl=c(),ne=f("p"),ne.textContent=Es,kl=c(),J(ae.$$.fragment),Il=c(),re=f("p"),re.innerHTML=Gs,gl=c(),pe=f("ul"),pe.innerHTML=Vs,Al=c(),ie=f("p"),ie.innerHTML=Zs,xl=c(),ce=f("p"),ce.innerHTML=Hs,vl=c(),J(Me.$$.fragment),Ql=c(),ue=f("p"),ue.textContent=zs,Nl=c(),oe=f("p"),oe.innerHTML=Ss,Dl=c(),me=f("p"),me.innerHTML=Rs,El=c(),g.c(),pl=c(),ye=f("p"),ye.textContent=Ws,Gl=c(),x.c(),il=c(),fe=f("p"),fe.innerHTML=Bs,Vl=c(),J(Te.$$.fragment),Zl=c(),Q.c(),cl=c(),be=f("p"),be.textContent=Ls,Hl=c(),Je=f("p"),Je.innerHTML=Fs,zl=c(),Ue=f("p"),Ue.textContent=Xs,Sl=c(),je=f("p"),je.innerHTML=Ys,Rl=c(),J(de.$$.fragment),Wl=c(),we=f("p"),we.textContent=Ps,Bl=c(),he=f("ul"),he.innerHTML=qs,Ll=c(),$e=f("p"),$e.textContent=Ks,Fl=c(),_e=f("p"),_e.textContent=Os,Xl=c(),D.c(),Ml=c(),Ce=f("p"),Ce.innerHTML=et,Yl=c(),J(ke.$$.fragment),Pl=c(),Ie=f("p"),Ie.textContent=lt,ql=c(),P=f("div"),P.innerHTML=st,Kl=c(),ge=f("p"),ge.textContent=tt,Ol=c(),Ae=f("p"),Ae.textContent=nt,es=c(),xe=f("p"),xe.textContent=at,ls=c(),ve=f("ul"),ve.innerHTML=rt,ss=c(),G.c(),ul=c(),Qe=f("p"),Qe.textContent=pt,ts=c(),J(Ne.$$.fragment),ns=c(),Z.c(),ol=c(),De=f("p"),De.textContent=it,as=c(),J(Ee.$$.fragment),rs=c(),Ge=f("p"),Ge.textContent=ct,ps=c(),J(Ve.$$.fragment),is=c(),z.c(),ml=c(),Ze=f("p"),Ze.innerHTML=Mt,cs=c(),R.c(),yl=c(),B.c(),fl=c(),He=f("p"),He.innerHTML=ut,Ms=c(),ze=f("p"),ze.innerHTML=ot,us=c(),J(Se.$$.fragment),os=c(),J(Re.$$.fragment),ms=c(),We=f("p"),We.textContent=mt,ys=c(),Be=f("ul"),Be.innerHTML=yt,fs=c(),Le=f("p"),Le.textContent=ft,Ts=c(),J(q.$$.fragment),bs=c(),J(Fe.$$.fragment),Js=c(),bl=f("p"),this.h()},l(e){const t=Pt("svelte-u9bgzb",document.head);s=T(t,"META",{name:!0,content:!0}),t.forEach(n),r=M(e),l=T(e,"P",{}),zt(l).forEach(n),i=M(e),U(u.$$.fragment,e),p=M(e),U(w.$$.fragment,e),Jl=M(e),U(K.$$.fragment,e),Ul=M(e),_.l(e),al=M(e),U(X.$$.fragment,e),jl=M(e),k.l(e),rl=M(e),O=T(e,"P",{"data-svelte-h":!0}),b(O)!=="svelte-g9xmns"&&(O.innerHTML=vs),dl=M(e),U(ee.$$.fragment,e),wl=M(e),le=T(e,"P",{"data-svelte-h":!0}),b(le)!=="svelte-wl1uu7"&&(le.textContent=Qs),hl=M(e),U(se.$$.fragment,e),$l=M(e),te=T(e,"P",{"data-svelte-h":!0}),b(te)!=="svelte-1iq5920"&&(te.innerHTML=Ns),_l=M(e),Y=T(e,"DIV",{class:!0,"data-svelte-h":!0}),b(Y)!=="svelte-fbe70j"&&(Y.innerHTML=Ds),Cl=M(e),ne=T(e,"P",{"data-svelte-h":!0}),b(ne)!=="svelte-vi0ems"&&(ne.textContent=Es),kl=M(e),U(ae.$$.fragment,e),Il=M(e),re=T(e,"P",{"data-svelte-h":!0}),b(re)!=="svelte-e4ngzp"&&(re.innerHTML=Gs),gl=M(e),pe=T(e,"UL",{"data-svelte-h":!0}),b(pe)!=="svelte-cxgkxr"&&(pe.innerHTML=Vs),Al=M(e),ie=T(e,"P",{"data-svelte-h":!0}),b(ie)!=="svelte-w17t67"&&(ie.innerHTML=Zs),xl=M(e),ce=T(e,"P",{"data-svelte-h":!0}),b(ce)!=="svelte-79gaho"&&(ce.innerHTML=Hs),vl=M(e),U(Me.$$.fragment,e),Ql=M(e),ue=T(e,"P",{"data-svelte-h":!0}),b(ue)!=="svelte-1rskcen"&&(ue.textContent=zs),Nl=M(e),oe=T(e,"P",{"data-svelte-h":!0}),b(oe)!=="svelte-1yfq89p"&&(oe.innerHTML=Ss),Dl=M(e),me=T(e,"P",{"data-svelte-h":!0}),b(me)!=="svelte-yp4x9m"&&(me.innerHTML=Rs),El=M(e),g.l(e),pl=M(e),ye=T(e,"P",{"data-svelte-h":!0}),b(ye)!=="svelte-12luxqf"&&(ye.textContent=Ws),Gl=M(e),x.l(e),il=M(e),fe=T(e,"P",{"data-svelte-h":!0}),b(fe)!=="svelte-4zxdhb"&&(fe.innerHTML=Bs),Vl=M(e),U(Te.$$.fragment,e),Zl=M(e),Q.l(e),cl=M(e),be=T(e,"P",{"data-svelte-h":!0}),b(be)!=="svelte-1kq8h6f"&&(be.textContent=Ls),Hl=M(e),Je=T(e,"P",{"data-svelte-h":!0}),b(Je)!=="svelte-1m8n2tn"&&(Je.innerHTML=Fs),zl=M(e),Ue=T(e,"P",{"data-svelte-h":!0}),b(Ue)!=="svelte-xwzhyw"&&(Ue.textContent=Xs),Sl=M(e),je=T(e,"P",{"data-svelte-h":!0}),b(je)!=="svelte-1j1df6u"&&(je.innerHTML=Ys),Rl=M(e),U(de.$$.fragment,e),Wl=M(e),we=T(e,"P",{"data-svelte-h":!0}),b(we)!=="svelte-118vqvh"&&(we.textContent=Ps),Bl=M(e),he=T(e,"UL",{"data-svelte-h":!0}),b(he)!=="svelte-1yer64p"&&(he.innerHTML=qs),Ll=M(e),$e=T(e,"P",{"data-svelte-h":!0}),b($e)!=="svelte-1ldcz1p"&&($e.textContent=Ks),Fl=M(e),_e=T(e,"P",{"data-svelte-h":!0}),b(_e)!=="svelte-foiu8f"&&(_e.textContent=Os),Xl=M(e),D.l(e),Ml=M(e),Ce=T(e,"P",{"data-svelte-h":!0}),b(Ce)!=="svelte-it37lc"&&(Ce.innerHTML=et),Yl=M(e),U(ke.$$.fragment,e),Pl=M(e),Ie=T(e,"P",{"data-svelte-h":!0}),b(Ie)!=="svelte-13d2s5r"&&(Ie.textContent=lt),ql=M(e),P=T(e,"DIV",{class:!0,"data-svelte-h":!0}),b(P)!=="svelte-8mo6lt"&&(P.innerHTML=st),Kl=M(e),ge=T(e,"P",{"data-svelte-h":!0}),b(ge)!=="svelte-k1g54v"&&(ge.textContent=tt),Ol=M(e),Ae=T(e,"P",{"data-svelte-h":!0}),b(Ae)!=="svelte-did2wt"&&(Ae.textContent=nt),es=M(e),xe=T(e,"P",{"data-svelte-h":!0}),b(xe)!=="svelte-1bvhwer"&&(xe.textContent=at),ls=M(e),ve=T(e,"UL",{"data-svelte-h":!0}),b(ve)!=="svelte-nf90ig"&&(ve.innerHTML=rt),ss=M(e),G.l(e),ul=M(e),Qe=T(e,"P",{"data-svelte-h":!0}),b(Qe)!=="svelte-19v4iwk"&&(Qe.textContent=pt),ts=M(e),U(Ne.$$.fragment,e),ns=M(e),Z.l(e),ol=M(e),De=T(e,"P",{"data-svelte-h":!0}),b(De)!=="svelte-vcufcz"&&(De.textContent=it),as=M(e),U(Ee.$$.fragment,e),rs=M(e),Ge=T(e,"P",{"data-svelte-h":!0}),b(Ge)!=="svelte-1fm5gwp"&&(Ge.textContent=ct),ps=M(e),U(Ve.$$.fragment,e),is=M(e),z.l(e),ml=M(e),Ze=T(e,"P",{"data-svelte-h":!0}),b(Ze)!=="svelte-a9kzjr"&&(Ze.innerHTML=Mt),cs=M(e),R.l(e),yl=M(e),B.l(e),fl=M(e),He=T(e,"P",{"data-svelte-h":!0}),b(He)!=="svelte-11qcsxk"&&(He.innerHTML=ut),Ms=M(e),ze=T(e,"P",{"data-svelte-h":!0}),b(ze)!=="svelte-16uv0pg"&&(ze.innerHTML=ot),us=M(e),U(Se.$$.fragment,e),os=M(e),U(Re.$$.fragment,e),ms=M(e),We=T(e,"P",{"data-svelte-h":!0}),b(We)!=="svelte-1qu5r5q"&&(We.textContent=mt),ys=M(e),Be=T(e,"UL",{"data-svelte-h":!0}),b(Be)!=="svelte-a79kkl"&&(Be.innerHTML=yt),fs=M(e),Le=T(e,"P",{"data-svelte-h":!0}),b(Le)!=="svelte-ptsq7t"&&(Le.textContent=ft),Ts=M(e),U(q.$$.fragment,e),bs=M(e),U(Fe.$$.fragment,e),Js=M(e),bl=T(e,"P",{}),zt(bl).forEach(n),this.h()},h(){js(s,"name","hf:doc:metadata"),js(s,"content",gn),js(Y,"class","flex justify-center"),js(P,"class","flex justify-center")},m(e,t){qt(document.head,s),a(e,r,t),a(e,l,t),a(e,i,t),j(u,e,t),a(e,p,t),j(w,e,t),a(e,Jl,t),j(K,e,t),a(e,Ul,t),Xe[$].m(e,t),a(e,al,t),j(X,e,t),a(e,jl,t),Ye[C].m(e,t),a(e,rl,t),a(e,O,t),a(e,dl,t),j(ee,e,t),a(e,wl,t),a(e,le,t),a(e,hl,t),j(se,e,t),a(e,$l,t),a(e,te,t),a(e,_l,t),a(e,Y,t),a(e,Cl,t),a(e,ne,t),a(e,kl,t),j(ae,e,t),a(e,Il,t),a(e,re,t),a(e,gl,t),a(e,pe,t),a(e,Al,t),a(e,ie,t),a(e,xl,t),a(e,ce,t),a(e,vl,t),j(Me,e,t),a(e,Ql,t),a(e,ue,t),a(e,Nl,t),a(e,oe,t),a(e,Dl,t),a(e,me,t),a(e,El,t),Pe[I].m(e,t),a(e,pl,t),a(e,ye,t),a(e,Gl,t),qe[A].m(e,t),a(e,il,t),a(e,fe,t),a(e,Vl,t),j(Te,e,t),a(e,Zl,t),Ke[v].m(e,t),a(e,cl,t),a(e,be,t),a(e,Hl,t),a(e,Je,t),a(e,zl,t),a(e,Ue,t),a(e,Sl,t),a(e,je,t),a(e,Rl,t),j(de,e,t),a(e,Wl,t),a(e,we,t),a(e,Bl,t),a(e,he,t),a(e,Ll,t),a(e,$e,t),a(e,Fl,t),a(e,_e,t),a(e,Xl,t),Oe[N].m(e,t),a(e,Ml,t),a(e,Ce,t),a(e,Yl,t),j(ke,e,t),a(e,Pl,t),a(e,Ie,t),a(e,ql,t),a(e,P,t),a(e,Kl,t),a(e,ge,t),a(e,Ol,t),a(e,Ae,t),a(e,es,t),a(e,xe,t),a(e,ls,t),a(e,ve,t),a(e,ss,t),el[E].m(e,t),a(e,ul,t),a(e,Qe,t),a(e,ts,t),j(Ne,e,t),a(e,ns,t),ll[V].m(e,t),a(e,ol,t),a(e,De,t),a(e,as,t),j(Ee,e,t),a(e,rs,t),a(e,Ge,t),a(e,ps,t),j(Ve,e,t),a(e,is,t),sl[H].m(e,t),a(e,ml,t),a(e,Ze,t),a(e,cs,t),tl[S].m(e,t),a(e,yl,t),nl[W].m(e,t),a(e,fl,t),a(e,He,t),a(e,Ms,t),a(e,ze,t),a(e,us,t),j(Se,e,t),a(e,os,t),j(Re,e,t),a(e,ms,t),a(e,We,t),a(e,ys,t),a(e,Be,t),a(e,fs,t),a(e,Le,t),a(e,Ts,t),j(q,e,t),a(e,bs,t),j(Fe,e,t),a(e,Js,t),a(e,bl,t),Us=!0},p(e,[t]){const Vt={};t&1&&(Vt.fw=e[0]),u.$set(Vt);let ds=$;$=bt(e),$!==ds&&(F(),o(Xe[ds],1,1,()=>{Xe[ds]=null}),L(),_=Xe[$],_||(_=Xe[$]=Tt[$](e),_.c()),m(_,1),_.m(al.parentNode,al));const Zt={};t&2&&(Zt.$$scope={dirty:t,ctx:e}),X.$set(Zt);let ws=C;C=Ut(e),C!==ws&&(F(),o(Ye[ws],1,1,()=>{Ye[ws]=null}),L(),k=Ye[C],k||(k=Ye[C]=Jt[C](e),k.c()),m(k,1),k.m(rl.parentNode,rl));let hs=I;I=dt(e),I!==hs&&(F(),o(Pe[hs],1,1,()=>{Pe[hs]=null}),L(),g=Pe[I],g||(g=Pe[I]=jt[I](e),g.c()),m(g,1),g.m(pl.parentNode,pl));let $s=A;A=ht(e),A!==$s&&(F(),o(qe[$s],1,1,()=>{qe[$s]=null}),L(),x=qe[A],x||(x=qe[A]=wt[A](e),x.c()),m(x,1),x.m(il.parentNode,il));let _s=v;v=_t(e),v!==_s&&(F(),o(Ke[_s],1,1,()=>{Ke[_s]=null}),L(),Q=Ke[v],Q||(Q=Ke[v]=$t[v](e),Q.c()),m(Q,1),Q.m(cl.parentNode,cl));let Cs=N;N=kt(e),N!==Cs&&(F(),o(Oe[Cs],1,1,()=>{Oe[Cs]=null}),L(),D=Oe[N],D||(D=Oe[N]=Ct[N](e),D.c()),m(D,1),D.m(Ml.parentNode,Ml));let ks=E;E=gt(e),E!==ks&&(F(),o(el[ks],1,1,()=>{el[ks]=null}),L(),G=el[E],G||(G=el[E]=It[E](e),G.c()),m(G,1),G.m(ul.parentNode,ul));let Is=V;V=xt(e),V!==Is&&(F(),o(ll[Is],1,1,()=>{ll[Is]=null}),L(),Z=ll[V],Z||(Z=ll[V]=At[V](e),Z.c()),m(Z,1),Z.m(ol.parentNode,ol));let gs=H;H=Qt(e),H!==gs&&(F(),o(sl[gs],1,1,()=>{sl[gs]=null}),L(),z=sl[H],z||(z=sl[H]=vt[H](e),z.c()),m(z,1),z.m(ml.parentNode,ml));let As=S;S=Dt(e),S!==As&&(F(),o(tl[As],1,1,()=>{tl[As]=null}),L(),R=tl[S],R||(R=tl[S]=Nt[S](e),R.c()),m(R,1),R.m(yl.parentNode,yl));let xs=W;W=Gt(e),W!==xs&&(F(),o(nl[xs],1,1,()=>{nl[xs]=null}),L(),B=nl[W],B||(B=nl[W]=Et[W](e),B.c()),m(B,1),B.m(fl.parentNode,fl));const Ht={};t&2&&(Ht.$$scope={dirty:t,ctx:e}),q.$set(Ht)},i(e){Us||(m(u.$$.fragment,e),m(w.$$.fragment,e),m(K.$$.fragment,e),m(_),m(X.$$.fragment,e),m(k),m(ee.$$.fragment,e),m(se.$$.fragment,e),m(ae.$$.fragment,e),m(Me.$$.fragment,e),m(g),m(x),m(Te.$$.fragment,e),m(Q),m(de.$$.fragment,e),m(D),m(ke.$$.fragment,e),m(G),m(Ne.$$.fragment,e),m(Z),m(Ee.$$.fragment,e),m(Ve.$$.fragment,e),m(z),m(R),m(B),m(Se.$$.fragment,e),m(Re.$$.fragment,e),m(q.$$.fragment,e),m(Fe.$$.fragment,e),Us=!0)},o(e){o(u.$$.fragment,e),o(w.$$.fragment,e),o(K.$$.fragment,e),o(_),o(X.$$.fragment,e),o(k),o(ee.$$.fragment,e),o(se.$$.fragment,e),o(ae.$$.fragment,e),o(Me.$$.fragment,e),o(g),o(x),o(Te.$$.fragment,e),o(Q),o(de.$$.fragment,e),o(D),o(ke.$$.fragment,e),o(G),o(Ne.$$.fragment,e),o(Z),o(Ee.$$.fragment,e),o(Ve.$$.fragment,e),o(z),o(R),o(B),o(Se.$$.fragment,e),o(Re.$$.fragment,e),o(q.$$.fragment,e),o(Fe.$$.fragment,e),Us=!1},d(e){e&&(n(r),n(l),n(i),n(p),n(Jl),n(Ul),n(al),n(jl),n(rl),n(O),n(dl),n(wl),n(le),n(hl),n($l),n(te),n(_l),n(Y),n(Cl),n(ne),n(kl),n(Il),n(re),n(gl),n(pe),n(Al),n(ie),n(xl),n(ce),n(vl),n(Ql),n(ue),n(Nl),n(oe),n(Dl),n(me),n(El),n(pl),n(ye),n(Gl),n(il),n(fe),n(Vl),n(Zl),n(cl),n(be),n(Hl),n(Je),n(zl),n(Ue),n(Sl),n(je),n(Rl),n(Wl),n(we),n(Bl),n(he),n(Ll),n($e),n(Fl),n(_e),n(Xl),n(Ml),n(Ce),n(Yl),n(Pl),n(Ie),n(ql),n(P),n(Kl),n(ge),n(Ol),n(Ae),n(es),n(xe),n(ls),n(ve),n(ss),n(ul),n(Qe),n(ts),n(ns),n(ol),n(De),n(as),n(rs),n(Ge),n(ps),n(is),n(ml),n(Ze),n(cs),n(yl),n(fl),n(He),n(Ms),n(ze),n(us),n(os),n(ms),n(We),n(ys),n(Be),n(fs),n(Le),n(Ts),n(bs),n(Js),n(bl)),n(s),d(u,e),d(w,e),d(K,e),Xe[$].d(e),d(X,e),Ye[C].d(e),d(ee,e),d(se,e),d(ae,e),d(Me,e),Pe[I].d(e),qe[A].d(e),d(Te,e),Ke[v].d(e),d(de,e),Oe[N].d(e),d(ke,e),el[E].d(e),d(Ne,e),ll[V].d(e),d(Ee,e),d(Ve,e),sl[H].d(e),tl[S].d(e),nl[W].d(e),d(Se,e),d(Re,e),d(q,e),d(Fe,e)}}}const gn='{"title":"파이프라인 내부 동작 과정","local":"behind-the-pipeline","sections":[{"title":"토크나이저를 이용한 전처리","local":"preprocessing-with-a-tokenizer","sections":[],"depth":2},{"title":"모델 살펴보기","local":"going-through-the-model","sections":[{"title":"고차원 벡터란?","local":"a-high-dimensional-vector","sections":[],"depth":3},{"title":"모델 헤드: 숫자로 이해하기","local":"model-heads-making-sense-out-of-numbers","sections":[],"depth":3}],"depth":2},{"title":"출력 후처리","local":"postprocessing-the-output","sections":[],"depth":2}],"depth":1}';function An(y,s,r){let l="pt";return Lt(()=>{const i=new URLSearchParams(window.location.search);r(0,l=i.get("fw")||"pt")}),[l]}class Zn extends Xt{constructor(s){super(),Yt(this,s,An,In,Bt,{})}}export{Zn as component};
