import{s as zl,o as Sl,n as Wl}from"../chunks/scheduler.37c15a92.js";import{S as Rl,i as Bl,g as y,s as p,r as w,A as Ll,h as f,f as n,c,j as Gl,u as b,x as d,k as fs,y as Fl,a,v as T,t as m,b as L,d as M,w as J,m as Xl,n as Yl,p as F}from"../chunks/index.2bf4358c.js";import{T as Vl}from"../chunks/Tip.363c041f.js";import{Y as Zl}from"../chunks/Youtube.1e50a667.js";import{C as j}from"../chunks/CodeBlock.4f5fc1ad.js";import{C as Hl}from"../chunks/CourseFloatingBanner.15ba07e6.js";import{F as Pl}from"../chunks/FrameworkSwitchCourse.8d4d4ab6.js";import{H as ht}from"../chunks/Heading.8ada512a.js";function ql(h){let s,r;return s=new Hl({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(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function Kl(h){let s,r;return s=new Hl({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(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function Ol(h){let s;return{c(){s=Xl("This is the first section where the content is slightly different depending on whether you use PyTorch or TensorFlow. Toggle the switch on top of the title to select the platform you prefer!")},l(r){s=Yl(r,"This is the first section where the content is slightly different depending on whether you use PyTorch or TensorFlow. Toggle the switch on top of the title to select the platform you prefer!")},m(r,t){a(r,s,t)},d(r){r&&n(s)}}}function en(h){let s,r;return s=new Zl({props:{id:"wVN12smEvqg"}}),{c(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function tn(h){let s,r;return s=new Zl({props:{id:"1pedAIvTWXk"}}),{c(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function sn(h){let s,r;return s=new j({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(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function ln(h){let s,r;return s=new j({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(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function nn(h){let s,r="Here’s what the results look like as TensorFlow tensors:",t,o,u;return o=new j({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=y("p"),s.textContent=r,t=p(),w(o.$$.fragment)},l(i){s=f(i,"P",{"data-svelte-h":!0}),d(s)!=="svelte-pi8yu"&&(s.textContent=r),t=c(i),b(o.$$.fragment,i)},m(i,U){a(i,s,U),a(i,t,U),T(o,i,U),u=!0},i(i){u||(M(o.$$.fragment,i),u=!0)},o(i){m(o.$$.fragment,i),u=!1},d(i){i&&(n(s),n(t)),J(o,i)}}}function an(h){let s,r="Here’s what the results look like as PyTorch tensors:",t,o,u;return o=new j({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=y("p"),s.textContent=r,t=p(),w(o.$$.fragment)},l(i){s=f(i,"P",{"data-svelte-h":!0}),d(s)!=="svelte-14j15ya"&&(s.textContent=r),t=c(i),b(o.$$.fragment,i)},m(i,U){a(i,s,U),a(i,t,U),T(o,i,U),u=!0},i(i){u||(M(o.$$.fragment,i),u=!0)},o(i){m(o.$$.fragment,i),u=!1},d(i){i&&(n(s),n(t)),J(o,i)}}}function rn(h){let s,r="We can download our pretrained model the same way we did with our tokenizer. 🤗 Transformers provides an <code>TFAutoModel</code> class which also has a <code>from_pretrained</code> method:",t,o,u;return o=new j({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=y("p"),s.innerHTML=r,t=p(),w(o.$$.fragment)},l(i){s=f(i,"P",{"data-svelte-h":!0}),d(s)!=="svelte-f8jo3w"&&(s.innerHTML=r),t=c(i),b(o.$$.fragment,i)},m(i,U){a(i,s,U),a(i,t,U),T(o,i,U),u=!0},i(i){u||(M(o.$$.fragment,i),u=!0)},o(i){m(o.$$.fragment,i),u=!1},d(i){i&&(n(s),n(t)),J(o,i)}}}function on(h){let s,r="We can download our pretrained model the same way we did with our tokenizer. 🤗 Transformers provides an <code>AutoModel</code> class which also has a <code>from_pretrained()</code> method:",t,o,u;return o=new j({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=y("p"),s.innerHTML=r,t=p(),w(o.$$.fragment)},l(i){s=f(i,"P",{"data-svelte-h":!0}),d(s)!=="svelte-1hvpt07"&&(s.innerHTML=r),t=c(i),b(o.$$.fragment,i)},m(i,U){a(i,s,U),a(i,t,U),T(o,i,U),u=!0},i(i){u||(M(o.$$.fragment,i),u=!0)},o(i){m(o.$$.fragment,i),u=!1},d(i){i&&(n(s),n(t)),J(o,i)}}}function pn(h){let s,r,t,o;return s=new j({props:{code:"b3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMEFwcmludChvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRlLnNoYXBlKQ==",highlighted:`outputs = model(inputs)
<span class="hljs-built_in">print</span>(outputs.last_hidden_state.shape)`,wrap:!1}}),t=new j({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(){w(s.$$.fragment),r=p(),w(t.$$.fragment)},l(u){b(s.$$.fragment,u),r=c(u),b(t.$$.fragment,u)},m(u,i){T(s,u,i),a(u,r,i),T(t,u,i),o=!0},i(u){o||(M(s.$$.fragment,u),M(t.$$.fragment,u),o=!0)},o(u){m(s.$$.fragment,u),m(t.$$.fragment,u),o=!1},d(u){u&&n(r),J(s,u),J(t,u)}}}function cn(h){let s,r,t,o;return s=new j({props:{code:"b3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQXByaW50KG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUuc2hhcGUp",highlighted:`outputs = model(**inputs)
<span class="hljs-built_in">print</span>(outputs.last_hidden_state.shape)`,wrap:!1}}),t=new j({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(){w(s.$$.fragment),r=p(),w(t.$$.fragment)},l(u){b(s.$$.fragment,u),r=c(u),b(t.$$.fragment,u)},m(u,i){T(s,u,i),a(u,r,i),T(t,u,i),o=!0},i(u){o||(M(s.$$.fragment,u),M(t.$$.fragment,u),o=!0)},o(u){m(s.$$.fragment,u),m(t.$$.fragment,u),o=!1},d(u){u&&n(r),J(s,u),J(t,u)}}}function un(h){let s,r="For our example, we will need a model with a sequence classification head (to be able to classify the sentences as positive or negative). So, we won’t actually use the <code>TFAutoModel</code> class, but <code>TFAutoModelForSequenceClassification</code>:",t,o,u;return o=new j({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=y("p"),s.innerHTML=r,t=p(),w(o.$$.fragment)},l(i){s=f(i,"P",{"data-svelte-h":!0}),d(s)!=="svelte-6up9xi"&&(s.innerHTML=r),t=c(i),b(o.$$.fragment,i)},m(i,U){a(i,s,U),a(i,t,U),T(o,i,U),u=!0},i(i){u||(M(o.$$.fragment,i),u=!0)},o(i){m(o.$$.fragment,i),u=!1},d(i){i&&(n(s),n(t)),J(o,i)}}}function mn(h){let s,r="For our example, we will need a model with a sequence classification head (to be able to classify the sentences as positive or negative). So, we won’t actually use the <code>AutoModel</code> class, but <code>AutoModelForSequenceClassification</code>:",t,o,u;return o=new j({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=y("p"),s.innerHTML=r,t=p(),w(o.$$.fragment)},l(i){s=f(i,"P",{"data-svelte-h":!0}),d(s)!=="svelte-35osqu"&&(s.innerHTML=r),t=c(i),b(o.$$.fragment,i)},m(i,U){a(i,s,U),a(i,t,U),T(o,i,U),u=!0},i(i){u||(M(o.$$.fragment,i),u=!0)},o(i){m(o.$$.fragment,i),u=!1},d(i){i&&(n(s),n(t)),J(o,i)}}}function Mn(h){let s,r;return s=new j({props:{code:"KDIlMkMlMjAyKQ==",highlighted:'(<span class="hljs-number">2</span>, <span class="hljs-number">2</span>)',wrap:!1}}),{c(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function hn(h){let s,r;return s=new j({props:{code:"dG9yY2guU2l6ZSglNUIyJTJDJTIwMiU1RCk=",highlighted:'torch.Size([<span class="hljs-number">2</span>, <span class="hljs-number">2</span>])',wrap:!1}}),{c(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function yn(h){let s,r;return s=new j({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(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function fn(h){let s,r;return s=new j({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(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function dn(h){let s,r;return s=new j({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(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function wn(h){let s,r;return s=new j({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(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function bn(h){let s,r;return s=new j({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(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function Tn(h){let s,r;return s=new j({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(){w(s.$$.fragment)},l(t){b(s.$$.fragment,t)},m(t,o){T(s,t,o),r=!0},i(t){r||(M(s.$$.fragment,t),r=!0)},o(t){m(s.$$.fragment,t),r=!1},d(t){J(s,t)}}}function Jn(h){let s,r="✏️ <strong>Try it out!</strong> Choose two (or more) texts of your own and run them through the <code>sentiment-analysis</code> pipeline. Then replicate the steps you saw here yourself and check that you obtain the same results!";return{c(){s=y("p"),s.innerHTML=r},l(t){s=f(t,"P",{"data-svelte-h":!0}),d(s)!=="svelte-x1krla"&&(s.innerHTML=r)},m(t,o){a(t,s,o)},p:Wl,d(t){t&&n(s)}}}function Un(h){let s,r,t,o,u,i,U,ft,k,_,lt,X,dt,$,C,nt,K,gs='Let’s start with a complete example, taking a look at what happened behind the scenes when we executed the following code in <a href="/course/chapter1">Chapter 1</a>:',wt,O,bt,ee,Is="and obtained:",Tt,te,Jt,se,vs='As we saw in <a href="/course/chapter1">Chapter 1</a>, this pipeline groups together three steps: preprocessing, passing the inputs through the model, and postprocessing:',Ut,Y,As='<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."/>',jt,le,xs="Let’s quickly go over each of these.",kt,ne,_t,ae,Ns="Like other neural networks, Transformer models can’t process raw text directly, so the first step of our pipeline is to convert the text inputs into numbers that the model can make sense of. To do this we use a <em>tokenizer</em>, which will be responsible for:",$t,re,Qs="<li>Splitting the input into words, subwords, or symbols (like punctuation) that are called <em>tokens</em></li> <li>Mapping each token to an integer</li> <li>Adding additional inputs that may be useful to the model</li>",Ct,ie,Ds='All this preprocessing needs to be done in exactly the same way as when the model was pretrained, so we first need to download that information from the <a href="https://huggingface.co/models" rel="nofollow">Model Hub</a>. To do this, we use the <code>AutoTokenizer</code> class and its <code>from_pretrained()</code> method. Using the checkpoint name of our model, it will automatically fetch the data associated with the model’s tokenizer and cache it (so it’s only downloaded the first time you run the code below).',gt,oe,Es='Since the default checkpoint of the <code>sentiment-analysis</code> pipeline is <code>distilbert-base-uncased-finetuned-sst-2-english</code> (you can see its model card <a href="https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english" rel="nofollow">here</a>), we run the following:',It,pe,vt,ce,Gs="Once we have the tokenizer, we can directly pass our sentences to it and we’ll get back a dictionary that’s ready to feed to our model! The only thing left to do is to convert the list of input IDs to tensors.",At,ue,Vs="You can use 🤗 Transformers without having to worry about which ML framework is used as a backend; it might be PyTorch or TensorFlow, or Flax for some models. However, Transformer models only accept <em>tensors</em> as input. If this is your first time hearing about tensors, you can think of them as NumPy arrays instead. A NumPy array can be a scalar (0D), a vector (1D), a matrix (2D), or have more dimensions. It’s effectively a tensor; other ML frameworks’ tensors behave similarly, and are usually as simple to instantiate as NumPy arrays.",xt,me,Zs="To specify the type of tensors we want to get back (PyTorch, TensorFlow, or plain NumPy), we use the <code>return_tensors</code> argument:",Nt,g,I,at,Me,Hs="Don’t worry about padding and truncation just yet; we’ll explain those later. The main things to remember here are that you can pass one sentence or a list of sentences, as well as specifying the type of tensors you want to get back (if no type is passed, you will get a list of lists as a result).",Qt,v,A,rt,he,zs="The output itself is a dictionary containing two keys, <code>input_ids</code> and <code>attention_mask</code>. <code>input_ids</code> contains two rows of integers (one for each sentence) that are the unique identifiers of the tokens in each sentence. We’ll explain what the <code>attention_mask</code> is later in this chapter.",Dt,ye,Et,x,N,it,fe,Ss="In this code snippet, we have downloaded the same checkpoint we used in our pipeline before (it should actually have been cached already) and instantiated a model with it.",Gt,de,Ws="This architecture contains only the base Transformer module: given some inputs, it outputs what we’ll call <em>hidden states</em>, also known as <em>features</em>. For each model input, we’ll retrieve a high-dimensional vector representing the <strong>contextual understanding of that input by the Transformer model</strong>.",Vt,we,Rs="If this doesn’t make sense, don’t worry about it. We’ll explain it all later.",Zt,be,Bs='While these hidden states can be useful on their own, they’re usually inputs to another part of the model, known as the <em>head</em>. In <a href="/course/chapter1">Chapter 1</a>, the different tasks could have been performed with the same architecture, but each of these tasks will have a different head associated with it.',Ht,Te,zt,Je,Ls="The vector output by the Transformer module is usually large. It generally has three dimensions:",St,Ue,Fs="<li><strong>Batch size</strong>: The number of sequences processed at a time (2 in our example).</li> <li><strong>Sequence length</strong>: The length of the numerical representation of the sequence (16 in our example).</li> <li><strong>Hidden size</strong>: The vector dimension of each model input.</li>",Wt,je,Xs="It is said to be “high dimensional” because of the last value. The hidden size can be very large (768 is common for smaller models, and in larger models this can reach 3072 or more).",Rt,ke,Ys="We can see this if we feed the inputs we preprocessed to our model:",Bt,Q,D,ot,_e,Ps="Note that the outputs of 🤗 Transformers models behave like <code>namedtuple</code>s or dictionaries. You can access the elements by attributes (like we did) or by key (<code>outputs[&quot;last_hidden_state&quot;]</code>), or even by index if you know exactly where the thing you are looking for is (<code>outputs[0]</code>).",Lt,$e,Ft,Ce,qs="The model heads take the high-dimensional vector of hidden states as input and project them onto a different dimension. They are usually composed of one or a few linear layers:",Xt,P,Ks='<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."/>',Yt,ge,Os="The output of the Transformer model is sent directly to the model head to be processed.",Pt,Ie,el="In this diagram, the model is represented by its embeddings layer and the subsequent layers. The embeddings layer converts each input ID in the tokenized input into a vector that represents the associated token. The subsequent layers manipulate those vectors using the attention mechanism to produce the final representation of the sentences.",qt,ve,tl="There are many different architectures available in 🤗 Transformers, with each one designed around tackling a specific task. Here is a non-exhaustive list:",Kt,Ae,sl="<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>and others 🤗</li>",Ot,E,G,pt,xe,ll="Now if we look at the shape of our outputs, the dimensionality will be much lower: the model head takes as input the high-dimensional vectors we saw before, and outputs vectors containing two values (one per label):",es,Ne,ts,V,Z,ct,Qe,nl="Since we have just two sentences and two labels, the result we get from our model is of shape 2 x 2.",ss,De,ls,Ee,al="The values we get as output from our model don’t necessarily make sense by themselves. Let’s take a look:",ns,Ge,as,H,z,ut,Ve,rl='Our model predicted <code>[-1.5607, 1.6123]</code> for the first sentence and <code>[ 4.1692, -3.3464]</code> for the second one. Those are not probabilities but <em>logits</em>, the raw, unnormalized scores outputted by the last layer of the model. To be converted to probabilities, they need to go through a <a href="https://en.wikipedia.org/wiki/Softmax_function" rel="nofollow">SoftMax</a> layer (all 🤗 Transformers models output the logits, as the loss function for training will generally fuse the last activation function, such as SoftMax, with the actual loss function, such as cross entropy):',rs,S,W,mt,R,B,Mt,Ze,il="Now we can see that the model predicted <code>[0.0402, 0.9598]</code> for the first sentence and <code>[0.9995, 0.0005]</code> for the second one. These are recognizable probability scores.",is,He,ol="To get the labels corresponding to each position, we can inspect the <code>id2label</code> attribute of the model config (more on this in the next section):",os,ze,ps,Se,cs,We,pl="Now we can conclude that the model predicted the following:",us,Re,cl="<li>First sentence: NEGATIVE: 0.0402, POSITIVE: 0.9598</li> <li>Second sentence: NEGATIVE: 0.9995, POSITIVE: 0.0005</li>",ms,Be,ul="We have successfully reproduced the three steps of the pipeline: preprocessing with tokenizers, passing the inputs through the model, and postprocessing! Now let’s take some time to dive deeper into each of those steps.",Ms,q,hs,yt,ys;u=new Pl({props:{fw:h[0]}}),U=new ht({props:{title:"Behind the pipeline",local:"behind-the-pipeline",headingTag:"h1"}});const ml=[Kl,ql],Le=[];function Ml(e,l){return e[0]==="pt"?0:1}k=Ml(h),_=Le[k]=ml[k](h),X=new Vl({props:{$$slots:{default:[Ol]},$$scope:{ctx:h}}});const hl=[tn,en],Fe=[];function yl(e,l){return e[0]==="pt"?0:1}$=yl(h),C=Fe[$]=hl[$](h),O=new j({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}}),te=new j({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}}),ne=new ht({props:{title:"Preprocessing with a tokenizer",local:"preprocessing-with-a-tokenizer",headingTag:"h2"}}),pe=new j({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 fl=[ln,sn],Xe=[];function dl(e,l){return e[0]==="pt"?0:1}g=dl(h),I=Xe[g]=fl[g](h);const wl=[an,nn],Ye=[];function bl(e,l){return e[0]==="pt"?0:1}v=bl(h),A=Ye[v]=wl[v](h),ye=new ht({props:{title:"Going through the model",local:"going-through-the-model",headingTag:"h2"}});const Tl=[on,rn],Pe=[];function Jl(e,l){return e[0]==="pt"?0:1}x=Jl(h),N=Pe[x]=Tl[x](h),Te=new ht({props:{title:"A high-dimensional vector?",local:"a-high-dimensional-vector",headingTag:"h3"}});const Ul=[cn,pn],qe=[];function jl(e,l){return e[0]==="pt"?0:1}Q=jl(h),D=qe[Q]=Ul[Q](h),$e=new ht({props:{title:"Model heads: Making sense out of numbers",local:"model-heads-making-sense-out-of-numbers",headingTag:"h3"}});const kl=[mn,un],Ke=[];function _l(e,l){return e[0]==="pt"?0:1}E=_l(h),G=Ke[E]=kl[E](h),Ne=new j({props:{code:"cHJpbnQob3V0cHV0cy5sb2dpdHMuc2hhcGUp",highlighted:'<span class="hljs-built_in">print</span>(outputs.logits.shape)',wrap:!1}});const $l=[hn,Mn],Oe=[];function Cl(e,l){return e[0]==="pt"?0:1}V=Cl(h),Z=Oe[V]=$l[V](h),De=new ht({props:{title:"Postprocessing the output",local:"postprocessing-the-output",headingTag:"h2"}}),Ge=new j({props:{code:"cHJpbnQob3V0cHV0cy5sb2dpdHMp",highlighted:'<span class="hljs-built_in">print</span>(outputs.logits)',wrap:!1}});const gl=[fn,yn],et=[];function Il(e,l){return e[0]==="pt"?0:1}H=Il(h),z=et[H]=gl[H](h);const vl=[wn,dn],tt=[];function Al(e,l){return e[0]==="pt"?0:1}S=Al(h),W=tt[S]=vl[S](h);const xl=[Tn,bn],st=[];function Nl(e,l){return e[0]==="pt"?0:1}return R=Nl(h),B=st[R]=xl[R](h),ze=new j({props:{code:"bW9kZWwuY29uZmlnLmlkMmxhYmVs",highlighted:"model.config.id2label",wrap:!1}}),Se=new j({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 Vl({props:{$$slots:{default:[Jn]},$$scope:{ctx:h}}}),{c(){s=y("meta"),r=p(),t=y("p"),o=p(),w(u.$$.fragment),i=p(),w(U.$$.fragment),ft=p(),_.c(),lt=p(),w(X.$$.fragment),dt=p(),C.c(),nt=p(),K=y("p"),K.innerHTML=gs,wt=p(),w(O.$$.fragment),bt=p(),ee=y("p"),ee.textContent=Is,Tt=p(),w(te.$$.fragment),Jt=p(),se=y("p"),se.innerHTML=vs,Ut=p(),Y=y("div"),Y.innerHTML=As,jt=p(),le=y("p"),le.textContent=xs,kt=p(),w(ne.$$.fragment),_t=p(),ae=y("p"),ae.innerHTML=Ns,$t=p(),re=y("ul"),re.innerHTML=Qs,Ct=p(),ie=y("p"),ie.innerHTML=Ds,gt=p(),oe=y("p"),oe.innerHTML=Es,It=p(),w(pe.$$.fragment),vt=p(),ce=y("p"),ce.textContent=Gs,At=p(),ue=y("p"),ue.innerHTML=Vs,xt=p(),me=y("p"),me.innerHTML=Zs,Nt=p(),I.c(),at=p(),Me=y("p"),Me.textContent=Hs,Qt=p(),A.c(),rt=p(),he=y("p"),he.innerHTML=zs,Dt=p(),w(ye.$$.fragment),Et=p(),N.c(),it=p(),fe=y("p"),fe.textContent=Ss,Gt=p(),de=y("p"),de.innerHTML=Ws,Vt=p(),we=y("p"),we.textContent=Rs,Zt=p(),be=y("p"),be.innerHTML=Bs,Ht=p(),w(Te.$$.fragment),zt=p(),Je=y("p"),Je.textContent=Ls,St=p(),Ue=y("ul"),Ue.innerHTML=Fs,Wt=p(),je=y("p"),je.textContent=Xs,Rt=p(),ke=y("p"),ke.textContent=Ys,Bt=p(),D.c(),ot=p(),_e=y("p"),_e.innerHTML=Ps,Lt=p(),w($e.$$.fragment),Ft=p(),Ce=y("p"),Ce.textContent=qs,Xt=p(),P=y("div"),P.innerHTML=Ks,Yt=p(),ge=y("p"),ge.textContent=Os,Pt=p(),Ie=y("p"),Ie.textContent=el,qt=p(),ve=y("p"),ve.textContent=tl,Kt=p(),Ae=y("ul"),Ae.innerHTML=sl,Ot=p(),G.c(),pt=p(),xe=y("p"),xe.textContent=ll,es=p(),w(Ne.$$.fragment),ts=p(),Z.c(),ct=p(),Qe=y("p"),Qe.textContent=nl,ss=p(),w(De.$$.fragment),ls=p(),Ee=y("p"),Ee.textContent=al,ns=p(),w(Ge.$$.fragment),as=p(),z.c(),ut=p(),Ve=y("p"),Ve.innerHTML=rl,rs=p(),W.c(),mt=p(),B.c(),Mt=p(),Ze=y("p"),Ze.innerHTML=il,is=p(),He=y("p"),He.innerHTML=ol,os=p(),w(ze.$$.fragment),ps=p(),w(Se.$$.fragment),cs=p(),We=y("p"),We.textContent=pl,us=p(),Re=y("ul"),Re.innerHTML=cl,ms=p(),Be=y("p"),Be.textContent=ul,Ms=p(),w(q.$$.fragment),hs=p(),yt=y("p"),this.h()},l(e){const l=Ll("svelte-u9bgzb",document.head);s=f(l,"META",{name:!0,content:!0}),l.forEach(n),r=c(e),t=f(e,"P",{}),Gl(t).forEach(n),o=c(e),b(u.$$.fragment,e),i=c(e),b(U.$$.fragment,e),ft=c(e),_.l(e),lt=c(e),b(X.$$.fragment,e),dt=c(e),C.l(e),nt=c(e),K=f(e,"P",{"data-svelte-h":!0}),d(K)!=="svelte-j1te7i"&&(K.innerHTML=gs),wt=c(e),b(O.$$.fragment,e),bt=c(e),ee=f(e,"P",{"data-svelte-h":!0}),d(ee)!=="svelte-16jsacb"&&(ee.textContent=Is),Tt=c(e),b(te.$$.fragment,e),Jt=c(e),se=f(e,"P",{"data-svelte-h":!0}),d(se)!=="svelte-19ql29h"&&(se.innerHTML=vs),Ut=c(e),Y=f(e,"DIV",{class:!0,"data-svelte-h":!0}),d(Y)!=="svelte-fbe70j"&&(Y.innerHTML=As),jt=c(e),le=f(e,"P",{"data-svelte-h":!0}),d(le)!=="svelte-1mmhgnm"&&(le.textContent=xs),kt=c(e),b(ne.$$.fragment,e),_t=c(e),ae=f(e,"P",{"data-svelte-h":!0}),d(ae)!=="svelte-koy9hz"&&(ae.innerHTML=Ns),$t=c(e),re=f(e,"UL",{"data-svelte-h":!0}),d(re)!=="svelte-17s3a16"&&(re.innerHTML=Qs),Ct=c(e),ie=f(e,"P",{"data-svelte-h":!0}),d(ie)!=="svelte-on9h0q"&&(ie.innerHTML=Ds),gt=c(e),oe=f(e,"P",{"data-svelte-h":!0}),d(oe)!=="svelte-t8b40m"&&(oe.innerHTML=Es),It=c(e),b(pe.$$.fragment,e),vt=c(e),ce=f(e,"P",{"data-svelte-h":!0}),d(ce)!=="svelte-l75ftz"&&(ce.textContent=Gs),At=c(e),ue=f(e,"P",{"data-svelte-h":!0}),d(ue)!=="svelte-zkqkgq"&&(ue.innerHTML=Vs),xt=c(e),me=f(e,"P",{"data-svelte-h":!0}),d(me)!=="svelte-mey5yg"&&(me.innerHTML=Zs),Nt=c(e),I.l(e),at=c(e),Me=f(e,"P",{"data-svelte-h":!0}),d(Me)!=="svelte-5dheo"&&(Me.textContent=Hs),Qt=c(e),A.l(e),rt=c(e),he=f(e,"P",{"data-svelte-h":!0}),d(he)!=="svelte-ko08zm"&&(he.innerHTML=zs),Dt=c(e),b(ye.$$.fragment,e),Et=c(e),N.l(e),it=c(e),fe=f(e,"P",{"data-svelte-h":!0}),d(fe)!=="svelte-q7vos4"&&(fe.textContent=Ss),Gt=c(e),de=f(e,"P",{"data-svelte-h":!0}),d(de)!=="svelte-vpzu85"&&(de.innerHTML=Ws),Vt=c(e),we=f(e,"P",{"data-svelte-h":!0}),d(we)!=="svelte-u3nixm"&&(we.textContent=Rs),Zt=c(e),be=f(e,"P",{"data-svelte-h":!0}),d(be)!=="svelte-10yaw60"&&(be.innerHTML=Bs),Ht=c(e),b(Te.$$.fragment,e),zt=c(e),Je=f(e,"P",{"data-svelte-h":!0}),d(Je)!=="svelte-16q0yx"&&(Je.textContent=Ls),St=c(e),Ue=f(e,"UL",{"data-svelte-h":!0}),d(Ue)!=="svelte-1usd93i"&&(Ue.innerHTML=Fs),Wt=c(e),je=f(e,"P",{"data-svelte-h":!0}),d(je)!=="svelte-1y68z51"&&(je.textContent=Xs),Rt=c(e),ke=f(e,"P",{"data-svelte-h":!0}),d(ke)!=="svelte-1yd31f1"&&(ke.textContent=Ys),Bt=c(e),D.l(e),ot=c(e),_e=f(e,"P",{"data-svelte-h":!0}),d(_e)!=="svelte-1g5de7c"&&(_e.innerHTML=Ps),Lt=c(e),b($e.$$.fragment,e),Ft=c(e),Ce=f(e,"P",{"data-svelte-h":!0}),d(Ce)!=="svelte-fbx3ha"&&(Ce.textContent=qs),Xt=c(e),P=f(e,"DIV",{class:!0,"data-svelte-h":!0}),d(P)!=="svelte-8mo6lt"&&(P.innerHTML=Ks),Yt=c(e),ge=f(e,"P",{"data-svelte-h":!0}),d(ge)!=="svelte-dc738t"&&(ge.textContent=Os),Pt=c(e),Ie=f(e,"P",{"data-svelte-h":!0}),d(Ie)!=="svelte-1ti48ib"&&(Ie.textContent=el),qt=c(e),ve=f(e,"P",{"data-svelte-h":!0}),d(ve)!=="svelte-1i8ccko"&&(ve.textContent=tl),Kt=c(e),Ae=f(e,"UL",{"data-svelte-h":!0}),d(Ae)!=="svelte-v0insc"&&(Ae.innerHTML=sl),Ot=c(e),G.l(e),pt=c(e),xe=f(e,"P",{"data-svelte-h":!0}),d(xe)!=="svelte-8ekttt"&&(xe.textContent=ll),es=c(e),b(Ne.$$.fragment,e),ts=c(e),Z.l(e),ct=c(e),Qe=f(e,"P",{"data-svelte-h":!0}),d(Qe)!=="svelte-1jnh99l"&&(Qe.textContent=nl),ss=c(e),b(De.$$.fragment,e),ls=c(e),Ee=f(e,"P",{"data-svelte-h":!0}),d(Ee)!=="svelte-1edjuis"&&(Ee.textContent=al),ns=c(e),b(Ge.$$.fragment,e),as=c(e),z.l(e),ut=c(e),Ve=f(e,"P",{"data-svelte-h":!0}),d(Ve)!=="svelte-19waoxv"&&(Ve.innerHTML=rl),rs=c(e),W.l(e),mt=c(e),B.l(e),Mt=c(e),Ze=f(e,"P",{"data-svelte-h":!0}),d(Ze)!=="svelte-sfijl8"&&(Ze.innerHTML=il),is=c(e),He=f(e,"P",{"data-svelte-h":!0}),d(He)!=="svelte-irfdpk"&&(He.innerHTML=ol),os=c(e),b(ze.$$.fragment,e),ps=c(e),b(Se.$$.fragment,e),cs=c(e),We=f(e,"P",{"data-svelte-h":!0}),d(We)!=="svelte-1tedvvg"&&(We.textContent=pl),us=c(e),Re=f(e,"UL",{"data-svelte-h":!0}),d(Re)!=="svelte-4ikgqa"&&(Re.innerHTML=cl),ms=c(e),Be=f(e,"P",{"data-svelte-h":!0}),d(Be)!=="svelte-18zmy58"&&(Be.textContent=ul),Ms=c(e),b(q.$$.fragment,e),hs=c(e),yt=f(e,"P",{}),Gl(yt).forEach(n),this.h()},h(){fs(s,"name","hf:doc:metadata"),fs(s,"content",jn),fs(Y,"class","flex justify-center"),fs(P,"class","flex justify-center")},m(e,l){Fl(document.head,s),a(e,r,l),a(e,t,l),a(e,o,l),T(u,e,l),a(e,i,l),T(U,e,l),a(e,ft,l),Le[k].m(e,l),a(e,lt,l),T(X,e,l),a(e,dt,l),Fe[$].m(e,l),a(e,nt,l),a(e,K,l),a(e,wt,l),T(O,e,l),a(e,bt,l),a(e,ee,l),a(e,Tt,l),T(te,e,l),a(e,Jt,l),a(e,se,l),a(e,Ut,l),a(e,Y,l),a(e,jt,l),a(e,le,l),a(e,kt,l),T(ne,e,l),a(e,_t,l),a(e,ae,l),a(e,$t,l),a(e,re,l),a(e,Ct,l),a(e,ie,l),a(e,gt,l),a(e,oe,l),a(e,It,l),T(pe,e,l),a(e,vt,l),a(e,ce,l),a(e,At,l),a(e,ue,l),a(e,xt,l),a(e,me,l),a(e,Nt,l),Xe[g].m(e,l),a(e,at,l),a(e,Me,l),a(e,Qt,l),Ye[v].m(e,l),a(e,rt,l),a(e,he,l),a(e,Dt,l),T(ye,e,l),a(e,Et,l),Pe[x].m(e,l),a(e,it,l),a(e,fe,l),a(e,Gt,l),a(e,de,l),a(e,Vt,l),a(e,we,l),a(e,Zt,l),a(e,be,l),a(e,Ht,l),T(Te,e,l),a(e,zt,l),a(e,Je,l),a(e,St,l),a(e,Ue,l),a(e,Wt,l),a(e,je,l),a(e,Rt,l),a(e,ke,l),a(e,Bt,l),qe[Q].m(e,l),a(e,ot,l),a(e,_e,l),a(e,Lt,l),T($e,e,l),a(e,Ft,l),a(e,Ce,l),a(e,Xt,l),a(e,P,l),a(e,Yt,l),a(e,ge,l),a(e,Pt,l),a(e,Ie,l),a(e,qt,l),a(e,ve,l),a(e,Kt,l),a(e,Ae,l),a(e,Ot,l),Ke[E].m(e,l),a(e,pt,l),a(e,xe,l),a(e,es,l),T(Ne,e,l),a(e,ts,l),Oe[V].m(e,l),a(e,ct,l),a(e,Qe,l),a(e,ss,l),T(De,e,l),a(e,ls,l),a(e,Ee,l),a(e,ns,l),T(Ge,e,l),a(e,as,l),et[H].m(e,l),a(e,ut,l),a(e,Ve,l),a(e,rs,l),tt[S].m(e,l),a(e,mt,l),st[R].m(e,l),a(e,Mt,l),a(e,Ze,l),a(e,is,l),a(e,He,l),a(e,os,l),T(ze,e,l),a(e,ps,l),T(Se,e,l),a(e,cs,l),a(e,We,l),a(e,us,l),a(e,Re,l),a(e,ms,l),a(e,Be,l),a(e,Ms,l),T(q,e,l),a(e,hs,l),a(e,yt,l),ys=!0},p(e,[l]){const Ql={};l&1&&(Ql.fw=e[0]),u.$set(Ql);let ds=k;k=Ml(e),k!==ds&&(F(),m(Le[ds],1,1,()=>{Le[ds]=null}),L(),_=Le[k],_||(_=Le[k]=ml[k](e),_.c()),M(_,1),_.m(lt.parentNode,lt));const Dl={};l&2&&(Dl.$$scope={dirty:l,ctx:e}),X.$set(Dl);let ws=$;$=yl(e),$!==ws&&(F(),m(Fe[ws],1,1,()=>{Fe[ws]=null}),L(),C=Fe[$],C||(C=Fe[$]=hl[$](e),C.c()),M(C,1),C.m(nt.parentNode,nt));let bs=g;g=dl(e),g!==bs&&(F(),m(Xe[bs],1,1,()=>{Xe[bs]=null}),L(),I=Xe[g],I||(I=Xe[g]=fl[g](e),I.c()),M(I,1),I.m(at.parentNode,at));let Ts=v;v=bl(e),v!==Ts&&(F(),m(Ye[Ts],1,1,()=>{Ye[Ts]=null}),L(),A=Ye[v],A||(A=Ye[v]=wl[v](e),A.c()),M(A,1),A.m(rt.parentNode,rt));let Js=x;x=Jl(e),x!==Js&&(F(),m(Pe[Js],1,1,()=>{Pe[Js]=null}),L(),N=Pe[x],N||(N=Pe[x]=Tl[x](e),N.c()),M(N,1),N.m(it.parentNode,it));let Us=Q;Q=jl(e),Q!==Us&&(F(),m(qe[Us],1,1,()=>{qe[Us]=null}),L(),D=qe[Q],D||(D=qe[Q]=Ul[Q](e),D.c()),M(D,1),D.m(ot.parentNode,ot));let js=E;E=_l(e),E!==js&&(F(),m(Ke[js],1,1,()=>{Ke[js]=null}),L(),G=Ke[E],G||(G=Ke[E]=kl[E](e),G.c()),M(G,1),G.m(pt.parentNode,pt));let ks=V;V=Cl(e),V!==ks&&(F(),m(Oe[ks],1,1,()=>{Oe[ks]=null}),L(),Z=Oe[V],Z||(Z=Oe[V]=$l[V](e),Z.c()),M(Z,1),Z.m(ct.parentNode,ct));let _s=H;H=Il(e),H!==_s&&(F(),m(et[_s],1,1,()=>{et[_s]=null}),L(),z=et[H],z||(z=et[H]=gl[H](e),z.c()),M(z,1),z.m(ut.parentNode,ut));let $s=S;S=Al(e),S!==$s&&(F(),m(tt[$s],1,1,()=>{tt[$s]=null}),L(),W=tt[S],W||(W=tt[S]=vl[S](e),W.c()),M(W,1),W.m(mt.parentNode,mt));let Cs=R;R=Nl(e),R!==Cs&&(F(),m(st[Cs],1,1,()=>{st[Cs]=null}),L(),B=st[R],B||(B=st[R]=xl[R](e),B.c()),M(B,1),B.m(Mt.parentNode,Mt));const El={};l&2&&(El.$$scope={dirty:l,ctx:e}),q.$set(El)},i(e){ys||(M(u.$$.fragment,e),M(U.$$.fragment,e),M(_),M(X.$$.fragment,e),M(C),M(O.$$.fragment,e),M(te.$$.fragment,e),M(ne.$$.fragment,e),M(pe.$$.fragment,e),M(I),M(A),M(ye.$$.fragment,e),M(N),M(Te.$$.fragment,e),M(D),M($e.$$.fragment,e),M(G),M(Ne.$$.fragment,e),M(Z),M(De.$$.fragment,e),M(Ge.$$.fragment,e),M(z),M(W),M(B),M(ze.$$.fragment,e),M(Se.$$.fragment,e),M(q.$$.fragment,e),ys=!0)},o(e){m(u.$$.fragment,e),m(U.$$.fragment,e),m(_),m(X.$$.fragment,e),m(C),m(O.$$.fragment,e),m(te.$$.fragment,e),m(ne.$$.fragment,e),m(pe.$$.fragment,e),m(I),m(A),m(ye.$$.fragment,e),m(N),m(Te.$$.fragment,e),m(D),m($e.$$.fragment,e),m(G),m(Ne.$$.fragment,e),m(Z),m(De.$$.fragment,e),m(Ge.$$.fragment,e),m(z),m(W),m(B),m(ze.$$.fragment,e),m(Se.$$.fragment,e),m(q.$$.fragment,e),ys=!1},d(e){e&&(n(r),n(t),n(o),n(i),n(ft),n(lt),n(dt),n(nt),n(K),n(wt),n(bt),n(ee),n(Tt),n(Jt),n(se),n(Ut),n(Y),n(jt),n(le),n(kt),n(_t),n(ae),n($t),n(re),n(Ct),n(ie),n(gt),n(oe),n(It),n(vt),n(ce),n(At),n(ue),n(xt),n(me),n(Nt),n(at),n(Me),n(Qt),n(rt),n(he),n(Dt),n(Et),n(it),n(fe),n(Gt),n(de),n(Vt),n(we),n(Zt),n(be),n(Ht),n(zt),n(Je),n(St),n(Ue),n(Wt),n(je),n(Rt),n(ke),n(Bt),n(ot),n(_e),n(Lt),n(Ft),n(Ce),n(Xt),n(P),n(Yt),n(ge),n(Pt),n(Ie),n(qt),n(ve),n(Kt),n(Ae),n(Ot),n(pt),n(xe),n(es),n(ts),n(ct),n(Qe),n(ss),n(ls),n(Ee),n(ns),n(as),n(ut),n(Ve),n(rs),n(mt),n(Mt),n(Ze),n(is),n(He),n(os),n(ps),n(cs),n(We),n(us),n(Re),n(ms),n(Be),n(Ms),n(hs),n(yt)),n(s),J(u,e),J(U,e),Le[k].d(e),J(X,e),Fe[$].d(e),J(O,e),J(te,e),J(ne,e),J(pe,e),Xe[g].d(e),Ye[v].d(e),J(ye,e),Pe[x].d(e),J(Te,e),qe[Q].d(e),J($e,e),Ke[E].d(e),J(Ne,e),Oe[V].d(e),J(De,e),J(Ge,e),et[H].d(e),tt[S].d(e),st[R].d(e),J(ze,e),J(Se,e),J(q,e)}}}const jn='{"title":"Behind the pipeline","local":"behind-the-pipeline","sections":[{"title":"Preprocessing with a tokenizer","local":"preprocessing-with-a-tokenizer","sections":[],"depth":2},{"title":"Going through the model","local":"going-through-the-model","sections":[{"title":"A high-dimensional vector?","local":"a-high-dimensional-vector","sections":[],"depth":3},{"title":"Model heads: Making sense out of numbers","local":"model-heads-making-sense-out-of-numbers","sections":[],"depth":3}],"depth":2},{"title":"Postprocessing the output","local":"postprocessing-the-output","sections":[],"depth":2}],"depth":1}';function kn(h,s,r){let t="pt";return Sl(()=>{const o=new URLSearchParams(window.location.search);r(0,t=o.get("fw")||"pt")}),[t]}class Nn extends Rl{constructor(s){super(),Bl(this,s,kn,Un,zl,{})}}export{Nn as component};
