import{s as zn,o as Xn,n as F}from"../chunks/scheduler.25b97de1.js";import{S as Nn,i as An,g as M,s as i,r as d,A as Yn,h as b,f as n,c as p,j as z,u,x as T,k as Hn,y as _,a as l,v as h,d as $,t as g,w as y}from"../chunks/index.d9030fc9.js";import{T as Kt}from"../chunks/Tip.baa67368.js";import{Y as Vn}from"../chunks/Youtube.eaf1a617.js";import{C as k}from"../chunks/CodeBlock.e6cd0d95.js";import{D as En}from"../chunks/DocNotebookDropdown.5ea6cb78.js";import{F as Xt,M as A}from"../chunks/Markdown.7217f838.js";import{H as L,E as Bn}from"../chunks/EditOnGithub.91d95064.js";function Ln(j){let s,o;return s=new k({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRvcmNo",highlighted:"pip install torch",wrap:!1}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p:F,i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function qn(j){let s,o;return s=new A({props:{$$slots:{default:[Ln]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function Sn(j){let s,o;return s=new k({props:{code:"cGlwJTIwaW5zdGFsbCUyMHRlbnNvcmZsb3c=",highlighted:"pip install tensorflow",wrap:!1}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p:F,i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function Qn(j){let s,o;return s=new A({props:{$$slots:{default:[Sn]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function Pn(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=b(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-yyszjd"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:F,d(t){t&&n(s)}}}function On(j){let s,o='Use <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoModelForSequenceClassification">AutoModelForSequenceClassification</a> and <a href="/docs/transformers/main/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,f;return r=new k({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)`,wrap:!1}}),{c(){s=M("p"),s.innerHTML=o,t=i(),d(r.$$.fragment)},l(m){s=b(m,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1magt38"&&(s.innerHTML=o),t=p(m),u(r.$$.fragment,m)},m(m,J){l(m,s,J),l(m,t,J),h(r,m,J),f=!0},p:F,i(m){f||($(r.$$.fragment,m),f=!0)},o(m){g(r.$$.fragment,m),f=!1},d(m){m&&(n(s),n(t)),y(r,m)}}}function Dn(j){let s,o;return s=new A({props:{$$slots:{default:[On]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function Kn(j){let s,o='Use <a href="/docs/transformers/main/en/model_doc/auto#transformers.TFAutoModelForSequenceClassification">TFAutoModelForSequenceClassification</a> and <a href="/docs/transformers/main/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,f;return r=new k({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)`,wrap:!1}}),{c(){s=M("p"),s.innerHTML=o,t=i(),d(r.$$.fragment)},l(m){s=b(m,"P",{"data-svelte-h":!0}),T(s)!=="svelte-ucahb2"&&(s.innerHTML=o),t=p(m),u(r.$$.fragment,m)},m(m,J){l(m,s,J),l(m,t,J),h(r,m,J),f=!0},p:F,i(m){f||($(r.$$.fragment,m),f=!0)},o(m){g(r.$$.fragment,m),f=!1},d(m){m&&(n(s),n(t)),y(r,m)}}}function el(j){let s,o;return s=new A({props:{$$slots:{default:[Kn]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function tl(j){let s,o;return s=new k({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>)`,wrap:!1}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p:F,i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function sl(j){let s,o;return s=new A({props:{$$slots:{default:[tl]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function al(j){let s,o;return s=new k({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>)`,wrap:!1}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p:F,i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function nl(j){let s,o;return s=new A({props:{$$slots:{default:[al]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function ll(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/main/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>, <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoFeatureExtractor">AutoFeatureExtractor</a> and <a href="/docs/transformers/main/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=b(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1xk5c2w"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:F,d(t){t&&n(s)}}}function rl(j){let s,o='See the <a href="./task_summary">task summary</a> for tasks supported by an <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoModel">AutoModel</a> class.';return{c(){s=M("p"),s.innerHTML=o},l(t){s=b(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-11k4zea"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:F,d(t){t&&n(s)}}}function ol(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/main/en/model_doc/auto#transformers.AutoModel">AutoModel</a> like you would load an <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. The only difference is selecting the correct <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoModel">AutoModel</a> for the task. For text (or sequence) classification, you should load <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoModelForSequenceClassification">AutoModelForSequenceClassification</a>:',t,r,f,m,J,Z,C="Now pass your preprocessed batch of inputs directly to the model. You just have to unpack the dictionary by adding <code>**</code>:",G,w,v,R,q="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:",I,W,x;return r=new k({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)`,wrap:!1}}),m=new Kt({props:{$$slots:{default:[rl]},$$scope:{ctx:j}}}),w=new k({props:{code:"cHRfb3V0cHV0cyUyMCUzRCUyMHB0X21vZGVsKCoqcHRfYmF0Y2gp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>pt_outputs = pt_model(**pt_batch)',wrap:!1}}),W=new k({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;)`,wrap:!1}}),{c(){s=M("p"),s.innerHTML=o,t=i(),d(r.$$.fragment),f=i(),d(m.$$.fragment),J=i(),Z=M("p"),Z.innerHTML=C,G=i(),d(w.$$.fragment),v=i(),R=M("p"),R.innerHTML=q,I=i(),d(W.$$.fragment)},l(c){s=b(c,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1l97ihu"&&(s.innerHTML=o),t=p(c),u(r.$$.fragment,c),f=p(c),u(m.$$.fragment,c),J=p(c),Z=b(c,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-wsvj9w"&&(Z.innerHTML=C),G=p(c),u(w.$$.fragment,c),v=p(c),R=b(c,"P",{"data-svelte-h":!0}),T(R)!=="svelte-17tdpgw"&&(R.innerHTML=q),I=p(c),u(W.$$.fragment,c)},m(c,U){l(c,s,U),l(c,t,U),h(r,c,U),l(c,f,U),h(m,c,U),l(c,J,U),l(c,Z,U),l(c,G,U),h(w,c,U),l(c,v,U),l(c,R,U),l(c,I,U),h(W,c,U),x=!0},p(c,U){const X={};U&2&&(X.$$scope={dirty:U,ctx:c}),m.$set(X)},i(c){x||($(r.$$.fragment,c),$(m.$$.fragment,c),$(w.$$.fragment,c),$(W.$$.fragment,c),x=!0)},o(c){g(r.$$.fragment,c),g(m.$$.fragment,c),g(w.$$.fragment,c),g(W.$$.fragment,c),x=!1},d(c){c&&(n(s),n(t),n(f),n(J),n(Z),n(G),n(v),n(R),n(I)),y(r,c),y(m,c),y(w,c),y(W,c)}}}function il(j){let s,o;return s=new A({props:{$$slots:{default:[ol]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function pl(j){let s,o='See the <a href="./task_summary">task summary</a> for tasks supported by an <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoModel">AutoModel</a> class.';return{c(){s=M("p"),s.innerHTML=o},l(t){s=b(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-11k4zea"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:F,d(t){t&&n(s)}}}function ml(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/main/en/model_doc/auto#transformers.TFAutoModel">TFAutoModel</a> like you would load an <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. The only difference is selecting the correct <a href="/docs/transformers/main/en/model_doc/auto#transformers.TFAutoModel">TFAutoModel</a> for the task. For text (or sequence) classification, you should load <a href="/docs/transformers/main/en/model_doc/auto#transformers.TFAutoModelForSequenceClassification">TFAutoModelForSequenceClassification</a>:',t,r,f,m,J,Z,C="Now pass your preprocessed batch of inputs directly to the model. You can pass the tensors as-is:",G,w,v,R,q="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:",I,W,x;return r=new k({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)`,wrap:!1}}),m=new Kt({props:{$$slots:{default:[pl]},$$scope:{ctx:j}}}),w=new k({props:{code:"dGZfb3V0cHV0cyUyMCUzRCUyMHRmX21vZGVsKHRmX2JhdGNoKQ==",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>tf_outputs = tf_model(tf_batch)',wrap:!1}}),W=new k({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`,wrap:!1}}),{c(){s=M("p"),s.innerHTML=o,t=i(),d(r.$$.fragment),f=i(),d(m.$$.fragment),J=i(),Z=M("p"),Z.textContent=C,G=i(),d(w.$$.fragment),v=i(),R=M("p"),R.innerHTML=q,I=i(),d(W.$$.fragment)},l(c){s=b(c,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1cx03ie"&&(s.innerHTML=o),t=p(c),u(r.$$.fragment,c),f=p(c),u(m.$$.fragment,c),J=p(c),Z=b(c,"P",{"data-svelte-h":!0}),T(Z)!=="svelte-19ydqo0"&&(Z.textContent=C),G=p(c),u(w.$$.fragment,c),v=p(c),R=b(c,"P",{"data-svelte-h":!0}),T(R)!=="svelte-17tdpgw"&&(R.innerHTML=q),I=p(c),u(W.$$.fragment,c)},m(c,U){l(c,s,U),l(c,t,U),h(r,c,U),l(c,f,U),h(m,c,U),l(c,J,U),l(c,Z,U),l(c,G,U),h(w,c,U),l(c,v,U),l(c,R,U),l(c,I,U),h(W,c,U),x=!0},p(c,U){const X={};U&2&&(X.$$scope={dirty:U,ctx:c}),m.$set(X)},i(c){x||($(r.$$.fragment,c),$(m.$$.fragment,c),$(w.$$.fragment,c),$(W.$$.fragment,c),x=!0)},o(c){g(r.$$.fragment,c),g(m.$$.fragment,c),g(w.$$.fragment,c),g(W.$$.fragment,c),x=!1},d(c){c&&(n(s),n(t),n(f),n(J),n(Z),n(G),n(v),n(R),n(I)),y(r,c),y(m,c),y(w,c),y(W,c)}}}function cl(j){let s,o;return s=new A({props:{$$slots:{default:[ml]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function fl(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=b(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-3ji870"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:F,d(t){t&&n(s)}}}function dl(j){let s,o='Once your model is fine-tuned, you can save it with its tokenizer using <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.save_pretrained">PreTrainedModel.save_pretrained()</a>:',t,r,f,m,J='When you are ready to use the model again, reload it with <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">PreTrainedModel.from_pretrained()</a>:',Z,C,G;return r=new k({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)`,wrap:!1}}),C=new k({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>)',wrap:!1}}),{c(){s=M("p"),s.innerHTML=o,t=i(),d(r.$$.fragment),f=i(),m=M("p"),m.innerHTML=J,Z=i(),d(C.$$.fragment)},l(w){s=b(w,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1dfj42p"&&(s.innerHTML=o),t=p(w),u(r.$$.fragment,w),f=p(w),m=b(w,"P",{"data-svelte-h":!0}),T(m)!=="svelte-1h7e1vx"&&(m.innerHTML=J),Z=p(w),u(C.$$.fragment,w)},m(w,v){l(w,s,v),l(w,t,v),h(r,w,v),l(w,f,v),l(w,m,v),l(w,Z,v),h(C,w,v),G=!0},p:F,i(w){G||($(r.$$.fragment,w),$(C.$$.fragment,w),G=!0)},o(w){g(r.$$.fragment,w),g(C.$$.fragment,w),G=!1},d(w){w&&(n(s),n(t),n(f),n(m),n(Z)),y(r,w),y(C,w)}}}function ul(j){let s,o;return s=new A({props:{$$slots:{default:[dl]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function hl(j){let s,o='Once your model is fine-tuned, you can save it with its tokenizer using <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.save_pretrained">TFPreTrainedModel.save_pretrained()</a>:',t,r,f,m,J='When you are ready to use the model again, reload it with <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">TFPreTrainedModel.from_pretrained()</a>:',Z,C,G;return r=new k({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)`,wrap:!1}}),C=new k({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>)',wrap:!1}}),{c(){s=M("p"),s.innerHTML=o,t=i(),d(r.$$.fragment),f=i(),m=M("p"),m.innerHTML=J,Z=i(),d(C.$$.fragment)},l(w){s=b(w,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1hprd39"&&(s.innerHTML=o),t=p(w),u(r.$$.fragment,w),f=p(w),m=b(w,"P",{"data-svelte-h":!0}),T(m)!=="svelte-6vlxmh"&&(m.innerHTML=J),Z=p(w),u(C.$$.fragment,w)},m(w,v){l(w,s,v),l(w,t,v),h(r,w,v),l(w,f,v),l(w,m,v),l(w,Z,v),h(C,w,v),G=!0},p:F,i(w){G||($(r.$$.fragment,w),$(C.$$.fragment,w),G=!0)},o(w){g(r.$$.fragment,w),g(C.$$.fragment,w),G=!1},d(w){w&&(n(s),n(t),n(f),n(m),n(Z)),y(r,w),y(C,w)}}}function $l(j){let s,o;return s=new A({props:{$$slots:{default:[hl]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function gl(j){let s,o;return s=new k({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>)`,wrap:!1}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p:F,i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function yl(j){let s,o;return s=new A({props:{$$slots:{default:[gl]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function Ml(j){let s,o;return s=new k({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>)`,wrap:!1}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p:F,i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function bl(j){let s,o;return s=new A({props:{$$slots:{default:[Ml]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function wl(j){let s,o='Create a model from your custom configuration with <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoModel.from_config">AutoModel.from_config()</a>:',t,r,f;return r=new k({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)`,wrap:!1}}),{c(){s=M("p"),s.innerHTML=o,t=i(),d(r.$$.fragment)},l(m){s=b(m,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1m7z71f"&&(s.innerHTML=o),t=p(m),u(r.$$.fragment,m)},m(m,J){l(m,s,J),l(m,t,J),h(r,m,J),f=!0},p:F,i(m){f||($(r.$$.fragment,m),f=!0)},o(m){g(r.$$.fragment,m),f=!1},d(m){m&&(n(s),n(t)),y(r,m)}}}function Tl(j){let s,o;return s=new A({props:{$$slots:{default:[wl]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function jl(j){let s,o='Create a model from your custom configuration with <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoModel.from_config">TFAutoModel.from_config()</a>:',t,r,f;return r=new k({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)`,wrap:!1}}),{c(){s=M("p"),s.innerHTML=o,t=i(),d(r.$$.fragment)},l(m){s=b(m,"P",{"data-svelte-h":!0}),T(s)!=="svelte-rdr3qh"&&(s.innerHTML=o),t=p(m),u(r.$$.fragment,m)},m(m,J){l(m,s,J),l(m,t,J),h(r,m,J),f=!0},p:F,i(m){f||($(r.$$.fragment,m),f=!0)},o(m){g(r.$$.fragment,m),f=!1},d(m){m&&(n(s),n(t)),y(r,m)}}}function kl(j){let s,o;return s=new A({props:{$$slots:{default:[jl]},$$scope:{ctx:j}}}),{c(){d(s.$$.fragment)},l(t){u(s.$$.fragment,t)},m(t,r){h(s,t,r),o=!0},p(t,r){const f={};r&2&&(f.$$scope={dirty:r,ctx:t}),s.$set(f)},i(t){o||($(s.$$.fragment,t),o=!0)},o(t){g(s.$$.fragment,t),o=!1},d(t){y(s,t)}}}function _l(j){let s,o='For tasks - like translation or summarization - that use a sequence-to-sequence model, use the <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Seq2SeqTrainer">Seq2SeqTrainer</a> and <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Seq2SeqTrainingArguments">Seq2SeqTrainingArguments</a> classes instead.';return{c(){s=M("p"),s.innerHTML=o},l(t){s=b(t,"P",{"data-svelte-h":!0}),T(s)!=="svelte-1q421e1"&&(s.innerHTML=o)},m(t,r){l(t,s,r)},p:F,d(t){t&&n(s)}}}function Jl(j){let s,o,t,r,f,m,J,Z,C,G='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/main/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.',w,v,R="Before you begin, make sure you have all the necessary libraries installed:",q,I,W,x,c="You’ll also need to install your preferred machine learning framework:",U,X,ts,ne,ss,le,as,re,Ba='The <a href="/docs/transformers/main/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/main/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:',ns,S,ls,oe,La="<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>",rs,ie,qa='Start by creating an instance of <a href="/docs/transformers/main/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/main/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> for sentiment analysis as an example:',os,pe,is,me,Sa='The <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> downloads and caches a default <a href="https://huggingface.co/distilbert/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:',ps,ce,ms,fe,Qa='If you have more than one input, pass your inputs as a list to the <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline">pipeline()</a> to return a list of dictionaries:',cs,de,fs,ue,Pa='The <a href="/docs/transformers/main/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:',ds,he,us,$e,Oa='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:',hs,ge,$s,ye,Da=`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:`,gs,Me,ys,be,Ka=`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:`,Ms,we,bs,Te,en='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.',ws,je,Ts,ke,tn='The <a href="/docs/transformers/main/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/main/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:',js,_e,ks,Q,_s,Je,sn='Specify the model and tokenizer in the <a href="/docs/transformers/main/en/main_classes/pipelines#transformers.pipeline">pipeline()</a>, and now you can apply the <code>classifier</code> on French text:',Js,Ue,Us,ve,an='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! 🤗',vs,Ze,Zs,Ce,Cs,Ge,nn='Under the hood, the <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoModelForSequenceClassification">AutoModelForSequenceClassification</a> and <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a> classes work together to power the <a href="/docs/transformers/main/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.',Gs,We,ln='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/main/en/main_classes/pipelines#transformers.pipeline">pipeline()</a>.',Ws,Re,Rs,Fe,rn='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.',Fs,Ie,on='Load a tokenizer with <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>:',Is,xe,xs,He,pn="Pass your text to the tokenizer:",Hs,Ve,Vs,ze,mn="The tokenizer returns a dictionary containing:",zs,Xe,cn='<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>',Xs,Ne,fn="A tokenizer can also accept a list of inputs, and pad and truncate the text to return a batch with uniform length:",Ns,P,As,O,Ys,Ae,Es,D,Bs,K,Ls,Ye,qs,ee,Ss,Ee,dn="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:",Qs,te,Ps,Be,Os,Le,un="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.",Ds,qe,hn='Start by importing <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoConfig">AutoConfig</a>, and then load the pretrained model you want to modify. Within <a href="/docs/transformers/main/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:',Ks,Se,ea,se,ta,Qe,$n='Take a look at the <a href="./create_a_model">Create a custom architecture</a> guide for more information about building custom configurations.',sa,Pe,aa,Oe,gn='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/main/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.',na,De,yn='Depending on your task, you’ll typically pass the following parameters to <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>:',la,H,Ke,Nt,Mn='You’ll start with a <a href="/docs/transformers/main/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>:',ja,et,ka,tt,At,bn='<a href="/docs/transformers/main/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:',_a,st,Ja,at,Yt,wn="Load a preprocessing class like a tokenizer, image processor, feature extractor, or processor:",Ua,nt,va,lt,Et,Tn="Load a dataset:",Za,rt,Ca,E,Bt,jn="Create a function to tokenize the dataset:",Ga,ot,Wa,Lt,kn='Then apply it over the entire dataset with <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset.map" rel="nofollow">map</a>:',Ra,it,Fa,pt,qt,_n='A <a href="/docs/transformers/main/en/main_classes/data_collator#transformers.DataCollatorWithPadding">DataCollatorWithPadding</a> to create a batch of examples from your dataset:',Ia,mt,ra,ct,Jn='Now gather all these classes in <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer">Trainer</a>:',oa,ft,ia,dt,Un='When you’re ready, call <a href="/docs/transformers/main/en/main_classes/trainer#transformers.Trainer.train">train()</a> to start training:',pa,ut,ma,ae,ca,ht,vn='You can customize the training loop behavior by subclassing the methods inside <a href="/docs/transformers/main/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/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> reference for which methods can be subclassed.',fa,$t,Zn='The other way to customize the training loop is by using <a href="./main_classes/callback">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/main/en/main_classes/trainer#transformers.Trainer">Trainer</a> instead.',da,gt,ua,yt,Cn='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/main/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.',ha,N,Mt,St,Gn='You’ll start with a <a href="/docs/transformers/main/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>:',xa,bt,Ha,wt,Qt,Wn="Load a preprocessing class like a tokenizer, image processor, feature extractor, or processor:",Va,Tt,za,jt,Pt,Rn="Create a function to tokenize the dataset:",Xa,kt,Na,_t,Ot,Fn='Apply the tokenizer over the entire dataset with <a href="https://huggingface.co/docs/datasets/main/en/package_reference/main_classes#datasets.Dataset.map" rel="nofollow">map</a> and then pass the dataset and tokenizer to <a href="/docs/transformers/main/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:',Aa,Jt,Ya,Ut,Dt,In="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:",Ea,vt,$a,Zt,ga,Ct,xn="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!",ya,Gt,Ma,es,ba;return f=new L({props:{title:"Quick tour",local:"quick-tour",headingTag:"h1"}}),J=new En({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"}]}}),I=new k({props:{code:"IXBpcCUyMGluc3RhbGwlMjB0cmFuc2Zvcm1lcnMlMjBkYXRhc2V0cyUyMGV2YWx1YXRlJTIwYWNjZWxlcmF0ZQ==",highlighted:"!pip install transformers datasets evaluate accelerate",wrap:!1}}),X=new Xt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[Qn],pytorch:[qn]},$$scope:{ctx:j}}}),ne=new L({props:{title:"Pipeline",local:"pipeline",headingTag:"h2"}}),le=new Vn({props:{id:"tiZFewofSLM"}}),S=new Kt({props:{$$slots:{default:[Pn]},$$scope:{ctx:j}}}),pe=new k({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>)`,wrap:!1}}),ce=new k({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>}]`,wrap:!1}}),de=new k({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>`,wrap:!1}}),he=new k({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>)`,wrap:!1}}),ge=new k({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>)`,wrap:!1}}),Me=new k({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))',wrap:!1}}),we=new k({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>]`,wrap:!1}}),je=new L({props:{title:"Use another model and tokenizer in the pipeline",local:"use-another-model-and-tokenizer-in-the-pipeline",headingTag:"h3"}}),_e=new k({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>',wrap:!1}}),Q=new Xt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[el],pytorch:[Dn]},$$scope:{ctx:j}}}),Ue=new k({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>}]`,wrap:!1}}),Ze=new L({props:{title:"AutoClass",local:"autoclass",headingTag:"h2"}}),Ce=new Vn({props:{id:"AhChOFRegn4"}}),Re=new L({props:{title:"AutoTokenizer",local:"autotokenizer",headingTag:"h3"}}),xe=new k({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)`,wrap:!1}}),Ve=new k({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>]}`,wrap:!1}}),P=new Xt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[nl],pytorch:[sl]},$$scope:{ctx:j}}}),O=new Kt({props:{$$slots:{default:[ll]},$$scope:{ctx:j}}}),Ae=new L({props:{title:"AutoModel",local:"automodel",headingTag:"h3"}}),D=new Xt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[cl],pytorch:[il]},$$scope:{ctx:j}}}),K=new Kt({props:{$$slots:{default:[fl]},$$scope:{ctx:j}}}),Ye=new L({props:{title:"Save a model",local:"save-a-model",headingTag:"h3"}}),ee=new Xt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[$l],pytorch:[ul]},$$scope:{ctx:j}}}),te=new Xt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[bl],pytorch:[yl]},$$scope:{ctx:j}}}),Be=new L({props:{title:"Custom model builds",local:"custom-model-builds",headingTag:"h2"}}),Se=new k({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Db25maWclMEElMEFteV9jb25maWclMjAlM0QlMjBBdXRvQ29uZmlnLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIlMkMlMjBuX2hlYWRzJTNEMTIp",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/distilbert-base-uncased&quot;</span>, n_heads=<span class="hljs-number">12</span>)`,wrap:!1}}),se=new Xt({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[kl],pytorch:[Tl]},$$scope:{ctx:j}}}),Pe=new L({props:{title:"Trainer - a PyTorch optimized training loop",local:"trainer---a-pytorch-optimized-training-loop",headingTag:"h2"}}),et=new k({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRpc3RpbGJlcnQlMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZCUyMik=",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/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),st=new k({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>)`,wrap:!1}}),nt=new k({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIp",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/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),rt=new k({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>`,wrap:!1}}),ot=new k({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>])`,wrap:!1}}),it=new k({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>)',wrap:!1}}),mt=new k({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)`,wrap:!1}}),ft=new k({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>`,wrap:!1}}),ut=new k({props:{code:"dHJhaW5lci50cmFpbigp",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>trainer.train()',wrap:!1}}),ae=new Kt({props:{$$slots:{default:[_l]},$$scope:{ctx:j}}}),gt=new L({props:{title:"Train with TensorFlow",local:"train-with-tensorflow",headingTag:"h2"}}),bt=new k({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQXV0b01vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQW1vZGVsJTIwJTNEJTIwVEZBdXRvTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIp",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/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),Tt=new k({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJkaXN0aWxiZXJ0JTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQlMjIp",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/distilbert-base-uncased&quot;</span>)`,wrap:!1}}),kt=new k({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>`,wrap:!1}}),Jt=new k({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>`,wrap:!1}}),vt=new k({props:{code:"ZnJvbSUyMHRlbnNvcmZsb3cua2VyYXMub3B0aW1pemVycyUyMGltcG9ydCUyMEFkYW0lMEElMEFtb2RlbC5jb21waWxlKG9wdGltaXplciUzRCdhZGFtJyklMjAlMjAlMjMlMjBObyUyMGxvc3MlMjBhcmd1bWVudCElMEFtb2RlbC5maXQodGZfZGF0YXNldCklMjAlMjAlMjMlMjBkb2N0ZXN0JTNBJTIwJTJCU0tJUA==",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=<span class="hljs-string">&#x27;adam&#x27;</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>`,wrap:!1}}),Zt=new L({props:{title:"What’s next?",local:"whats-next",headingTag:"h2"}}),Gt=new Bn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/quicktour.md"}}),{c(){s=M("meta"),o=i(),t=M("p"),r=i(),d(f.$$.fragment),m=i(),d(J.$$.fragment),Z=i(),C=M("p"),C.innerHTML=G,w=i(),v=M("p"),v.textContent=R,q=i(),d(I.$$.fragment),W=i(),x=M("p"),x.textContent=c,U=i(),d(X.$$.fragment),ts=i(),d(ne.$$.fragment),ss=i(),d(le.$$.fragment),as=i(),re=M("p"),re.innerHTML=Ba,ns=i(),d(S.$$.fragment),ls=i(),oe=M("table"),oe.innerHTML=La,rs=i(),ie=M("p"),ie.innerHTML=qa,os=i(),d(pe.$$.fragment),is=i(),me=M("p"),me.innerHTML=Sa,ps=i(),d(ce.$$.fragment),ms=i(),fe=M("p"),fe.innerHTML=Qa,cs=i(),d(de.$$.fragment),fs=i(),ue=M("p"),ue.innerHTML=Pa,ds=i(),d(he.$$.fragment),us=i(),$e=M("p"),$e.innerHTML=Oa,hs=i(),d(ge.$$.fragment),$s=i(),ye=M("p"),ye.innerHTML=Da,gs=i(),d(Me.$$.fragment),ys=i(),be=M("p"),be.innerHTML=Ka,Ms=i(),d(we.$$.fragment),bs=i(),Te=M("p"),Te.innerHTML=en,ws=i(),d(je.$$.fragment),Ts=i(),ke=M("p"),ke.innerHTML=tn,js=i(),d(_e.$$.fragment),ks=i(),d(Q.$$.fragment),_s=i(),Je=M("p"),Je.innerHTML=sn,Js=i(),d(Ue.$$.fragment),Us=i(),ve=M("p"),ve.innerHTML=an,vs=i(),d(Ze.$$.fragment),Zs=i(),d(Ce.$$.fragment),Cs=i(),Ge=M("p"),Ge.innerHTML=nn,Gs=i(),We=M("p"),We.innerHTML=ln,Ws=i(),d(Re.$$.fragment),Rs=i(),Fe=M("p"),Fe.innerHTML=rn,Fs=i(),Ie=M("p"),Ie.innerHTML=on,Is=i(),d(xe.$$.fragment),xs=i(),He=M("p"),He.textContent=pn,Hs=i(),d(Ve.$$.fragment),Vs=i(),ze=M("p"),ze.textContent=mn,zs=i(),Xe=M("ul"),Xe.innerHTML=cn,Xs=i(),Ne=M("p"),Ne.textContent=fn,Ns=i(),d(P.$$.fragment),As=i(),d(O.$$.fragment),Ys=i(),d(Ae.$$.fragment),Es=i(),d(D.$$.fragment),Bs=i(),d(K.$$.fragment),Ls=i(),d(Ye.$$.fragment),qs=i(),d(ee.$$.fragment),Ss=i(),Ee=M("p"),Ee.innerHTML=dn,Qs=i(),d(te.$$.fragment),Ps=i(),d(Be.$$.fragment),Os=i(),Le=M("p"),Le.textContent=un,Ds=i(),qe=M("p"),qe.innerHTML=hn,Ks=i(),d(Se.$$.fragment),ea=i(),d(se.$$.fragment),ta=i(),Qe=M("p"),Qe.innerHTML=$n,sa=i(),d(Pe.$$.fragment),aa=i(),Oe=M("p"),Oe.innerHTML=gn,na=i(),De=M("p"),De.innerHTML=yn,la=i(),H=M("ol"),Ke=M("li"),Nt=M("p"),Nt.innerHTML=Mn,ja=i(),d(et.$$.fragment),ka=i(),tt=M("li"),At=M("p"),At.innerHTML=bn,_a=i(),d(st.$$.fragment),Ja=i(),at=M("li"),Yt=M("p"),Yt.textContent=wn,Ua=i(),d(nt.$$.fragment),va=i(),lt=M("li"),Et=M("p"),Et.textContent=Tn,Za=i(),d(rt.$$.fragment),Ca=i(),E=M("li"),Bt=M("p"),Bt.textContent=jn,Ga=i(),d(ot.$$.fragment),Wa=i(),Lt=M("p"),Lt.innerHTML=kn,Ra=i(),d(it.$$.fragment),Fa=i(),pt=M("li"),qt=M("p"),qt.innerHTML=_n,Ia=i(),d(mt.$$.fragment),ra=i(),ct=M("p"),ct.innerHTML=Jn,oa=i(),d(ft.$$.fragment),ia=i(),dt=M("p"),dt.innerHTML=Un,pa=i(),d(ut.$$.fragment),ma=i(),d(ae.$$.fragment),ca=i(),ht=M("p"),ht.innerHTML=vn,fa=i(),$t=M("p"),$t.innerHTML=Zn,da=i(),d(gt.$$.fragment),ua=i(),yt=M("p"),yt.innerHTML=Cn,ha=i(),N=M("ol"),Mt=M("li"),St=M("p"),St.innerHTML=Gn,xa=i(),d(bt.$$.fragment),Ha=i(),wt=M("li"),Qt=M("p"),Qt.textContent=Wn,Va=i(),d(Tt.$$.fragment),za=i(),jt=M("li"),Pt=M("p"),Pt.textContent=Rn,Xa=i(),d(kt.$$.fragment),Na=i(),_t=M("li"),Ot=M("p"),Ot.innerHTML=Fn,Aa=i(),d(Jt.$$.fragment),Ya=i(),Ut=M("li"),Dt=M("p"),Dt.innerHTML=In,Ea=i(),d(vt.$$.fragment),$a=i(),d(Zt.$$.fragment),ga=i(),Ct=M("p"),Ct.textContent=xn,ya=i(),d(Gt.$$.fragment),Ma=i(),es=M("p"),this.h()},l(e){const a=Yn("svelte-u9bgzb",document.head);s=b(a,"META",{name:!0,content:!0}),a.forEach(n),o=p(e),t=b(e,"P",{}),z(t).forEach(n),r=p(e),u(f.$$.fragment,e),m=p(e),u(J.$$.fragment,e),Z=p(e),C=b(e,"P",{"data-svelte-h":!0}),T(C)!=="svelte-qu8i7k"&&(C.innerHTML=G),w=p(e),v=b(e,"P",{"data-svelte-h":!0}),T(v)!=="svelte-1c9nexd"&&(v.textContent=R),q=p(e),u(I.$$.fragment,e),W=p(e),x=b(e,"P",{"data-svelte-h":!0}),T(x)!=="svelte-1nw764u"&&(x.textContent=c),U=p(e),u(X.$$.fragment,e),ts=p(e),u(ne.$$.fragment,e),ss=p(e),u(le.$$.fragment,e),as=p(e),re=b(e,"P",{"data-svelte-h":!0}),T(re)!=="svelte-1dtnm1c"&&(re.innerHTML=Ba),ns=p(e),u(S.$$.fragment,e),ls=p(e),oe=b(e,"TABLE",{"data-svelte-h":!0}),T(oe)!=="svelte-x282na"&&(oe.innerHTML=La),rs=p(e),ie=b(e,"P",{"data-svelte-h":!0}),T(ie)!=="svelte-1s3aj34"&&(ie.innerHTML=qa),os=p(e),u(pe.$$.fragment,e),is=p(e),me=b(e,"P",{"data-svelte-h":!0}),T(me)!=="svelte-kx5i7j"&&(me.innerHTML=Sa),ps=p(e),u(ce.$$.fragment,e),ms=p(e),fe=b(e,"P",{"data-svelte-h":!0}),T(fe)!=="svelte-144so8s"&&(fe.innerHTML=Qa),cs=p(e),u(de.$$.fragment,e),fs=p(e),ue=b(e,"P",{"data-svelte-h":!0}),T(ue)!=="svelte-9fh64d"&&(ue.innerHTML=Pa),ds=p(e),u(he.$$.fragment,e),us=p(e),$e=b(e,"P",{"data-svelte-h":!0}),T($e)!=="svelte-1gp521x"&&($e.innerHTML=Oa),hs=p(e),u(ge.$$.fragment,e),$s=p(e),ye=b(e,"P",{"data-svelte-h":!0}),T(ye)!=="svelte-8z5qlz"&&(ye.innerHTML=Da),gs=p(e),u(Me.$$.fragment,e),ys=p(e),be=b(e,"P",{"data-svelte-h":!0}),T(be)!=="svelte-ue0ub3"&&(be.innerHTML=Ka),Ms=p(e),u(we.$$.fragment,e),bs=p(e),Te=b(e,"P",{"data-svelte-h":!0}),T(Te)!=="svelte-1q1ewi4"&&(Te.innerHTML=en),ws=p(e),u(je.$$.fragment,e),Ts=p(e),ke=b(e,"P",{"data-svelte-h":!0}),T(ke)!=="svelte-11eqp1z"&&(ke.innerHTML=tn),js=p(e),u(_e.$$.fragment,e),ks=p(e),u(Q.$$.fragment,e),_s=p(e),Je=b(e,"P",{"data-svelte-h":!0}),T(Je)!=="svelte-z8qwnn"&&(Je.innerHTML=sn),Js=p(e),u(Ue.$$.fragment,e),Us=p(e),ve=b(e,"P",{"data-svelte-h":!0}),T(ve)!=="svelte-1tkpcvw"&&(ve.innerHTML=an),vs=p(e),u(Ze.$$.fragment,e),Zs=p(e),u(Ce.$$.fragment,e),Cs=p(e),Ge=b(e,"P",{"data-svelte-h":!0}),T(Ge)!=="svelte-13zqyls"&&(Ge.innerHTML=nn),Gs=p(e),We=b(e,"P",{"data-svelte-h":!0}),T(We)!=="svelte-vgd6up"&&(We.innerHTML=ln),Ws=p(e),u(Re.$$.fragment,e),Rs=p(e),Fe=b(e,"P",{"data-svelte-h":!0}),T(Fe)!=="svelte-1s6s1n"&&(Fe.innerHTML=rn),Fs=p(e),Ie=b(e,"P",{"data-svelte-h":!0}),T(Ie)!=="svelte-1ce7t4m"&&(Ie.innerHTML=on),Is=p(e),u(xe.$$.fragment,e),xs=p(e),He=b(e,"P",{"data-svelte-h":!0}),T(He)!=="svelte-1c0z2pg"&&(He.textContent=pn),Hs=p(e),u(Ve.$$.fragment,e),Vs=p(e),ze=b(e,"P",{"data-svelte-h":!0}),T(ze)!=="svelte-19i2zcw"&&(ze.textContent=mn),zs=p(e),Xe=b(e,"UL",{"data-svelte-h":!0}),T(Xe)!=="svelte-1q7h0a7"&&(Xe.innerHTML=cn),Xs=p(e),Ne=b(e,"P",{"data-svelte-h":!0}),T(Ne)!=="svelte-3sx4bx"&&(Ne.textContent=fn),Ns=p(e),u(P.$$.fragment,e),As=p(e),u(O.$$.fragment,e),Ys=p(e),u(Ae.$$.fragment,e),Es=p(e),u(D.$$.fragment,e),Bs=p(e),u(K.$$.fragment,e),Ls=p(e),u(Ye.$$.fragment,e),qs=p(e),u(ee.$$.fragment,e),Ss=p(e),Ee=b(e,"P",{"data-svelte-h":!0}),T(Ee)!=="svelte-10grpgy"&&(Ee.innerHTML=dn),Qs=p(e),u(te.$$.fragment,e),Ps=p(e),u(Be.$$.fragment,e),Os=p(e),Le=b(e,"P",{"data-svelte-h":!0}),T(Le)!=="svelte-8iah3b"&&(Le.textContent=un),Ds=p(e),qe=b(e,"P",{"data-svelte-h":!0}),T(qe)!=="svelte-1c0rueq"&&(qe.innerHTML=hn),Ks=p(e),u(Se.$$.fragment,e),ea=p(e),u(se.$$.fragment,e),ta=p(e),Qe=b(e,"P",{"data-svelte-h":!0}),T(Qe)!=="svelte-1ld89qp"&&(Qe.innerHTML=$n),sa=p(e),u(Pe.$$.fragment,e),aa=p(e),Oe=b(e,"P",{"data-svelte-h":!0}),T(Oe)!=="svelte-urakba"&&(Oe.innerHTML=gn),na=p(e),De=b(e,"P",{"data-svelte-h":!0}),T(De)!=="svelte-1b7ydqw"&&(De.innerHTML=yn),la=p(e),H=b(e,"OL",{});var V=z(H);Ke=b(V,"LI",{});var Wt=z(Ke);Nt=b(Wt,"P",{"data-svelte-h":!0}),T(Nt)!=="svelte-1c8pjui"&&(Nt.innerHTML=Mn),ja=p(Wt),u(et.$$.fragment,Wt),Wt.forEach(n),ka=p(V),tt=b(V,"LI",{});var Rt=z(tt);At=b(Rt,"P",{"data-svelte-h":!0}),T(At)!=="svelte-18xr32e"&&(At.innerHTML=bn),_a=p(Rt),u(st.$$.fragment,Rt),Rt.forEach(n),Ja=p(V),at=b(V,"LI",{});var Ft=z(at);Yt=b(Ft,"P",{"data-svelte-h":!0}),T(Yt)!=="svelte-1ov2exk"&&(Yt.textContent=wn),Ua=p(Ft),u(nt.$$.fragment,Ft),Ft.forEach(n),va=p(V),lt=b(V,"LI",{});var It=z(lt);Et=b(It,"P",{"data-svelte-h":!0}),T(Et)!=="svelte-1u8gaxj"&&(Et.textContent=Tn),Za=p(It),u(rt.$$.fragment,It),It.forEach(n),Ca=p(V),E=b(V,"LI",{});var B=z(E);Bt=b(B,"P",{"data-svelte-h":!0}),T(Bt)!=="svelte-1u6z95a"&&(Bt.textContent=jn),Ga=p(B),u(ot.$$.fragment,B),Wa=p(B),Lt=b(B,"P",{"data-svelte-h":!0}),T(Lt)!=="svelte-1fz1ica"&&(Lt.innerHTML=kn),Ra=p(B),u(it.$$.fragment,B),B.forEach(n),Fa=p(V),pt=b(V,"LI",{});var xt=z(pt);qt=b(xt,"P",{"data-svelte-h":!0}),T(qt)!=="svelte-uat4v0"&&(qt.innerHTML=_n),Ia=p(xt),u(mt.$$.fragment,xt),xt.forEach(n),V.forEach(n),ra=p(e),ct=b(e,"P",{"data-svelte-h":!0}),T(ct)!=="svelte-1a9nun4"&&(ct.innerHTML=Jn),oa=p(e),u(ft.$$.fragment,e),ia=p(e),dt=b(e,"P",{"data-svelte-h":!0}),T(dt)!=="svelte-1rn5goj"&&(dt.innerHTML=Un),pa=p(e),u(ut.$$.fragment,e),ma=p(e),u(ae.$$.fragment,e),ca=p(e),ht=b(e,"P",{"data-svelte-h":!0}),T(ht)!=="svelte-11fl78x"&&(ht.innerHTML=vn),fa=p(e),$t=b(e,"P",{"data-svelte-h":!0}),T($t)!=="svelte-1s7pvya"&&($t.innerHTML=Zn),da=p(e),u(gt.$$.fragment,e),ua=p(e),yt=b(e,"P",{"data-svelte-h":!0}),T(yt)!=="svelte-gae27c"&&(yt.innerHTML=Cn),ha=p(e),N=b(e,"OL",{});var Y=z(N);Mt=b(Y,"LI",{});var Ht=z(Mt);St=b(Ht,"P",{"data-svelte-h":!0}),T(St)!=="svelte-137rzzn"&&(St.innerHTML=Gn),xa=p(Ht),u(bt.$$.fragment,Ht),Ht.forEach(n),Ha=p(Y),wt=b(Y,"LI",{});var Vt=z(wt);Qt=b(Vt,"P",{"data-svelte-h":!0}),T(Qt)!=="svelte-1ov2exk"&&(Qt.textContent=Wn),Va=p(Vt),u(Tt.$$.fragment,Vt),Vt.forEach(n),za=p(Y),jt=b(Y,"LI",{});var zt=z(jt);Pt=b(zt,"P",{"data-svelte-h":!0}),T(Pt)!=="svelte-1u6z95a"&&(Pt.textContent=Rn),Xa=p(zt),u(kt.$$.fragment,zt),zt.forEach(n),Na=p(Y),_t=b(Y,"LI",{});var wa=z(_t);Ot=b(wa,"P",{"data-svelte-h":!0}),T(Ot)!=="svelte-11qq3xg"&&(Ot.innerHTML=Fn),Aa=p(wa),u(Jt.$$.fragment,wa),wa.forEach(n),Ya=p(Y),Ut=b(Y,"LI",{});var Ta=z(Ut);Dt=b(Ta,"P",{"data-svelte-h":!0}),T(Dt)!=="svelte-1map0wi"&&(Dt.innerHTML=In),Ea=p(Ta),u(vt.$$.fragment,Ta),Ta.forEach(n),Y.forEach(n),$a=p(e),u(Zt.$$.fragment,e),ga=p(e),Ct=b(e,"P",{"data-svelte-h":!0}),T(Ct)!=="svelte-gn9in9"&&(Ct.textContent=xn),ya=p(e),u(Gt.$$.fragment,e),Ma=p(e),es=b(e,"P",{}),z(es).forEach(n),this.h()},h(){Hn(s,"name","hf:doc:metadata"),Hn(s,"content",Ul)},m(e,a){_(document.head,s),l(e,o,a),l(e,t,a),l(e,r,a),h(f,e,a),l(e,m,a),h(J,e,a),l(e,Z,a),l(e,C,a),l(e,w,a),l(e,v,a),l(e,q,a),h(I,e,a),l(e,W,a),l(e,x,a),l(e,U,a),h(X,e,a),l(e,ts,a),h(ne,e,a),l(e,ss,a),h(le,e,a),l(e,as,a),l(e,re,a),l(e,ns,a),h(S,e,a),l(e,ls,a),l(e,oe,a),l(e,rs,a),l(e,ie,a),l(e,os,a),h(pe,e,a),l(e,is,a),l(e,me,a),l(e,ps,a),h(ce,e,a),l(e,ms,a),l(e,fe,a),l(e,cs,a),h(de,e,a),l(e,fs,a),l(e,ue,a),l(e,ds,a),h(he,e,a),l(e,us,a),l(e,$e,a),l(e,hs,a),h(ge,e,a),l(e,$s,a),l(e,ye,a),l(e,gs,a),h(Me,e,a),l(e,ys,a),l(e,be,a),l(e,Ms,a),h(we,e,a),l(e,bs,a),l(e,Te,a),l(e,ws,a),h(je,e,a),l(e,Ts,a),l(e,ke,a),l(e,js,a),h(_e,e,a),l(e,ks,a),h(Q,e,a),l(e,_s,a),l(e,Je,a),l(e,Js,a),h(Ue,e,a),l(e,Us,a),l(e,ve,a),l(e,vs,a),h(Ze,e,a),l(e,Zs,a),h(Ce,e,a),l(e,Cs,a),l(e,Ge,a),l(e,Gs,a),l(e,We,a),l(e,Ws,a),h(Re,e,a),l(e,Rs,a),l(e,Fe,a),l(e,Fs,a),l(e,Ie,a),l(e,Is,a),h(xe,e,a),l(e,xs,a),l(e,He,a),l(e,Hs,a),h(Ve,e,a),l(e,Vs,a),l(e,ze,a),l(e,zs,a),l(e,Xe,a),l(e,Xs,a),l(e,Ne,a),l(e,Ns,a),h(P,e,a),l(e,As,a),h(O,e,a),l(e,Ys,a),h(Ae,e,a),l(e,Es,a),h(D,e,a),l(e,Bs,a),h(K,e,a),l(e,Ls,a),h(Ye,e,a),l(e,qs,a),h(ee,e,a),l(e,Ss,a),l(e,Ee,a),l(e,Qs,a),h(te,e,a),l(e,Ps,a),h(Be,e,a),l(e,Os,a),l(e,Le,a),l(e,Ds,a),l(e,qe,a),l(e,Ks,a),h(Se,e,a),l(e,ea,a),h(se,e,a),l(e,ta,a),l(e,Qe,a),l(e,sa,a),h(Pe,e,a),l(e,aa,a),l(e,Oe,a),l(e,na,a),l(e,De,a),l(e,la,a),l(e,H,a),_(H,Ke),_(Ke,Nt),_(Ke,ja),h(et,Ke,null),_(H,ka),_(H,tt),_(tt,At),_(tt,_a),h(st,tt,null),_(H,Ja),_(H,at),_(at,Yt),_(at,Ua),h(nt,at,null),_(H,va),_(H,lt),_(lt,Et),_(lt,Za),h(rt,lt,null),_(H,Ca),_(H,E),_(E,Bt),_(E,Ga),h(ot,E,null),_(E,Wa),_(E,Lt),_(E,Ra),h(it,E,null),_(H,Fa),_(H,pt),_(pt,qt),_(pt,Ia),h(mt,pt,null),l(e,ra,a),l(e,ct,a),l(e,oa,a),h(ft,e,a),l(e,ia,a),l(e,dt,a),l(e,pa,a),h(ut,e,a),l(e,ma,a),h(ae,e,a),l(e,ca,a),l(e,ht,a),l(e,fa,a),l(e,$t,a),l(e,da,a),h(gt,e,a),l(e,ua,a),l(e,yt,a),l(e,ha,a),l(e,N,a),_(N,Mt),_(Mt,St),_(Mt,xa),h(bt,Mt,null),_(N,Ha),_(N,wt),_(wt,Qt),_(wt,Va),h(Tt,wt,null),_(N,za),_(N,jt),_(jt,Pt),_(jt,Xa),h(kt,jt,null),_(N,Na),_(N,_t),_(_t,Ot),_(_t,Aa),h(Jt,_t,null),_(N,Ya),_(N,Ut),_(Ut,Dt),_(Ut,Ea),h(vt,Ut,null),l(e,$a,a),h(Zt,e,a),l(e,ga,a),l(e,Ct,a),l(e,ya,a),h(Gt,e,a),l(e,Ma,a),l(e,es,a),ba=!0},p(e,[a]){const V={};a&2&&(V.$$scope={dirty:a,ctx:e}),X.$set(V);const Wt={};a&2&&(Wt.$$scope={dirty:a,ctx:e}),S.$set(Wt);const Rt={};a&2&&(Rt.$$scope={dirty:a,ctx:e}),Q.$set(Rt);const Ft={};a&2&&(Ft.$$scope={dirty:a,ctx:e}),P.$set(Ft);const It={};a&2&&(It.$$scope={dirty:a,ctx:e}),O.$set(It);const B={};a&2&&(B.$$scope={dirty:a,ctx:e}),D.$set(B);const xt={};a&2&&(xt.$$scope={dirty:a,ctx:e}),K.$set(xt);const Y={};a&2&&(Y.$$scope={dirty:a,ctx:e}),ee.$set(Y);const Ht={};a&2&&(Ht.$$scope={dirty:a,ctx:e}),te.$set(Ht);const Vt={};a&2&&(Vt.$$scope={dirty:a,ctx:e}),se.$set(Vt);const zt={};a&2&&(zt.$$scope={dirty:a,ctx:e}),ae.$set(zt)},i(e){ba||($(f.$$.fragment,e),$(J.$$.fragment,e),$(I.$$.fragment,e),$(X.$$.fragment,e),$(ne.$$.fragment,e),$(le.$$.fragment,e),$(S.$$.fragment,e),$(pe.$$.fragment,e),$(ce.$$.fragment,e),$(de.$$.fragment,e),$(he.$$.fragment,e),$(ge.$$.fragment,e),$(Me.$$.fragment,e),$(we.$$.fragment,e),$(je.$$.fragment,e),$(_e.$$.fragment,e),$(Q.$$.fragment,e),$(Ue.$$.fragment,e),$(Ze.$$.fragment,e),$(Ce.$$.fragment,e),$(Re.$$.fragment,e),$(xe.$$.fragment,e),$(Ve.$$.fragment,e),$(P.$$.fragment,e),$(O.$$.fragment,e),$(Ae.$$.fragment,e),$(D.$$.fragment,e),$(K.$$.fragment,e),$(Ye.$$.fragment,e),$(ee.$$.fragment,e),$(te.$$.fragment,e),$(Be.$$.fragment,e),$(Se.$$.fragment,e),$(se.$$.fragment,e),$(Pe.$$.fragment,e),$(et.$$.fragment,e),$(st.$$.fragment,e),$(nt.$$.fragment,e),$(rt.$$.fragment,e),$(ot.$$.fragment,e),$(it.$$.fragment,e),$(mt.$$.fragment,e),$(ft.$$.fragment,e),$(ut.$$.fragment,e),$(ae.$$.fragment,e),$(gt.$$.fragment,e),$(bt.$$.fragment,e),$(Tt.$$.fragment,e),$(kt.$$.fragment,e),$(Jt.$$.fragment,e),$(vt.$$.fragment,e),$(Zt.$$.fragment,e),$(Gt.$$.fragment,e),ba=!0)},o(e){g(f.$$.fragment,e),g(J.$$.fragment,e),g(I.$$.fragment,e),g(X.$$.fragment,e),g(ne.$$.fragment,e),g(le.$$.fragment,e),g(S.$$.fragment,e),g(pe.$$.fragment,e),g(ce.$$.fragment,e),g(de.$$.fragment,e),g(he.$$.fragment,e),g(ge.$$.fragment,e),g(Me.$$.fragment,e),g(we.$$.fragment,e),g(je.$$.fragment,e),g(_e.$$.fragment,e),g(Q.$$.fragment,e),g(Ue.$$.fragment,e),g(Ze.$$.fragment,e),g(Ce.$$.fragment,e),g(Re.$$.fragment,e),g(xe.$$.fragment,e),g(Ve.$$.fragment,e),g(P.$$.fragment,e),g(O.$$.fragment,e),g(Ae.$$.fragment,e),g(D.$$.fragment,e),g(K.$$.fragment,e),g(Ye.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(Be.$$.fragment,e),g(Se.$$.fragment,e),g(se.$$.fragment,e),g(Pe.$$.fragment,e),g(et.$$.fragment,e),g(st.$$.fragment,e),g(nt.$$.fragment,e),g(rt.$$.fragment,e),g(ot.$$.fragment,e),g(it.$$.fragment,e),g(mt.$$.fragment,e),g(ft.$$.fragment,e),g(ut.$$.fragment,e),g(ae.$$.fragment,e),g(gt.$$.fragment,e),g(bt.$$.fragment,e),g(Tt.$$.fragment,e),g(kt.$$.fragment,e),g(Jt.$$.fragment,e),g(vt.$$.fragment,e),g(Zt.$$.fragment,e),g(Gt.$$.fragment,e),ba=!1},d(e){e&&(n(o),n(t),n(r),n(m),n(Z),n(C),n(w),n(v),n(q),n(W),n(x),n(U),n(ts),n(ss),n(as),n(re),n(ns),n(ls),n(oe),n(rs),n(ie),n(os),n(is),n(me),n(ps),n(ms),n(fe),n(cs),n(fs),n(ue),n(ds),n(us),n($e),n(hs),n($s),n(ye),n(gs),n(ys),n(be),n(Ms),n(bs),n(Te),n(ws),n(Ts),n(ke),n(js),n(ks),n(_s),n(Je),n(Js),n(Us),n(ve),n(vs),n(Zs),n(Cs),n(Ge),n(Gs),n(We),n(Ws),n(Rs),n(Fe),n(Fs),n(Ie),n(Is),n(xs),n(He),n(Hs),n(Vs),n(ze),n(zs),n(Xe),n(Xs),n(Ne),n(Ns),n(As),n(Ys),n(Es),n(Bs),n(Ls),n(qs),n(Ss),n(Ee),n(Qs),n(Ps),n(Os),n(Le),n(Ds),n(qe),n(Ks),n(ea),n(ta),n(Qe),n(sa),n(aa),n(Oe),n(na),n(De),n(la),n(H),n(ra),n(ct),n(oa),n(ia),n(dt),n(pa),n(ma),n(ca),n(ht),n(fa),n($t),n(da),n(ua),n(yt),n(ha),n(N),n($a),n(ga),n(Ct),n(ya),n(Ma),n(es)),n(s),y(f,e),y(J,e),y(I,e),y(X,e),y(ne,e),y(le,e),y(S,e),y(pe,e),y(ce,e),y(de,e),y(he,e),y(ge,e),y(Me,e),y(we,e),y(je,e),y(_e,e),y(Q,e),y(Ue,e),y(Ze,e),y(Ce,e),y(Re,e),y(xe,e),y(Ve,e),y(P,e),y(O,e),y(Ae,e),y(D,e),y(K,e),y(Ye,e),y(ee,e),y(te,e),y(Be,e),y(Se,e),y(se,e),y(Pe,e),y(et),y(st),y(nt),y(rt),y(ot),y(it),y(mt),y(ft,e),y(ut,e),y(ae,e),y(gt,e),y(bt),y(Tt),y(kt),y(Jt),y(vt),y(Zt,e),y(Gt,e)}}}const Ul='{"title":"Quick tour","local":"quick-tour","sections":[{"title":"Pipeline","local":"pipeline","sections":[{"title":"Use another model and tokenizer in the pipeline","local":"use-another-model-and-tokenizer-in-the-pipeline","sections":[],"depth":3}],"depth":2},{"title":"AutoClass","local":"autoclass","sections":[{"title":"AutoTokenizer","local":"autotokenizer","sections":[],"depth":3},{"title":"AutoModel","local":"automodel","sections":[],"depth":3},{"title":"Save a model","local":"save-a-model","sections":[],"depth":3}],"depth":2},{"title":"Custom model builds","local":"custom-model-builds","sections":[],"depth":2},{"title":"Trainer - a PyTorch optimized training loop","local":"trainer---a-pytorch-optimized-training-loop","sections":[],"depth":2},{"title":"Train with TensorFlow","local":"train-with-tensorflow","sections":[],"depth":2},{"title":"What’s next?","local":"whats-next","sections":[],"depth":2}],"depth":1}';function vl(j){return Xn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Hl extends Nn{constructor(s){super(),An(this,s,vl,Jl,zn,{})}}export{Hl as component};
