import{s as Ur,o as Cr,n as I}from"../chunks/scheduler.9bc65507.js";import{S as Zr,i as xr,g as m,s as i,u as g,A as Wr,h as c,f as a,c as p,j as k,v as $,y as T,k as J,o as h,a as l,w as y,d as M,t as b,x as w}from"../chunks/index.78c82d43.js";import{T as Us}from"../chunks/Tip.87d55b76.js";import{Y as Jr}from"../chunks/Youtube.b19762b6.js";import{I as Y}from"../chunks/IconCopyLink.bedaa44d.js";import{C as _}from"../chunks/CodeBlock.48618ec2.js";import{D as Gr}from"../chunks/DocNotebookDropdown.40f7599b.js";import{F as ls,M as N}from"../chunks/Markdown.993b48ef.js";function Rr(j){let s,o;return s=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRvcmNo",highlighted:"pip install torch"}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p:I,i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function Hr(j){let s,o;return s=new N({props:{$$slots:{default:[Rr]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function Ir(j){let s,o;return s=new _({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRlbnNvcmZsb3c=",highlighted:"pip install tensorflow"}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p:I,i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function Fr(j){let s,o;return s=new N({props:{$$slots:{default:[Ir]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function Vr(j){let s,o='For a complete list of available tasks, check out the <a href="./main_classes/pipelines">pipeline API reference</a>.';return{c(){s=m("p"),s.innerHTML=o},l(t){s=c(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-yyszjd"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:I,d(t){t&&a(s)}}}function zr(j){let s,o='Use <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoModelForSequenceClassification">AutoModelForSequenceClassification</a> and <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a> to load the pretrained model and it’s associated tokenizer (more on an <code>AutoClass</code> in the next section):',t,r,u;return r=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZChtb2RlbF9uYW1lKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKG1vZGVsX25hbWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(model_name)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(model_name)`}}),{c(){s=m("p"),s.innerHTML=o,t=i(),g(r.$$.fragment)},l(f){s=c(f,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1yj5h1q"&&(s.innerHTML=o),t=p(f),$(r.$$.fragment,f)},m(f,U){l(f,s,U),l(f,t,U),y(r,f,U),u=!0},p:I,i(f){u||(M(r.$$.fragment,f),u=!0)},o(f){b(r.$$.fragment,f),u=!1},d(f){f&&(a(s),a(t)),w(r,f)}}}function Ar(j){let s,o;return s=new N({props:{$$slots:{default:[zr]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function Nr(j){let s,o='Use <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.TFAutoModelForSequenceClassification">TFAutoModelForSequenceClassification</a> and <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a> to load the pretrained model and it’s associated tokenizer (more on an <code>TFAutoClass</code> in the next section):',t,r,u;return r=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMFRGQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQobW9kZWxfbmFtZSklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZChtb2RlbF9uYW1lKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFAutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForSequenceClassification.from_pretrained(model_name)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(model_name)`}}),{c(){s=m("p"),s.innerHTML=o,t=i(),g(r.$$.fragment)},l(f){s=c(f,"P",{"data-svelte-h":!0}),T(s)!=="svelte-h2tys8"&&(s.innerHTML=o),t=p(f),$(r.$$.fragment,f)},m(f,U){l(f,s,U),l(f,t,U),y(r,f,U),u=!0},p:I,i(f){u||(M(r.$$.fragment,f),u=!0)},o(f){b(r.$$.fragment,f),u=!1},d(f){f&&(a(s),a(t)),w(r,f)}}}function Xr(j){let s,o;return s=new N({props:{$$slots:{default:[Nr]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function Er(j){let s,o;return s=new _({props:{code:"cHRfYmF0Y2glMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTVCJTIyV2UlMjBhcmUlMjB2ZXJ5JTIwaGFwcHklMjB0byUyMHNob3clMjB5b3UlMjB0aGUlMjAlRjAlOUYlQTQlOTclMjBUcmFuc2Zvcm1lcnMlMjBsaWJyYXJ5LiUyMiUyQyUyMCUyMldlJTIwaG9wZSUyMHlvdSUyMGRvbid0JTIwaGF0ZSUyMGl0LiUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHBhZGRpbmclM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwdHJ1bmNhdGlvbiUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBtYXhfbGVuZ3RoJTNENTEyJTJDJTBBJTIwJTIwJTIwJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>pt_batch = tokenizer(
<span class="hljs-meta">... </span>    [<span class="hljs-string">&quot;We are very happy to show you the 🤗 Transformers library.&quot;</span>, <span class="hljs-string">&quot;We hope you don&#x27;t hate it.&quot;</span>],
<span class="hljs-meta">... </span>    padding=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    truncation=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    max_length=<span class="hljs-number">512</span>,
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;pt&quot;</span>,
<span class="hljs-meta">... </span>)`}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p:I,i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function Yr(j){let s,o;return s=new N({props:{$$slots:{default:[Er]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function Br(j){let s,o;return s=new _({props:{code:"dGZfYmF0Y2glMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTVCJTIyV2UlMjBhcmUlMjB2ZXJ5JTIwaGFwcHklMjB0byUyMHNob3clMjB5b3UlMjB0aGUlMjAlRjAlOUYlQTQlOTclMjBUcmFuc2Zvcm1lcnMlMjBsaWJyYXJ5LiUyMiUyQyUyMCUyMldlJTIwaG9wZSUyMHlvdSUyMGRvbid0JTIwaGF0ZSUyMGl0LiUyMiU1RCUyQyUwQSUyMCUyMCUyMCUyMHBhZGRpbmclM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwdHJ1bmNhdGlvbiUzRFRydWUlMkMlMEElMjAlMjAlMjAlMjBtYXhfbGVuZ3RoJTNENTEyJTJDJTBBJTIwJTIwJTIwJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUyQyUwQSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>tf_batch = tokenizer(
<span class="hljs-meta">... </span>    [<span class="hljs-string">&quot;We are very happy to show you the 🤗 Transformers library.&quot;</span>, <span class="hljs-string">&quot;We hope you don&#x27;t hate it.&quot;</span>],
<span class="hljs-meta">... </span>    padding=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    truncation=<span class="hljs-literal">True</span>,
<span class="hljs-meta">... </span>    max_length=<span class="hljs-number">512</span>,
<span class="hljs-meta">... </span>    return_tensors=<span class="hljs-string">&quot;tf&quot;</span>,
<span class="hljs-meta">... </span>)`}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p:I,i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function Lr(j){let s,o;return s=new N({props:{$$slots:{default:[Br]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function Sr(j){let s,o='Check out the <a href="./preprocessing">preprocess</a> tutorial for more details about tokenization, and how to use an <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>, <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> and <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoProcessor">AutoProcessor</a> to preprocess image, audio, and multimodal inputs.';return{c(){s=m("p"),s.innerHTML=o},l(t){s=c(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-14c74yq"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:I,d(t){t&&a(s)}}}function qr(j){let s,o='See the <a href="./task_summary">task summary</a> for tasks supported by an <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoModel">AutoModel</a> class.';return{c(){s=m("p"),s.innerHTML=o},l(t){s=c(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-wdvmdo"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:I,d(t){t&&a(s)}}}function Pr(j){let s,o='🤗 Transformers provides a simple and unified way to load pretrained instances. This means you can load an <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoModel">AutoModel</a> like you would load an <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. The only difference is selecting the correct <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoModel">AutoModel</a> for the task. For text (or sequence) classification, you should load <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoModelForSequenceClassification">AutoModelForSequenceClassification</a>:',t,r,u,f,U,Z,G="Now pass your preprocessed batch of inputs directly to the model. You just have to unpack the dictionary by adding <code>**</code>:",W,v,x,R,B="The model outputs the final activations in the <code>logits</code> attribute. Apply the softmax function to the <code>logits</code> to retrieve the probabilities:",F,H,z;return r=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbF9uYW1lJTIwJTNEJTIwJTIybmxwdG93biUyRmJlcnQtYmFzZS1tdWx0aWxpbmd1YWwtdW5jYXNlZC1zZW50aW1lbnQlMjIlMEFwdF9tb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKG1vZGVsX25hbWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">&quot;nlptown/bert-base-multilingual-uncased-sentiment&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model = AutoModelForSequenceClassification.from_pretrained(model_name)`}}),f=new Us({props:{$$slots:{default:[qr]},$$scope:{ctx:j}}}),v=new _({props:{code:"cHRfb3V0cHV0cyUyMCUzRCUyMHB0X21vZGVsKCoqcHRfYmF0Y2gp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>pt_outputs = pt_model(**pt_batch)'}}),H=new _({props:{code:"ZnJvbSUyMHRvcmNoJTIwaW1wb3J0JTIwbm4lMEElMEFwdF9wcmVkaWN0aW9ucyUyMCUzRCUyMG5uLmZ1bmN0aW9uYWwuc29mdG1heChwdF9vdXRwdXRzLmxvZ2l0cyUyQyUyMGRpbSUzRC0xKSUwQXByaW50KHB0X3ByZWRpY3Rpb25zKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> torch <span class="hljs-keyword">import</span> nn

<span class="hljs-meta">&gt;&gt;&gt; </span>pt_predictions = nn.functional.softmax(pt_outputs.logits, dim=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(pt_predictions)
tensor([[<span class="hljs-number">0.0021</span>, <span class="hljs-number">0.0018</span>, <span class="hljs-number">0.0115</span>, <span class="hljs-number">0.2121</span>, <span class="hljs-number">0.7725</span>],
        [<span class="hljs-number">0.2084</span>, <span class="hljs-number">0.1826</span>, <span class="hljs-number">0.1969</span>, <span class="hljs-number">0.1755</span>, <span class="hljs-number">0.2365</span>]], grad_fn=&lt;SoftmaxBackward0&gt;)`}}),{c(){s=m("p"),s.innerHTML=o,t=i(),g(r.$$.fragment),u=i(),g(f.$$.fragment),U=i(),Z=m("p"),Z.innerHTML=G,W=i(),g(v.$$.fragment),x=i(),R=m("p"),R.innerHTML=B,F=i(),g(H.$$.fragment)},l(d){s=c(d,"P",{"data-svelte-h":!0}),T(s)!=="svelte-68m9j6"&&(s.innerHTML=o),t=p(d),$(r.$$.fragment,d),u=p(d),$(f.$$.fragment,d),U=p(d),Z=c(d,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-wsvj9w"&&(Z.innerHTML=G),W=p(d),$(v.$$.fragment,d),x=p(d),R=c(d,"P",{"data-svelte-h":!0}),T(R)!=="svelte-17tdpgw"&&(R.innerHTML=B),F=p(d),$(H.$$.fragment,d)},m(d,C){l(d,s,C),l(d,t,C),y(r,d,C),l(d,u,C),y(f,d,C),l(d,U,C),l(d,Z,C),l(d,W,C),y(v,d,C),l(d,x,C),l(d,R,C),l(d,F,C),y(H,d,C),z=!0},p(d,C){const L={};C&2&&(L.$$scope={dirty:C,ctx:d}),f.$set(L)},i(d){z||(M(r.$$.fragment,d),M(f.$$.fragment,d),M(v.$$.fragment,d),M(H.$$.fragment,d),z=!0)},o(d){b(r.$$.fragment,d),b(f.$$.fragment,d),b(v.$$.fragment,d),b(H.$$.fragment,d),z=!1},d(d){d&&(a(s),a(t),a(u),a(U),a(Z),a(W),a(x),a(R),a(F)),w(r,d),w(f,d),w(v,d),w(H,d)}}}function Qr(j){let s,o;return s=new N({props:{$$slots:{default:[Pr]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function Or(j){let s,o='See the <a href="./task_summary">task summary</a> for tasks supported by an <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoModel">AutoModel</a> class.';return{c(){s=m("p"),s.innerHTML=o},l(t){s=c(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-wdvmdo"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:I,d(t){t&&a(s)}}}function Dr(j){let s,o='🤗 Transformers provides a simple and unified way to load pretrained instances. This means you can load an <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.TFAutoModel">TFAutoModel</a> like you would load an <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. The only difference is selecting the correct <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.TFAutoModel">TFAutoModel</a> for the task. For text (or sequence) classification, you should load <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.TFAutoModelForSequenceClassification">TFAutoModelForSequenceClassification</a>:',t,r,u,f,U,Z,G="Now pass your preprocessed batch of inputs directly to the model. You can pass the tensors as-is:",W,v,x,R,B="The model outputs the final activations in the <code>logits</code> attribute. Apply the softmax function to the <code>logits</code> to retrieve the probabilities:",F,H,z;return r=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQW1vZGVsX25hbWUlMjAlM0QlMjAlMjJubHB0b3duJTJGYmVydC1iYXNlLW11bHRpbGluZ3VhbC11bmNhc2VkLXNlbnRpbWVudCUyMiUwQXRmX21vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZChtb2RlbF9uYW1lKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">&quot;nlptown/bert-base-multilingual-uncased-sentiment&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFAutoModelForSequenceClassification.from_pretrained(model_name)`}}),f=new Us({props:{$$slots:{default:[Or]},$$scope:{ctx:j}}}),v=new _({props:{code:"dGZfb3V0cHV0cyUyMCUzRCUyMHRmX21vZGVsKHRmX2JhdGNoKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tf_outputs = tf_model(tf_batch)'}}),H=new _({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0Zl9wcmVkaWN0aW9ucyUyMCUzRCUyMHRmLm5uLnNvZnRtYXgodGZfb3V0cHV0cy5sb2dpdHMlMkMlMjBheGlzJTNELTEpJTBBdGZfcHJlZGljdGlvbnM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tf_predictions = tf.nn.softmax(tf_outputs.logits, axis=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_predictions`}}),{c(){s=m("p"),s.innerHTML=o,t=i(),g(r.$$.fragment),u=i(),g(f.$$.fragment),U=i(),Z=m("p"),Z.textContent=G,W=i(),g(v.$$.fragment),x=i(),R=m("p"),R.innerHTML=B,F=i(),g(H.$$.fragment)},l(d){s=c(d,"P",{"data-svelte-h":!0}),T(s)!=="svelte-10cr2ae"&&(s.innerHTML=o),t=p(d),$(r.$$.fragment,d),u=p(d),$(f.$$.fragment,d),U=p(d),Z=c(d,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-19ydqo0"&&(Z.textContent=G),W=p(d),$(v.$$.fragment,d),x=p(d),R=c(d,"P",{"data-svelte-h":!0}),T(R)!=="svelte-17tdpgw"&&(R.innerHTML=B),F=p(d),$(H.$$.fragment,d)},m(d,C){l(d,s,C),l(d,t,C),y(r,d,C),l(d,u,C),y(f,d,C),l(d,U,C),l(d,Z,C),l(d,W,C),y(v,d,C),l(d,x,C),l(d,R,C),l(d,F,C),y(H,d,C),z=!0},p(d,C){const L={};C&2&&(L.$$scope={dirty:C,ctx:d}),f.$set(L)},i(d){z||(M(r.$$.fragment,d),M(f.$$.fragment,d),M(v.$$.fragment,d),M(H.$$.fragment,d),z=!0)},o(d){b(r.$$.fragment,d),b(f.$$.fragment,d),b(v.$$.fragment,d),b(H.$$.fragment,d),z=!1},d(d){d&&(a(s),a(t),a(u),a(U),a(Z),a(W),a(x),a(R),a(F)),w(r,d),w(f,d),w(v,d),w(H,d)}}}function Kr(j){let s,o;return s=new N({props:{$$slots:{default:[Dr]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function eo(j){let s,o=`All 🤗 Transformers models (PyTorch or TensorFlow) output the tensors <em>before</em> the final activation
function (like softmax) because the final activation function is often fused with the loss. Model outputs are special dataclasses so their attributes are autocompleted in an IDE. The model outputs behave like a tuple or a dictionary (you can index with an integer, a slice or a string) in which case, attributes that are None are ignored.`;return{c(){s=m("p"),s.innerHTML=o},l(t){s=c(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-3ji870"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:I,d(t){t&&a(s)}}}function to(j){let s,o='Once your model is fine-tuned, you can save it with its tokenizer using <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel.save_pretrained">PreTrainedModel.save_pretrained()</a>:',t,r,u,f,U='When you are ready to use the model again, reload it with <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">PreTrainedModel.from_pretrained()</a>:',Z,G,W;return r=new _({props:{code:"cHRfc2F2ZV9kaXJlY3RvcnklMjAlM0QlMjAlMjIuJTJGcHRfc2F2ZV9wcmV0cmFpbmVkJTIyJTBBdG9rZW5pemVyLnNhdmVfcHJldHJhaW5lZChwdF9zYXZlX2RpcmVjdG9yeSklMEFwdF9tb2RlbC5zYXZlX3ByZXRyYWluZWQocHRfc2F2ZV9kaXJlY3Rvcnkp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>pt_save_directory = <span class="hljs-string">&quot;./pt_save_pretrained&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.save_pretrained(pt_save_directory)
<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model.save_pretrained(pt_save_directory)`}}),G=new _({props:{code:"cHRfbW9kZWwlMjAlM0QlMjBBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjIuJTJGcHRfc2F2ZV9wcmV0cmFpbmVkJTIyKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;./pt_save_pretrained&quot;</span>)'}}),{c(){s=m("p"),s.innerHTML=o,t=i(),g(r.$$.fragment),u=i(),f=m("p"),f.innerHTML=U,Z=i(),g(G.$$.fragment)},l(v){s=c(v,"P",{"data-svelte-h":!0}),T(s)!=="svelte-zbf4d"&&(s.innerHTML=o),t=p(v),$(r.$$.fragment,v),u=p(v),f=c(v,"P",{"data-svelte-h":!0}),T(f)!=="svelte-1nnr5w1"&&(f.innerHTML=U),Z=p(v),$(G.$$.fragment,v)},m(v,x){l(v,s,x),l(v,t,x),y(r,v,x),l(v,u,x),l(v,f,x),l(v,Z,x),y(G,v,x),W=!0},p:I,i(v){W||(M(r.$$.fragment,v),M(G.$$.fragment,v),W=!0)},o(v){b(r.$$.fragment,v),b(G.$$.fragment,v),W=!1},d(v){v&&(a(s),a(t),a(u),a(f),a(Z)),w(r,v),w(G,v)}}}function so(j){let s,o;return s=new N({props:{$$slots:{default:[to]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function ao(j){let s,o='Once your model is fine-tuned, you can save it with its tokenizer using <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.TFPreTrainedModel.save_pretrained">TFPreTrainedModel.save_pretrained()</a>:',t,r,u,f,U='When you are ready to use the model again, reload it with <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">TFPreTrainedModel.from_pretrained()</a>:',Z,G,W;return r=new _({props:{code:"dGZfc2F2ZV9kaXJlY3RvcnklMjAlM0QlMjAlMjIuJTJGdGZfc2F2ZV9wcmV0cmFpbmVkJTIyJTBBdG9rZW5pemVyLnNhdmVfcHJldHJhaW5lZCh0Zl9zYXZlX2RpcmVjdG9yeSklMEF0Zl9tb2RlbC5zYXZlX3ByZXRyYWluZWQodGZfc2F2ZV9kaXJlY3Rvcnkp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>tf_save_directory = <span class="hljs-string">&quot;./tf_save_pretrained&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.save_pretrained(tf_save_directory)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model.save_pretrained(tf_save_directory)`}}),G=new _({props:{code:"dGZfbW9kZWwlMjAlM0QlMjBURkF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMi4lMkZ0Zl9zYXZlX3ByZXRyYWluZWQlMjIp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFAutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;./tf_save_pretrained&quot;</span>)'}}),{c(){s=m("p"),s.innerHTML=o,t=i(),g(r.$$.fragment),u=i(),f=m("p"),f.innerHTML=U,Z=i(),g(G.$$.fragment)},l(v){s=c(v,"P",{"data-svelte-h":!0}),T(s)!=="svelte-a264tl"&&(s.innerHTML=o),t=p(v),$(r.$$.fragment,v),u=p(v),f=c(v,"P",{"data-svelte-h":!0}),T(f)!=="svelte-1t6271h"&&(f.innerHTML=U),Z=p(v),$(G.$$.fragment,v)},m(v,x){l(v,s,x),l(v,t,x),y(r,v,x),l(v,u,x),l(v,f,x),l(v,Z,x),y(G,v,x),W=!0},p:I,i(v){W||(M(r.$$.fragment,v),M(G.$$.fragment,v),W=!0)},o(v){b(r.$$.fragment,v),b(G.$$.fragment,v),W=!1},d(v){v&&(a(s),a(t),a(u),a(f),a(Z)),w(r,v),w(G,v)}}}function no(j){let s,o;return s=new N({props:{$$slots:{default:[ao]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function lo(j){let s,o;return s=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKHRmX3NhdmVfZGlyZWN0b3J5KSUwQXB0X21vZGVsJTIwJTNEJTIwQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQodGZfc2F2ZV9kaXJlY3RvcnklMkMlMjBmcm9tX3RmJTNEVHJ1ZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(tf_save_directory)
<span class="hljs-meta">&gt;&gt;&gt; </span>pt_model = AutoModelForSequenceClassification.from_pretrained(tf_save_directory, from_tf=<span class="hljs-literal">True</span>)`}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p:I,i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function ro(j){let s,o;return s=new N({props:{$$slots:{default:[lo]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function oo(j){let s,o;return s=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQocHRfc2F2ZV9kaXJlY3RvcnkpJTBBdGZfbW9kZWwlMjAlM0QlMjBURkF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKHB0X3NhdmVfZGlyZWN0b3J5JTJDJTIwZnJvbV9wdCUzRFRydWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(pt_save_directory)
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_model = TFAutoModelForSequenceClassification.from_pretrained(pt_save_directory, from_pt=<span class="hljs-literal">True</span>)`}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p:I,i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function io(j){let s,o;return s=new N({props:{$$slots:{default:[oo]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function po(j){let s,o='Create a model from your custom configuration with <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.FlaxAutoModelForVision2Seq.from_config">AutoModel.from_config()</a>:',t,r,u;return r=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbCUwQSUwQW15X21vZGVsJTIwJTNEJTIwQXV0b01vZGVsLmZyb21fY29uZmlnKG15X2NvbmZpZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModel

<span class="hljs-meta">&gt;&gt;&gt; </span>my_model = AutoModel.from_config(my_config)`}}),{c(){s=m("p"),s.innerHTML=o,t=i(),g(r.$$.fragment)},l(f){s=c(f,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1tfalke"&&(s.innerHTML=o),t=p(f),$(r.$$.fragment,f)},m(f,U){l(f,s,U),l(f,t,U),y(r,f,U),u=!0},p:I,i(f){u||(M(r.$$.fragment,f),u=!0)},o(f){b(r.$$.fragment,f),u=!1},d(f){f&&(a(s),a(t)),w(r,f)}}}function mo(j){let s,o;return s=new N({props:{$$slots:{default:[po]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function co(j){let s,o='Create a model from your custom configuration with <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.FlaxAutoModelForVision2Seq.from_config">TFAutoModel.from_config()</a>:',t,r,u;return r=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsJTBBJTBBbXlfbW9kZWwlMjAlM0QlMjBURkF1dG9Nb2RlbC5mcm9tX2NvbmZpZyhteV9jb25maWcp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModel

<span class="hljs-meta">&gt;&gt;&gt; </span>my_model = TFAutoModel.from_config(my_config)`}}),{c(){s=m("p"),s.innerHTML=o,t=i(),g(r.$$.fragment)},l(f){s=c(f,"P",{"data-svelte-h":!0}),T(s)!=="svelte-snifow"&&(s.innerHTML=o),t=p(f),$(r.$$.fragment,f)},m(f,U){l(f,s,U),l(f,t,U),y(r,f,U),u=!0},p:I,i(f){u||(M(r.$$.fragment,f),u=!0)},o(f){b(r.$$.fragment,f),u=!1},d(f){f&&(a(s),a(t)),w(r,f)}}}function fo(j){let s,o;return s=new N({props:{$$slots:{default:[co]},$$scope:{ctx:j}}}),{c(){g(s.$$.fragment)},l(t){$(s.$$.fragment,t)},m(t,r){y(s,t,r),o=!0},p(t,r){const u={};r&2&&(u.$$scope={dirty:r,ctx:t}),s.$set(u)},i(t){o||(M(s.$$.fragment,t),o=!0)},o(t){b(s.$$.fragment,t),o=!1},d(t){w(s,t)}}}function uo(j){let s,o='For tasks - like translation or summarization - that use a sequence-to-sequence model, use the <a href="/docs/transformers/v4.33.3/en/main_classes/trainer#transformers.Seq2SeqTrainer">Seq2SeqTrainer</a> and <a href="/docs/transformers/v4.33.3/en/main_classes/trainer#transformers.Seq2SeqTrainingArguments">Seq2SeqTrainingArguments</a> classes instead.';return{c(){s=m("p"),s.innerHTML=o},l(t){s=c(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-d7fml3"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:I,d(t){t&&a(s)}}}function ho(j){let s,o,t,r,u,f,U,Z,G,W,v="Quick tour",x,R,B,F,H='Get up and running with 🤗 Transformers! Whether you’re a developer or an everyday user, this quick tour will help you get started and show you how to use the <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> for inference, load a pretrained model and preprocessor with an <a href="./model_doc/auto">AutoClass</a>, and quickly train a model with PyTorch or TensorFlow. If you’re a beginner, we recommend checking out our tutorials or <a href="https://huggingface.co/course/chapter1/1" rel="nofollow">course</a> next for more in-depth explanations of the concepts introduced here.',z,d,C="Before you begin, make sure you have all the necessary libraries installed:",L,_e,Ss,Je,ml="You’ll also need to install your preferred machine learning framework:",qs,ne,Ps,q,le,Cs,Ue,Wn,rs,cl="Pipeline",Qs,Ce,Os,Ze,fl='The <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> is the easiest and fastest way to use a pretrained model for inference. You can use the <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> out-of-the-box for many tasks across different modalities, some of which are shown in the table below:',Ds,re,Ks,xe,dl="<thead><tr><th><strong>Task</strong></th> <th><strong>Description</strong></th> <th><strong>Modality</strong></th> <th><strong>Pipeline identifier</strong></th></tr></thead> <tbody><tr><td>Text classification</td> <td>assign a label to a given sequence of text</td> <td>NLP</td> <td>pipeline(task=“sentiment-analysis”)</td></tr> <tr><td>Text generation</td> <td>generate text given a prompt</td> <td>NLP</td> <td>pipeline(task=“text-generation”)</td></tr> <tr><td>Summarization</td> <td>generate a summary of a sequence of text or document</td> <td>NLP</td> <td>pipeline(task=“summarization”)</td></tr> <tr><td>Image classification</td> <td>assign a label to an image</td> <td>Computer vision</td> <td>pipeline(task=“image-classification”)</td></tr> <tr><td>Image segmentation</td> <td>assign a label to each individual pixel of an image (supports semantic, panoptic, and instance segmentation)</td> <td>Computer vision</td> <td>pipeline(task=“image-segmentation”)</td></tr> <tr><td>Object detection</td> <td>predict the bounding boxes and classes of objects in an image</td> <td>Computer vision</td> <td>pipeline(task=“object-detection”)</td></tr> <tr><td>Audio classification</td> <td>assign a label to some audio data</td> <td>Audio</td> <td>pipeline(task=“audio-classification”)</td></tr> <tr><td>Automatic speech recognition</td> <td>transcribe speech into text</td> <td>Audio</td> <td>pipeline(task=“automatic-speech-recognition”)</td></tr> <tr><td>Visual question answering</td> <td>answer a question about the image, given an image and a question</td> <td>Multimodal</td> <td>pipeline(task=“vqa”)</td></tr> <tr><td>Document question answering</td> <td>answer a question about the document, given a document and a question</td> <td>Multimodal</td> <td>pipeline(task=“document-question-answering”)</td></tr> <tr><td>Image captioning</td> <td>generate a caption for a given image</td> <td>Multimodal</td> <td>pipeline(task=“image-to-text”)</td></tr></tbody>",ea,We,ul='Start by creating an instance of <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> and specifying a task you want to use it for. In this guide, you’ll use the <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> for sentiment analysis as an example:',ta,Ge,sa,Re,hl='The <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> downloads and caches a default <a href="https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english" rel="nofollow">pretrained model</a> and tokenizer for sentiment analysis. Now you can use the <code>classifier</code> on your target text:',aa,He,na,Ie,gl='If you have more than one input, pass your inputs as a list to the <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> to return a list of dictionaries:',la,Fe,ra,Ve,$l='The <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> can also iterate over an entire dataset for any task you like. For this example, let’s choose automatic speech recognition as our task:',oa,ze,ia,Ae,yl='Load an audio dataset (see the 🤗 Datasets <a href="https://huggingface.co/docs/datasets/quickstart#audio" rel="nofollow">Quick Start</a> for more details) you’d like to iterate over. For example, load the <a href="https://huggingface.co/datasets/PolyAI/minds14" rel="nofollow">MInDS-14</a> dataset:',pa,Ne,ma,Xe,Ml=`You need to make sure the sampling rate of the dataset matches the sampling
rate <a href="https://huggingface.co/facebook/wav2vec2-base-960h" rel="nofollow"><code>facebook/wav2vec2-base-960h</code></a> was trained on:`,ca,Ee,fa,Ye,bl=`The audio files are automatically loaded and resampled when calling the <code>&quot;audio&quot;</code> column.
Extract the raw waveform arrays from the first 4 samples and pass it as a list to the pipeline:`,da,Be,ua,Le,wl='For larger datasets where the inputs are big (like in speech or vision), you’ll want to pass a generator instead of a list to load all the inputs in memory. Take a look at the <a href="./main_classes/pipelines">pipeline API reference</a> for more information.',ha,P,oe,Zs,Se,Gn,os,Tl="Use another model and tokenizer in the pipeline",ga,qe,vl='The <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> can accommodate any model from the <a href="https://huggingface.co/models" rel="nofollow">Hub</a>, making it easy to adapt the <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> for other use-cases. For example, if you’d like a model capable of handling French text, use the tags on the Hub to filter for an appropriate model. The top filtered result returns a multilingual <a href="https://huggingface.co/nlptown/bert-base-multilingual-uncased-sentiment" rel="nofollow">BERT model</a> finetuned for sentiment analysis you can use for French text:',$a,Pe,ya,ie,Ma,Qe,jl='Specify the model and tokenizer in the <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a>, and now you can apply the <code>classifier</code> on French text:',ba,Oe,wa,De,kl='If you can’t find a model for your use-case, you’ll need to finetune a pretrained model on your data. Take a look at our <a href="./training">finetuning tutorial</a> to learn how. Finally, after you’ve finetuned your pretrained model, please consider <a href="./model_sharing">sharing</a> the model with the community on the Hub to democratize machine learning for everyone! 🤗',Ta,Q,pe,xs,Ke,Rn,is,_l="AutoClass",va,et,ja,tt,Jl='Under the hood, the <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoModelForSequenceClassification">AutoModelForSequenceClassification</a> and <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a> classes work together to power the <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> you used above. An <a href="./model_doc/auto">AutoClass</a> is a shortcut that automatically retrieves the architecture of a pretrained model from its name or path. You only need to select the appropriate <code>AutoClass</code> for your task and it’s associated preprocessing class.',ka,st,Ul='Let’s return to the example from the previous section and see how you can use the <code>AutoClass</code> to replicate the results of the <a href="/docs/transformers/v4.33.3/en/main_classes/pipelines#transformers.pipeline">pipeline()</a>.',_a,O,me,Ws,at,Hn,ps,Cl="AutoTokenizer",Ja,nt,Zl='A tokenizer is responsible for preprocessing text into an array of numbers as inputs to a model. There are multiple rules that govern the tokenization process, including how to split a word and at what level words should be split (learn more about tokenization in the <a href="./tokenizer_summary">tokenizer summary</a>). The most important thing to remember is you need to instantiate a tokenizer with the same model name to ensure you’re using the same tokenization rules a model was pretrained with.',Ua,lt,xl='Load a tokenizer with <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>:',Ca,rt,Za,ot,Wl="Pass your text to the tokenizer:",xa,it,Wa,pt,Gl="The tokenizer returns a dictionary containing:",Ga,mt,Rl='<li><a href="./glossary#input-ids">input_ids</a>: numerical representations of your tokens.</li> <li><a href=".glossary#attention-mask">attention_mask</a>: indicates which tokens should be attended to.</li>',Ra,ct,Hl="A tokenizer can also accept a list of inputs, and pad and truncate the text to return a batch with uniform length:",Ha,ce,Ia,fe,Fa,D,de,Gs,ft,In,ms,Il="AutoModel",Va,ue,za,he,Aa,K,ge,Rs,dt,Fn,cs,Fl="Save a model",Na,$e,Xa,ut,Vl="One particularly cool 🤗 Transformers feature is the ability to save a model and reload it as either a PyTorch or TensorFlow model. The <code>from_pt</code> or <code>from_tf</code> parameter can convert the model from one framework to the other:",Ea,ye,Ya,ee,Me,Hs,ht,Vn,fs,zl="Custom model builds",Ba,gt,Al="You can modify the model’s configuration class to change how a model is built. The configuration specifies a model’s attributes, such as the number of hidden layers or attention heads. You start from scratch when you initialize a model from a custom configuration class. The model attributes are randomly initialized, and you’ll need to train the model before you can use it to get meaningful results.",La,$t,Nl='Start by importing <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoConfig">AutoConfig</a>, and then load the pretrained model you want to modify. Within <a href="/docs/transformers/v4.33.3/en/model_doc/auto#transformers.AutoConfig.from_pretrained">AutoConfig.from_pretrained()</a>, you can specify the attribute you want to change, such as the number of attention heads:',Sa,yt,qa,be,Pa,Mt,Xl='Take a look at the <a href="./create_a_model">Create a custom architecture</a> guide for more information about building custom configurations.',Qa,te,we,Is,bt,zn,ds,El="Trainer - a PyTorch optimized training loop",Oa,wt,Yl='All models are a standard <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow"><code>torch.nn.Module</code></a> so you can use them in any typical training loop. While you can write your own training loop, 🤗 Transformers provides a <a href="/docs/transformers/v4.33.3/en/main_classes/trainer#transformers.Trainer">Trainer</a> class for PyTorch, which contains the basic training loop and adds additional functionality for features like distributed training, mixed precision, and more.',Da,Tt,Bl='Depending on your task, you’ll typically pass the following parameters to <a href="/docs/transformers/v4.33.3/en/main_classes/trainer#transformers.Trainer">Trainer</a>:',Ka,V,vt,us,Ll='You’ll start with a <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a> or a <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow"><code>torch.nn.Module</code></a>:',An,jt,Nn,kt,hs,Sl='<a href="/docs/transformers/v4.33.3/en/main_classes/trainer#transformers.TrainingArguments">TrainingArguments</a> contains the model hyperparameters you can change like learning rate, batch size, and the number of epochs to train for. The default values are used if you don’t specify any training arguments:',Xn,_t,En,Jt,gs,ql="Load a preprocessing class like a tokenizer, image processor, feature extractor, or processor:",Yn,Ut,Bn,Ct,$s,Pl="Load a dataset:",Ln,Zt,Sn,E,ys,Ql="Create a function to tokenize the dataset:",qn,xt,Pn,Ms,Ol='Then apply it over the entire dataset with <a href="https://huggingface.co/docs/datasets/v2.14.5/en/package_reference/main_classes#datasets.Dataset.map" rel="nofollow">map</a>:',Qn,Wt,On,Gt,bs,Dl='A <a href="/docs/transformers/v4.33.3/en/main_classes/data_collator#transformers.DataCollatorWithPadding">DataCollatorWithPadding</a> to create a batch of examples from your dataset:',Dn,Rt,en,Ht,Kl='Now gather all these classes in <a href="/docs/transformers/v4.33.3/en/main_classes/trainer#transformers.Trainer">Trainer</a>:',tn,It,sn,Ft,er='When you’re ready, call <a href="/docs/transformers/v4.33.3/en/main_classes/trainer#transformers.Trainer.train">train()</a> to start training:',an,Vt,nn,Te,ln,zt,tr='You can customize the training loop behavior by subclassing the methods inside <a href="/docs/transformers/v4.33.3/en/main_classes/trainer#transformers.Trainer">Trainer</a>. This allows you to customize features such as the loss function, optimizer, and scheduler. Take a look at the <a href="/docs/transformers/v4.33.3/en/main_classes/trainer#transformers.Trainer">Trainer</a> reference for which methods can be subclassed.',rn,At,sr='The other way to customize the training loop is by using <a href="./main_classes/callbacks">Callbacks</a>. You can use callbacks to integrate with other libraries and inspect the training loop to report on progress or stop the training early. Callbacks do not modify anything in the training loop itself. To customize something like the loss function, you need to subclass the <a href="/docs/transformers/v4.33.3/en/main_classes/trainer#transformers.Trainer">Trainer</a> instead.',on,se,ve,Fs,Nt,Kn,ws,ar="Train with TensorFlow",pn,Xt,nr='All models are a standard <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow"><code>tf.keras.Model</code></a> so they can be trained in TensorFlow with the <a href="https://keras.io/" rel="nofollow">Keras</a> API. 🤗 Transformers provides the <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.TFPreTrainedModel.prepare_tf_dataset">prepare_tf_dataset()</a> method to easily load your dataset as a <code>tf.data.Dataset</code> so you can start training right away with Keras’ <a href="https://keras.io/api/models/model_training_apis/#compile-method" rel="nofollow"><code>compile</code></a> and <a href="https://keras.io/api/models/model_training_apis/#fit-method" rel="nofollow"><code>fit</code></a> methods.',mn,A,Et,Ts,lr='You’ll start with a <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a> or a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow"><code>tf.keras.Model</code></a>:',el,Yt,tl,Bt,vs,rr="Load a preprocessing class like a tokenizer, image processor, feature extractor, or processor:",sl,Lt,al,St,js,or="Create a function to tokenize the dataset:",nl,qt,ll,Pt,ks,ir='Apply the tokenizer over the entire dataset with <a href="https://huggingface.co/docs/datasets/v2.14.5/en/package_reference/main_classes#datasets.Dataset.map" rel="nofollow">map</a> and then pass the dataset and tokenizer to <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.TFPreTrainedModel.prepare_tf_dataset">prepare_tf_dataset()</a>. You can also change the batch size and shuffle the dataset here if you’d like:',rl,Qt,ol,Ot,_s,pr="When you’re ready, you can call <code>compile</code> and <code>fit</code> to start training. Note that Transformers models all have a default task-relevant loss function, so you don’t need to specify one unless you want to:",il,Dt,cn,ae,je,Vs,Kt,pl,Js,mr="What's next?",fn,es,cr="Now that you’ve completed the 🤗 Transformers quick tour, check out our guides and learn how to do more specific things like writing a custom model, fine-tuning a model for a task, and how to train a model with a script. If you’re interested in learning more about 🤗 Transformers core concepts, grab a cup of coffee and take a look at our Conceptual Guides!",dn,zs,un;return Z=new Y({}),R=new Gr({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/quicktour.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/pytorch/quicktour.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/en/tensorflow/quicktour.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/quicktour.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/pytorch/quicktour.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/en/tensorflow/quicktour.ipynb"}]}}),_e=new _({props:{code:"IXBpcCUyMGluc3RhbGwlMjB0cmFuc2Zvcm1lcnMlMjBkYXRhc2V0cw==",highlighted:"!pip install transformers datasets"}}),ne=new ls({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Fr],pytorch:[Hr]},$$scope:{ctx:j}}}),Ue=new Y({}),Ce=new Jr({props:{id:"tiZFewofSLM"}}),re=new Us({props:{$$slots:{default:[Vr]},$$scope:{ctx:j}}}),Ge=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKCUyMnNlbnRpbWVudC1hbmFseXNpcyUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(<span class="hljs-string">&quot;sentiment-analysis&quot;</span>)`}}),He=new _({props:{code:"Y2xhc3NpZmllciglMjJXZSUyMGFyZSUyMHZlcnklMjBoYXBweSUyMHRvJTIwc2hvdyUyMHlvdSUyMHRoZSUyMCVGMCU5RiVBNCU5NyUyMFRyYW5zZm9ybWVycyUyMGxpYnJhcnkuJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(<span class="hljs-string">&quot;We are very happy to show you the 🤗 Transformers library.&quot;</span>)
[{<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.9998</span>}]`}}),Fe=new _({props:{code:"cmVzdWx0cyUyMCUzRCUyMGNsYXNzaWZpZXIoJTVCJTIyV2UlMjBhcmUlMjB2ZXJ5JTIwaGFwcHklMjB0byUyMHNob3clMjB5b3UlMjB0aGUlMjAlRjAlOUYlQTQlOTclMjBUcmFuc2Zvcm1lcnMlMjBsaWJyYXJ5LiUyMiUyQyUyMCUyMldlJTIwaG9wZSUyMHlvdSUyMGRvbid0JTIwaGF0ZSUyMGl0LiUyMiU1RCklMEFmb3IlMjByZXN1bHQlMjBpbiUyMHJlc3VsdHMlM0ElMEElMjAlMjAlMjAlMjBwcmludChmJTIybGFiZWwlM0ElMjAlN0JyZXN1bHQlNUInbGFiZWwnJTVEJTdEJTJDJTIwd2l0aCUyMHNjb3JlJTNBJTIwJTdCcm91bmQocmVzdWx0JTVCJ3Njb3JlJyU1RCUyQyUyMDQpJTdEJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>results = classifier([<span class="hljs-string">&quot;We are very happy to show you the 🤗 Transformers library.&quot;</span>, <span class="hljs-string">&quot;We hope you don&#x27;t hate it.&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> result <span class="hljs-keyword">in</span> results:
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;label: <span class="hljs-subst">{result[<span class="hljs-string">&#x27;label&#x27;</span>]}</span>, with score: <span class="hljs-subst">{<span class="hljs-built_in">round</span>(result[<span class="hljs-string">&#x27;score&#x27;</span>], <span class="hljs-number">4</span>)}</span>&quot;</span>)
label: POSITIVE, <span class="hljs-keyword">with</span> score: <span class="hljs-number">0.9998</span>
label: NEGATIVE, <span class="hljs-keyword">with</span> score: <span class="hljs-number">0.5309</span>`}}),ze=new _({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwcGlwZWxpbmUlMEElMEFzcGVlY2hfcmVjb2duaXplciUyMCUzRCUyMHBpcGVsaW5lKCUyMmF1dG9tYXRpYy1zcGVlY2gtcmVjb2duaXRpb24lMjIlMkMlMjBtb2RlbCUzRCUyMmZhY2Vib29rJTJGd2F2MnZlYzItYmFzZS05NjBoJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>speech_recognizer = pipeline(<span class="hljs-string">&quot;automatic-speech-recognition&quot;</span>, model=<span class="hljs-string">&quot;facebook/wav2vec2-base-960h&quot;</span>)`}}),Ne=new _({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTJDJTIwQXVkaW8lMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMlBvbHlBSSUyRm1pbmRzMTQlMjIlMkMlMjBuYW1lJTNEJTIyZW4tVVMlMjIlMkMlMjBzcGxpdCUzRCUyMnRyYWluJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset, Audio

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;PolyAI/minds14&quot;</span>, name=<span class="hljs-string">&quot;en-US&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)`}}),Ee=new _({props:{code:"ZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQuY2FzdF9jb2x1bW4oJTIyYXVkaW8lMjIlMkMlMjBBdWRpbyhzYW1wbGluZ19yYXRlJTNEc3BlZWNoX3JlY29nbml6ZXIuZmVhdHVyZV9leHRyYWN0b3Iuc2FtcGxpbmdfcmF0ZSkp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.cast_column(<span class="hljs-string">&quot;audio&quot;</span>, Audio(sampling_rate=speech_recognizer.feature_extractor.sampling_rate))'}}),Be=new _({props:{code:"cmVzdWx0JTIwJTNEJTIwc3BlZWNoX3JlY29nbml6ZXIoZGF0YXNldCU1QiUzQTQlNUQlNUIlMjJhdWRpbyUyMiU1RCklMEFwcmludCglNUJkJTVCJTIydGV4dCUyMiU1RCUyMGZvciUyMGQlMjBpbiUyMHJlc3VsdCU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>result = speech_recognizer(dataset[:<span class="hljs-number">4</span>][<span class="hljs-string">&quot;audio&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>([d[<span class="hljs-string">&quot;text&quot;</span>] <span class="hljs-keyword">for</span> d <span class="hljs-keyword">in</span> result])
[<span class="hljs-string">&#x27;I WOULD LIKE TO SET UP A JOINT ACCOUNT WITH MY PARTNER HOW DO I PROCEED WITH DOING THAT&#x27;</span>, <span class="hljs-string">&quot;FONDERING HOW I&#x27;D SET UP A JOIN TO HELL T WITH MY WIFE AND WHERE THE AP MIGHT BE&quot;</span>, <span class="hljs-string">&quot;I I&#x27;D LIKE TOY SET UP A JOINT ACCOUNT WITH MY PARTNER I&#x27;M NOT SEEING THE OPTION TO DO IT ON THE APSO I CALLED IN TO GET SOME HELP CAN I JUST DO IT OVER THE PHONE WITH YOU AND GIVE YOU THE INFORMATION OR SHOULD I DO IT IN THE AP AN I&#x27;M MISSING SOMETHING UQUETTE HAD PREFERRED TO JUST DO IT OVER THE PHONE OF POSSIBLE THINGS&quot;</span>, <span class="hljs-string">&#x27;HOW DO I FURN A JOINA COUT&#x27;</span>]`}}),Se=new Y({}),Pe=new _({props:{code:"bW9kZWxfbmFtZSUyMCUzRCUyMCUyMm5scHRvd24lMkZiZXJ0LWJhc2UtbXVsdGlsaW5ndWFsLXVuY2FzZWQtc2VudGltZW50JTIy",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">&quot;nlptown/bert-base-multilingual-uncased-sentiment&quot;</span>'}}),ie=new ls({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Xr],pytorch:[Ar]},$$scope:{ctx:j}}}),Oe=new _({props:{code:"Y2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKCUyMnNlbnRpbWVudC1hbmFseXNpcyUyMiUyQyUyMG1vZGVsJTNEbW9kZWwlMkMlMjB0b2tlbml6ZXIlM0R0b2tlbml6ZXIpJTBBY2xhc3NpZmllciglMjJOb3VzJTIwc29tbWVzJTIwdHIlQzMlQThzJTIwaGV1cmV1eCUyMGRlJTIwdm91cyUyMHByJUMzJUE5c2VudGVyJTIwbGElMjBiaWJsaW90aCVDMyVBOHF1ZSUyMCVGMCU5RiVBNCU5NyUyMFRyYW5zZm9ybWVycy4lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>classifier = pipeline(<span class="hljs-string">&quot;sentiment-analysis&quot;</span>, model=model, tokenizer=tokenizer)
<span class="hljs-meta">&gt;&gt;&gt; </span>classifier(<span class="hljs-string">&quot;Nous sommes très heureux de vous présenter la bibliothèque 🤗 Transformers.&quot;</span>)
[{<span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;5 stars&#x27;</span>, <span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.7273</span>}]`}}),Ke=new Y({}),et=new Jr({props:{id:"AhChOFRegn4"}}),at=new Y({}),rt=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEFtb2RlbF9uYW1lJTIwJTNEJTIwJTIybmxwdG93biUyRmJlcnQtYmFzZS1tdWx0aWxpbmd1YWwtdW5jYXNlZC1zZW50aW1lbnQlMjIlMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZChtb2RlbF9uYW1lKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>model_name = <span class="hljs-string">&quot;nlptown/bert-base-multilingual-uncased-sentiment&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(model_name)`}}),it=new _({props:{code:"ZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTIyV2UlMjBhcmUlMjB2ZXJ5JTIwaGFwcHklMjB0byUyMHNob3clMjB5b3UlMjB0aGUlMjAlRjAlOUYlQTQlOTclMjBUcmFuc2Zvcm1lcnMlMjBsaWJyYXJ5LiUyMiklMEFwcmludChlbmNvZGluZyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(<span class="hljs-string">&quot;We are very happy to show you the 🤗 Transformers library.&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(encoding)
{<span class="hljs-string">&#x27;input_ids&#x27;</span>: [<span class="hljs-number">101</span>, <span class="hljs-number">11312</span>, <span class="hljs-number">10320</span>, <span class="hljs-number">12495</span>, <span class="hljs-number">19308</span>, <span class="hljs-number">10114</span>, <span class="hljs-number">11391</span>, <span class="hljs-number">10855</span>, <span class="hljs-number">10103</span>, <span class="hljs-number">100</span>, <span class="hljs-number">58263</span>, <span class="hljs-number">13299</span>, <span class="hljs-number">119</span>, <span class="hljs-number">102</span>],
 <span class="hljs-string">&#x27;token_type_ids&#x27;</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-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>: [<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>]}`}}),ce=new ls({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Lr],pytorch:[Yr]},$$scope:{ctx:j}}}),fe=new Us({props:{$$slots:{default:[Sr]},$$scope:{ctx:j}}}),ft=new Y({}),ue=new ls({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Kr],pytorch:[Qr]},$$scope:{ctx:j}}}),he=new Us({props:{$$slots:{default:[eo]},$$scope:{ctx:j}}}),dt=new Y({}),$e=new ls({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[no],pytorch:[so]},$$scope:{ctx:j}}}),ye=new ls({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[io],pytorch:[ro]},$$scope:{ctx:j}}}),ht=new Y({}),yt=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Db25maWclMEElMEFteV9jb25maWclMjAlM0QlMjBBdXRvQ29uZmlnLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMiUyQyUyMG5faGVhZHMlM0QxMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoConfig

<span class="hljs-meta">&gt;&gt;&gt; </span>my_config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>, n_heads=<span class="hljs-number">12</span>)`}}),be=new ls({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[fo],pytorch:[mo]},$$scope:{ctx:j}}}),bt=new Y({}),jt=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)`}}),_t=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluaW5nQXJndW1lbnRzJTBBJTBBdHJhaW5pbmdfYXJncyUyMCUzRCUyMFRyYWluaW5nQXJndW1lbnRzKCUwQSUyMCUyMCUyMCUyMG91dHB1dF9kaXIlM0QlMjJwYXRoJTJGdG8lMkZzYXZlJTJGZm9sZGVyJTJGJTIyJTJDJTBBJTIwJTIwJTIwJTIwbGVhcm5pbmdfcmF0ZSUzRDJlLTUlMkMlMEElMjAlMjAlMjAlMjBwZXJfZGV2aWNlX3RyYWluX2JhdGNoX3NpemUlM0Q4JTJDJTBBJTIwJTIwJTIwJTIwcGVyX2RldmljZV9ldmFsX2JhdGNoX3NpemUlM0Q4JTJDJTBBJTIwJTIwJTIwJTIwbnVtX3RyYWluX2Vwb2NocyUzRDIlMkMlMEEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TrainingArguments

<span class="hljs-meta">&gt;&gt;&gt; </span>training_args = TrainingArguments(
<span class="hljs-meta">... </span>    output_dir=<span class="hljs-string">&quot;path/to/save/folder/&quot;</span>,
<span class="hljs-meta">... </span>    learning_rate=<span class="hljs-number">2e-5</span>,
<span class="hljs-meta">... </span>    per_device_train_batch_size=<span class="hljs-number">8</span>,
<span class="hljs-meta">... </span>    per_device_eval_batch_size=<span class="hljs-number">8</span>,
<span class="hljs-meta">... </span>    num_train_epochs=<span class="hljs-number">2</span>,
<span class="hljs-meta">... </span>)`}}),Ut=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)`}}),Zt=new _({props:{code:"ZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJyb3R0ZW5fdG9tYXRvZXMlMjIpJTIwJTIwJTIzJTIwZG9jdGVzdCUzQSUyMCUyQklHTk9SRV9SRVNVTFQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;rotten_tomatoes&quot;</span>)  <span class="hljs-comment"># doctest: +IGNORE_RESULT</span>`}}),xt=new _({props:{code:"ZGVmJTIwdG9rZW5pemVfZGF0YXNldChkYXRhc2V0KSUzQSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMHRva2VuaXplcihkYXRhc2V0JTVCJTIydGV4dCUyMiU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">tokenize_dataset</span>(<span class="hljs-params">dataset</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> tokenizer(dataset[<span class="hljs-string">&quot;text&quot;</span>])`}}),Wt=new _({props:{code:"ZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQubWFwKHRva2VuaXplX2RhdGFzZXQlMkMlMjBiYXRjaGVkJTNEVHJ1ZSk=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.<span class="hljs-built_in">map</span>(tokenize_dataset, batched=<span class="hljs-literal">True</span>)'}}),Rt=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMERhdGFDb2xsYXRvcldpdGhQYWRkaW5nJTBBJTBBZGF0YV9jb2xsYXRvciUyMCUzRCUyMERhdGFDb2xsYXRvcldpdGhQYWRkaW5nKHRva2VuaXplciUzRHRva2VuaXplcik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> DataCollatorWithPadding

<span class="hljs-meta">&gt;&gt;&gt; </span>data_collator = DataCollatorWithPadding(tokenizer=tokenizer)`}}),It=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYWluZXIlMEElMEF0cmFpbmVyJTIwJTNEJTIwVHJhaW5lciglMEElMjAlMjAlMjAlMjBtb2RlbCUzRG1vZGVsJTJDJTBBJTIwJTIwJTIwJTIwYXJncyUzRHRyYWluaW5nX2FyZ3MlMkMlMEElMjAlMjAlMjAlMjB0cmFpbl9kYXRhc2V0JTNEZGF0YXNldCU1QiUyMnRyYWluJTIyJTVEJTJDJTBBJTIwJTIwJTIwJTIwZXZhbF9kYXRhc2V0JTNEZGF0YXNldCU1QiUyMnRlc3QlMjIlNUQlMkMlMEElMjAlMjAlMjAlMjB0b2tlbml6ZXIlM0R0b2tlbml6ZXIlMkMlMEElMjAlMjAlMjAlMjBkYXRhX2NvbGxhdG9yJTNEZGF0YV9jb2xsYXRvciUyQyUwQSklMjAlMjAlMjMlMjBkb2N0ZXN0JTNBJTIwJTJCU0tJUA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> Trainer

<span class="hljs-meta">&gt;&gt;&gt; </span>trainer = Trainer(
<span class="hljs-meta">... </span>    model=model,
<span class="hljs-meta">... </span>    args=training_args,
<span class="hljs-meta">... </span>    train_dataset=dataset[<span class="hljs-string">&quot;train&quot;</span>],
<span class="hljs-meta">... </span>    eval_dataset=dataset[<span class="hljs-string">&quot;test&quot;</span>],
<span class="hljs-meta">... </span>    tokenizer=tokenizer,
<span class="hljs-meta">... </span>    data_collator=data_collator,
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># doctest: +SKIP</span>`}}),Vt=new _({props:{code:"dHJhaW5lci50cmFpbigp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.train()'}}),Te=new Us({props:{$$slots:{default:[uo]},$$scope:{ctx:j}}}),Nt=new Y({}),Yt=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFAutoModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAutoModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)`}}),Lt=new _({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;distilbert-base-uncased&quot;</span>)`}}),qt=new _({props:{code:"ZGVmJTIwdG9rZW5pemVfZGF0YXNldChkYXRhc2V0KSUzQSUwQSUyMCUyMCUyMCUyMHJldHVybiUyMHRva2VuaXplcihkYXRhc2V0JTVCJTIydGV4dCUyMiU1RCklMjAlMjAlMjMlMjBkb2N0ZXN0JTNBJTIwJTJCU0tJUA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">tokenize_dataset</span>(<span class="hljs-params">dataset</span>):
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> tokenizer(dataset[<span class="hljs-string">&quot;text&quot;</span>])  <span class="hljs-comment"># doctest: +SKIP</span>`}}),Qt=new _({props:{code:"ZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQubWFwKHRva2VuaXplX2RhdGFzZXQpJTIwJTIwJTIzJTIwZG9jdGVzdCUzQSUyMCUyQlNLSVAlMEF0Zl9kYXRhc2V0JTIwJTNEJTIwbW9kZWwucHJlcGFyZV90Zl9kYXRhc2V0KCUwQSUyMCUyMCUyMCUyMGRhdGFzZXQlNUIlMjJ0cmFpbiUyMiU1RCUyQyUyMGJhdGNoX3NpemUlM0QxNiUyQyUyMHNodWZmbGUlM0RUcnVlJTJDJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyJTBBKSUyMCUyMCUyMyUyMGRvY3Rlc3QlM0ElMjAlMkJTS0lQ",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.<span class="hljs-built_in">map</span>(tokenize_dataset)  <span class="hljs-comment"># doctest: +SKIP</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tf_dataset = model.prepare_tf_dataset(
<span class="hljs-meta">... </span>    dataset[<span class="hljs-string">&quot;train&quot;</span>], batch_size=<span class="hljs-number">16</span>, shuffle=<span class="hljs-literal">True</span>, tokenizer=tokenizer
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># doctest: +SKIP</span>`}}),Dt=new _({props:{code:"ZnJvbSUyMHRlbnNvcmZsb3cua2VyYXMub3B0aW1pemVycyUyMGltcG9ydCUyMEFkYW0lMEElMEFtb2RlbC5jb21waWxlKG9wdGltaXplciUzREFkYW0oM2UtNSkpJTIwJTIwJTIzJTIwTm8lMjBsb3NzJTIwYXJndW1lbnQhJTBBbW9kZWwuZml0KHRmX2RhdGFzZXQpJTIwJTIwJTIzJTIwZG9jdGVzdCUzQSUyMCUyQlNLSVA=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> tensorflow.keras.optimizers <span class="hljs-keyword">import</span> Adam

<span class="hljs-meta">&gt;&gt;&gt; </span>model.<span class="hljs-built_in">compile</span>(optimizer=Adam(<span class="hljs-number">3e-5</span>))  <span class="hljs-comment"># No loss argument!</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model.fit(tf_dataset)  <span class="hljs-comment"># doctest: +SKIP</span>`}}),Kt=new Y({}),{c(){s=m("meta"),o=i(),t=m("p"),r=i(),u=m("h1"),f=m("a"),U=m("span"),g(Z.$$.fragment),G=i(),W=m("span"),W.textContent=v,x=i(),g(R.$$.fragment),B=i(),F=m("p"),F.innerHTML=H,z=i(),d=m("p"),d.textContent=C,L=i(),g(_e.$$.fragment),Ss=i(),Je=m("p"),Je.textContent=ml,qs=i(),g(ne.$$.fragment),Ps=i(),q=m("h2"),le=m("a"),Cs=m("span"),g(Ue.$$.fragment),Wn=i(),rs=m("span"),rs.textContent=cl,Qs=i(),g(Ce.$$.fragment),Os=i(),Ze=m("p"),Ze.innerHTML=fl,Ds=i(),g(re.$$.fragment),Ks=i(),xe=m("table"),xe.innerHTML=dl,ea=i(),We=m("p"),We.innerHTML=ul,ta=i(),g(Ge.$$.fragment),sa=i(),Re=m("p"),Re.innerHTML=hl,aa=i(),g(He.$$.fragment),na=i(),Ie=m("p"),Ie.innerHTML=gl,la=i(),g(Fe.$$.fragment),ra=i(),Ve=m("p"),Ve.innerHTML=$l,oa=i(),g(ze.$$.fragment),ia=i(),Ae=m("p"),Ae.innerHTML=yl,pa=i(),g(Ne.$$.fragment),ma=i(),Xe=m("p"),Xe.innerHTML=Ml,ca=i(),g(Ee.$$.fragment),fa=i(),Ye=m("p"),Ye.innerHTML=bl,da=i(),g(Be.$$.fragment),ua=i(),Le=m("p"),Le.innerHTML=wl,ha=i(),P=m("h3"),oe=m("a"),Zs=m("span"),g(Se.$$.fragment),Gn=i(),os=m("span"),os.textContent=Tl,ga=i(),qe=m("p"),qe.innerHTML=vl,$a=i(),g(Pe.$$.fragment),ya=i(),g(ie.$$.fragment),Ma=i(),Qe=m("p"),Qe.innerHTML=jl,ba=i(),g(Oe.$$.fragment),wa=i(),De=m("p"),De.innerHTML=kl,Ta=i(),Q=m("h2"),pe=m("a"),xs=m("span"),g(Ke.$$.fragment),Rn=i(),is=m("span"),is.textContent=_l,va=i(),g(et.$$.fragment),ja=i(),tt=m("p"),tt.innerHTML=Jl,ka=i(),st=m("p"),st.innerHTML=Ul,_a=i(),O=m("h3"),me=m("a"),Ws=m("span"),g(at.$$.fragment),Hn=i(),ps=m("span"),ps.textContent=Cl,Ja=i(),nt=m("p"),nt.innerHTML=Zl,Ua=i(),lt=m("p"),lt.innerHTML=xl,Ca=i(),g(rt.$$.fragment),Za=i(),ot=m("p"),ot.textContent=Wl,xa=i(),g(it.$$.fragment),Wa=i(),pt=m("p"),pt.textContent=Gl,Ga=i(),mt=m("ul"),mt.innerHTML=Rl,Ra=i(),ct=m("p"),ct.textContent=Hl,Ha=i(),g(ce.$$.fragment),Ia=i(),g(fe.$$.fragment),Fa=i(),D=m("h3"),de=m("a"),Gs=m("span"),g(ft.$$.fragment),In=i(),ms=m("span"),ms.textContent=Il,Va=i(),g(ue.$$.fragment),za=i(),g(he.$$.fragment),Aa=i(),K=m("h3"),ge=m("a"),Rs=m("span"),g(dt.$$.fragment),Fn=i(),cs=m("span"),cs.textContent=Fl,Na=i(),g($e.$$.fragment),Xa=i(),ut=m("p"),ut.innerHTML=Vl,Ea=i(),g(ye.$$.fragment),Ya=i(),ee=m("h2"),Me=m("a"),Hs=m("span"),g(ht.$$.fragment),Vn=i(),fs=m("span"),fs.textContent=zl,Ba=i(),gt=m("p"),gt.textContent=Al,La=i(),$t=m("p"),$t.innerHTML=Nl,Sa=i(),g(yt.$$.fragment),qa=i(),g(be.$$.fragment),Pa=i(),Mt=m("p"),Mt.innerHTML=Xl,Qa=i(),te=m("h2"),we=m("a"),Is=m("span"),g(bt.$$.fragment),zn=i(),ds=m("span"),ds.textContent=El,Oa=i(),wt=m("p"),wt.innerHTML=Yl,Da=i(),Tt=m("p"),Tt.innerHTML=Bl,Ka=i(),V=m("ol"),vt=m("li"),us=m("p"),us.innerHTML=Ll,An=i(),g(jt.$$.fragment),Nn=i(),kt=m("li"),hs=m("p"),hs.innerHTML=Sl,Xn=i(),g(_t.$$.fragment),En=i(),Jt=m("li"),gs=m("p"),gs.textContent=ql,Yn=i(),g(Ut.$$.fragment),Bn=i(),Ct=m("li"),$s=m("p"),$s.textContent=Pl,Ln=i(),g(Zt.$$.fragment),Sn=i(),E=m("li"),ys=m("p"),ys.textContent=Ql,qn=i(),g(xt.$$.fragment),Pn=i(),Ms=m("p"),Ms.innerHTML=Ol,Qn=i(),g(Wt.$$.fragment),On=i(),Gt=m("li"),bs=m("p"),bs.innerHTML=Dl,Dn=i(),g(Rt.$$.fragment),en=i(),Ht=m("p"),Ht.innerHTML=Kl,tn=i(),g(It.$$.fragment),sn=i(),Ft=m("p"),Ft.innerHTML=er,an=i(),g(Vt.$$.fragment),nn=i(),g(Te.$$.fragment),ln=i(),zt=m("p"),zt.innerHTML=tr,rn=i(),At=m("p"),At.innerHTML=sr,on=i(),se=m("h2"),ve=m("a"),Fs=m("span"),g(Nt.$$.fragment),Kn=i(),ws=m("span"),ws.textContent=ar,pn=i(),Xt=m("p"),Xt.innerHTML=nr,mn=i(),A=m("ol"),Et=m("li"),Ts=m("p"),Ts.innerHTML=lr,el=i(),g(Yt.$$.fragment),tl=i(),Bt=m("li"),vs=m("p"),vs.textContent=rr,sl=i(),g(Lt.$$.fragment),al=i(),St=m("li"),js=m("p"),js.textContent=or,nl=i(),g(qt.$$.fragment),ll=i(),Pt=m("li"),ks=m("p"),ks.innerHTML=ir,rl=i(),g(Qt.$$.fragment),ol=i(),Ot=m("li"),_s=m("p"),_s.innerHTML=pr,il=i(),g(Dt.$$.fragment),cn=i(),ae=m("h2"),je=m("a"),Vs=m("span"),g(Kt.$$.fragment),pl=i(),Js=m("span"),Js.textContent=mr,fn=i(),es=m("p"),es.textContent=cr,dn=i(),zs=m("p"),this.h()},l(e){const n=Wr("svelte-1phssyn",document.head);s=c(n,"META",{name:!0,content:!0}),n.forEach(a),o=p(e),t=c(e,"P",{}),k(t).forEach(a),r=p(e),u=c(e,"H1",{class:!0});var ts=k(u);f=c(ts,"A",{id:!0,class:!0,href:!0});var As=k(f);U=c(As,"SPAN",{});var Ns=k(U);$(Z.$$.fragment,Ns),Ns.forEach(a),As.forEach(a),G=p(ts),W=c(ts,"SPAN",{"data-svelte-h":!0}),T(W)!=="svelte-btee2s"&&(W.textContent=v),ts.forEach(a),x=p(e),$(R.$$.fragment,e),B=p(e),F=c(e,"P",{"data-svelte-h":!0}),T(F)!=="svelte-122y4xm"&&(F.innerHTML=H),z=p(e),d=c(e,"P",{"data-svelte-h":!0}),T(d)!=="svelte-1c9nexd"&&(d.textContent=C),L=p(e),$(_e.$$.fragment,e),Ss=p(e),Je=c(e,"P",{"data-svelte-h":!0}),T(Je)!=="svelte-1nw764u"&&(Je.textContent=ml),qs=p(e),$(ne.$$.fragment,e),Ps=p(e),q=c(e,"H2",{class:!0});var ss=k(q);le=c(ss,"A",{id:!0,class:!0,href:!0});var Xs=k(le);Cs=c(Xs,"SPAN",{});var Es=k(Cs);$(Ue.$$.fragment,Es),Es.forEach(a),Xs.forEach(a),Wn=p(ss),rs=c(ss,"SPAN",{"data-svelte-h":!0}),T(rs)!=="svelte-1hivr8r"&&(rs.textContent=cl),ss.forEach(a),Qs=p(e),$(Ce.$$.fragment,e),Os=p(e),Ze=c(e,"P",{"data-svelte-h":!0}),T(Ze)!=="svelte-1p03ua2"&&(Ze.innerHTML=fl),Ds=p(e),$(re.$$.fragment,e),Ks=p(e),xe=c(e,"TABLE",{"data-svelte-h":!0}),T(xe)!=="svelte-x282na"&&(xe.innerHTML=dl),ea=p(e),We=c(e,"P",{"data-svelte-h":!0}),T(We)!=="svelte-wyhwsy"&&(We.innerHTML=ul),ta=p(e),$(Ge.$$.fragment,e),sa=p(e),Re=c(e,"P",{"data-svelte-h":!0}),T(Re)!=="svelte-kk2q9i"&&(Re.innerHTML=hl),aa=p(e),$(He.$$.fragment,e),na=p(e),Ie=c(e,"P",{"data-svelte-h":!0}),T(Ie)!=="svelte-1lvohm"&&(Ie.innerHTML=gl),la=p(e),$(Fe.$$.fragment,e),ra=p(e),Ve=c(e,"P",{"data-svelte-h":!0}),T(Ve)!=="svelte-9kfoan"&&(Ve.innerHTML=$l),oa=p(e),$(ze.$$.fragment,e),ia=p(e),Ae=c(e,"P",{"data-svelte-h":!0}),T(Ae)!=="svelte-1gp521x"&&(Ae.innerHTML=yl),pa=p(e),$(Ne.$$.fragment,e),ma=p(e),Xe=c(e,"P",{"data-svelte-h":!0}),T(Xe)!=="svelte-8z5qlz"&&(Xe.innerHTML=Ml),ca=p(e),$(Ee.$$.fragment,e),fa=p(e),Ye=c(e,"P",{"data-svelte-h":!0}),T(Ye)!=="svelte-ue0ub3"&&(Ye.innerHTML=bl),da=p(e),$(Be.$$.fragment,e),ua=p(e),Le=c(e,"P",{"data-svelte-h":!0}),T(Le)!=="svelte-1q1ewi4"&&(Le.innerHTML=wl),ha=p(e),P=c(e,"H3",{class:!0});var as=k(P);oe=c(as,"A",{id:!0,class:!0,href:!0});var Ys=k(oe);Zs=c(Ys,"SPAN",{});var Bs=k(Zs);$(Se.$$.fragment,Bs),Bs.forEach(a),Ys.forEach(a),Gn=p(as),os=c(as,"SPAN",{"data-svelte-h":!0}),T(os)!=="svelte-8en66g"&&(os.textContent=Tl),as.forEach(a),ga=p(e),qe=c(e,"P",{"data-svelte-h":!0}),T(qe)!=="svelte-ggwzpv"&&(qe.innerHTML=vl),$a=p(e),$(Pe.$$.fragment,e),ya=p(e),$(ie.$$.fragment,e),Ma=p(e),Qe=c(e,"P",{"data-svelte-h":!0}),T(Qe)!=="svelte-18ahwmd"&&(Qe.innerHTML=jl),ba=p(e),$(Oe.$$.fragment,e),wa=p(e),De=c(e,"P",{"data-svelte-h":!0}),T(De)!=="svelte-1tkpcvw"&&(De.innerHTML=kl),Ta=p(e),Q=c(e,"H2",{class:!0});var ns=k(Q);pe=c(ns,"A",{id:!0,class:!0,href:!0});var Ls=k(pe);xs=c(Ls,"SPAN",{});var fr=k(xs);$(Ke.$$.fragment,fr),fr.forEach(a),Ls.forEach(a),Rn=p(ns),is=c(ns,"SPAN",{"data-svelte-h":!0}),T(is)!=="svelte-l9z4zy"&&(is.textContent=_l),ns.forEach(a),va=p(e),$(et.$$.fragment,e),ja=p(e),tt=c(e,"P",{"data-svelte-h":!0}),T(tt)!=="svelte-nrfqq"&&(tt.innerHTML=Jl),ka=p(e),st=c(e,"P",{"data-svelte-h":!0}),T(st)!=="svelte-1w4hlxx"&&(st.innerHTML=Ul),_a=p(e),O=c(e,"H3",{class:!0});var hn=k(O);me=c(hn,"A",{id:!0,class:!0,href:!0});var dr=k(me);Ws=c(dr,"SPAN",{});var ur=k(Ws);$(at.$$.fragment,ur),ur.forEach(a),dr.forEach(a),Hn=p(hn),ps=c(hn,"SPAN",{"data-svelte-h":!0}),T(ps)!=="svelte-5wpjmf"&&(ps.textContent=Cl),hn.forEach(a),Ja=p(e),nt=c(e,"P",{"data-svelte-h":!0}),T(nt)!=="svelte-1s6s1n"&&(nt.innerHTML=Zl),Ua=p(e),lt=c(e,"P",{"data-svelte-h":!0}),T(lt)!=="svelte-1qbw038"&&(lt.innerHTML=xl),Ca=p(e),$(rt.$$.fragment,e),Za=p(e),ot=c(e,"P",{"data-svelte-h":!0}),T(ot)!=="svelte-1c0z2pg"&&(ot.textContent=Wl),xa=p(e),$(it.$$.fragment,e),Wa=p(e),pt=c(e,"P",{"data-svelte-h":!0}),T(pt)!=="svelte-19i2zcw"&&(pt.textContent=Gl),Ga=p(e),mt=c(e,"UL",{"data-svelte-h":!0}),T(mt)!=="svelte-5dpeuy"&&(mt.innerHTML=Rl),Ra=p(e),ct=c(e,"P",{"data-svelte-h":!0}),T(ct)!=="svelte-3sx4bx"&&(ct.textContent=Hl),Ha=p(e),$(ce.$$.fragment,e),Ia=p(e),$(fe.$$.fragment,e),Fa=p(e),D=c(e,"H3",{class:!0});var gn=k(D);de=c(gn,"A",{id:!0,class:!0,href:!0});var hr=k(de);Gs=c(hr,"SPAN",{});var gr=k(Gs);$(ft.$$.fragment,gr),gr.forEach(a),hr.forEach(a),In=p(gn),ms=c(gn,"SPAN",{"data-svelte-h":!0}),T(ms)!=="svelte-12n7lj"&&(ms.textContent=Il),gn.forEach(a),Va=p(e),$(ue.$$.fragment,e),za=p(e),$(he.$$.fragment,e),Aa=p(e),K=c(e,"H3",{class:!0});var $n=k(K);ge=c($n,"A",{id:!0,class:!0,href:!0});var $r=k(ge);Rs=c($r,"SPAN",{});var yr=k(Rs);$(dt.$$.fragment,yr),yr.forEach(a),$r.forEach(a),Fn=p($n),cs=c($n,"SPAN",{"data-svelte-h":!0}),T(cs)!=="svelte-flams"&&(cs.textContent=Fl),$n.forEach(a),Na=p(e),$($e.$$.fragment,e),Xa=p(e),ut=c(e,"P",{"data-svelte-h":!0}),T(ut)!=="svelte-10grpgy"&&(ut.innerHTML=Vl),Ea=p(e),$(ye.$$.fragment,e),Ya=p(e),ee=c(e,"H2",{class:!0});var yn=k(ee);Me=c(yn,"A",{id:!0,class:!0,href:!0});var Mr=k(Me);Hs=c(Mr,"SPAN",{});var br=k(Hs);$(ht.$$.fragment,br),br.forEach(a),Mr.forEach(a),Vn=p(yn),fs=c(yn,"SPAN",{"data-svelte-h":!0}),T(fs)!=="svelte-1fov7io"&&(fs.textContent=zl),yn.forEach(a),Ba=p(e),gt=c(e,"P",{"data-svelte-h":!0}),T(gt)!=="svelte-8iah3b"&&(gt.textContent=Al),La=p(e),$t=c(e,"P",{"data-svelte-h":!0}),T($t)!=="svelte-1au8fyw"&&($t.innerHTML=Nl),Sa=p(e),$(yt.$$.fragment,e),qa=p(e),$(be.$$.fragment,e),Pa=p(e),Mt=c(e,"P",{"data-svelte-h":!0}),T(Mt)!=="svelte-1ld89qp"&&(Mt.innerHTML=Xl),Qa=p(e),te=c(e,"H2",{class:!0});var Mn=k(te);we=c(Mn,"A",{id:!0,class:!0,href:!0});var wr=k(we);Is=c(wr,"SPAN",{});var Tr=k(Is);$(bt.$$.fragment,Tr),Tr.forEach(a),wr.forEach(a),zn=p(Mn),ds=c(Mn,"SPAN",{"data-svelte-h":!0}),T(ds)!=="svelte-1lydvc4"&&(ds.textContent=El),Mn.forEach(a),Oa=p(e),wt=c(e,"P",{"data-svelte-h":!0}),T(wt)!=="svelte-em5vnu"&&(wt.innerHTML=Yl),Da=p(e),Tt=c(e,"P",{"data-svelte-h":!0}),T(Tt)!=="svelte-19k4ue"&&(Tt.innerHTML=Bl),Ka=p(e),V=c(e,"OL",{});var X=k(V);vt=c(X,"LI",{});var bn=k(vt);us=c(bn,"P",{"data-svelte-h":!0}),T(us)!=="svelte-1n6ztda"&&(us.innerHTML=Ll),An=p(bn),$(jt.$$.fragment,bn),bn.forEach(a),Nn=p(X),kt=c(X,"LI",{});var wn=k(kt);hs=c(wn,"P",{"data-svelte-h":!0}),T(hs)!=="svelte-1vvixw8"&&(hs.innerHTML=Sl),Xn=p(wn),$(_t.$$.fragment,wn),wn.forEach(a),En=p(X),Jt=c(X,"LI",{});var Tn=k(Jt);gs=c(Tn,"P",{"data-svelte-h":!0}),T(gs)!=="svelte-1ov2exk"&&(gs.textContent=ql),Yn=p(Tn),$(Ut.$$.fragment,Tn),Tn.forEach(a),Bn=p(X),Ct=c(X,"LI",{});var vn=k(Ct);$s=c(vn,"P",{"data-svelte-h":!0}),T($s)!=="svelte-1u8gaxj"&&($s.textContent=Pl),Ln=p(vn),$(Zt.$$.fragment,vn),vn.forEach(a),Sn=p(X),E=c(X,"LI",{});var ke=k(E);ys=c(ke,"P",{"data-svelte-h":!0}),T(ys)!=="svelte-1u6z95a"&&(ys.textContent=Ql),qn=p(ke),$(xt.$$.fragment,ke),Pn=p(ke),Ms=c(ke,"P",{"data-svelte-h":!0}),T(Ms)!=="svelte-ovynal"&&(Ms.innerHTML=Ol),Qn=p(ke),$(Wt.$$.fragment,ke),ke.forEach(a),On=p(X),Gt=c(X,"LI",{});var jn=k(Gt);bs=c(jn,"P",{"data-svelte-h":!0}),T(bs)!=="svelte-c77cj4"&&(bs.innerHTML=Dl),Dn=p(jn),$(Rt.$$.fragment,jn),jn.forEach(a),X.forEach(a),en=p(e),Ht=c(e,"P",{"data-svelte-h":!0}),T(Ht)!=="svelte-ucw8i6"&&(Ht.innerHTML=Kl),tn=p(e),$(It.$$.fragment,e),sn=p(e),Ft=c(e,"P",{"data-svelte-h":!0}),T(Ft)!=="svelte-axmfyf"&&(Ft.innerHTML=er),an=p(e),$(Vt.$$.fragment,e),nn=p(e),$(Te.$$.fragment,e),ln=p(e),zt=c(e,"P",{"data-svelte-h":!0}),T(zt)!=="svelte-1ctycjr"&&(zt.innerHTML=tr),rn=p(e),At=c(e,"P",{"data-svelte-h":!0}),T(At)!=="svelte-1uwyrk7"&&(At.innerHTML=sr),on=p(e),se=c(e,"H2",{class:!0});var kn=k(se);ve=c(kn,"A",{id:!0,class:!0,href:!0});var vr=k(ve);Fs=c(vr,"SPAN",{});var jr=k(Fs);$(Nt.$$.fragment,jr),jr.forEach(a),vr.forEach(a),Kn=p(kn),ws=c(kn,"SPAN",{"data-svelte-h":!0}),T(ws)!=="svelte-hdzrog"&&(ws.textContent=ar),kn.forEach(a),pn=p(e),Xt=c(e,"P",{"data-svelte-h":!0}),T(Xt)!=="svelte-160elks"&&(Xt.innerHTML=nr),mn=p(e),A=c(e,"OL",{});var S=k(A);Et=c(S,"LI",{});var _n=k(Et);Ts=c(_n,"P",{"data-svelte-h":!0}),T(Ts)!=="svelte-g8f8it"&&(Ts.innerHTML=lr),el=p(_n),$(Yt.$$.fragment,_n),_n.forEach(a),tl=p(S),Bt=c(S,"LI",{});var Jn=k(Bt);vs=c(Jn,"P",{"data-svelte-h":!0}),T(vs)!=="svelte-1ov2exk"&&(vs.textContent=rr),sl=p(Jn),$(Lt.$$.fragment,Jn),Jn.forEach(a),al=p(S),St=c(S,"LI",{});var Un=k(St);js=c(Un,"P",{"data-svelte-h":!0}),T(js)!=="svelte-1u6z95a"&&(js.textContent=or),nl=p(Un),$(qt.$$.fragment,Un),Un.forEach(a),ll=p(S),Pt=c(S,"LI",{});var Cn=k(Pt);ks=c(Cn,"P",{"data-svelte-h":!0}),T(ks)!=="svelte-y81bb3"&&(ks.innerHTML=ir),rl=p(Cn),$(Qt.$$.fragment,Cn),Cn.forEach(a),ol=p(S),Ot=c(S,"LI",{});var Zn=k(Ot);_s=c(Zn,"P",{"data-svelte-h":!0}),T(_s)!=="svelte-1map0wi"&&(_s.innerHTML=pr),il=p(Zn),$(Dt.$$.fragment,Zn),Zn.forEach(a),S.forEach(a),cn=p(e),ae=c(e,"H2",{class:!0});var xn=k(ae);je=c(xn,"A",{id:!0,class:!0,href:!0});var kr=k(je);Vs=c(kr,"SPAN",{});var _r=k(Vs);$(Kt.$$.fragment,_r),_r.forEach(a),kr.forEach(a),pl=p(xn),Js=c(xn,"SPAN",{"data-svelte-h":!0}),T(Js)!=="svelte-72vgtz"&&(Js.textContent=mr),xn.forEach(a),fn=p(e),es=c(e,"P",{"data-svelte-h":!0}),T(es)!=="svelte-gn9in9"&&(es.textContent=cr),dn=p(e),zs=c(e,"P",{}),k(zs).forEach(a),this.h()},h(){J(s,"name","hf:doc:metadata"),J(s,"content",JSON.stringify(go)),J(f,"id","quick-tour"),J(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(f,"href","#quick-tour"),J(u,"class","relative group"),J(le,"id","pipeline"),J(le,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(le,"href","#pipeline"),J(q,"class","relative group"),J(oe,"id","use-another-model-and-tokenizer-in-the-pipeline"),J(oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(oe,"href","#use-another-model-and-tokenizer-in-the-pipeline"),J(P,"class","relative group"),J(pe,"id","autoclass"),J(pe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(pe,"href","#autoclass"),J(Q,"class","relative group"),J(me,"id","autotokenizer"),J(me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(me,"href","#autotokenizer"),J(O,"class","relative group"),J(de,"id","automodel"),J(de,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(de,"href","#automodel"),J(D,"class","relative group"),J(ge,"id","save-a-model"),J(ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(ge,"href","#save-a-model"),J(K,"class","relative group"),J(Me,"id","custom-model-builds"),J(Me,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(Me,"href","#custom-model-builds"),J(ee,"class","relative group"),J(we,"id","trainer-a-pytorch-optimized-training-loop"),J(we,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(we,"href","#trainer-a-pytorch-optimized-training-loop"),J(te,"class","relative group"),J(ve,"id","train-with-tensorflow"),J(ve,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(ve,"href","#train-with-tensorflow"),J(se,"class","relative group"),J(je,"id","whats-next"),J(je,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),J(je,"href","#whats-next"),J(ae,"class","relative group")},m(e,n){h(document.head,s),l(e,o,n),l(e,t,n),l(e,r,n),l(e,u,n),h(u,f),h(f,U),y(Z,U,null),h(u,G),h(u,W),l(e,x,n),y(R,e,n),l(e,B,n),l(e,F,n),l(e,z,n),l(e,d,n),l(e,L,n),y(_e,e,n),l(e,Ss,n),l(e,Je,n),l(e,qs,n),y(ne,e,n),l(e,Ps,n),l(e,q,n),h(q,le),h(le,Cs),y(Ue,Cs,null),h(q,Wn),h(q,rs),l(e,Qs,n),y(Ce,e,n),l(e,Os,n),l(e,Ze,n),l(e,Ds,n),y(re,e,n),l(e,Ks,n),l(e,xe,n),l(e,ea,n),l(e,We,n),l(e,ta,n),y(Ge,e,n),l(e,sa,n),l(e,Re,n),l(e,aa,n),y(He,e,n),l(e,na,n),l(e,Ie,n),l(e,la,n),y(Fe,e,n),l(e,ra,n),l(e,Ve,n),l(e,oa,n),y(ze,e,n),l(e,ia,n),l(e,Ae,n),l(e,pa,n),y(Ne,e,n),l(e,ma,n),l(e,Xe,n),l(e,ca,n),y(Ee,e,n),l(e,fa,n),l(e,Ye,n),l(e,da,n),y(Be,e,n),l(e,ua,n),l(e,Le,n),l(e,ha,n),l(e,P,n),h(P,oe),h(oe,Zs),y(Se,Zs,null),h(P,Gn),h(P,os),l(e,ga,n),l(e,qe,n),l(e,$a,n),y(Pe,e,n),l(e,ya,n),y(ie,e,n),l(e,Ma,n),l(e,Qe,n),l(e,ba,n),y(Oe,e,n),l(e,wa,n),l(e,De,n),l(e,Ta,n),l(e,Q,n),h(Q,pe),h(pe,xs),y(Ke,xs,null),h(Q,Rn),h(Q,is),l(e,va,n),y(et,e,n),l(e,ja,n),l(e,tt,n),l(e,ka,n),l(e,st,n),l(e,_a,n),l(e,O,n),h(O,me),h(me,Ws),y(at,Ws,null),h(O,Hn),h(O,ps),l(e,Ja,n),l(e,nt,n),l(e,Ua,n),l(e,lt,n),l(e,Ca,n),y(rt,e,n),l(e,Za,n),l(e,ot,n),l(e,xa,n),y(it,e,n),l(e,Wa,n),l(e,pt,n),l(e,Ga,n),l(e,mt,n),l(e,Ra,n),l(e,ct,n),l(e,Ha,n),y(ce,e,n),l(e,Ia,n),y(fe,e,n),l(e,Fa,n),l(e,D,n),h(D,de),h(de,Gs),y(ft,Gs,null),h(D,In),h(D,ms),l(e,Va,n),y(ue,e,n),l(e,za,n),y(he,e,n),l(e,Aa,n),l(e,K,n),h(K,ge),h(ge,Rs),y(dt,Rs,null),h(K,Fn),h(K,cs),l(e,Na,n),y($e,e,n),l(e,Xa,n),l(e,ut,n),l(e,Ea,n),y(ye,e,n),l(e,Ya,n),l(e,ee,n),h(ee,Me),h(Me,Hs),y(ht,Hs,null),h(ee,Vn),h(ee,fs),l(e,Ba,n),l(e,gt,n),l(e,La,n),l(e,$t,n),l(e,Sa,n),y(yt,e,n),l(e,qa,n),y(be,e,n),l(e,Pa,n),l(e,Mt,n),l(e,Qa,n),l(e,te,n),h(te,we),h(we,Is),y(bt,Is,null),h(te,zn),h(te,ds),l(e,Oa,n),l(e,wt,n),l(e,Da,n),l(e,Tt,n),l(e,Ka,n),l(e,V,n),h(V,vt),h(vt,us),h(vt,An),y(jt,vt,null),h(V,Nn),h(V,kt),h(kt,hs),h(kt,Xn),y(_t,kt,null),h(V,En),h(V,Jt),h(Jt,gs),h(Jt,Yn),y(Ut,Jt,null),h(V,Bn),h(V,Ct),h(Ct,$s),h(Ct,Ln),y(Zt,Ct,null),h(V,Sn),h(V,E),h(E,ys),h(E,qn),y(xt,E,null),h(E,Pn),h(E,Ms),h(E,Qn),y(Wt,E,null),h(V,On),h(V,Gt),h(Gt,bs),h(Gt,Dn),y(Rt,Gt,null),l(e,en,n),l(e,Ht,n),l(e,tn,n),y(It,e,n),l(e,sn,n),l(e,Ft,n),l(e,an,n),y(Vt,e,n),l(e,nn,n),y(Te,e,n),l(e,ln,n),l(e,zt,n),l(e,rn,n),l(e,At,n),l(e,on,n),l(e,se,n),h(se,ve),h(ve,Fs),y(Nt,Fs,null),h(se,Kn),h(se,ws),l(e,pn,n),l(e,Xt,n),l(e,mn,n),l(e,A,n),h(A,Et),h(Et,Ts),h(Et,el),y(Yt,Et,null),h(A,tl),h(A,Bt),h(Bt,vs),h(Bt,sl),y(Lt,Bt,null),h(A,al),h(A,St),h(St,js),h(St,nl),y(qt,St,null),h(A,ll),h(A,Pt),h(Pt,ks),h(Pt,rl),y(Qt,Pt,null),h(A,ol),h(A,Ot),h(Ot,_s),h(Ot,il),y(Dt,Ot,null),l(e,cn,n),l(e,ae,n),h(ae,je),h(je,Vs),y(Kt,Vs,null),h(ae,pl),h(ae,Js),l(e,fn,n),l(e,es,n),l(e,dn,n),l(e,zs,n),un=!0},p(e,[n]){const ts={};n&2&&(ts.$$scope={dirty:n,ctx:e}),ne.$set(ts);const As={};n&2&&(As.$$scope={dirty:n,ctx:e}),re.$set(As);const Ns={};n&2&&(Ns.$$scope={dirty:n,ctx:e}),ie.$set(Ns);const ss={};n&2&&(ss.$$scope={dirty:n,ctx:e}),ce.$set(ss);const Xs={};n&2&&(Xs.$$scope={dirty:n,ctx:e}),fe.$set(Xs);const Es={};n&2&&(Es.$$scope={dirty:n,ctx:e}),ue.$set(Es);const as={};n&2&&(as.$$scope={dirty:n,ctx:e}),he.$set(as);const Ys={};n&2&&(Ys.$$scope={dirty:n,ctx:e}),$e.$set(Ys);const Bs={};n&2&&(Bs.$$scope={dirty:n,ctx:e}),ye.$set(Bs);const ns={};n&2&&(ns.$$scope={dirty:n,ctx:e}),be.$set(ns);const Ls={};n&2&&(Ls.$$scope={dirty:n,ctx:e}),Te.$set(Ls)},i(e){un||(M(Z.$$.fragment,e),M(R.$$.fragment,e),M(_e.$$.fragment,e),M(ne.$$.fragment,e),M(Ue.$$.fragment,e),M(Ce.$$.fragment,e),M(re.$$.fragment,e),M(Ge.$$.fragment,e),M(He.$$.fragment,e),M(Fe.$$.fragment,e),M(ze.$$.fragment,e),M(Ne.$$.fragment,e),M(Ee.$$.fragment,e),M(Be.$$.fragment,e),M(Se.$$.fragment,e),M(Pe.$$.fragment,e),M(ie.$$.fragment,e),M(Oe.$$.fragment,e),M(Ke.$$.fragment,e),M(et.$$.fragment,e),M(at.$$.fragment,e),M(rt.$$.fragment,e),M(it.$$.fragment,e),M(ce.$$.fragment,e),M(fe.$$.fragment,e),M(ft.$$.fragment,e),M(ue.$$.fragment,e),M(he.$$.fragment,e),M(dt.$$.fragment,e),M($e.$$.fragment,e),M(ye.$$.fragment,e),M(ht.$$.fragment,e),M(yt.$$.fragment,e),M(be.$$.fragment,e),M(bt.$$.fragment,e),M(jt.$$.fragment,e),M(_t.$$.fragment,e),M(Ut.$$.fragment,e),M(Zt.$$.fragment,e),M(xt.$$.fragment,e),M(Wt.$$.fragment,e),M(Rt.$$.fragment,e),M(It.$$.fragment,e),M(Vt.$$.fragment,e),M(Te.$$.fragment,e),M(Nt.$$.fragment,e),M(Yt.$$.fragment,e),M(Lt.$$.fragment,e),M(qt.$$.fragment,e),M(Qt.$$.fragment,e),M(Dt.$$.fragment,e),M(Kt.$$.fragment,e),un=!0)},o(e){b(Z.$$.fragment,e),b(R.$$.fragment,e),b(_e.$$.fragment,e),b(ne.$$.fragment,e),b(Ue.$$.fragment,e),b(Ce.$$.fragment,e),b(re.$$.fragment,e),b(Ge.$$.fragment,e),b(He.$$.fragment,e),b(Fe.$$.fragment,e),b(ze.$$.fragment,e),b(Ne.$$.fragment,e),b(Ee.$$.fragment,e),b(Be.$$.fragment,e),b(Se.$$.fragment,e),b(Pe.$$.fragment,e),b(ie.$$.fragment,e),b(Oe.$$.fragment,e),b(Ke.$$.fragment,e),b(et.$$.fragment,e),b(at.$$.fragment,e),b(rt.$$.fragment,e),b(it.$$.fragment,e),b(ce.$$.fragment,e),b(fe.$$.fragment,e),b(ft.$$.fragment,e),b(ue.$$.fragment,e),b(he.$$.fragment,e),b(dt.$$.fragment,e),b($e.$$.fragment,e),b(ye.$$.fragment,e),b(ht.$$.fragment,e),b(yt.$$.fragment,e),b(be.$$.fragment,e),b(bt.$$.fragment,e),b(jt.$$.fragment,e),b(_t.$$.fragment,e),b(Ut.$$.fragment,e),b(Zt.$$.fragment,e),b(xt.$$.fragment,e),b(Wt.$$.fragment,e),b(Rt.$$.fragment,e),b(It.$$.fragment,e),b(Vt.$$.fragment,e),b(Te.$$.fragment,e),b(Nt.$$.fragment,e),b(Yt.$$.fragment,e),b(Lt.$$.fragment,e),b(qt.$$.fragment,e),b(Qt.$$.fragment,e),b(Dt.$$.fragment,e),b(Kt.$$.fragment,e),un=!1},d(e){e&&(a(o),a(t),a(r),a(u),a(x),a(B),a(F),a(z),a(d),a(L),a(Ss),a(Je),a(qs),a(Ps),a(q),a(Qs),a(Os),a(Ze),a(Ds),a(Ks),a(xe),a(ea),a(We),a(ta),a(sa),a(Re),a(aa),a(na),a(Ie),a(la),a(ra),a(Ve),a(oa),a(ia),a(Ae),a(pa),a(ma),a(Xe),a(ca),a(fa),a(Ye),a(da),a(ua),a(Le),a(ha),a(P),a(ga),a(qe),a($a),a(ya),a(Ma),a(Qe),a(ba),a(wa),a(De),a(Ta),a(Q),a(va),a(ja),a(tt),a(ka),a(st),a(_a),a(O),a(Ja),a(nt),a(Ua),a(lt),a(Ca),a(Za),a(ot),a(xa),a(Wa),a(pt),a(Ga),a(mt),a(Ra),a(ct),a(Ha),a(Ia),a(Fa),a(D),a(Va),a(za),a(Aa),a(K),a(Na),a(Xa),a(ut),a(Ea),a(Ya),a(ee),a(Ba),a(gt),a(La),a($t),a(Sa),a(qa),a(Pa),a(Mt),a(Qa),a(te),a(Oa),a(wt),a(Da),a(Tt),a(Ka),a(V),a(en),a(Ht),a(tn),a(sn),a(Ft),a(an),a(nn),a(ln),a(zt),a(rn),a(At),a(on),a(se),a(pn),a(Xt),a(mn),a(A),a(cn),a(ae),a(fn),a(es),a(dn),a(zs)),a(s),w(Z),w(R,e),w(_e,e),w(ne,e),w(Ue),w(Ce,e),w(re,e),w(Ge,e),w(He,e),w(Fe,e),w(ze,e),w(Ne,e),w(Ee,e),w(Be,e),w(Se),w(Pe,e),w(ie,e),w(Oe,e),w(Ke),w(et,e),w(at),w(rt,e),w(it,e),w(ce,e),w(fe,e),w(ft),w(ue,e),w(he,e),w(dt),w($e,e),w(ye,e),w(ht),w(yt,e),w(be,e),w(bt),w(jt),w(_t),w(Ut),w(Zt),w(xt),w(Wt),w(Rt),w(It,e),w(Vt,e),w(Te,e),w(Nt),w(Yt),w(Lt),w(qt),w(Qt),w(Dt),w(Kt)}}}const go={local:"quick-tour",sections:[{local:"pipeline",sections:[{local:"use-another-model-and-tokenizer-in-the-pipeline",title:"Use another model and tokenizer in the pipeline"}],title:"Pipeline"},{local:"autoclass",sections:[{local:"autotokenizer",title:"AutoTokenizer"},{local:"automodel",title:"AutoModel"},{local:"save-a-model",title:"Save a model"}],title:"AutoClass"},{local:"custom-model-builds",title:"Custom model builds"},{local:"trainer-a-pytorch-optimized-training-loop",title:"Trainer - a PyTorch optimized training loop"},{local:"train-with-tensorflow",title:"Train with TensorFlow"},{local:"whats-next",title:"What's next?"}],title:"Quick tour"};function $o(j){return Cr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _o extends Zr{constructor(s){super(),xr(this,s,$o,ho,Ur,{})}}export{_o as component};
