import{s as Gp,o as Vp,n as v}from"../chunks/scheduler.5f3e6389.js";import{S as Ip,i as Xp,e as c,s as l,c as h,h as zp,a as d,d as p,b as r,f as J,g as f,j as w,k as j,l as a,m as u,n as M,t as b,o as T,p as y}from"../chunks/index.373ab25c.js";import{T as W}from"../chunks/Tip.3e202241.js";import{C as Bp,H as R}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.bfaff5db.js";import{D as k}from"../chunks/Docstring.d2a61378.js";import{C as U}from"../chunks/CodeBlock.e179bed8.js";import{E as x}from"../chunks/ExampleCodeBlock.b031b48e.js";function Sp($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function qp($){let n,g="Example of text generation:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yQ2F1c2FsTE0lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZncHQyJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmdwdDIlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMk15JTIwbmFtZSUyMGlzJTIwQXJ0aHVyJTIwYW5kJTIwSSUyMGxpdmUlMjBpbiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBZ2VuX3Rva2VucyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKCoqaW5wdXRzJTJDZG9fc2FtcGxlJTNEVHJ1ZSUyQ3RlbXBlcmF0dXJlJTNEMC45JTJDJTIwbWluX2xlbmd0aCUzRDIwJTJDbWF4X2xlbmd0aCUzRDIwKSUwQXRva2VuaXplci5iYXRjaF9kZWNvZGUoZ2VuX3Rva2Vucyk=",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><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForCausalLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/gpt2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;optimum/gpt2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;My name is Arthur and I live in&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>gen_tokens = model.generate(**inputs,do_sample=<span class="hljs-literal">True</span>,temperature=<span class="hljs-number">0.9</span>, min_length=<span class="hljs-number">20</span>,max_length=<span class="hljs-number">20</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.batch_decode(gen_tokens)`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1bvu0cy"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Hp($){let n,g="Example using <code>transformers.pipelines</code>:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JDYXVzYWxMTSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZncHQyJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmdwdDIlMjIpJTBBb25ueF9nZW4lMjAlM0QlMjBwaXBlbGluZSglMjJ0ZXh0LWdlbmVyYXRpb24lMjIlMkMlMjBtb2RlbCUzRG1vZGVsJTJDJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyKSUwQSUwQXRleHQlMjAlM0QlMjAlMjJNeSUyMG5hbWUlMjBpcyUyMEFydGh1ciUyMGFuZCUyMEklMjBsaXZlJTIwaW4lMjIlMEFnZW4lMjAlM0QlMjBvbm54X2dlbih0ZXh0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/gpt2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForCausalLM.from_pretrained(<span class="hljs-string">&quot;optimum/gpt2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_gen = pipeline(<span class="hljs-string">&quot;text-generation&quot;</span>, model=model, tokenizer=tokenizer)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My name is Arthur and I live in&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>gen = onnx_gen(text)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1da1qsq"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Ep($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function Qp($){let n,g="Example of feature extraction:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZiZXJ0LWJhc2UtdW5jYXNlZC1mb3ItZmlsbC1tYXNrJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmJlcnQtYmFzZS11bmNhc2VkLWZvci1maWxsLW1hc2slMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTVCTUFTSyU1RC4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyUwQWxpc3QobG9naXRzLnNoYXBlKQ==",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><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/bert-base-uncased-for-fill-mask&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForMaskedLM.from_pretrained(<span class="hljs-string">&quot;optimum/bert-base-uncased-for-fill-mask&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is [MASK].&quot;</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">8</span>, <span class="hljs-number">28996</span>]`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-12vwt80"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Lp($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JNYXNrZWRMTSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZiZXJ0LWJhc2UtdW5jYXNlZC1mb3ItZmlsbC1tYXNrJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmJlcnQtYmFzZS11bmNhc2VkLWZvci1maWxsLW1hc2slMjIpJTBBZmlsbF9tYXNrZXIlMjAlM0QlMjBwaXBlbGluZSglMjJmaWxsLW1hc2slMjIlMkMlMjBtb2RlbCUzRG1vZGVsJTJDJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyKSUwQSUwQXRleHQlMjAlM0QlMjAlMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlMjBpcyUyMCU1Qk1BU0slNUQuJTIyJTBBcHJlZCUyMCUzRCUyMGZpbGxfbWFza2VyKHRleHQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/bert-base-uncased-for-fill-mask&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForMaskedLM.from_pretrained(<span class="hljs-string">&quot;optimum/bert-base-uncased-for-fill-mask&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>fill_masker = pipeline(<span class="hljs-string">&quot;fill-mask&quot;</span>, model=model, tokenizer=tokenizer)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;The capital of France is [MASK].&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = fill_masker(text)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1u1xsxh"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Op($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function Yp($){let n,g="Example of text generation:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yU2VxMlNlcUxNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRnQ1LXNtYWxsJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JTZXEyU2VxTE0uZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZ0NS1zbWFsbCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyTXklMjBuYW1lJTIwaXMlMjBFdXN0YWNoZSUyMGFuZCUyMEklMjBsaWtlJTIwdG8lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWdlbl90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyklMEFvdXRwdXRzJTIwJTNEJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5fdG9rZW5zKQ==",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><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForSeq2SeqLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/t5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;optimum/t5-small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;My name is Eustache and I like to&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>gen_tokens = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = tokenizer.batch_decode(gen_tokens)`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1bvu0cy"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Ap($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JTZXEyU2VxTE0lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGdDUtc21hbGwlMjIpJTBBbW9kZWwlMjAlM0QlMjBPUlRNb2RlbEZvclNlcTJTZXFMTS5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRnQ1LXNtYWxsJTIyKSUwQW9ubnhfdHJhbnNsYXRpb24lMjAlM0QlMjBwaXBlbGluZSglMjJ0cmFuc2xhdGlvbl9lbl90b19kZSUyMiUyQyUyMG1vZGVsJTNEbW9kZWwlMkMlMjB0b2tlbml6ZXIlM0R0b2tlbml6ZXIpJTBBJTBBdGV4dCUyMCUzRCUyMCUyMk15JTIwbmFtZSUyMGlzJTIwRXVzdGFjaGUuJTIyJTBBcHJlZCUyMCUzRCUyMG9ubnhfdHJhbnNsYXRpb24odGV4dCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForSeq2SeqLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/t5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForSeq2SeqLM.from_pretrained(<span class="hljs-string">&quot;optimum/t5-small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_translation = pipeline(<span class="hljs-string">&quot;translation_en_to_de&quot;</span>, model=model, tokenizer=tokenizer)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My name is Eustache.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = onnx_translation(text)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1u1xsxh"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Pp($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function Dp($){let n,g="Example of single-label classification:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkLWZpbmV0dW5lZC1zc3QtMi1lbmdsaXNoJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQtZmluZXR1bmVkLXNzdC0yLWVuZ2xpc2glMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyUwQWxpc3QobG9naXRzLnNoYXBlKQ==",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><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/distilbert-base-uncased-finetuned-sst-2-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;optimum/distilbert-base-uncased-finetuned-sst-2-english&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">2</span>]`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-ykxpe4"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Kp($){let n,g="Example using <code>transformers.pipelines</code>:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkLWZpbmV0dW5lZC1zc3QtMi1lbmdsaXNoJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGZGlzdGlsYmVydC1iYXNlLXVuY2FzZWQtZmluZXR1bmVkLXNzdC0yLWVuZ2xpc2glMjIpJTBBb25ueF9jbGFzc2lmaWVyJTIwJTNEJTIwcGlwZWxpbmUoJTIydGV4dC1jbGFzc2lmaWNhdGlvbiUyMiUyQyUyMG1vZGVsJTNEbW9kZWwlMkMlMjB0b2tlbml6ZXIlM0R0b2tlbml6ZXIpJTBBJTBBdGV4dCUyMCUzRCUyMCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMEFwcmVkJTIwJTNEJTIwb25ueF9jbGFzc2lmaWVyKHRleHQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/distilbert-base-uncased-finetuned-sst-2-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;optimum/distilbert-base-uncased-finetuned-sst-2-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_classifier = pipeline(<span class="hljs-string">&quot;text-classification&quot;</span>, model=model, tokenizer=tokenizer)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = onnx_classifier(text)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1da1qsq"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function em($){let n,g="Example using zero-shot-classification <code>transformers.pipelines</code>:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmRpc3RpbGJlcnQtYmFzZS11bmNhc2VkLW1ubGklMjIpJTBBbW9kZWwlMjAlM0QlMjBPUlRNb2RlbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZkaXN0aWxiZXJ0LWJhc2UtdW5jYXNlZC1tbmxpJTIyKSUwQW9ubnhfejAlMjAlM0QlMjBwaXBlbGluZSglMjJ6ZXJvLXNob3QtY2xhc3NpZmljYXRpb24lMjIlMkMlMjBtb2RlbCUzRG1vZGVsJTJDJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyKSUwQSUwQXNlcXVlbmNlX3RvX2NsYXNzaWZ5JTIwJTNEJTIwJTIyV2hvJTIwYXJlJTIweW91JTIwdm90aW5nJTIwZm9yJTIwaW4lMjAyMDIwJTNGJTIyJTBBY2FuZGlkYXRlX2xhYmVscyUyMCUzRCUyMCU1QiUyMkV1cm9wZSUyMiUyQyUyMCUyMnB1YmxpYyUyMGhlYWx0aCUyMiUyQyUyMCUyMnBvbGl0aWNzJTIyJTJDJTIwJTIyZWxlY3Rpb25zJTIyJTVEJTBBcHJlZCUyMCUzRCUyMG9ubnhfejAoc2VxdWVuY2VfdG9fY2xhc3NpZnklMkMlMjBjYW5kaWRhdGVfbGFiZWxzJTJDJTIwbXVsdGlfbGFiZWwlM0RUcnVlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/distilbert-base-uncased-mnli&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;optimum/distilbert-base-uncased-mnli&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_z0 = pipeline(<span class="hljs-string">&quot;zero-shot-classification&quot;</span>, model=model, tokenizer=tokenizer)

<span class="hljs-meta">&gt;&gt;&gt; </span>sequence_to_classify = <span class="hljs-string">&quot;Who are you voting for in 2020?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>candidate_labels = [<span class="hljs-string">&quot;Europe&quot;</span>, <span class="hljs-string">&quot;public health&quot;</span>, <span class="hljs-string">&quot;politics&quot;</span>, <span class="hljs-string">&quot;elections&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = onnx_z0(sequence_to_classify, candidate_labels, multi_label=<span class="hljs-literal">True</span>)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1vtj8d2"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function tm($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function nm($){let n,g="Example of token classification:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmJlcnQtYmFzZS1ORVIlMjIpJTBBbW9kZWwlMjAlM0QlMjBPUlRNb2RlbEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZiZXJ0LWJhc2UtTkVSJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJNeSUyMG5hbWUlMjBpcyUyMFBoaWxpcHAlMjBhbmQlMjBJJTIwbGl2ZSUyMGluJTIwR2VybWFueS4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyUwQWxpc3QobG9naXRzLnNoYXBlKQ==",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><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/bert-base-NER&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;optimum/bert-base-NER&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;My name is Philipp and I live in Germany.&quot;</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(logits.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">12</span>, <span class="hljs-number">9</span>]`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-rtgw80"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function sm($){let n,g="Example using <code>transformers.pipelines</code>:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmJlcnQtYmFzZS1ORVIlMjIpJTBBbW9kZWwlMjAlM0QlMjBPUlRNb2RlbEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZiZXJ0LWJhc2UtTkVSJTIyKSUwQW9ubnhfbmVyJTIwJTNEJTIwcGlwZWxpbmUoJTIydG9rZW4tY2xhc3NpZmljYXRpb24lMjIlMkMlMjBtb2RlbCUzRG1vZGVsJTJDJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyKSUwQSUwQXRleHQlMjAlM0QlMjAlMjJNeSUyMG5hbWUlMjBpcyUyMFBoaWxpcHAlMjBhbmQlMjBJJTIwbGl2ZSUyMGluJTIwR2VybWFueS4lMjIlMEFwcmVkJTIwJTNEJTIwb25ueF9uZXIodGV4dCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/bert-base-NER&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;optimum/bert-base-NER&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_ner = pipeline(<span class="hljs-string">&quot;token-classification&quot;</span>, model=model, tokenizer=tokenizer)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My name is Philipp and I live in Germany.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = onnx_ner(text)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1da1qsq"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function om($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function am($){let n,g="Example of multiple choice:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yTXVsdGlwbGVDaG9pY2UlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJlaGR3bnMxNTE2JTJGYmVydC1iYXNlLXVuY2FzZWRfU1dBRyUyMiklMEFtb2RlbCUyMCUzRCUyME9SVE1vZGVsRm9yTXVsdGlwbGVDaG9pY2UuZnJvbV9wcmV0cmFpbmVkKCUyMmVoZHduczE1MTYlMkZiZXJ0LWJhc2UtdW5jYXNlZF9TV0FHJTIyJTJDJTIwZXhwb3J0JTNEVHJ1ZSklMEElMEFudW1fY2hvaWNlcyUyMCUzRCUyMDQlMEFmaXJzdF9zZW50ZW5jZSUyMCUzRCUyMCU1QiUyMk1lbWJlcnMlMjBvZiUyMHRoZSUyMHByb2Nlc3Npb24lMjB3YWxrJTIwZG93biUyMHRoZSUyMHN0cmVldCUyMGhvbGRpbmclMjBzbWFsbCUyMGhvcm4lMjBicmFzcyUyMGluc3RydW1lbnRzLiUyMiU1RCUyMColMjBudW1fY2hvaWNlcyUwQXNlY29uZF9zZW50ZW5jZSUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCUyMkElMjBkcnVtJTIwbGluZSUyMHBhc3NlcyUyMGJ5JTIwd2Fsa2luZyUyMGRvd24lMjB0aGUlMjBzdHJlZXQlMjBwbGF5aW5nJTIwdGhlaXIlMjBpbnN0cnVtZW50cy4lMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJBJTIwZHJ1bSUyMGxpbmUlMjBoYXMlMjBoZWFyZCUyMGFwcHJvYWNoaW5nJTIwdGhlbS4lMjIlMkMlMEElMjAlMjAlMjAlMjAlMjJBJTIwZHJ1bSUyMGxpbmUlMjBhcnJpdmVzJTIwYW5kJTIwdGhleSdyZSUyMG91dHNpZGUlMjBkYW5jaW5nJTIwYW5kJTIwYXNsZWVwLiUyMiUyQyUwQSUyMCUyMCUyMCUyMCUyMkElMjBkcnVtJTIwbGluZSUyMHR1cm5zJTIwdGhlJTIwbGVhZCUyMHNpbmdlciUyMHdhdGNoZXMlMjB0aGUlMjBwZXJmb3JtYW5jZS4lMjIlMEElNUQlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoZmlyc3Rfc2VudGVuY2UlMkMlMjBzZWNvbmRfc2VudGVuY2UlMkMlMjB0cnVuY2F0aW9uJTNEVHJ1ZSUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQSUwQWZvciUyMGslMkMlMjB2JTIwaW4lMjBpbnB1dHMuaXRlbXMoKSUzQSUwQSUyMCUyMCUyMCUyMGlucHV0cyU1QmslNUQlMjAlM0QlMjAlNUJ2JTVCaSUzQSUyMGklMjAlMkIlMjBudW1fY2hvaWNlcyU1RCUyMGZvciUyMGklMjBpbiUyMHJhbmdlKDAlMkMlMjBsZW4odiklMkMlMjBudW1fY2hvaWNlcyklNUQlMEFpbnB1dHMlMjAlM0QlMjBkaWN0KGlucHV0cy5jb252ZXJ0X3RvX3RlbnNvcnModGVuc29yX3R5cGUlM0QlMjJwdCUyMikpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",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><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;ehdwns1516/bert-base-uncased_SWAG&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;ehdwns1516/bert-base-uncased_SWAG&quot;</span>, export=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>num_choices = <span class="hljs-number">4</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>first_sentence = [<span class="hljs-string">&quot;Members of the procession walk down the street holding small horn brass instruments.&quot;</span>] * num_choices
<span class="hljs-meta">&gt;&gt;&gt; </span>second_sentence = [
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;A drum line passes by walking down the street playing their instruments.&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;A drum line has heard approaching them.&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;A drum line arrives and they&#x27;re outside dancing and asleep.&quot;</span>,
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;A drum line turns the lead singer watches the performance.&quot;</span>
<span class="hljs-meta">... </span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(first_sentence, second_sentence, truncation=<span class="hljs-literal">True</span>, padding=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># Unflatten the inputs values expanding it to the shape [batch_size, num_choices, seq_length]</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> inputs.items():
<span class="hljs-meta">... </span>    inputs[k] = [v[i: i + num_choices] <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span>(<span class="hljs-number">0</span>, <span class="hljs-built_in">len</span>(v), num_choices)]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = <span class="hljs-built_in">dict</span>(inputs.convert_to_tensors(tensor_type=<span class="hljs-string">&quot;pt&quot;</span>))
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1wk3stq"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function lm($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function rm($){let n,g="Example of question answering:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZyb2JlcnRhLWJhc2Utc3F1YWQyJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRnJvYmVydGEtYmFzZS1zcXVhZDIlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklMEFzdGFydF9wb3NpdGlvbnMlMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMSU1RCklMEFlbmRfcG9zaXRpb25zJTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjMlNUQpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwc3RhcnRfcG9zaXRpb25zJTNEc3RhcnRfcG9zaXRpb25zJTJDJTIwZW5kX3Bvc2l0aW9ucyUzRGVuZF9wb3NpdGlvbnMpJTBBc3RhcnRfc2NvcmVzJTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMlMEFlbmRfc2NvcmVzJTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRz",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><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/roberta-base-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;optimum/roberta-base-squad2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_positions = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>end_positions = torch.tensor([<span class="hljs-number">3</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=start_positions, end_positions=end_positions)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1ml1brl"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function im($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JRdWVzdGlvbkFuc3dlcmluZyUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZyb2JlcnRhLWJhc2Utc3F1YWQyJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRnJvYmVydGEtYmFzZS1zcXVhZDIlMjIpJTBBb25ueF9xYSUyMCUzRCUyMHBpcGVsaW5lKCUyMnF1ZXN0aW9uLWFuc3dlcmluZyUyMiUyQyUyMG1vZGVsJTNEbW9kZWwlMkMlMjB0b2tlbml6ZXIlM0R0b2tlbml6ZXIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEFwcmVkJTIwJTNEJTIwb25ueF9xYShxdWVzdGlvbiUyQyUyMHRleHQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/roberta-base-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;optimum/roberta-base-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_qa = pipeline(<span class="hljs-string">&quot;question-answering&quot;</span>, model=model, tokenizer=tokenizer)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = onnx_qa(question, text)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1u1xsxh"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function pm($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function mm($){let n,g="Example of image classification:",o,s,m;return s=new U({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbiUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBdXRvRmVhdHVyZUV4dHJhY3RvciUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEElMEFwcmVwcm9jZXNzb3IlMjAlM0QlMjBBdXRvRmVhdHVyZUV4dHJhY3Rvci5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRnZpdC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JJbWFnZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGdml0LWJhc2UtcGF0Y2gxNi0yMjQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJlcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForImageClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>preprocessor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;optimum/vit-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForImageClassification.from_pretrained(<span class="hljs-string">&quot;optimum/vit-base-patch16-224&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = preprocessor(images=image, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1nh3zco"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function cm($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,m;return s=new U({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JJbWFnZUNsYXNzaWZpY2F0aW9uJTBBJTBBcHJlcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZ2aXQtYmFzZS1wYXRjaDE2LTIyNCUyMiklMEFtb2RlbCUyMCUzRCUyME9SVE1vZGVsRm9ySW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRnZpdC1iYXNlLXBhdGNoMTYtMjI0JTIyKSUwQW9ubnhfaW1hZ2VfY2xhc3NpZmllciUyMCUzRCUyMHBpcGVsaW5lKCUyMmltYWdlLWNsYXNzaWZpY2F0aW9uJTIyJTJDJTIwbW9kZWwlM0Rtb2RlbCUyQyUyMGZlYXR1cmVfZXh0cmFjdG9yJTNEcHJlcHJvY2Vzc29yKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFwcmVkJTIwJTNEJTIwb25ueF9pbWFnZV9jbGFzc2lmaWVyKHVybCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForImageClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>preprocessor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;optimum/vit-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForImageClassification.from_pretrained(<span class="hljs-string">&quot;optimum/vit-base-patch16-224&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_image_classifier = pipeline(<span class="hljs-string">&quot;image-classification&quot;</span>, model=model, feature_extractor=preprocessor)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = onnx_image_classifier(url)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1u1xsxh"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function dm($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function um($){let n,g="Example of semantic segmentation:",o,s,m;return s=new U({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yU2VtYW50aWNTZWdtZW50YXRpb24lMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwJTNBJTJGJTJGaW1hZ2VzLmNvY29kYXRhc2V0Lm9yZyUyRnZhbDIwMTclMkYwMDAwMDAwMzk3NjkuanBnJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBcHJlcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZzZWdmb3JtZXItYjAtZmluZXR1bmVkLWFkZS01MTItNTEyJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JTZW1hbnRpY1NlZ21lbnRhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRnNlZ2Zvcm1lci1iMC1maW5ldHVuZWQtYWRlLTUxMi01MTIlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJlcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJucCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForSemanticSegmentation
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>preprocessor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;optimum/segformer-b0-finetuned-ade-512-512&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;optimum/segformer-b0-finetuned-ade-512-512&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = preprocessor(images=image, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1wzzaup"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function gm($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,m;return s=new U({props:{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFmcm9tJTIwUElMJTIwaW1wb3J0JTIwSW1hZ2UlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JTZW1hbnRpY1NlZ21lbnRhdGlvbiUwQSUwQXByZXByb2Nlc3NvciUyMCUzRCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGc2VnZm9ybWVyLWIwLWZpbmV0dW5lZC1hZGUtNTEyLTUxMiUyMiklMEFtb2RlbCUyMCUzRCUyME9SVE1vZGVsRm9yU2VtYW50aWNTZWdtZW50YXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZzZWdmb3JtZXItYjAtZmluZXR1bmVkLWFkZS01MTItNTEyJTIyKSUwQW9ubnhfaW1hZ2Vfc2VnbWVudGVyJTIwJTNEJTIwcGlwZWxpbmUoJTIyaW1hZ2Utc2VnbWVudGF0aW9uJTIyJTJDJTIwbW9kZWwlM0Rtb2RlbCUyQyUyMGZlYXR1cmVfZXh0cmFjdG9yJTNEcHJlcHJvY2Vzc29yKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFwcmVkJTIwJTNEJTIwb25ueF9pbWFnZV9zZWdtZW50ZXIodXJsKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForSemanticSegmentation

<span class="hljs-meta">&gt;&gt;&gt; </span>preprocessor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;optimum/segformer-b0-finetuned-ade-512-512&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForSemanticSegmentation.from_pretrained(<span class="hljs-string">&quot;optimum/segformer-b0-finetuned-ade-512-512&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_image_segmenter = pipeline(<span class="hljs-string">&quot;image-segmentation&quot;</span>, model=model, feature_extractor=preprocessor)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = onnx_image_segmenter(url)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1u1xsxh"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function hm($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function fm($){let n,g="Example of audio classification:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBZnJvbSUyMG9wdGltdW0ub25ueHJ1bnRpbWUlMjBpbXBvcnQlMjBPUlRNb2RlbEZvckF1ZGlvQ2xhc3NpZmljYXRpb24lMEFmcm9tJTIwZGF0YXNldHMlMjBpbXBvcnQlMjBsb2FkX2RhdGFzZXQlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQWRhdGFzZXQlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kZW1vJTIyJTJDJTIwJTIyY2xlYW4lMjIlMkMlMjBzcGxpdCUzRCUyMnZhbGlkYXRpb24lMjIpJTBBZGF0YXNldCUyMCUzRCUyMGRhdGFzZXQuc29ydCglMjJpZCUyMiklMEFzYW1wbGluZ19yYXRlJTIwJTNEJTIwZGF0YXNldC5mZWF0dXJlcyU1QiUyMmF1ZGlvJTIyJTVELnNhbXBsaW5nX3JhdGUlMEElMEFmZWF0dXJlX2V4dHJhY3RvciUyMCUzRCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGaHViZXJ0LWJhc2Utc3VwZXJiLWtzJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JBdWRpb0NsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGaHViZXJ0LWJhc2Utc3VwZXJiLWtzJTIyKSUwQSUwQSUyMyUyMGF1ZGlvJTIwZmlsZSUyMGlzJTIwZGVjb2RlZCUyMG9uJTIwdGhlJTIwZmx5JTBBaW5wdXRzJTIwJTNEJTIwZmVhdHVyZV9leHRyYWN0b3IoZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRHNhbXBsaW5nX3JhdGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkcyUyMCUzRCUyMHRvcmNoLmFyZ21heChsb2dpdHMlMkMlMjBkaW0lM0QtMSkuaXRlbSgpJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2NsYXNzX2lkcyU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForAudioClassification
<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><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;optimum/hubert-base-superb-ks&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForAudioClassification.from_pretrained(<span class="hljs-string">&quot;optimum/hubert-base-superb-ks&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.argmax(logits, dim=-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = model.config.id2label[predicted_class_ids]`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1mp8f15"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Mm($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTJDJTIwcGlwZWxpbmUlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yQXVkaW9DbGFzc2lmaWNhdGlvbiUwQSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZodWJlcnQtYmFzZS1zdXBlcmIta3MlMjIpJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2RlbW8lMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiklMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5zb3J0KCUyMmlkJTIyKSUwQSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JBdWRpb0NsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGaHViZXJ0LWJhc2Utc3VwZXJiLWtzJTIyKSUwQW9ubnhfYWMlMjAlM0QlMjBwaXBlbGluZSglMjJhdWRpby1jbGFzc2lmaWNhdGlvbiUyMiUyQyUyMG1vZGVsJTNEbW9kZWwlMkMlMjBmZWF0dXJlX2V4dHJhY3RvciUzRGZlYXR1cmVfZXh0cmFjdG9yKSUwQSUwQXByZWQlMjAlM0QlMjBvbm54X2FjKGRhdGFzZXQlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForAudioClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;optimum/hubert-base-superb-ks&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForAudioClassification.from_pretrained(<span class="hljs-string">&quot;optimum/hubert-base-superb-ks&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_ac = pipeline(<span class="hljs-string">&quot;audio-classification&quot;</span>, model=model, feature_extractor=feature_extractor)

<span class="hljs-meta">&gt;&gt;&gt; </span>pred = onnx_ac(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>])`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1u1xsxh"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function bm($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function Tm($){let n,g="Example of audio frame classification:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBZnJvbSUyMG9wdGltdW0ub25ueHJ1bnRpbWUlMjBpbXBvcnQlMjBPUlRNb2RlbEZvckF1ZGlvRnJhbWVDbGFzc2lmaWNhdGlvbiUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2RlbW8lMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiklMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5zb3J0KCUyMmlkJTIyKSUwQXNhbXBsaW5nX3JhdGUlMjAlM0QlMjBkYXRhc2V0LmZlYXR1cmVzJTVCJTIyYXVkaW8lMjIlNUQuc2FtcGxpbmdfcmF0ZSUwQSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZ3YXYydmVjMi1iYXNlLXN1cGVyYi1zZCUyMiklMEFtb2RlbCUyMCUzRCUyMCUyME9SVE1vZGVsRm9yQXVkaW9GcmFtZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGd2F2MnZlYzItYmFzZS1zdXBlcmItc2QlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwZmVhdHVyZV9leHRyYWN0b3IoZGF0YXNldCU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGluZ19yYXRlKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJvYmFiaWxpdGllcyUyMCUzRCUyMHRvcmNoLnNpZ21vaWQobG9naXRzJTVCMCU1RCklMEFsYWJlbHMlMjAlM0QlMjAocHJvYmFiaWxpdGllcyUyMCUzRSUyMDAuNSkubG9uZygpJTBBbGFiZWxzJTVCMCU1RC50b2xpc3QoKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForAudioFrameClassification
<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><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;optimum/wav2vec2-base-superb-sd&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model =  ORTModelForAudioFrameClassification.from_pretrained(<span class="hljs-string">&quot;optimum/wav2vec2-base-superb-sd&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, sampling_rate=sampling_rate)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>probabilities = torch.sigmoid(logits[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = (probabilities &gt; <span class="hljs-number">0.5</span>).long()
<span class="hljs-meta">&gt;&gt;&gt; </span>labels[<span class="hljs-number">0</span>].tolist()`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-12boqdm"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function ym($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function _m($){let n,g="Example of CTC:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBIdWJlcnRGb3JDVEMlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yQ1RDJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBaW1wb3J0JTIwdG9yY2glMEElMEFkYXRhc2V0JTIwJTNEJTIwbG9hZF9kYXRhc2V0KCUyMmhmLWludGVybmFsLXRlc3RpbmclMkZsaWJyaXNwZWVjaF9hc3JfZGVtbyUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQWRhdGFzZXQlMjAlM0QlMjBkYXRhc2V0LnNvcnQoJTIyaWQlMjIpJTBBc2FtcGxpbmdfcmF0ZSUyMCUzRCUyMGRhdGFzZXQuZmVhdHVyZXMlNUIlMjJhdWRpbyUyMiU1RC5zYW1wbGluZ19yYXRlJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmh1YmVydC1sYXJnZS1sczk2MC1mdCUyMiklMEFtb2RlbCUyMCUzRCUyME9SVE1vZGVsRm9yQ1RDLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGaHViZXJ0LWxhcmdlLWxzOTYwLWZ0JTIyKSUwQSUwQSUyMyUyMGF1ZGlvJTIwZmlsZSUyMGlzJTIwZGVjb2RlZCUyMG9uJTIwdGhlJTIwZmx5JTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGRhdGFzZXQlNUIwJTVEJTVCJTIyYXVkaW8lMjIlNUQlNUIlMjJhcnJheSUyMiU1RCUyQyUyMHNhbXBsaW5nX3JhdGUlM0RzYW1wbGluZ19yYXRlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQXByZWRpY3RlZF9pZHMlMjAlM0QlMjB0b3JjaC5hcmdtYXgobG9naXRzJTJDJTIwZGltJTNELTEpJTBBJTBBdHJhbnNjcmlwdGlvbiUyMCUzRCUyMHByb2Nlc3Nvci5iYXRjaF9kZWNvZGUocHJlZGljdGVkX2lkcyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, HubertForCTC
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForCTC
<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><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;optimum/hubert-large-ls960-ft&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForCTC.from_pretrained(<span class="hljs-string">&quot;optimum/hubert-large-ls960-ft&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(dataset[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_ids = torch.argmax(logits, dim=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>transcription = processor.batch_decode(predicted_ids)`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-mdyxnj"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function wm($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function $m($){let n,g="Example of text generation:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yU3BlZWNoU2VxMlNlcSUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQXByb2Nlc3NvciUyMCUzRCUyMEF1dG9Qcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZ3aGlzcGVyLXRpbnkuZW4lMjIpJTBBbW9kZWwlMjAlM0QlMjBPUlRNb2RlbEZvclNwZWVjaFNlcTJTZXEuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZ3aGlzcGVyLXRpbnkuZW4lMjIpJTBBJTBBZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyaGYtaW50ZXJuYWwtdGVzdGluZyUyRmxpYnJpc3BlZWNoX2Fzcl9kdW1teSUyMiUyQyUyMCUyMmNsZWFuJTIyJTJDJTIwc3BsaXQlM0QlMjJ2YWxpZGF0aW9uJTIyKSUwQWlucHV0cyUyMCUzRCUyMHByb2Nlc3Nvci5mZWF0dXJlX2V4dHJhY3RvcihkcyU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEFnZW5fdG9rZW5zJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRzJTNEaW5wdXRzLmlucHV0X2ZlYXR1cmVzKSUwQW91dHB1dHMlMjAlM0QlMjBwcm9jZXNzb3IudG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5fdG9rZW5zKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForSpeechSeq2Seq
<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>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;optimum/whisper-tiny.en&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForSpeechSeq2Seq.from_pretrained(<span class="hljs-string">&quot;optimum/whisper-tiny.en&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_dummy&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor.feature_extractor(ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>gen_tokens = model.generate(inputs=inputs.input_features)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = processor.tokenizer.batch_decode(gen_tokens)`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1bvu0cy"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function vm($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JTcGVlY2hTZXEyU2VxJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRndoaXNwZXItdGlueS5lbiUyMiklMEFtb2RlbCUyMCUzRCUyME9SVE1vZGVsRm9yU3BlZWNoU2VxMlNlcS5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRndoaXNwZXItdGlueS5lbiUyMiklMEFzcGVlY2hfcmVjb2duaXRpb24lMjAlM0QlMjBwaXBlbGluZSglMjJhdXRvbWF0aWMtc3BlZWNoLXJlY29nbml0aW9uJTIyJTJDJTIwbW9kZWwlM0Rtb2RlbCUyQyUyMHRva2VuaXplciUzRHByb2Nlc3Nvci50b2tlbml6ZXIlMkMlMjBmZWF0dXJlX2V4dHJhY3RvciUzRHByb2Nlc3Nvci5mZWF0dXJlX2V4dHJhY3RvciklMEElMEFkcyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2R1bW15JTIyJTJDJTIwJTIyY2xlYW4lMjIlMkMlMjBzcGxpdCUzRCUyMnZhbGlkYXRpb24lMjIpJTBBcHJlZCUyMCUzRCUyMHNwZWVjaF9yZWNvZ25pdGlvbihkcyU1QjAlNUQlNUIlMjJhdWRpbyUyMiU1RCU1QiUyMmFycmF5JTIyJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForSpeechSeq2Seq
<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>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;optimum/whisper-tiny.en&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForSpeechSeq2Seq.from_pretrained(<span class="hljs-string">&quot;optimum/whisper-tiny.en&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>speech_recognition = pipeline(<span class="hljs-string">&quot;automatic-speech-recognition&quot;</span>, model=model, tokenizer=processor.tokenizer, feature_extractor=processor.feature_extractor)

<span class="hljs-meta">&gt;&gt;&gt; </span>ds = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_dummy&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = speech_recognition(ds[<span class="hljs-number">0</span>][<span class="hljs-string">&quot;audio&quot;</span>][<span class="hljs-string">&quot;array&quot;</span>])`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1u1xsxh"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Jm($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function jm($){let n,g="Example of Audio XVector:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9GZWF0dXJlRXh0cmFjdG9yJTBBZnJvbSUyMG9wdGltdW0ub25ueHJ1bnRpbWUlMjBpbXBvcnQlMjBPUlRNb2RlbEZvckF1ZGlvWFZlY3RvciUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBZGF0YXNldCUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGbGlicmlzcGVlY2hfYXNyX2RlbW8lMjIlMkMlMjAlMjJjbGVhbiUyMiUyQyUyMHNwbGl0JTNEJTIydmFsaWRhdGlvbiUyMiklMEFkYXRhc2V0JTIwJTNEJTIwZGF0YXNldC5zb3J0KCUyMmlkJTIyKSUwQXNhbXBsaW5nX3JhdGUlMjAlM0QlMjBkYXRhc2V0LmZlYXR1cmVzJTVCJTIyYXVkaW8lMjIlNUQuc2FtcGxpbmdfcmF0ZSUwQSUwQWZlYXR1cmVfZXh0cmFjdG9yJTIwJTNEJTIwQXV0b0ZlYXR1cmVFeHRyYWN0b3IuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZ3YXYydmVjMi1iYXNlLXN1cGVyYi1zdiUyMiklMEFtb2RlbCUyMCUzRCUyME9SVE1vZGVsRm9yQXVkaW9YVmVjdG9yLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGd2F2MnZlYzItYmFzZS1zdXBlcmItc3YlMjIpJTBBJTBBJTIzJTIwYXVkaW8lMjBmaWxlJTIwaXMlMjBkZWNvZGVkJTIwb24lMjB0aGUlMjBmbHklMEFpbnB1dHMlMjAlM0QlMjBmZWF0dXJlX2V4dHJhY3RvciglMEElMjAlMjAlMjAlMjAlNUJkJTVCJTIyYXJyYXklMjIlNUQlMjBmb3IlMjBkJTIwaW4lMjBkYXRhc2V0JTVCJTNBMiU1RCU1QiUyMmF1ZGlvJTIyJTVEJTVEJTJDJTIwc2FtcGxpbmdfcmF0ZSUzRHNhbXBsaW5nX3JhdGUlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUlMEEpJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGVtYmVkZGluZ3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykuZW1iZWRkaW5ncyUwQSUwQWVtYmVkZGluZ3MlMjAlM0QlMjB0b3JjaC5ubi5mdW5jdGlvbmFsLm5vcm1hbGl6ZShlbWJlZGRpbmdzJTJDJTIwZGltJTNELTEpLmNwdSgpJTBBJTBBY29zaW5lX3NpbSUyMCUzRCUyMHRvcmNoLm5uLkNvc2luZVNpbWlsYXJpdHkoZGltJTNELTEpJTBBc2ltaWxhcml0eSUyMCUzRCUyMGNvc2luZV9zaW0oZW1iZWRkaW5ncyU1QjAlNUQlMkMlMjBlbWJlZGRpbmdzJTVCMSU1RCklMEF0aHJlc2hvbGQlMjAlM0QlMjAwLjclMEFpZiUyMHNpbWlsYXJpdHklMjAlM0MlMjB0aHJlc2hvbGQlM0ElMEElMjAlMjAlMjAlMjBwcmludCglMjJTcGVha2VycyUyMGFyZSUyMG5vdCUyMHRoZSUyMHNhbWUhJTIyKSUwQXJvdW5kKHNpbWlsYXJpdHkuaXRlbSgpJTJDJTIwMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoFeatureExtractor
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForAudioXVector
<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><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = load_dataset(<span class="hljs-string">&quot;hf-internal-testing/librispeech_asr_demo&quot;</span>, <span class="hljs-string">&quot;clean&quot;</span>, split=<span class="hljs-string">&quot;validation&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>dataset = dataset.sort(<span class="hljs-string">&quot;id&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>sampling_rate = dataset.features[<span class="hljs-string">&quot;audio&quot;</span>].sampling_rate

<span class="hljs-meta">&gt;&gt;&gt; </span>feature_extractor = AutoFeatureExtractor.from_pretrained(<span class="hljs-string">&quot;optimum/wav2vec2-base-superb-sv&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForAudioXVector.from_pretrained(<span class="hljs-string">&quot;optimum/wav2vec2-base-superb-sv&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># audio file is decoded on the fly</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = feature_extractor(
<span class="hljs-meta">... </span>    [d[<span class="hljs-string">&quot;array&quot;</span>] <span class="hljs-keyword">for</span> d <span class="hljs-keyword">in</span> dataset[:<span class="hljs-number">2</span>][<span class="hljs-string">&quot;audio&quot;</span>]], sampling_rate=sampling_rate, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    embeddings = model(**inputs).embeddings

<span class="hljs-meta">&gt;&gt;&gt; </span>embeddings = torch.nn.functional.normalize(embeddings, dim=-<span class="hljs-number">1</span>).cpu()

<span class="hljs-meta">&gt;&gt;&gt; </span>cosine_sim = torch.nn.CosineSimilarity(dim=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>similarity = cosine_sim(embeddings[<span class="hljs-number">0</span>], embeddings[<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>threshold = <span class="hljs-number">0.7</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">if</span> similarity &lt; threshold:
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Speakers are not the same!&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(similarity.item(), <span class="hljs-number">2</span>)`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1kzdm5c"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function km($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function xm($){let n,g="Example of text generation:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yVmlzaW9uMlNlcSUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJubHBjb25uZWN0JTJGdml0LWdwdDItaW1hZ2UtY2FwdGlvbmluZyUyMiklMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJubHBjb25uZWN0JTJGdml0LWdwdDItaW1hZ2UtY2FwdGlvbmluZyUyMiklMEFtb2RlbCUyMCUzRCUyME9SVE1vZGVsRm9yVmlzaW9uMlNlcS5mcm9tX3ByZXRyYWluZWQoJTIybmxwY29ubmVjdCUyRnZpdC1ncHQyLWltYWdlLWNhcHRpb25pbmclMjIlMkMlMjBleHBvcnQlM0RUcnVlKSUwQSUwQXVybCUyMCUzRCUyMCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWdlbl90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyklMEFvdXRwdXRzJTIwJTNEJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5fdG9rZW5zJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBB",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, AutoTokenizer
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForVision2Seq
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests


<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;nlpconnect/vit-gpt2-image-captioning&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;nlpconnect/vit-gpt2-image-captioning&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForVision2Seq.from_pretrained(<span class="hljs-string">&quot;nlpconnect/vit-gpt2-image-captioning&quot;</span>, export=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>gen_tokens = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = tokenizer.batch_decode(gen_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1bvu0cy"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Um($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JWaXNpb24yU2VxJTBBZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEElMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvSW1hZ2VQcm9jZXNzb3IuZnJvbV9wcmV0cmFpbmVkKCUyMm5scGNvbm5lY3QlMkZ2aXQtZ3B0Mi1pbWFnZS1jYXB0aW9uaW5nJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm5scGNvbm5lY3QlMkZ2aXQtZ3B0Mi1pbWFnZS1jYXB0aW9uaW5nJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JWaXNpb24yU2VxLmZyb21fcHJldHJhaW5lZCglMjJubHBjb25uZWN0JTJGdml0LWdwdDItaW1hZ2UtY2FwdGlvbmluZyUyMiUyQyUyMGV4cG9ydCUzRFRydWUpJTBBJTBBdXJsJTIwJTNEJTIwJTIyaHR0cCUzQSUyRiUyRmltYWdlcy5jb2NvZGF0YXNldC5vcmclMkZ2YWwyMDE3JTJGMDAwMDAwMDM5NzY5LmpwZyUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWltYWdlX3RvX3RleHQlMjAlM0QlMjBwaXBlbGluZSglMjJpbWFnZS10by10ZXh0JTIyJTJDJTIwbW9kZWwlM0Rtb2RlbCUyQyUyMHRva2VuaXplciUzRHRva2VuaXplciUyQyUyMGZlYXR1cmVfZXh0cmFjdG9yJTNEcHJvY2Vzc29yJTJDJTIwaW1hZ2VfcHJvY2Vzc29yJTNEcHJvY2Vzc29yKSUwQXByZWQlMjAlM0QlMjBpbWFnZV90b190ZXh0KGltYWdlKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, AutoTokenizer, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForVision2Seq
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests


<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;nlpconnect/vit-gpt2-image-captioning&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;nlpconnect/vit-gpt2-image-captioning&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForVision2Seq.from_pretrained(<span class="hljs-string">&quot;nlpconnect/vit-gpt2-image-captioning&quot;</span>, export=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_to_text = pipeline(<span class="hljs-string">&quot;image-to-text&quot;</span>, model=model, tokenizer=tokenizer, feature_extractor=processor, image_processor=processor)
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = image_to_text(image)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1u1xsxh"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Rm($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function Zm($){let n,g="Example of pix2struct:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yUGl4MlN0cnVjdCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQWltcG9ydCUyMHJlcXVlc3RzJTBBJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b1Byb2Nlc3Nvci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGcGl4MnN0cnVjdC1haTJkLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBPUlRNb2RlbEZvclBpeDJTdHJ1Y3QuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnBpeDJzdHJ1Y3QtYWkyZC1iYXNlJTIyJTJDJTIwZXhwb3J0JTNEVHJ1ZSUyQyUyMHVzZV9pb19iaW5kaW5nJTNEVHJ1ZSklMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRmh1Z2dpbmdmYWNlLmNvJTJGZGF0YXNldHMlMkZodWdnaW5nZmFjZSUyRmRvY3VtZW50YXRpb24taW1hZ2VzJTJGcmVzb2x2ZSUyRm1haW4lMkZ0cmFuc2Zvcm1lcnMlMkZ0YXNrcyUyRmFpMmQtZGVtby5qcGclMjIlMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KHVybCUyQyUyMHN0cmVhbSUzRFRydWUpLnJhdyklMEFxdWVzdGlvbiUyMCUzRCUyMCUyMldoYXQlMjBkb2VzJTIwdGhlJTIwbGFiZWwlMjAxNSUyMHJlcHJlc2VudCUzRiUyMCgxKSUyMGxhdmElMjAoMiklMjBjb3JlJTIwKDMpJTIwdHVubmVsJTIwKDQpJTIwYXNoJTIwY2xvdWQlMjIlMEFpbnB1dHMlMjAlM0QlMjBwcm9jZXNzb3IoaW1hZ2VzJTNEaW1hZ2UlMkMlMjB0ZXh0JTNEcXVlc3Rpb24lMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQWdlbl90b2tlbnMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0cyklMEFvdXRwdXRzJTIwJTNEJTIwcHJvY2Vzc29yLmJhdGNoX2RlY29kZShnZW5fdG9rZW5zJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForPix2Struct
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(<span class="hljs-string">&quot;google/pix2struct-ai2d-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForPix2Struct.from_pretrained(<span class="hljs-string">&quot;google/pix2struct-ai2d-base&quot;</span>, export=<span class="hljs-literal">True</span>, use_io_binding=<span class="hljs-literal">True</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/ai2d-demo.jpg&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)
<span class="hljs-meta">&gt;&gt;&gt; </span>question = <span class="hljs-string">&quot;What does the label 15 represent? (1) lava (2) core (3) tunnel (4) ash cloud&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=question, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>gen_tokens = model.generate(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = processor.batch_decode(gen_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-11ikyn3"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Wm($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function Fm($){let n,g="Example of custom tasks(e.g. a sentence transformers taking <code>pooler_output</code> as output):",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yQ3VzdG9tVGFza3MlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJvcHRpbXVtJTJGc2JlcnQtYWxsLU1pbmlMTS1MNi13aXRoLXBvb2xlciUyMiklMEFtb2RlbCUyMCUzRCUyME9SVE1vZGVsRm9yQ3VzdG9tVGFza3MuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZzYmVydC1hbGwtTWluaUxNLUw2LXdpdGgtcG9vbGVyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJJJTIwbG92ZSUyMGJ1cnJpdG9zISUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQXBvb2xlcl9vdXRwdXQlMjAlM0QlMjBvdXRwdXRzLnBvb2xlcl9vdXRwdXQ=",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><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForCustomTasks

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/sbert-all-MiniLM-L6-with-pooler&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForCustomTasks.from_pretrained(<span class="hljs-string">&quot;optimum/sbert-all-MiniLM-L6-with-pooler&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;I love burritos!&quot;</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span>pooler_output = outputs.pooler_output`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-6kynse"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Nm($){let n,g="Example using <code>transformers.pipelines</code>(only if the task is supported):",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JDdXN0b21UYXNrcyUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZzYmVydC1hbGwtTWluaUxNLUw2LXdpdGgtcG9vbGVyJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JDdXN0b21UYXNrcy5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRnNiZXJ0LWFsbC1NaW5pTE0tTDYtd2l0aC1wb29sZXIlMjIpJTBBb25ueF9leHRyYWN0b3IlMjAlM0QlMjBwaXBlbGluZSglMjJmZWF0dXJlLWV4dHJhY3Rpb24lMjIlMkMlMjBtb2RlbCUzRG1vZGVsJTJDJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyKSUwQSUwQXRleHQlMjAlM0QlMjAlMjJJJTIwbG92ZSUyMGJ1cnJpdG9zISUyMiUwQXByZWQlMjAlM0QlMjBvbm54X2V4dHJhY3Rvcih0ZXh0KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForCustomTasks

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/sbert-all-MiniLM-L6-with-pooler&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForCustomTasks.from_pretrained(<span class="hljs-string">&quot;optimum/sbert-all-MiniLM-L6-with-pooler&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_extractor = pipeline(<span class="hljs-string">&quot;feature-extraction&quot;</span>, model=model, tokenizer=tokenizer)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;I love burritos!&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = onnx_extractor(text)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-xxeb0k"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Cm($){let n,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){n=c("p"),n.innerHTML=g},l(o){n=d(o,"P",{"data-svelte-h":!0}),w(n)!=="svelte-fincs2"&&(n.innerHTML=g)},m(o,s){u(o,n,s)},p:v,d(o){o&&p(n)}}}function Gm($){let n,g="Example of feature extraction:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMEFmcm9tJTIwb3B0aW11bS5vbm54cnVudGltZSUyMGltcG9ydCUyME9SVE1vZGVsRm9yRmVhdHVyZUV4dHJhY3Rpb24lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZhbGwtTWluaUxNLUw2LXYyJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JGZWF0dXJlRXh0cmFjdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmFsbC1NaW5pTE0tTDYtdjIlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMk15JTIwbmFtZSUyMGlzJTIwUGhpbGlwcCUyMGFuZCUyMEklMjBsaXZlJTIwaW4lMjBHZXJtYW55LiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZSUwQWxpc3QobGFzdF9oaWRkZW5fc3RhdGUuc2hhcGUp",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><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForFeatureExtraction
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/all-MiniLM-L6-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForFeatureExtraction.from_pretrained(<span class="hljs-string">&quot;optimum/all-MiniLM-L6-v2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;My name is Philipp and I live in Germany.&quot;</span>, return_tensors=<span class="hljs-string">&quot;np&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_state = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_state.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">12</span>, <span class="hljs-number">384</span>]`,wrap:!1}}),{c(){n=c("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-12vwt80"&&(n.textContent=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Vm($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,m;return s=new U({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBwaXBlbGluZSUwQWZyb20lMjBvcHRpbXVtLm9ubnhydW50aW1lJTIwaW1wb3J0JTIwT1JUTW9kZWxGb3JGZWF0dXJlRXh0cmFjdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm9wdGltdW0lMkZhbGwtTWluaUxNLUw2LXYyJTIyKSUwQW1vZGVsJTIwJTNEJTIwT1JUTW9kZWxGb3JGZWF0dXJlRXh0cmFjdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyb3B0aW11bSUyRmFsbC1NaW5pTE0tTDYtdjIlMjIpJTBBb25ueF9leHRyYWN0b3IlMjAlM0QlMjBwaXBlbGluZSglMjJmZWF0dXJlLWV4dHJhY3Rpb24lMjIlMkMlMjBtb2RlbCUzRG1vZGVsJTJDJTIwdG9rZW5pemVyJTNEdG9rZW5pemVyKSUwQSUwQXRleHQlMjAlM0QlMjAlMjJNeSUyMG5hbWUlMjBpcyUyMFBoaWxpcHAlMjBhbmQlMjBJJTIwbGl2ZSUyMGluJTIwR2VybWFueS4lMjIlMEFwcmVkJTIwJTNEJTIwb25ueF9leHRyYWN0b3IodGV4dCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, pipeline
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> optimum.onnxruntime <span class="hljs-keyword">import</span> ORTModelForFeatureExtraction

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;optimum/all-MiniLM-L6-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ORTModelForFeatureExtraction.from_pretrained(<span class="hljs-string">&quot;optimum/all-MiniLM-L6-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>onnx_extractor = pipeline(<span class="hljs-string">&quot;feature-extraction&quot;</span>, model=model, tokenizer=tokenizer)

<span class="hljs-meta">&gt;&gt;&gt; </span>text = <span class="hljs-string">&quot;My name is Philipp and I live in Germany.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>pred = onnx_extractor(text)`,wrap:!1}}),{c(){n=c("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=d(t,"P",{"data-svelte-h":!0}),w(n)!=="svelte-1u1xsxh"&&(n.innerHTML=g),o=r(t),f(s.$$.fragment,t)},m(t,_){u(t,n,_),u(t,o,_),M(s,t,_),m=!0},p:v,i(t){m||(b(s.$$.fragment,t),m=!0)},o(t){T(s.$$.fragment,t),m=!1},d(t){t&&(p(n),p(o)),y(s,t)}}}function Im($){let n,g,o,s,m,t,_,Zo,Pt,Wo,Dt,ai="The following ORT classes are available for instantiating a base model class without a specific head.",Fo,Kt,No,Z,en,Ua,hs,li="Base class for implementing models using ONNX Runtime.",Ra,fs,ri=`The ORTModel implements generic methods for interacting with the Hugging Face Hub as well as exporting vanilla
transformers models to ONNX using <code>optimum.exporters.onnx</code> toolchain.`,Za,Ms,ii="Class attributes:",Wa,bs,pi=`<li>model_type (<code>str</code>, <em>optional</em>, defaults to <code>&quot;onnx_model&quot;</code>) — The name of the model type to use when
registering the ORTModel classes.</li> <li>auto_model_class (<code>Type</code>, <em>optional</em>, defaults to <code>AutoModel</code>) — The “AutoModel” class to represented by the
current ORTModel class.</li>`,Fa,et,tn,Na,Ts,mi="Returns whether this model can generate sequences with <code>.generate()</code>.",Ca,N,nn,Ga,ys,ci="Instantiate a pretrained model from a pre-trained model configuration.",Va,_s,di=`provider (<code>str</code>, defaults to <code>&quot;CPUExecutionProvider&quot;</code>):
ONNX Runtime provider to use for loading the model.
See <a href="https://onnxruntime.ai/docs/execution-providers/" rel="nofollow">https://onnxruntime.ai/docs/execution-providers/</a> for possible providers.
providers (<code>Optional[Sequence[str]]</code>, defaults to <code>None</code>):
List of execution providers to use for loading the model.
This argument takes precedence over the <code>provider</code> argument.
provider_options (<code>Optional[Dict[str, Any]]</code>, defaults to <code>None</code>):
Provider option dictionaries corresponding to the provider used. See available options
for each provider: <a href="https://onnxruntime.ai/docs/api/c/group___global.html" rel="nofollow">https://onnxruntime.ai/docs/api/c/group___global.html</a> .
session_options (<code>Optional[onnxruntime.SessionOptions]</code>, defaults to <code>None</code>),:
ONNX Runtime session options to use for loading the model.
use_io_binding (<code>Optional[bool]</code>, defaults to <code>None</code>):
Whether to use IOBinding during inference to avoid memory copy between the host and device, or between numpy/torch tensors and ONNX Runtime ORTValue. Defaults to
<code>True</code> if the execution provider is CUDAExecutionProvider. For [~onnxruntime.ORTModelForCausalLM], defaults to <code>True</code> on CPUExecutionProvider,
in all other cases defaults to <code>False</code>.
kwargs (<code>Dict[str, Any]</code>):
Will be passed to the underlying model loading methods.`,Ia,ws,ui="<p>Parameters for decoder models (ORTModelForCausalLM, ORTModelForSeq2SeqLM, ORTModelForSeq2SeqLM, ORTModelForSpeechSeq2Seq, ORTModelForVision2Seq)</p>",Xa,$s,gi=`use_cache (<code>Optional[bool]</code>, defaults to <code>True</code>):
Whether or not past key/values cache should be used. Defaults to <code>True</code>.`,za,vs,hi=`use_merged (<code>Optional[bool]</code>, defaults to <code>None</code>):
whether or not to use a single ONNX that handles both the decoding without and with past key values reuse. This option defaults
to <code>True</code> if loading from a local repository and a merged decoder is found. When exporting with <code>export=True</code>,
defaults to <code>False</code>. This option should be set to <code>True</code> to minimize memory usage.`,Co,sn,Go,on,fi="The following ORT classes are available for the following natural language processing tasks.",Vo,an,Io,ee,ln,Ba,Js,Mi=`ONNX model with a causal language modeling head for ONNX Runtime inference. This class officially supports bloom, codegen, falcon, gpt2, gpt-bigcode, gpt_neo, gpt_neox, gptj, llama.
This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Sa,js,bi='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',qa,S,rn,Ha,ks,Ti="The <code>ORTModelForCausalLM</code> forward method, overrides the <code>__call__</code> special method.",Ea,tt,Qa,nt,La,st,Xo,pn,zo,te,mn,Oa,xs,yi=`ONNX Model with a MaskedLMOutput for masked language modeling tasks. This class officially supports albert, bert, camembert, convbert, data2vec-text, deberta, deberta_v2, distilbert, electra, flaubert, ibert, mobilebert, roberta, roformer, squeezebert, xlm, xlm_roberta.
This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Ya,Us,_i='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',Aa,q,cn,Pa,Rs,wi="The <code>ORTModelForMaskedLM</code> forward method, overrides the <code>__call__</code> special method.",Da,ot,Ka,at,el,lt,Bo,dn,So,ne,un,tl,Zs,$i=`Sequence-to-sequence model with a language modeling head for ONNX Runtime inference. This class officially supports bart, blenderbot, blenderbot-small, longt5, m2m_100, marian, mbart, mt5, pegasus, t5.
This model inherits from <code>~onnxruntime.modeling_ort.ORTModelForConditionalGeneration</code>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,nl,Ws,vi="This class should be initialized using the <code>onnxruntime.modeling_ort.ORTModelForConditionalGeneration.from_pretrained</code> method.",sl,H,gn,ol,Fs,Ji="The <code>ORTModelForSeq2SeqLM</code> forward method, overrides the <code>__call__</code> special method.",al,rt,ll,it,rl,pt,qo,hn,Ho,G,fn,il,Ns,ji=`ONNX Model with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks. This class officially supports albert, bart, bert, camembert, convbert, data2vec-text, deberta, deberta_v2, distilbert, electra, flaubert, ibert, mbart, mobilebert, nystromformer, roberta, roformer, squeezebert, xlm, xlm_roberta.`,pl,Cs,ki=`This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,ml,Gs,xi='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',cl,C,Mn,dl,Vs,Ui="The <code>ORTModelForSequenceClassification</code> forward method, overrides the <code>__call__</code> special method.",ul,mt,gl,ct,hl,dt,fl,ut,Eo,bn,Qo,V,Tn,Ml,Is,Ri=`ONNX Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g.
for Named-Entity-Recognition (NER) tasks. This class officially supports albert, bert, bloom, camembert, convbert, data2vec-text, deberta, deberta_v2, distilbert, electra, flaubert, gpt2, ibert, mobilebert, roberta, roformer, squeezebert, xlm, xlm_roberta.`,bl,Xs,Zi=`This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Tl,zs,Wi='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',yl,E,yn,_l,Bs,Fi="The <code>ORTModelForTokenClassification</code> forward method, overrides the <code>__call__</code> special method.",wl,gt,$l,ht,vl,ft,Lo,_n,Oo,I,wn,Jl,Ss,Ni=`ONNX Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks. This class officially supports albert, bert, camembert, convbert, data2vec-text, deberta_v2, distilbert, electra, flaubert, ibert, mobilebert, nystromformer, roberta, roformer, squeezebert, xlm, xlm_roberta.`,jl,qs,Ci=`This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,kl,Hs,Gi='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',xl,Re,$n,Ul,Es,Vi="The <code>ORTModelForMultipleChoice</code> forward method, overrides the <code>__call__</code> special method.",Rl,Mt,Zl,bt,Yo,vn,Ao,se,Jn,Wl,Qs,Ii=`ONNX Model with a QuestionAnsweringModelOutput for extractive question-answering tasks like SQuAD. This class officially supports albert, bart, bert, camembert, convbert, data2vec-text, deberta, deberta_v2, distilbert, electra, flaubert, gptj, ibert, mbart, mobilebert, nystromformer, roberta, roformer, squeezebert, xlm, xlm_roberta.
This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Fl,Ls,Xi='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',Nl,Q,jn,Cl,Os,zi="The <code>ORTModelForQuestionAnswering</code> forward method, overrides the <code>__call__</code> special method.",Gl,Tt,Vl,yt,Il,_t,Po,kn,Do,xn,Bi="The following ORT classes are available for the following computer vision tasks.",Ko,Un,ea,oe,Rn,Xl,Ys,Si=`ONNX Model for image-classification tasks. This class officially supports beit, convnext, convnextv2, data2vec-vision, deit, dinov2, levit, mobilenet_v1, mobilenet_v2, mobilevit, poolformer, resnet, segformer, swin, swinv2, vit.
This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,zl,As,qi='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',Bl,L,Zn,Sl,Ps,Hi="The <code>ORTModelForImageClassification</code> forward method, overrides the <code>__call__</code> special method.",ql,wt,Hl,$t,El,vt,ta,Wn,na,ae,Fn,Ql,Ds,Ei=`ONNX Model for semantic-segmentation, with an all-MLP decode head on top e.g. for ADE20k, CityScapes. This class officially supports maskformer, segformer.
This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Ll,Ks,Qi='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',Ol,O,Nn,Yl,eo,Li="The <code>ORTModelForSemanticSegmentation</code> forward method, overrides the <code>__call__</code> special method.",Al,Jt,Pl,jt,Dl,kt,sa,Cn,oa,Gn,Oi="The following ORT classes are available for the following audio tasks.",aa,Vn,la,X,In,Kl,to,Yi=`ONNX Model for audio-classification, with a sequence classification head on top (a linear layer over the pooled output) for tasks like
SUPERB Keyword Spotting. This class officially supports audio_spectrogram_transformer, data2vec-audio, hubert, sew, sew-d, unispeech, unispeech_sat, wavlm, wav2vec2, wav2vec2-conformer.`,er,no,Ai=`This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,tr,so,Pi='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',nr,Y,Xn,sr,oo,Di="The <code>ORTModelForAudioClassification</code> forward method, overrides the <code>__call__</code> special method.",or,xt,ar,Ut,lr,Rt,ra,zn,ia,le,Bn,rr,ao,Ki=`ONNX Model with a frame classification head on top for tasks like Speaker Diarization. This class officially supports data2vec-audio, unispeech_sat, wavlm, wav2vec2, wav2vec2-conformer.
This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,ir,lo,ep='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',pr,Ze,Sn,mr,ro,tp="The <code>ORTModelForAudioFrameClassification</code> forward method, overrides the <code>__call__</code> special method.",cr,Zt,dr,Wt,pa,qn,ma,re,Hn,ur,io,np=`ONNX Model with a language modeling head on top for Connectionist Temporal Classification (CTC). This class officially supports data2vec-audio, hubert, sew, sew-d, unispeech, unispeech_sat, wavlm, wav2vec2, wav2vec2-conformer.
This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,gr,po,sp='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',hr,We,En,fr,mo,op="The <code>ORTModelForCTC</code> forward method, overrides the <code>__call__</code> special method.",Mr,Ft,br,Nt,ca,Qn,da,ie,Ln,Tr,co,ap=`Speech sequence-to-sequence model with a language modeling head for ONNX Runtime inference. This class officially supports whisper, speech_to_text.
This model inherits from <code>~onnxruntime.modeling_ort.ORTModelForConditionalGeneration</code>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,yr,uo,lp="This class should be initialized using the <code>onnxruntime.modeling_ort.ORTModelForConditionalGeneration.from_pretrained</code> method.",_r,A,On,wr,go,rp="The <code>ORTModelForSpeechSeq2Seq</code> forward method, overrides the <code>__call__</code> special method.",$r,Ct,vr,Gt,Jr,Vt,ua,Yn,ga,pe,An,jr,ho,ip=`ONNX Model with an XVector feature extraction head on top for tasks like Speaker Verification. This class officially supports data2vec-audio, unispeech_sat, wavlm, wav2vec2, wav2vec2-conformer.
This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,kr,fo,pp='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',xr,Fe,Pn,Ur,Mo,mp="The <code>ORTModelForAudioXVector</code> forward method, overrides the <code>__call__</code> special method.",Rr,It,Zr,Xt,ha,Dn,fa,Kn,cp="The following ORT classes are available for the following multimodal tasks.",Ma,es,ba,me,ts,Wr,bo,dp=`Vision sequence-to-sequence model with a language modeling head for ONNX Runtime inference. This class officially supports vision encoder-decoder and pix2struct.
This model inherits from <code>~onnxruntime.modeling_ort.ORTModelForConditionalGeneration</code>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Fr,To,up="This class should be initialized using the <code>onnxruntime.modeling_ort.ORTModelForConditionalGeneration.from_pretrained</code> method.",Nr,P,ns,Cr,yo,gp="The <code>ORTModelForVision2Seq</code> forward method, overrides the <code>__call__</code> special method.",Gr,zt,Vr,Bt,Ir,St,Ta,ss,ya,ce,os,Xr,_o,hp=`Pix2Struct model with a language modeling head for ONNX Runtime inference. This class officially supports pix2struct.
This model inherits from <code>~onnxruntime.modeling_ort.ORTModelForConditionalGeneration</code>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,zr,wo,fp="This class should be initialized using the <code>onnxruntime.modeling_ort.ORTModelForConditionalGeneration.from_pretrained</code> method.",Br,Ne,as,Sr,$o,Mp="The <code>ORTModelForPix2Struct</code> forward method, overrides the <code>__call__</code> special method.",qr,qt,Hr,Ht,_a,ls,wa,rs,bp="The following ORT classes are available for the following custom tasks.",$a,is,va,de,ps,Er,vo,Tp=`ONNX Model for any custom tasks. It can be used to leverage the inference acceleration for any single-file ONNX model, that may use custom inputs and outputs.
This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Qr,Jo,yp='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',Lr,D,ms,Or,jo,_p="The <code>ORTModelForCustomTasks</code> forward method, overrides the <code>__call__</code> special method.",Yr,Et,Ar,Qt,Pr,Lt,Ja,cs,ja,ue,ds,Dr,ko,wp=`ONNX Model for feature-extraction task.
This model inherits from <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Kr,xo,$p='This class should be initialized using the <a href="/docs/optimum/pr_68/en/onnxruntime/package_reference/modeling_ort#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',ei,K,us,ti,Uo,vp="The <code>ORTModelForFeatureExtraction</code> forward method, overrides the <code>__call__</code> special method.",ni,Ot,si,Yt,oi,At,ka,Ro,xa;return m=new Bp({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),_=new R({props:{title:"ONNX Runtime Models",local:"onnx-runtime-models",headingTag:"h1"}}),Pt=new R({props:{title:"Generic model classes",local:"generic-model-classes",headingTag:"h2"}}),Kt=new R({props:{title:"ORTModel",local:"optimum.onnxruntime.ORTModel",headingTag:"h3"}}),en=new k({props:{name:"class optimum.onnxruntime.ORTModel",anchor:"optimum.onnxruntime.ORTModel",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModel.-",description:"<strong>-</strong> config (<code>PretrainedConfig</code> &#x2014; The configuration of the model. &#x2014;",name:"-"},{anchor:"optimum.onnxruntime.ORTModel.-",description:"<strong>-</strong> session (<code>~onnxruntime.InferenceSession</code>) &#x2014; The ONNX Runtime InferenceSession that is running the model. &#x2014;",name:"-"},{anchor:"optimum.onnxruntime.ORTModel.-",description:"<strong>-</strong> use_io_binding (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014; Whether to use I/O bindings with **ONNX Runtime &#x2014;",name:"-"},{anchor:"optimum.onnxruntime.ORTModel.with",description:"<strong>with</strong> the CUDAExecutionProvider**, this can significantly speedup inference depending on the task. &#x2014;",name:"with"},{anchor:"optimum.onnxruntime.ORTModel.-",description:"<strong>-</strong> model_save_dir (<code>Path</code>) &#x2014; The directory where the model exported to ONNX is saved. &#x2014;",name:"-"},{anchor:"optimum.onnxruntime.ORTModel.By",description:"<strong>By</strong> defaults, if the loaded model is local, the directory where the original model will be used. Otherwise, the &#x2014;",name:"By"},{anchor:"optimum.onnxruntime.ORTModel.cache",description:"<strong>cache</strong> directory is used. &#x2014;",name:"cache"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L131"}}),tn=new k({props:{name:"can_generate",anchor:"optimum.onnxruntime.ORTModel.can_generate",parameters:[],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L569"}}),nn=new k({props:{name:"from_pretrained",anchor:"optimum.onnxruntime.ORTModel.from_pretrained",parameters:[{name:"model_id",val:": str | Path"},{name:"config",val:": PretrainedConfig | None = None"},{name:"export",val:": bool = False"},{name:"subfolder",val:": str = ''"},{name:"revision",val:": str = 'main'"},{name:"force_download",val:": bool = False"},{name:"local_files_only",val:": bool = False"},{name:"trust_remote_code",val:": bool = False"},{name:"cache_dir",val:": str = '/home/runner/.cache/huggingface/hub'"},{name:"token",val:": bool | str | None = None"},{name:"provider",val:": str = 'CPUExecutionProvider'"},{name:"providers",val:": Sequence[str] | None = None"},{name:"provider_options",val:": Sequence[dict[str, Any]] | dict[str, Any] | None = None"},{name:"session_options",val:": SessionOptions | None = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModel.from_pretrained.model_id",description:`<strong>model_id</strong> (<code>Union[str, Path]</code>) &#x2014;
Can be either:<ul>
<li>A string, the <em>model id</em> of a pretrained model hosted inside a model repo on huggingface.co.
Valid model ids can be located at the root-level, like <code>bert-base-uncased</code>, or namespaced under a
user or organization name, like <code>dbmdz/bert-base-german-cased</code>.</li>
<li>A path to a <em>directory</em> containing a model saved using <code>~OptimizedModel.save_pretrained</code>,
e.g., <code>./my_model_directory/</code>.</li>
</ul>`,name:"model_id"},{anchor:"optimum.onnxruntime.ORTModel.from_pretrained.export",description:`<strong>export</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Defines whether the provided <code>model_id</code> needs to be exported to the targeted format.`,name:"export"},{anchor:"optimum.onnxruntime.ORTModel.from_pretrained.force_download",description:`<strong>force_download</strong> (<code>bool</code>, defaults to <code>True</code>) &#x2014;
Whether or not to force the (re-)download of the model weights and configuration files, overriding the
cached versions if they exist.`,name:"force_download"},{anchor:"optimum.onnxruntime.ORTModel.from_pretrained.token",description:`<strong>token</strong> (<code>Optional[Union[bool,str]]</code>, defaults to <code>None</code>) &#x2014;
The token to use as HTTP bearer authorization for remote files. If <code>True</code>, will use the token generated
when running <code>huggingface-cli login</code> (stored in <code>huggingface_hub.constants.HF_TOKEN_PATH</code>).`,name:"token"},{anchor:"optimum.onnxruntime.ORTModel.from_pretrained.cache_dir",description:`<strong>cache_dir</strong> (<code>Optional[str]</code>, defaults to <code>None</code>) &#x2014;
Path to a directory in which a downloaded pretrained model configuration should be cached if the
standard cache should not be used.`,name:"cache_dir"},{anchor:"optimum.onnxruntime.ORTModel.from_pretrained.subfolder",description:`<strong>subfolder</strong> (<code>str</code>, defaults to <code>&quot;&quot;</code>) &#x2014;
In case the relevant files are located inside a subfolder of the model repo either locally or on huggingface.co, you can
specify the folder name here.`,name:"subfolder"},{anchor:"optimum.onnxruntime.ORTModel.from_pretrained.config",description:`<strong>config</strong> (<code>Optional[transformers.PretrainedConfig]</code>, defaults to <code>None</code>) &#x2014;
The model configuration.`,name:"config"},{anchor:"optimum.onnxruntime.ORTModel.from_pretrained.local_files_only",description:`<strong>local_files_only</strong> (<code>Optional[bool]</code>, defaults to <code>False</code>) &#x2014;
Whether or not to only look at local files (i.e., do not try to download the model).`,name:"local_files_only"},{anchor:"optimum.onnxruntime.ORTModel.from_pretrained.trust_remote_code",description:`<strong>trust_remote_code</strong> (<code>bool</code>, defaults to <code>False</code>) &#x2014;
Whether or not to allow for custom code defined on the Hub in their own modeling. This option should only be set
to <code>True</code> for repositories you trust and in which you have read the code, as it will execute code present on
the Hub on your local machine.`,name:"trust_remote_code"},{anchor:"optimum.onnxruntime.ORTModel.from_pretrained.revision",description:`<strong>revision</strong> (<code>Optional[str]</code>, defaults to <code>None</code>) &#x2014;
The specific model version to use. It can be a branch name, a tag name, or a commit id, since we use a
git-based system for storing models and other artifacts on huggingface.co, so <code>revision</code> can be any
identifier allowed by git.`,name:"revision"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L443",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The loaded ORTModel model.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>ORTModel</code></p>
`}}),sn=new R({props:{title:"Natural Language Processing",local:"natural-language-processing",headingTag:"h2"}}),an=new R({props:{title:"ORTModelForCausalLM",local:"optimum.onnxruntime.ORTModelForCausalLM",headingTag:"h3"}}),ln=new k({props:{name:"class optimum.onnxruntime.ORTModelForCausalLM",anchor:"optimum.onnxruntime.ORTModelForCausalLM",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"generation_config",val:": GenerationConfig | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_decoder.py#L123"}}),rn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForCausalLM.forward",parameters:[{name:"input_ids",val:": torch.LongTensor"},{name:"attention_mask",val:": torch.LongTensor | None = None"},{name:"past_key_values",val:": tuple[tuple[torch.Tensor]] | None = None"},{name:"position_ids",val:": torch.LongTensor | None = None"},{name:"use_cache",val:": bool | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary of shape <code>(batch_size, sequence_length)</code>.`,name:"input_ids"},{anchor:"optimum.onnxruntime.ORTModelForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code>) &#x2014;
Mask to avoid performing attention on padding token indices, of shape
<code>(batch_size, sequence_length)</code>. Mask values selected in <code>[0, 1]</code>.`,name:"attention_mask"},{anchor:"optimum.onnxruntime.ORTModelForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor), *optional*, defaults to </code>None<code>)</code> &#x2014;
Contains the precomputed key and value hidden states of the attention blocks used to speed up decoding.
The tuple is of length <code>config.n_layers</code> with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>.`,name:"past_key_values"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_decoder.py#L249"}}),tt=new W({props:{$$slots:{default:[Sp]},$$scope:{ctx:$}}}),nt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForCausalLM.forward.example",$$slots:{default:[qp]},$$scope:{ctx:$}}}),st=new x({props:{anchor:"optimum.onnxruntime.ORTModelForCausalLM.forward.example-2",$$slots:{default:[Hp]},$$scope:{ctx:$}}}),pn=new R({props:{title:"ORTModelForMaskedLM",local:"optimum.onnxruntime.ORTModelForMaskedLM",headingTag:"h3"}}),mn=new k({props:{name:"class optimum.onnxruntime.ORTModelForMaskedLM",anchor:"optimum.onnxruntime.ORTModelForMaskedLM",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L749"}}),cn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForMaskedLM.forward",parameters:[{name:"input_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"attention_mask",val:": torch.Tensor | np.ndarray | None = None"},{name:"token_type_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.
Indices can be obtained using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autotokenizer" rel="nofollow"><code>AutoTokenizer</code></a>.
See <a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.encode" rel="nofollow"><code>PreTrainedTokenizer.encode</code></a> and
<a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.__call__" rel="nofollow"><code>PreTrainedTokenizer.__call__</code></a> for details.
<a href="https://huggingface.co/docs/transformers/glossary#input-ids" rel="nofollow">What are input IDs?</a>`,name:"input_ids"},{anchor:"optimum.onnxruntime.ORTModelForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#attention-mask" rel="nofollow">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"optimum.onnxruntime.ORTModelForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>sentence A</strong>,</li>
<li>0 for tokens that are <strong>sentence B</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#token-type-ids" rel="nofollow">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L755"}}),ot=new W({props:{$$slots:{default:[Ep]},$$scope:{ctx:$}}}),at=new x({props:{anchor:"optimum.onnxruntime.ORTModelForMaskedLM.forward.example",$$slots:{default:[Qp]},$$scope:{ctx:$}}}),lt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForMaskedLM.forward.example-2",$$slots:{default:[Lp]},$$scope:{ctx:$}}}),dn=new R({props:{title:"ORTModelForSeq2SeqLM",local:"optimum.onnxruntime.ORTModelForSeq2SeqLM",headingTag:"h3"}}),un=new k({props:{name:"class optimum.onnxruntime.ORTModelForSeq2SeqLM",anchor:"optimum.onnxruntime.ORTModelForSeq2SeqLM",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"encoder_session",val:": InferenceSession = None"},{name:"decoder_session",val:": InferenceSession = None"},{name:"decoder_with_past_session",val:": InferenceSession | None = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"generation_config",val:": GenerationConfig | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_seq2seq.py#L1218"}}),gn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForSeq2SeqLM.forward",parameters:[{name:"input_ids",val:": torch.LongTensor = None"},{name:"attention_mask",val:": torch.FloatTensor | None = None"},{name:"decoder_input_ids",val:": torch.LongTensor | None = None"},{name:"decoder_attention_mask",val:": torch.LongTensor | None = None"},{name:"encoder_outputs",val:": BaseModelOutput | list[torch.FloatTensor] | None = None"},{name:"past_key_values",val:": tuple[tuple[torch.Tensor]] | None = None"},{name:"token_type_ids",val:": torch.LongTensor | None = None"},{name:"cache_position",val:": torch.Tensor | None = None"},{name:"use_cache",val:": bool | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForSeq2SeqLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code>) &#x2014;
Indices of input sequence tokens in the vocabulary of shape <code>(batch_size, encoder_sequence_length)</code>.`,name:"input_ids"},{anchor:"optimum.onnxruntime.ORTModelForSeq2SeqLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.LongTensor</code>) &#x2014;
Mask to avoid performing attention on padding token indices, of shape
<code>(batch_size, encoder_sequence_length)</code>. Mask values selected in <code>[0, 1]</code>.`,name:"attention_mask"},{anchor:"optimum.onnxruntime.ORTModelForSeq2SeqLM.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary of shape <code>(batch_size, decoder_sequence_length)</code>.`,name:"decoder_input_ids"},{anchor:"optimum.onnxruntime.ORTModelForSeq2SeqLM.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>torch.FloatTensor</code>) &#x2014;
The encoder <code>last_hidden_state</code> of shape <code>(batch_size, encoder_sequence_length, hidden_size)</code>.`,name:"encoder_outputs"},{anchor:"optimum.onnxruntime.ORTModelForSeq2SeqLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor), *optional*, defaults to </code>None<code>)</code> &#x2014;
Contains the precomputed key and value hidden states of the attention blocks used to speed up decoding.
The tuple is of length <code>config.n_layers</code> with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, decoder_sequence_length, embed_size_per_head)</code> and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.`,name:"past_key_values"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_seq2seq.py#L1226"}}),rt=new W({props:{$$slots:{default:[Op]},$$scope:{ctx:$}}}),it=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSeq2SeqLM.forward.example",$$slots:{default:[Yp]},$$scope:{ctx:$}}}),pt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSeq2SeqLM.forward.example-2",$$slots:{default:[Ap]},$$scope:{ctx:$}}}),hn=new R({props:{title:"ORTModelForSequenceClassification",local:"optimum.onnxruntime.ORTModelForSequenceClassification",headingTag:"h3"}}),fn=new k({props:{name:"class optimum.onnxruntime.ORTModelForSequenceClassification",anchor:"optimum.onnxruntime.ORTModelForSequenceClassification",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L963"}}),Mn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForSequenceClassification.forward",parameters:[{name:"input_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"attention_mask",val:": torch.Tensor | np.ndarray | None = None"},{name:"token_type_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.
Indices can be obtained using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autotokenizer" rel="nofollow"><code>AutoTokenizer</code></a>.
See <a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.encode" rel="nofollow"><code>PreTrainedTokenizer.encode</code></a> and
<a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.__call__" rel="nofollow"><code>PreTrainedTokenizer.__call__</code></a> for details.
<a href="https://huggingface.co/docs/transformers/glossary#input-ids" rel="nofollow">What are input IDs?</a>`,name:"input_ids"},{anchor:"optimum.onnxruntime.ORTModelForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#attention-mask" rel="nofollow">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"optimum.onnxruntime.ORTModelForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>sentence A</strong>,</li>
<li>0 for tokens that are <strong>sentence B</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#token-type-ids" rel="nofollow">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L971"}}),mt=new W({props:{$$slots:{default:[Pp]},$$scope:{ctx:$}}}),ct=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSequenceClassification.forward.example",$$slots:{default:[Dp]},$$scope:{ctx:$}}}),dt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSequenceClassification.forward.example-2",$$slots:{default:[Kp]},$$scope:{ctx:$}}}),ut=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSequenceClassification.forward.example-3",$$slots:{default:[em]},$$scope:{ctx:$}}}),bn=new R({props:{title:"ORTModelForTokenClassification",local:"optimum.onnxruntime.ORTModelForTokenClassification",headingTag:"h3"}}),Tn=new k({props:{name:"class optimum.onnxruntime.ORTModelForTokenClassification",anchor:"optimum.onnxruntime.ORTModelForTokenClassification",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1064"}}),yn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForTokenClassification.forward",parameters:[{name:"input_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"attention_mask",val:": torch.Tensor | np.ndarray | None = None"},{name:"token_type_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.
Indices can be obtained using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autotokenizer" rel="nofollow"><code>AutoTokenizer</code></a>.
See <a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.encode" rel="nofollow"><code>PreTrainedTokenizer.encode</code></a> and
<a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.__call__" rel="nofollow"><code>PreTrainedTokenizer.__call__</code></a> for details.
<a href="https://huggingface.co/docs/transformers/glossary#input-ids" rel="nofollow">What are input IDs?</a>`,name:"input_ids"},{anchor:"optimum.onnxruntime.ORTModelForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#attention-mask" rel="nofollow">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"optimum.onnxruntime.ORTModelForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>sentence A</strong>,</li>
<li>0 for tokens that are <strong>sentence B</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#token-type-ids" rel="nofollow">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1073"}}),gt=new W({props:{$$slots:{default:[tm]},$$scope:{ctx:$}}}),ht=new x({props:{anchor:"optimum.onnxruntime.ORTModelForTokenClassification.forward.example",$$slots:{default:[nm]},$$scope:{ctx:$}}}),ft=new x({props:{anchor:"optimum.onnxruntime.ORTModelForTokenClassification.forward.example-2",$$slots:{default:[sm]},$$scope:{ctx:$}}}),_n=new R({props:{title:"ORTModelForMultipleChoice",local:"optimum.onnxruntime.ORTModelForMultipleChoice",headingTag:"h3"}}),wn=new k({props:{name:"class optimum.onnxruntime.ORTModelForMultipleChoice",anchor:"optimum.onnxruntime.ORTModelForMultipleChoice",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1160"}}),$n=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForMultipleChoice.forward",parameters:[{name:"input_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"attention_mask",val:": torch.Tensor | np.ndarray | None = None"},{name:"token_type_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.
Indices can be obtained using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autotokenizer" rel="nofollow"><code>AutoTokenizer</code></a>.
See <a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.encode" rel="nofollow"><code>PreTrainedTokenizer.encode</code></a> and
<a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.__call__" rel="nofollow"><code>PreTrainedTokenizer.__call__</code></a> for details.
<a href="https://huggingface.co/docs/transformers/glossary#input-ids" rel="nofollow">What are input IDs?</a>`,name:"input_ids"},{anchor:"optimum.onnxruntime.ORTModelForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#attention-mask" rel="nofollow">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"optimum.onnxruntime.ORTModelForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>sentence A</strong>,</li>
<li>0 for tokens that are <strong>sentence B</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#token-type-ids" rel="nofollow">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1168"}}),Mt=new W({props:{$$slots:{default:[om]},$$scope:{ctx:$}}}),bt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForMultipleChoice.forward.example",$$slots:{default:[am]},$$scope:{ctx:$}}}),vn=new R({props:{title:"ORTModelForQuestionAnswering",local:"optimum.onnxruntime.ORTModelForQuestionAnswering",headingTag:"h3"}}),Jn=new k({props:{name:"class optimum.onnxruntime.ORTModelForQuestionAnswering",anchor:"optimum.onnxruntime.ORTModelForQuestionAnswering",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L848"}}),jn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"attention_mask",val:": torch.Tensor | np.ndarray | None = None"},{name:"token_type_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.
Indices can be obtained using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autotokenizer" rel="nofollow"><code>AutoTokenizer</code></a>.
See <a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.encode" rel="nofollow"><code>PreTrainedTokenizer.encode</code></a> and
<a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.__call__" rel="nofollow"><code>PreTrainedTokenizer.__call__</code></a> for details.
<a href="https://huggingface.co/docs/transformers/glossary#input-ids" rel="nofollow">What are input IDs?</a>`,name:"input_ids"},{anchor:"optimum.onnxruntime.ORTModelForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#attention-mask" rel="nofollow">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"optimum.onnxruntime.ORTModelForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>sentence A</strong>,</li>
<li>0 for tokens that are <strong>sentence B</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#token-type-ids" rel="nofollow">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L854"}}),Tt=new W({props:{$$slots:{default:[lm]},$$scope:{ctx:$}}}),yt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForQuestionAnswering.forward.example",$$slots:{default:[rm]},$$scope:{ctx:$}}}),_t=new x({props:{anchor:"optimum.onnxruntime.ORTModelForQuestionAnswering.forward.example-2",$$slots:{default:[im]},$$scope:{ctx:$}}}),kn=new R({props:{title:"Computer vision",local:"computer-vision",headingTag:"h2"}}),Un=new R({props:{title:"ORTModelForImageClassification",local:"optimum.onnxruntime.ORTModelForImageClassification",headingTag:"h3"}}),Rn=new k({props:{name:"class optimum.onnxruntime.ORTModelForImageClassification",anchor:"optimum.onnxruntime.ORTModelForImageClassification",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1265"}}),Zn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForImageClassification.forward",parameters:[{name:"pixel_values",val:": torch.Tensor | np.ndarray"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForImageClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, num_channels, height, width)</code>, defaults to <code>None</code>) &#x2014;
Pixel values corresponding to the images in the current batch.
Pixel values can be obtained from encoded images using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autofeatureextractor" rel="nofollow"><code>AutoFeatureExtractor</code></a>.`,name:"pixel_values"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1270"}}),wt=new W({props:{$$slots:{default:[pm]},$$scope:{ctx:$}}}),$t=new x({props:{anchor:"optimum.onnxruntime.ORTModelForImageClassification.forward.example",$$slots:{default:[mm]},$$scope:{ctx:$}}}),vt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForImageClassification.forward.example-2",$$slots:{default:[cm]},$$scope:{ctx:$}}}),Wn=new R({props:{title:"ORTModelForSemanticSegmentation",local:"optimum.onnxruntime.ORTModelForSemanticSegmentation",headingTag:"h3"}}),Fn=new k({props:{name:"class optimum.onnxruntime.ORTModelForSemanticSegmentation",anchor:"optimum.onnxruntime.ORTModelForSemanticSegmentation",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1360"}}),Nn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForSemanticSegmentation.forward",parameters:[{name:"pixel_values",val:": torch.Tensor | np.ndarray"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForSemanticSegmentation.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, num_channels, height, width)</code>, defaults to <code>None</code>) &#x2014;
Pixel values corresponding to the images in the current batch.
Pixel values can be obtained from encoded images using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autofeatureextractor" rel="nofollow"><code>AutoFeatureExtractor</code></a>.`,name:"pixel_values"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1374"}}),Jt=new W({props:{$$slots:{default:[dm]},$$scope:{ctx:$}}}),jt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSemanticSegmentation.forward.example",$$slots:{default:[um]},$$scope:{ctx:$}}}),kt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSemanticSegmentation.forward.example-2",$$slots:{default:[gm]},$$scope:{ctx:$}}}),Cn=new R({props:{title:"Audio",local:"audio",headingTag:"h2"}}),Vn=new R({props:{title:"ORTModelForAudioClassification",local:"optimum.onnxruntime.ORTModelForAudioClassification",headingTag:"h3"}}),In=new k({props:{name:"class optimum.onnxruntime.ORTModelForAudioClassification",anchor:"optimum.onnxruntime.ORTModelForAudioClassification",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1479"}}),Xn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForAudioClassification.forward",parameters:[{name:"input_values",val:": torch.Tensor | np.ndarray | None = None"},{name:"attention_mask",val:": torch.Tensor | np.ndarray | None = None"},{name:"input_features",val:": torch.Tensor | np.ndarray | None = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForAudioClassification.forward.input_values",description:`<strong>input_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform..
Input values can be obtained from audio file loaded into an array using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autofeatureextractor" rel="nofollow"><code>AutoFeatureExtractor</code></a>.`,name:"input_values"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1487"}}),xt=new W({props:{$$slots:{default:[hm]},$$scope:{ctx:$}}}),Ut=new x({props:{anchor:"optimum.onnxruntime.ORTModelForAudioClassification.forward.example",$$slots:{default:[fm]},$$scope:{ctx:$}}}),Rt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForAudioClassification.forward.example-2",$$slots:{default:[Mm]},$$scope:{ctx:$}}}),zn=new R({props:{title:"ORTModelForAudioFrameClassification",local:"optimum.onnxruntime.ORTModelForAudioFrameClassification",headingTag:"h3"}}),Bn=new k({props:{name:"class optimum.onnxruntime.ORTModelForAudioFrameClassification",anchor:"optimum.onnxruntime.ORTModelForAudioFrameClassification",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1768"}}),Sn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForAudioFrameClassification.forward",parameters:[{name:"input_values",val:": torch.Tensor | np.ndarray | None = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForAudioFrameClassification.forward.input_values",description:`<strong>input_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform..
Input values can be obtained from audio file loaded into an array using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autofeatureextractor" rel="nofollow"><code>AutoFeatureExtractor</code></a>.`,name:"input_values"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1774"}}),Zt=new W({props:{$$slots:{default:[bm]},$$scope:{ctx:$}}}),Wt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForAudioFrameClassification.forward.example",$$slots:{default:[Tm]},$$scope:{ctx:$}}}),qn=new R({props:{title:"ORTModelForCTC",local:"optimum.onnxruntime.ORTModelForCTC",headingTag:"h3"}}),Hn=new k({props:{name:"class optimum.onnxruntime.ORTModelForCTC",anchor:"optimum.onnxruntime.ORTModelForCTC",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1581"}}),En=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForCTC.forward",parameters:[{name:"input_values",val:": torch.Tensor | np.ndarray | None = None"},{name:"input_features",val:": torch.Tensor | np.ndarray | None = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForCTC.forward.input_values",description:`<strong>input_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform..
Input values can be obtained from audio file loaded into an array using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autofeatureextractor" rel="nofollow"><code>AutoFeatureExtractor</code></a>.`,name:"input_values"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1587"}}),Ft=new W({props:{$$slots:{default:[ym]},$$scope:{ctx:$}}}),Nt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForCTC.forward.example",$$slots:{default:[_m]},$$scope:{ctx:$}}}),Qn=new R({props:{title:"ORTModelForSpeechSeq2Seq",local:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq",headingTag:"h3"}}),Ln=new k({props:{name:"class optimum.onnxruntime.ORTModelForSpeechSeq2Seq",anchor:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_seq2seq.py#L1283"}}),On=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq.forward",parameters:[{name:"input_features",val:": torch.FloatTensor | None = None"},{name:"attention_mask",val:": torch.LongTensor | None = None"},{name:"decoder_input_ids",val:": torch.LongTensor | None = None"},{name:"decoder_attention_mask",val:": torch.LongTensor | None = None"},{name:"encoder_outputs",val:": tuple[tuple[torch.Tensor]] | None = None"},{name:"past_key_values",val:": tuple[tuple[torch.Tensor]] | None = None"},{name:"cache_position",val:": torch.Tensor | None = None"},{name:"use_cache",val:": bool | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq.forward.input_features",description:`<strong>input_features</strong> (<code>torch.FloatTensor</code>) &#x2014;
Mel features extracted from the raw speech waveform.
<code>(batch_size, feature_size, encoder_sequence_length)</code>.`,name:"input_features"},{anchor:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary of shape <code>(batch_size, decoder_sequence_length)</code>.`,name:"decoder_input_ids"},{anchor:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>torch.FloatTensor</code>) &#x2014;
The encoder <code>last_hidden_state</code> of shape <code>(batch_size, encoder_sequence_length, hidden_size)</code>.`,name:"encoder_outputs"},{anchor:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor), *optional*, defaults to </code>None<code>)</code> &#x2014;
Contains the precomputed key and value hidden states of the attention blocks used to speed up decoding.
The tuple is of length <code>config.n_layers</code> with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, decoder_sequence_length, embed_size_per_head)</code> and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.`,name:"past_key_values"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_seq2seq.py#L1308"}}),Ct=new W({props:{$$slots:{default:[wm]},$$scope:{ctx:$}}}),Gt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq.forward.example",$$slots:{default:[$m]},$$scope:{ctx:$}}}),Vt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq.forward.example-2",$$slots:{default:[vm]},$$scope:{ctx:$}}}),Yn=new R({props:{title:"ORTModelForAudioXVector",local:"optimum.onnxruntime.ORTModelForAudioXVector",headingTag:"h3"}}),An=new k({props:{name:"class optimum.onnxruntime.ORTModelForAudioXVector",anchor:"optimum.onnxruntime.ORTModelForAudioXVector",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1682"}}),Pn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForAudioXVector.forward",parameters:[{name:"input_values",val:": torch.Tensor | np.ndarray | None = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForAudioXVector.forward.input_values",description:`<strong>input_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Float values of input raw speech waveform..
Input values can be obtained from audio file loaded into an array using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autofeatureextractor" rel="nofollow"><code>AutoFeatureExtractor</code></a>.`,name:"input_values"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1688"}}),It=new W({props:{$$slots:{default:[Jm]},$$scope:{ctx:$}}}),Xt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForAudioXVector.forward.example",$$slots:{default:[jm]},$$scope:{ctx:$}}}),Dn=new R({props:{title:"Multimodal",local:"multimodal",headingTag:"h2"}}),es=new R({props:{title:"ORTModelForVision2Seq",local:"optimum.onnxruntime.ORTModelForVision2Seq",headingTag:"h3"}}),ts=new k({props:{name:"class optimum.onnxruntime.ORTModelForVision2Seq",anchor:"optimum.onnxruntime.ORTModelForVision2Seq",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"encoder_session",val:": InferenceSession = None"},{name:"decoder_session",val:": InferenceSession = None"},{name:"decoder_with_past_session",val:": InferenceSession | None = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"generation_config",val:": GenerationConfig | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_seq2seq.py#L1455"}}),ns=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForVision2Seq.forward",parameters:[{name:"pixel_values",val:": torch.FloatTensor | None = None"},{name:"attention_mask",val:": torch.LongTensor | None = None"},{name:"decoder_input_ids",val:": torch.LongTensor | None = None"},{name:"decoder_attention_mask",val:": torch.BoolTensor | None = None"},{name:"encoder_outputs",val:": BaseModelOutput | list[torch.FloatTensor] | None = None"},{name:"past_key_values",val:": tuple[tuple[torch.Tensor]] | None = None"},{name:"cache_position",val:": torch.Tensor | None = None"},{name:"use_cache",val:": bool | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForVision2Seq.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code>) &#x2014;
Features extracted from an Image. This tensor should be of shape
<code>(batch_size, num_channels, height, width)</code>.`,name:"pixel_values"},{anchor:"optimum.onnxruntime.ORTModelForVision2Seq.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary of shape <code>(batch_size, decoder_sequence_length)</code>.`,name:"decoder_input_ids"},{anchor:"optimum.onnxruntime.ORTModelForVision2Seq.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>torch.FloatTensor</code>) &#x2014;
The encoder <code>last_hidden_state</code> of shape <code>(batch_size, encoder_sequence_length, hidden_size)</code>.`,name:"encoder_outputs"},{anchor:"optimum.onnxruntime.ORTModelForVision2Seq.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor), *optional*, defaults to </code>None<code>)</code> &#x2014;
Contains the precomputed key and value hidden states of the attention blocks used to speed up decoding.
The tuple is of length <code>config.n_layers</code> with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, decoder_sequence_length, embed_size_per_head)</code> and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.`,name:"past_key_values"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_seq2seq.py#L1470"}}),zt=new W({props:{$$slots:{default:[km]},$$scope:{ctx:$}}}),Bt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForVision2Seq.forward.example",$$slots:{default:[xm]},$$scope:{ctx:$}}}),St=new x({props:{anchor:"optimum.onnxruntime.ORTModelForVision2Seq.forward.example-2",$$slots:{default:[Um]},$$scope:{ctx:$}}}),ss=new R({props:{title:"ORTModelForPix2Struct",local:"optimum.onnxruntime.ORTModelForPix2Struct",headingTag:"h3"}}),os=new k({props:{name:"class optimum.onnxruntime.ORTModelForPix2Struct",anchor:"optimum.onnxruntime.ORTModelForPix2Struct",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"encoder_session",val:": InferenceSession = None"},{name:"decoder_session",val:": InferenceSession = None"},{name:"decoder_with_past_session",val:": InferenceSession | None = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"generation_config",val:": GenerationConfig | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_seq2seq.py#L1527"}}),as=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForPix2Struct.forward",parameters:[{name:"flattened_patches",val:": torch.FloatTensor | None = None"},{name:"attention_mask",val:": torch.LongTensor | None = None"},{name:"decoder_input_ids",val:": torch.LongTensor | None = None"},{name:"decoder_attention_mask",val:": torch.BoolTensor | None = None"},{name:"encoder_outputs",val:": BaseModelOutput | list[torch.FloatTensor] | None = None"},{name:"past_key_values",val:": tuple[tuple[torch.Tensor]] | None = None"},{name:"use_cache",val:": bool | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForPix2Struct.forward.flattened_patches",description:`<strong>flattened_patches</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, seq_length, hidden_size)</code>) &#x2014;
Flattened pixel patches. the <code>hidden_size</code> is obtained by the following formula: <code>hidden_size</code> =
<code>num_channels</code> <em> <code>patch_size</code> </em> <code>patch_size</code>
The process of flattening the pixel patches is done by <code>Pix2StructProcessor</code>.`,name:"flattened_patches"},{anchor:"optimum.onnxruntime.ORTModelForPix2Struct.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices.`,name:"attention_mask"},{anchor:"optimum.onnxruntime.ORTModelForPix2Struct.forward.decoder_input_ids",description:`<strong>decoder_input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of decoder input sequence tokens in the vocabulary.
Pix2StructText uses the <code>pad_token_id</code> as the starting token for <code>decoder_input_ids</code> generation. If
<code>past_key_values</code> is used, optionally only the last <code>decoder_input_ids</code> have to be input (see
<code>past_key_values</code>).`,name:"decoder_input_ids"},{anchor:"optimum.onnxruntime.ORTModelForPix2Struct.forward.decoder_attention_mask",description:`<strong>decoder_attention_mask</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, target_sequence_length)</code>, <em>optional</em>) &#x2014;
Default behavior: generate a tensor that ignores pad tokens in <code>decoder_input_ids</code>. Causal mask will also
be used by default.`,name:"decoder_attention_mask"},{anchor:"optimum.onnxruntime.ORTModelForPix2Struct.forward.encoder_outputs",description:`<strong>encoder_outputs</strong> (<code>tuple(tuple(torch.FloatTensor)</code>, <em>optional</em>) &#x2014;
Tuple consists of (<code>last_hidden_state</code>, <code>optional</code>: <em>hidden_states</em>, <code>optional</code>: <em>attentions</em>)
<code>last_hidden_state</code> of shape <code>(batch_size, sequence_length, hidden_size)</code> is a sequence of hidden states at
the output of the last layer of the encoder. Used in the cross-attention of the decoder.`,name:"encoder_outputs"},{anchor:"optimum.onnxruntime.ORTModelForPix2Struct.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor), *optional*, defaults to </code>None<code>)</code> &#x2014;
Contains the precomputed key and value hidden states of the attention blocks used to speed up decoding.
The tuple is of length <code>config.n_layers</code> with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, decoder_sequence_length, embed_size_per_head)</code> and 2 additional tensors of shape
<code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.`,name:"past_key_values"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_seq2seq.py#L1540"}}),qt=new W({props:{$$slots:{default:[Rm]},$$scope:{ctx:$}}}),Ht=new x({props:{anchor:"optimum.onnxruntime.ORTModelForPix2Struct.forward.example",$$slots:{default:[Zm]},$$scope:{ctx:$}}}),ls=new R({props:{title:"Custom Tasks",local:"custom-tasks",headingTag:"h2"}}),is=new R({props:{title:"ORTModelForCustomTasks",local:"optimum.onnxruntime.ORTModelForCustomTasks",headingTag:"h4"}}),ps=new k({props:{name:"class optimum.onnxruntime.ORTModelForCustomTasks",anchor:"optimum.onnxruntime.ORTModelForCustomTasks",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1933"}}),ms=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForCustomTasks.forward",parameters:[{name:"**model_inputs",val:": torch.Tensor | np.ndarray"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L1936"}}),Et=new W({props:{$$slots:{default:[Wm]},$$scope:{ctx:$}}}),Qt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForCustomTasks.forward.example",$$slots:{default:[Fm]},$$scope:{ctx:$}}}),Lt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForCustomTasks.forward.example-2",$$slots:{default:[Nm]},$$scope:{ctx:$}}}),cs=new R({props:{title:"ORTModelForFeatureExtraction",local:"optimum.onnxruntime.ORTModelForFeatureExtraction",headingTag:"h4"}}),ds=new k({props:{name:"class optimum.onnxruntime.ORTModelForFeatureExtraction",anchor:"optimum.onnxruntime.ORTModelForFeatureExtraction",parameters:[{name:"config",val:": PretrainedConfig = None"},{name:"session",val:": InferenceSession = None"},{name:"use_io_binding",val:": bool | None = None"},{name:"model_save_dir",val:": str | Path | TemporaryDirectory | None = None"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L623"}}),us=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForFeatureExtraction.forward",parameters:[{name:"input_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"attention_mask",val:": torch.Tensor | np.ndarray | None = None"},{name:"token_type_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"position_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"pixel_values",val:": torch.Tensor | np.ndarray | None = None"},{name:"visual_embeds",val:": torch.Tensor | np.ndarray | None = None"},{name:"visual_attention_mask",val:": torch.Tensor | np.ndarray | None = None"},{name:"visual_token_type_ids",val:": torch.Tensor | np.ndarray | None = None"},{name:"input_features",val:": torch.Tensor | np.ndarray | None = None"},{name:"input_values",val:": torch.Tensor | np.ndarray | None = None"},{name:"return_dict",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForFeatureExtraction.forward.input_ids",description:`<strong>input_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.
Indices can be obtained using <a href="https://huggingface.co/docs/transformers/autoclass_tutorial#autotokenizer" rel="nofollow"><code>AutoTokenizer</code></a>.
See <a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.encode" rel="nofollow"><code>PreTrainedTokenizer.encode</code></a> and
<a href="https://huggingface.co/docs/transformers/main_classes/tokenizer#transformers.PreTrainedTokenizerBase.__call__" rel="nofollow"><code>PreTrainedTokenizer.__call__</code></a> for details.
<a href="https://huggingface.co/docs/transformers/glossary#input-ids" rel="nofollow">What are input IDs?</a>`,name:"input_ids"},{anchor:"optimum.onnxruntime.ORTModelForFeatureExtraction.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#attention-mask" rel="nofollow">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"optimum.onnxruntime.ORTModelForFeatureExtraction.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Union[torch.Tensor, np.ndarray, None]</code> of shape <code>(batch_size, sequence_length)</code>, defaults to <code>None</code>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:<ul>
<li>1 for tokens that are <strong>sentence A</strong>,</li>
<li>0 for tokens that are <strong>sentence B</strong>.
<a href="https://huggingface.co/docs/transformers/glossary#token-type-ids" rel="nofollow">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"}],source:"https://github.com/huggingface/optimum-onnx/blob/vr_68/optimum/onnxruntime/modeling_ort.py#L629"}}),Ot=new W({props:{$$slots:{default:[Cm]},$$scope:{ctx:$}}}),Yt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForFeatureExtraction.forward.example",$$slots:{default:[Gm]},$$scope:{ctx:$}}}),At=new x({props:{anchor:"optimum.onnxruntime.ORTModelForFeatureExtraction.forward.example-2",$$slots:{default:[Vm]},$$scope:{ctx:$}}}),{c(){n=c("meta"),g=l(),o=c("p"),s=l(),h(m.$$.fragment),t=l(),h(_.$$.fragment),Zo=l(),h(Pt.$$.fragment),Wo=l(),Dt=c("p"),Dt.textContent=ai,Fo=l(),h(Kt.$$.fragment),No=l(),Z=c("div"),h(en.$$.fragment),Ua=l(),hs=c("p"),hs.textContent=li,Ra=l(),fs=c("p"),fs.innerHTML=ri,Za=l(),Ms=c("p"),Ms.textContent=ii,Wa=l(),bs=c("ul"),bs.innerHTML=pi,Fa=l(),et=c("div"),h(tn.$$.fragment),Na=l(),Ts=c("p"),Ts.innerHTML=mi,Ca=l(),N=c("div"),h(nn.$$.fragment),Ga=l(),ys=c("p"),ys.textContent=ci,Va=l(),_s=c("p"),_s.innerHTML=di,Ia=l(),ws=c("blockquote"),ws.innerHTML=ui,Xa=l(),$s=c("p"),$s.innerHTML=gi,za=l(),vs=c("p"),vs.innerHTML=hi,Co=l(),h(sn.$$.fragment),Go=l(),on=c("p"),on.textContent=fi,Vo=l(),h(an.$$.fragment),Io=l(),ee=c("div"),h(ln.$$.fragment),Ba=l(),Js=c("p"),Js.innerHTML=Mi,Sa=l(),js=c("p"),js.innerHTML=bi,qa=l(),S=c("div"),h(rn.$$.fragment),Ha=l(),ks=c("p"),ks.innerHTML=Ti,Ea=l(),h(tt.$$.fragment),Qa=l(),h(nt.$$.fragment),La=l(),h(st.$$.fragment),Xo=l(),h(pn.$$.fragment),zo=l(),te=c("div"),h(mn.$$.fragment),Oa=l(),xs=c("p"),xs.innerHTML=yi,Ya=l(),Us=c("p"),Us.innerHTML=_i,Aa=l(),q=c("div"),h(cn.$$.fragment),Pa=l(),Rs=c("p"),Rs.innerHTML=wi,Da=l(),h(ot.$$.fragment),Ka=l(),h(at.$$.fragment),el=l(),h(lt.$$.fragment),Bo=l(),h(dn.$$.fragment),So=l(),ne=c("div"),h(un.$$.fragment),tl=l(),Zs=c("p"),Zs.innerHTML=$i,nl=l(),Ws=c("p"),Ws.innerHTML=vi,sl=l(),H=c("div"),h(gn.$$.fragment),ol=l(),Fs=c("p"),Fs.innerHTML=Ji,al=l(),h(rt.$$.fragment),ll=l(),h(it.$$.fragment),rl=l(),h(pt.$$.fragment),qo=l(),h(hn.$$.fragment),Ho=l(),G=c("div"),h(fn.$$.fragment),il=l(),Ns=c("p"),Ns.textContent=ji,pl=l(),Cs=c("p"),Cs.innerHTML=ki,ml=l(),Gs=c("p"),Gs.innerHTML=xi,cl=l(),C=c("div"),h(Mn.$$.fragment),dl=l(),Vs=c("p"),Vs.innerHTML=Ui,ul=l(),h(mt.$$.fragment),gl=l(),h(ct.$$.fragment),hl=l(),h(dt.$$.fragment),fl=l(),h(ut.$$.fragment),Eo=l(),h(bn.$$.fragment),Qo=l(),V=c("div"),h(Tn.$$.fragment),Ml=l(),Is=c("p"),Is.textContent=Ri,bl=l(),Xs=c("p"),Xs.innerHTML=Zi,Tl=l(),zs=c("p"),zs.innerHTML=Wi,yl=l(),E=c("div"),h(yn.$$.fragment),_l=l(),Bs=c("p"),Bs.innerHTML=Fi,wl=l(),h(gt.$$.fragment),$l=l(),h(ht.$$.fragment),vl=l(),h(ft.$$.fragment),Lo=l(),h(_n.$$.fragment),Oo=l(),I=c("div"),h(wn.$$.fragment),Jl=l(),Ss=c("p"),Ss.textContent=Ni,jl=l(),qs=c("p"),qs.innerHTML=Ci,kl=l(),Hs=c("p"),Hs.innerHTML=Gi,xl=l(),Re=c("div"),h($n.$$.fragment),Ul=l(),Es=c("p"),Es.innerHTML=Vi,Rl=l(),h(Mt.$$.fragment),Zl=l(),h(bt.$$.fragment),Yo=l(),h(vn.$$.fragment),Ao=l(),se=c("div"),h(Jn.$$.fragment),Wl=l(),Qs=c("p"),Qs.innerHTML=Ii,Fl=l(),Ls=c("p"),Ls.innerHTML=Xi,Nl=l(),Q=c("div"),h(jn.$$.fragment),Cl=l(),Os=c("p"),Os.innerHTML=zi,Gl=l(),h(Tt.$$.fragment),Vl=l(),h(yt.$$.fragment),Il=l(),h(_t.$$.fragment),Po=l(),h(kn.$$.fragment),Do=l(),xn=c("p"),xn.textContent=Bi,Ko=l(),h(Un.$$.fragment),ea=l(),oe=c("div"),h(Rn.$$.fragment),Xl=l(),Ys=c("p"),Ys.innerHTML=Si,zl=l(),As=c("p"),As.innerHTML=qi,Bl=l(),L=c("div"),h(Zn.$$.fragment),Sl=l(),Ps=c("p"),Ps.innerHTML=Hi,ql=l(),h(wt.$$.fragment),Hl=l(),h($t.$$.fragment),El=l(),h(vt.$$.fragment),ta=l(),h(Wn.$$.fragment),na=l(),ae=c("div"),h(Fn.$$.fragment),Ql=l(),Ds=c("p"),Ds.innerHTML=Ei,Ll=l(),Ks=c("p"),Ks.innerHTML=Qi,Ol=l(),O=c("div"),h(Nn.$$.fragment),Yl=l(),eo=c("p"),eo.innerHTML=Li,Al=l(),h(Jt.$$.fragment),Pl=l(),h(jt.$$.fragment),Dl=l(),h(kt.$$.fragment),sa=l(),h(Cn.$$.fragment),oa=l(),Gn=c("p"),Gn.textContent=Oi,aa=l(),h(Vn.$$.fragment),la=l(),X=c("div"),h(In.$$.fragment),Kl=l(),to=c("p"),to.textContent=Yi,er=l(),no=c("p"),no.innerHTML=Ai,tr=l(),so=c("p"),so.innerHTML=Pi,nr=l(),Y=c("div"),h(Xn.$$.fragment),sr=l(),oo=c("p"),oo.innerHTML=Di,or=l(),h(xt.$$.fragment),ar=l(),h(Ut.$$.fragment),lr=l(),h(Rt.$$.fragment),ra=l(),h(zn.$$.fragment),ia=l(),le=c("div"),h(Bn.$$.fragment),rr=l(),ao=c("p"),ao.innerHTML=Ki,ir=l(),lo=c("p"),lo.innerHTML=ep,pr=l(),Ze=c("div"),h(Sn.$$.fragment),mr=l(),ro=c("p"),ro.innerHTML=tp,cr=l(),h(Zt.$$.fragment),dr=l(),h(Wt.$$.fragment),pa=l(),h(qn.$$.fragment),ma=l(),re=c("div"),h(Hn.$$.fragment),ur=l(),io=c("p"),io.innerHTML=np,gr=l(),po=c("p"),po.innerHTML=sp,hr=l(),We=c("div"),h(En.$$.fragment),fr=l(),mo=c("p"),mo.innerHTML=op,Mr=l(),h(Ft.$$.fragment),br=l(),h(Nt.$$.fragment),ca=l(),h(Qn.$$.fragment),da=l(),ie=c("div"),h(Ln.$$.fragment),Tr=l(),co=c("p"),co.innerHTML=ap,yr=l(),uo=c("p"),uo.innerHTML=lp,_r=l(),A=c("div"),h(On.$$.fragment),wr=l(),go=c("p"),go.innerHTML=rp,$r=l(),h(Ct.$$.fragment),vr=l(),h(Gt.$$.fragment),Jr=l(),h(Vt.$$.fragment),ua=l(),h(Yn.$$.fragment),ga=l(),pe=c("div"),h(An.$$.fragment),jr=l(),ho=c("p"),ho.innerHTML=ip,kr=l(),fo=c("p"),fo.innerHTML=pp,xr=l(),Fe=c("div"),h(Pn.$$.fragment),Ur=l(),Mo=c("p"),Mo.innerHTML=mp,Rr=l(),h(It.$$.fragment),Zr=l(),h(Xt.$$.fragment),ha=l(),h(Dn.$$.fragment),fa=l(),Kn=c("p"),Kn.textContent=cp,Ma=l(),h(es.$$.fragment),ba=l(),me=c("div"),h(ts.$$.fragment),Wr=l(),bo=c("p"),bo.innerHTML=dp,Fr=l(),To=c("p"),To.innerHTML=up,Nr=l(),P=c("div"),h(ns.$$.fragment),Cr=l(),yo=c("p"),yo.innerHTML=gp,Gr=l(),h(zt.$$.fragment),Vr=l(),h(Bt.$$.fragment),Ir=l(),h(St.$$.fragment),Ta=l(),h(ss.$$.fragment),ya=l(),ce=c("div"),h(os.$$.fragment),Xr=l(),_o=c("p"),_o.innerHTML=hp,zr=l(),wo=c("p"),wo.innerHTML=fp,Br=l(),Ne=c("div"),h(as.$$.fragment),Sr=l(),$o=c("p"),$o.innerHTML=Mp,qr=l(),h(qt.$$.fragment),Hr=l(),h(Ht.$$.fragment),_a=l(),h(ls.$$.fragment),wa=l(),rs=c("p"),rs.textContent=bp,$a=l(),h(is.$$.fragment),va=l(),de=c("div"),h(ps.$$.fragment),Er=l(),vo=c("p"),vo.innerHTML=Tp,Qr=l(),Jo=c("p"),Jo.innerHTML=yp,Lr=l(),D=c("div"),h(ms.$$.fragment),Or=l(),jo=c("p"),jo.innerHTML=_p,Yr=l(),h(Et.$$.fragment),Ar=l(),h(Qt.$$.fragment),Pr=l(),h(Lt.$$.fragment),Ja=l(),h(cs.$$.fragment),ja=l(),ue=c("div"),h(ds.$$.fragment),Dr=l(),ko=c("p"),ko.innerHTML=wp,Kr=l(),xo=c("p"),xo.innerHTML=$p,ei=l(),K=c("div"),h(us.$$.fragment),ti=l(),Uo=c("p"),Uo.innerHTML=vp,ni=l(),h(Ot.$$.fragment),si=l(),h(Yt.$$.fragment),oi=l(),h(At.$$.fragment),ka=l(),Ro=c("p"),this.h()},l(e){const i=zp("svelte-u9bgzb",document.head);n=d(i,"META",{name:!0,content:!0}),i.forEach(p),g=r(e),o=d(e,"P",{}),J(o).forEach(p),s=r(e),f(m.$$.fragment,e),t=r(e),f(_.$$.fragment,e),Zo=r(e),f(Pt.$$.fragment,e),Wo=r(e),Dt=d(e,"P",{"data-svelte-h":!0}),w(Dt)!=="svelte-uyecg"&&(Dt.textContent=ai),Fo=r(e),f(Kt.$$.fragment,e),No=r(e),Z=d(e,"DIV",{class:!0});var F=J(Z);f(en.$$.fragment,F),Ua=r(F),hs=d(F,"P",{"data-svelte-h":!0}),w(hs)!=="svelte-12yueui"&&(hs.textContent=li),Ra=r(F),fs=d(F,"P",{"data-svelte-h":!0}),w(fs)!=="svelte-zarm0s"&&(fs.innerHTML=ri),Za=r(F),Ms=d(F,"P",{"data-svelte-h":!0}),w(Ms)!=="svelte-wz8va1"&&(Ms.textContent=ii),Wa=r(F),bs=d(F,"UL",{"data-svelte-h":!0}),w(bs)!=="svelte-qpxha0"&&(bs.innerHTML=pi),Fa=r(F),et=d(F,"DIV",{class:!0});var gs=J(et);f(tn.$$.fragment,gs),Na=r(gs),Ts=d(gs,"P",{"data-svelte-h":!0}),w(Ts)!=="svelte-1r2xt0l"&&(Ts.innerHTML=mi),gs.forEach(p),Ca=r(F),N=d(F,"DIV",{class:!0});var z=J(N);f(nn.$$.fragment,z),Ga=r(z),ys=d(z,"P",{"data-svelte-h":!0}),w(ys)!=="svelte-18vxhwp"&&(ys.textContent=ci),Va=r(z),_s=d(z,"P",{"data-svelte-h":!0}),w(_s)!=="svelte-1mrbn81"&&(_s.innerHTML=di),Ia=r(z),ws=d(z,"BLOCKQUOTE",{"data-svelte-h":!0}),w(ws)!=="svelte-1uv5y3f"&&(ws.innerHTML=ui),Xa=r(z),$s=d(z,"P",{"data-svelte-h":!0}),w($s)!=="svelte-vzi3zk"&&($s.innerHTML=gi),za=r(z),vs=d(z,"P",{"data-svelte-h":!0}),w(vs)!=="svelte-111jrpf"&&(vs.innerHTML=hi),z.forEach(p),F.forEach(p),Co=r(e),f(sn.$$.fragment,e),Go=r(e),on=d(e,"P",{"data-svelte-h":!0}),w(on)!=="svelte-1tlroh"&&(on.textContent=fi),Vo=r(e),f(an.$$.fragment,e),Io=r(e),ee=d(e,"DIV",{class:!0});var Ce=J(ee);f(ln.$$.fragment,Ce),Ba=r(Ce),Js=d(Ce,"P",{"data-svelte-h":!0}),w(Js)!=="svelte-f18c3o"&&(Js.innerHTML=Mi),Sa=r(Ce),js=d(Ce,"P",{"data-svelte-h":!0}),w(js)!=="svelte-11krgja"&&(js.innerHTML=bi),qa=r(Ce),S=d(Ce,"DIV",{class:!0});var ge=J(S);f(rn.$$.fragment,ge),Ha=r(ge),ks=d(ge,"P",{"data-svelte-h":!0}),w(ks)!=="svelte-1ox9av6"&&(ks.innerHTML=Ti),Ea=r(ge),f(tt.$$.fragment,ge),Qa=r(ge),f(nt.$$.fragment,ge),La=r(ge),f(st.$$.fragment,ge),ge.forEach(p),Ce.forEach(p),Xo=r(e),f(pn.$$.fragment,e),zo=r(e),te=d(e,"DIV",{class:!0});var Ge=J(te);f(mn.$$.fragment,Ge),Oa=r(Ge),xs=d(Ge,"P",{"data-svelte-h":!0}),w(xs)!=="svelte-hkfevr"&&(xs.innerHTML=yi),Ya=r(Ge),Us=d(Ge,"P",{"data-svelte-h":!0}),w(Us)!=="svelte-11krgja"&&(Us.innerHTML=_i),Aa=r(Ge),q=d(Ge,"DIV",{class:!0});var he=J(q);f(cn.$$.fragment,he),Pa=r(he),Rs=d(he,"P",{"data-svelte-h":!0}),w(Rs)!=="svelte-1xqof9m"&&(Rs.innerHTML=wi),Da=r(he),f(ot.$$.fragment,he),Ka=r(he),f(at.$$.fragment,he),el=r(he),f(lt.$$.fragment,he),he.forEach(p),Ge.forEach(p),Bo=r(e),f(dn.$$.fragment,e),So=r(e),ne=d(e,"DIV",{class:!0});var Ve=J(ne);f(un.$$.fragment,Ve),tl=r(Ve),Zs=d(Ve,"P",{"data-svelte-h":!0}),w(Zs)!=="svelte-1r520uu"&&(Zs.innerHTML=$i),nl=r(Ve),Ws=d(Ve,"P",{"data-svelte-h":!0}),w(Ws)!=="svelte-10uuk2l"&&(Ws.innerHTML=vi),sl=r(Ve),H=d(Ve,"DIV",{class:!0});var fe=J(H);f(gn.$$.fragment,fe),ol=r(fe),Fs=d(fe,"P",{"data-svelte-h":!0}),w(Fs)!=="svelte-n65k7h"&&(Fs.innerHTML=Ji),al=r(fe),f(rt.$$.fragment,fe),ll=r(fe),f(it.$$.fragment,fe),rl=r(fe),f(pt.$$.fragment,fe),fe.forEach(p),Ve.forEach(p),qo=r(e),f(hn.$$.fragment,e),Ho=r(e),G=d(e,"DIV",{class:!0});var Me=J(G);f(fn.$$.fragment,Me),il=r(Me),Ns=d(Me,"P",{"data-svelte-h":!0}),w(Ns)!=="svelte-1fcejq5"&&(Ns.textContent=ji),pl=r(Me),Cs=d(Me,"P",{"data-svelte-h":!0}),w(Cs)!=="svelte-81k19v"&&(Cs.innerHTML=ki),ml=r(Me),Gs=d(Me,"P",{"data-svelte-h":!0}),w(Gs)!=="svelte-11krgja"&&(Gs.innerHTML=xi),cl=r(Me),C=d(Me,"DIV",{class:!0});var B=J(C);f(Mn.$$.fragment,B),dl=r(B),Vs=d(B,"P",{"data-svelte-h":!0}),w(Vs)!=="svelte-1plx9t"&&(Vs.innerHTML=Ui),ul=r(B),f(mt.$$.fragment,B),gl=r(B),f(ct.$$.fragment,B),hl=r(B),f(dt.$$.fragment,B),fl=r(B),f(ut.$$.fragment,B),B.forEach(p),Me.forEach(p),Eo=r(e),f(bn.$$.fragment,e),Qo=r(e),V=d(e,"DIV",{class:!0});var be=J(V);f(Tn.$$.fragment,be),Ml=r(be),Is=d(be,"P",{"data-svelte-h":!0}),w(Is)!=="svelte-1uwjkkt"&&(Is.textContent=Ri),bl=r(be),Xs=d(be,"P",{"data-svelte-h":!0}),w(Xs)!=="svelte-81k19v"&&(Xs.innerHTML=Zi),Tl=r(be),zs=d(be,"P",{"data-svelte-h":!0}),w(zs)!=="svelte-11krgja"&&(zs.innerHTML=Wi),yl=r(be),E=d(be,"DIV",{class:!0});var Te=J(E);f(yn.$$.fragment,Te),_l=r(Te),Bs=d(Te,"P",{"data-svelte-h":!0}),w(Bs)!=="svelte-xk2xch"&&(Bs.innerHTML=Fi),wl=r(Te),f(gt.$$.fragment,Te),$l=r(Te),f(ht.$$.fragment,Te),vl=r(Te),f(ft.$$.fragment,Te),Te.forEach(p),be.forEach(p),Lo=r(e),f(_n.$$.fragment,e),Oo=r(e),I=d(e,"DIV",{class:!0});var ye=J(I);f(wn.$$.fragment,ye),Jl=r(ye),Ss=d(ye,"P",{"data-svelte-h":!0}),w(Ss)!=="svelte-dcahwi"&&(Ss.textContent=Ni),jl=r(ye),qs=d(ye,"P",{"data-svelte-h":!0}),w(qs)!=="svelte-81k19v"&&(qs.innerHTML=Ci),kl=r(ye),Hs=d(ye,"P",{"data-svelte-h":!0}),w(Hs)!=="svelte-11krgja"&&(Hs.innerHTML=Gi),xl=r(ye),Re=d(ye,"DIV",{class:!0});var Ie=J(Re);f($n.$$.fragment,Ie),Ul=r(Ie),Es=d(Ie,"P",{"data-svelte-h":!0}),w(Es)!=="svelte-qesv8n"&&(Es.innerHTML=Vi),Rl=r(Ie),f(Mt.$$.fragment,Ie),Zl=r(Ie),f(bt.$$.fragment,Ie),Ie.forEach(p),ye.forEach(p),Yo=r(e),f(vn.$$.fragment,e),Ao=r(e),se=d(e,"DIV",{class:!0});var Xe=J(se);f(Jn.$$.fragment,Xe),Wl=r(Xe),Qs=d(Xe,"P",{"data-svelte-h":!0}),w(Qs)!=="svelte-1p0k96c"&&(Qs.innerHTML=Ii),Fl=r(Xe),Ls=d(Xe,"P",{"data-svelte-h":!0}),w(Ls)!=="svelte-11krgja"&&(Ls.innerHTML=Xi),Nl=r(Xe),Q=d(Xe,"DIV",{class:!0});var _e=J(Q);f(jn.$$.fragment,_e),Cl=r(_e),Os=d(_e,"P",{"data-svelte-h":!0}),w(Os)!=="svelte-1dng7rw"&&(Os.innerHTML=zi),Gl=r(_e),f(Tt.$$.fragment,_e),Vl=r(_e),f(yt.$$.fragment,_e),Il=r(_e),f(_t.$$.fragment,_e),_e.forEach(p),Xe.forEach(p),Po=r(e),f(kn.$$.fragment,e),Do=r(e),xn=d(e,"P",{"data-svelte-h":!0}),w(xn)!=="svelte-1h2y3wu"&&(xn.textContent=Bi),Ko=r(e),f(Un.$$.fragment,e),ea=r(e),oe=d(e,"DIV",{class:!0});var ze=J(oe);f(Rn.$$.fragment,ze),Xl=r(ze),Ys=d(ze,"P",{"data-svelte-h":!0}),w(Ys)!=="svelte-lhn08s"&&(Ys.innerHTML=Si),zl=r(ze),As=d(ze,"P",{"data-svelte-h":!0}),w(As)!=="svelte-11krgja"&&(As.innerHTML=qi),Bl=r(ze),L=d(ze,"DIV",{class:!0});var we=J(L);f(Zn.$$.fragment,we),Sl=r(we),Ps=d(we,"P",{"data-svelte-h":!0}),w(Ps)!=="svelte-1azuqx"&&(Ps.innerHTML=Hi),ql=r(we),f(wt.$$.fragment,we),Hl=r(we),f($t.$$.fragment,we),El=r(we),f(vt.$$.fragment,we),we.forEach(p),ze.forEach(p),ta=r(e),f(Wn.$$.fragment,e),na=r(e),ae=d(e,"DIV",{class:!0});var Be=J(ae);f(Fn.$$.fragment,Be),Ql=r(Be),Ds=d(Be,"P",{"data-svelte-h":!0}),w(Ds)!=="svelte-7c4g0u"&&(Ds.innerHTML=Ei),Ll=r(Be),Ks=d(Be,"P",{"data-svelte-h":!0}),w(Ks)!=="svelte-11krgja"&&(Ks.innerHTML=Qi),Ol=r(Be),O=d(Be,"DIV",{class:!0});var $e=J(O);f(Nn.$$.fragment,$e),Yl=r($e),eo=d($e,"P",{"data-svelte-h":!0}),w(eo)!=="svelte-1s27jle"&&(eo.innerHTML=Li),Al=r($e),f(Jt.$$.fragment,$e),Pl=r($e),f(jt.$$.fragment,$e),Dl=r($e),f(kt.$$.fragment,$e),$e.forEach(p),Be.forEach(p),sa=r(e),f(Cn.$$.fragment,e),oa=r(e),Gn=d(e,"P",{"data-svelte-h":!0}),w(Gn)!=="svelte-liyjdz"&&(Gn.textContent=Oi),aa=r(e),f(Vn.$$.fragment,e),la=r(e),X=d(e,"DIV",{class:!0});var ve=J(X);f(In.$$.fragment,ve),Kl=r(ve),to=d(ve,"P",{"data-svelte-h":!0}),w(to)!=="svelte-1uwrr47"&&(to.textContent=Yi),er=r(ve),no=d(ve,"P",{"data-svelte-h":!0}),w(no)!=="svelte-81k19v"&&(no.innerHTML=Ai),tr=r(ve),so=d(ve,"P",{"data-svelte-h":!0}),w(so)!=="svelte-11krgja"&&(so.innerHTML=Pi),nr=r(ve),Y=d(ve,"DIV",{class:!0});var Je=J(Y);f(Xn.$$.fragment,Je),sr=r(Je),oo=d(Je,"P",{"data-svelte-h":!0}),w(oo)!=="svelte-p67kxo"&&(oo.innerHTML=Di),or=r(Je),f(xt.$$.fragment,Je),ar=r(Je),f(Ut.$$.fragment,Je),lr=r(Je),f(Rt.$$.fragment,Je),Je.forEach(p),ve.forEach(p),ra=r(e),f(zn.$$.fragment,e),ia=r(e),le=d(e,"DIV",{class:!0});var Se=J(le);f(Bn.$$.fragment,Se),rr=r(Se),ao=d(Se,"P",{"data-svelte-h":!0}),w(ao)!=="svelte-1b2mkfv"&&(ao.innerHTML=Ki),ir=r(Se),lo=d(Se,"P",{"data-svelte-h":!0}),w(lo)!=="svelte-11krgja"&&(lo.innerHTML=ep),pr=r(Se),Ze=d(Se,"DIV",{class:!0});var qe=J(Ze);f(Sn.$$.fragment,qe),mr=r(qe),ro=d(qe,"P",{"data-svelte-h":!0}),w(ro)!=="svelte-18aced7"&&(ro.innerHTML=tp),cr=r(qe),f(Zt.$$.fragment,qe),dr=r(qe),f(Wt.$$.fragment,qe),qe.forEach(p),Se.forEach(p),pa=r(e),f(qn.$$.fragment,e),ma=r(e),re=d(e,"DIV",{class:!0});var He=J(re);f(Hn.$$.fragment,He),ur=r(He),io=d(He,"P",{"data-svelte-h":!0}),w(io)!=="svelte-1f7g6dz"&&(io.innerHTML=np),gr=r(He),po=d(He,"P",{"data-svelte-h":!0}),w(po)!=="svelte-11krgja"&&(po.innerHTML=sp),hr=r(He),We=d(He,"DIV",{class:!0});var Ee=J(We);f(En.$$.fragment,Ee),fr=r(Ee),mo=d(Ee,"P",{"data-svelte-h":!0}),w(mo)!=="svelte-1szjv6u"&&(mo.innerHTML=op),Mr=r(Ee),f(Ft.$$.fragment,Ee),br=r(Ee),f(Nt.$$.fragment,Ee),Ee.forEach(p),He.forEach(p),ca=r(e),f(Qn.$$.fragment,e),da=r(e),ie=d(e,"DIV",{class:!0});var Qe=J(ie);f(Ln.$$.fragment,Qe),Tr=r(Qe),co=d(Qe,"P",{"data-svelte-h":!0}),w(co)!=="svelte-5j5tvz"&&(co.innerHTML=ap),yr=r(Qe),uo=d(Qe,"P",{"data-svelte-h":!0}),w(uo)!=="svelte-10uuk2l"&&(uo.innerHTML=lp),_r=r(Qe),A=d(Qe,"DIV",{class:!0});var je=J(A);f(On.$$.fragment,je),wr=r(je),go=d(je,"P",{"data-svelte-h":!0}),w(go)!=="svelte-1e3zkhy"&&(go.innerHTML=rp),$r=r(je),f(Ct.$$.fragment,je),vr=r(je),f(Gt.$$.fragment,je),Jr=r(je),f(Vt.$$.fragment,je),je.forEach(p),Qe.forEach(p),ua=r(e),f(Yn.$$.fragment,e),ga=r(e),pe=d(e,"DIV",{class:!0});var Le=J(pe);f(An.$$.fragment,Le),jr=r(Le),ho=d(Le,"P",{"data-svelte-h":!0}),w(ho)!=="svelte-jvepyj"&&(ho.innerHTML=ip),kr=r(Le),fo=d(Le,"P",{"data-svelte-h":!0}),w(fo)!=="svelte-11krgja"&&(fo.innerHTML=pp),xr=r(Le),Fe=d(Le,"DIV",{class:!0});var Oe=J(Fe);f(Pn.$$.fragment,Oe),Ur=r(Oe),Mo=d(Oe,"P",{"data-svelte-h":!0}),w(Mo)!=="svelte-1fuxgrl"&&(Mo.innerHTML=mp),Rr=r(Oe),f(It.$$.fragment,Oe),Zr=r(Oe),f(Xt.$$.fragment,Oe),Oe.forEach(p),Le.forEach(p),ha=r(e),f(Dn.$$.fragment,e),fa=r(e),Kn=d(e,"P",{"data-svelte-h":!0}),w(Kn)!=="svelte-1gk58z"&&(Kn.textContent=cp),Ma=r(e),f(es.$$.fragment,e),ba=r(e),me=d(e,"DIV",{class:!0});var Ye=J(me);f(ts.$$.fragment,Ye),Wr=r(Ye),bo=d(Ye,"P",{"data-svelte-h":!0}),w(bo)!=="svelte-4pv247"&&(bo.innerHTML=dp),Fr=r(Ye),To=d(Ye,"P",{"data-svelte-h":!0}),w(To)!=="svelte-10uuk2l"&&(To.innerHTML=up),Nr=r(Ye),P=d(Ye,"DIV",{class:!0});var ke=J(P);f(ns.$$.fragment,ke),Cr=r(ke),yo=d(ke,"P",{"data-svelte-h":!0}),w(yo)!=="svelte-11xalzp"&&(yo.innerHTML=gp),Gr=r(ke),f(zt.$$.fragment,ke),Vr=r(ke),f(Bt.$$.fragment,ke),Ir=r(ke),f(St.$$.fragment,ke),ke.forEach(p),Ye.forEach(p),Ta=r(e),f(ss.$$.fragment,e),ya=r(e),ce=d(e,"DIV",{class:!0});var Ae=J(ce);f(os.$$.fragment,Ae),Xr=r(Ae),_o=d(Ae,"P",{"data-svelte-h":!0}),w(_o)!=="svelte-1t5a452"&&(_o.innerHTML=hp),zr=r(Ae),wo=d(Ae,"P",{"data-svelte-h":!0}),w(wo)!=="svelte-10uuk2l"&&(wo.innerHTML=fp),Br=r(Ae),Ne=d(Ae,"DIV",{class:!0});var Pe=J(Ne);f(as.$$.fragment,Pe),Sr=r(Pe),$o=d(Pe,"P",{"data-svelte-h":!0}),w($o)!=="svelte-eywb10"&&($o.innerHTML=Mp),qr=r(Pe),f(qt.$$.fragment,Pe),Hr=r(Pe),f(Ht.$$.fragment,Pe),Pe.forEach(p),Ae.forEach(p),_a=r(e),f(ls.$$.fragment,e),wa=r(e),rs=d(e,"P",{"data-svelte-h":!0}),w(rs)!=="svelte-1n8n3ms"&&(rs.textContent=bp),$a=r(e),f(is.$$.fragment,e),va=r(e),de=d(e,"DIV",{class:!0});var De=J(de);f(ps.$$.fragment,De),Er=r(De),vo=d(De,"P",{"data-svelte-h":!0}),w(vo)!=="svelte-vg8o2c"&&(vo.innerHTML=Tp),Qr=r(De),Jo=d(De,"P",{"data-svelte-h":!0}),w(Jo)!=="svelte-11krgja"&&(Jo.innerHTML=yp),Lr=r(De),D=d(De,"DIV",{class:!0});var xe=J(D);f(ms.$$.fragment,xe),Or=r(xe),jo=d(xe,"P",{"data-svelte-h":!0}),w(jo)!=="svelte-1usnw5b"&&(jo.innerHTML=_p),Yr=r(xe),f(Et.$$.fragment,xe),Ar=r(xe),f(Qt.$$.fragment,xe),Pr=r(xe),f(Lt.$$.fragment,xe),xe.forEach(p),De.forEach(p),Ja=r(e),f(cs.$$.fragment,e),ja=r(e),ue=d(e,"DIV",{class:!0});var Ke=J(ue);f(ds.$$.fragment,Ke),Dr=r(Ke),ko=d(Ke,"P",{"data-svelte-h":!0}),w(ko)!=="svelte-aw387n"&&(ko.innerHTML=wp),Kr=r(Ke),xo=d(Ke,"P",{"data-svelte-h":!0}),w(xo)!=="svelte-11krgja"&&(xo.innerHTML=$p),ei=r(Ke),K=d(Ke,"DIV",{class:!0});var Ue=J(K);f(us.$$.fragment,Ue),ti=r(Ue),Uo=d(Ue,"P",{"data-svelte-h":!0}),w(Uo)!=="svelte-iqwqsz"&&(Uo.innerHTML=vp),ni=r(Ue),f(Ot.$$.fragment,Ue),si=r(Ue),f(Yt.$$.fragment,Ue),oi=r(Ue),f(At.$$.fragment,Ue),Ue.forEach(p),Ke.forEach(p),ka=r(e),Ro=d(e,"P",{}),J(Ro).forEach(p),this.h()},h(){j(n,"name","hf:doc:metadata"),j(n,"content",Xm),j(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,i){a(document.head,n),u(e,g,i),u(e,o,i),u(e,s,i),M(m,e,i),u(e,t,i),M(_,e,i),u(e,Zo,i),M(Pt,e,i),u(e,Wo,i),u(e,Dt,i),u(e,Fo,i),M(Kt,e,i),u(e,No,i),u(e,Z,i),M(en,Z,null),a(Z,Ua),a(Z,hs),a(Z,Ra),a(Z,fs),a(Z,Za),a(Z,Ms),a(Z,Wa),a(Z,bs),a(Z,Fa),a(Z,et),M(tn,et,null),a(et,Na),a(et,Ts),a(Z,Ca),a(Z,N),M(nn,N,null),a(N,Ga),a(N,ys),a(N,Va),a(N,_s),a(N,Ia),a(N,ws),a(N,Xa),a(N,$s),a(N,za),a(N,vs),u(e,Co,i),M(sn,e,i),u(e,Go,i),u(e,on,i),u(e,Vo,i),M(an,e,i),u(e,Io,i),u(e,ee,i),M(ln,ee,null),a(ee,Ba),a(ee,Js),a(ee,Sa),a(ee,js),a(ee,qa),a(ee,S),M(rn,S,null),a(S,Ha),a(S,ks),a(S,Ea),M(tt,S,null),a(S,Qa),M(nt,S,null),a(S,La),M(st,S,null),u(e,Xo,i),M(pn,e,i),u(e,zo,i),u(e,te,i),M(mn,te,null),a(te,Oa),a(te,xs),a(te,Ya),a(te,Us),a(te,Aa),a(te,q),M(cn,q,null),a(q,Pa),a(q,Rs),a(q,Da),M(ot,q,null),a(q,Ka),M(at,q,null),a(q,el),M(lt,q,null),u(e,Bo,i),M(dn,e,i),u(e,So,i),u(e,ne,i),M(un,ne,null),a(ne,tl),a(ne,Zs),a(ne,nl),a(ne,Ws),a(ne,sl),a(ne,H),M(gn,H,null),a(H,ol),a(H,Fs),a(H,al),M(rt,H,null),a(H,ll),M(it,H,null),a(H,rl),M(pt,H,null),u(e,qo,i),M(hn,e,i),u(e,Ho,i),u(e,G,i),M(fn,G,null),a(G,il),a(G,Ns),a(G,pl),a(G,Cs),a(G,ml),a(G,Gs),a(G,cl),a(G,C),M(Mn,C,null),a(C,dl),a(C,Vs),a(C,ul),M(mt,C,null),a(C,gl),M(ct,C,null),a(C,hl),M(dt,C,null),a(C,fl),M(ut,C,null),u(e,Eo,i),M(bn,e,i),u(e,Qo,i),u(e,V,i),M(Tn,V,null),a(V,Ml),a(V,Is),a(V,bl),a(V,Xs),a(V,Tl),a(V,zs),a(V,yl),a(V,E),M(yn,E,null),a(E,_l),a(E,Bs),a(E,wl),M(gt,E,null),a(E,$l),M(ht,E,null),a(E,vl),M(ft,E,null),u(e,Lo,i),M(_n,e,i),u(e,Oo,i),u(e,I,i),M(wn,I,null),a(I,Jl),a(I,Ss),a(I,jl),a(I,qs),a(I,kl),a(I,Hs),a(I,xl),a(I,Re),M($n,Re,null),a(Re,Ul),a(Re,Es),a(Re,Rl),M(Mt,Re,null),a(Re,Zl),M(bt,Re,null),u(e,Yo,i),M(vn,e,i),u(e,Ao,i),u(e,se,i),M(Jn,se,null),a(se,Wl),a(se,Qs),a(se,Fl),a(se,Ls),a(se,Nl),a(se,Q),M(jn,Q,null),a(Q,Cl),a(Q,Os),a(Q,Gl),M(Tt,Q,null),a(Q,Vl),M(yt,Q,null),a(Q,Il),M(_t,Q,null),u(e,Po,i),M(kn,e,i),u(e,Do,i),u(e,xn,i),u(e,Ko,i),M(Un,e,i),u(e,ea,i),u(e,oe,i),M(Rn,oe,null),a(oe,Xl),a(oe,Ys),a(oe,zl),a(oe,As),a(oe,Bl),a(oe,L),M(Zn,L,null),a(L,Sl),a(L,Ps),a(L,ql),M(wt,L,null),a(L,Hl),M($t,L,null),a(L,El),M(vt,L,null),u(e,ta,i),M(Wn,e,i),u(e,na,i),u(e,ae,i),M(Fn,ae,null),a(ae,Ql),a(ae,Ds),a(ae,Ll),a(ae,Ks),a(ae,Ol),a(ae,O),M(Nn,O,null),a(O,Yl),a(O,eo),a(O,Al),M(Jt,O,null),a(O,Pl),M(jt,O,null),a(O,Dl),M(kt,O,null),u(e,sa,i),M(Cn,e,i),u(e,oa,i),u(e,Gn,i),u(e,aa,i),M(Vn,e,i),u(e,la,i),u(e,X,i),M(In,X,null),a(X,Kl),a(X,to),a(X,er),a(X,no),a(X,tr),a(X,so),a(X,nr),a(X,Y),M(Xn,Y,null),a(Y,sr),a(Y,oo),a(Y,or),M(xt,Y,null),a(Y,ar),M(Ut,Y,null),a(Y,lr),M(Rt,Y,null),u(e,ra,i),M(zn,e,i),u(e,ia,i),u(e,le,i),M(Bn,le,null),a(le,rr),a(le,ao),a(le,ir),a(le,lo),a(le,pr),a(le,Ze),M(Sn,Ze,null),a(Ze,mr),a(Ze,ro),a(Ze,cr),M(Zt,Ze,null),a(Ze,dr),M(Wt,Ze,null),u(e,pa,i),M(qn,e,i),u(e,ma,i),u(e,re,i),M(Hn,re,null),a(re,ur),a(re,io),a(re,gr),a(re,po),a(re,hr),a(re,We),M(En,We,null),a(We,fr),a(We,mo),a(We,Mr),M(Ft,We,null),a(We,br),M(Nt,We,null),u(e,ca,i),M(Qn,e,i),u(e,da,i),u(e,ie,i),M(Ln,ie,null),a(ie,Tr),a(ie,co),a(ie,yr),a(ie,uo),a(ie,_r),a(ie,A),M(On,A,null),a(A,wr),a(A,go),a(A,$r),M(Ct,A,null),a(A,vr),M(Gt,A,null),a(A,Jr),M(Vt,A,null),u(e,ua,i),M(Yn,e,i),u(e,ga,i),u(e,pe,i),M(An,pe,null),a(pe,jr),a(pe,ho),a(pe,kr),a(pe,fo),a(pe,xr),a(pe,Fe),M(Pn,Fe,null),a(Fe,Ur),a(Fe,Mo),a(Fe,Rr),M(It,Fe,null),a(Fe,Zr),M(Xt,Fe,null),u(e,ha,i),M(Dn,e,i),u(e,fa,i),u(e,Kn,i),u(e,Ma,i),M(es,e,i),u(e,ba,i),u(e,me,i),M(ts,me,null),a(me,Wr),a(me,bo),a(me,Fr),a(me,To),a(me,Nr),a(me,P),M(ns,P,null),a(P,Cr),a(P,yo),a(P,Gr),M(zt,P,null),a(P,Vr),M(Bt,P,null),a(P,Ir),M(St,P,null),u(e,Ta,i),M(ss,e,i),u(e,ya,i),u(e,ce,i),M(os,ce,null),a(ce,Xr),a(ce,_o),a(ce,zr),a(ce,wo),a(ce,Br),a(ce,Ne),M(as,Ne,null),a(Ne,Sr),a(Ne,$o),a(Ne,qr),M(qt,Ne,null),a(Ne,Hr),M(Ht,Ne,null),u(e,_a,i),M(ls,e,i),u(e,wa,i),u(e,rs,i),u(e,$a,i),M(is,e,i),u(e,va,i),u(e,de,i),M(ps,de,null),a(de,Er),a(de,vo),a(de,Qr),a(de,Jo),a(de,Lr),a(de,D),M(ms,D,null),a(D,Or),a(D,jo),a(D,Yr),M(Et,D,null),a(D,Ar),M(Qt,D,null),a(D,Pr),M(Lt,D,null),u(e,Ja,i),M(cs,e,i),u(e,ja,i),u(e,ue,i),M(ds,ue,null),a(ue,Dr),a(ue,ko),a(ue,Kr),a(ue,xo),a(ue,ei),a(ue,K),M(us,K,null),a(K,ti),a(K,Uo),a(K,ni),M(Ot,K,null),a(K,si),M(Yt,K,null),a(K,oi),M(At,K,null),u(e,ka,i),u(e,Ro,i),xa=!0},p(e,[i]){const F={};i&2&&(F.$$scope={dirty:i,ctx:e}),tt.$set(F);const gs={};i&2&&(gs.$$scope={dirty:i,ctx:e}),nt.$set(gs);const z={};i&2&&(z.$$scope={dirty:i,ctx:e}),st.$set(z);const Ce={};i&2&&(Ce.$$scope={dirty:i,ctx:e}),ot.$set(Ce);const ge={};i&2&&(ge.$$scope={dirty:i,ctx:e}),at.$set(ge);const Ge={};i&2&&(Ge.$$scope={dirty:i,ctx:e}),lt.$set(Ge);const he={};i&2&&(he.$$scope={dirty:i,ctx:e}),rt.$set(he);const Ve={};i&2&&(Ve.$$scope={dirty:i,ctx:e}),it.$set(Ve);const fe={};i&2&&(fe.$$scope={dirty:i,ctx:e}),pt.$set(fe);const Me={};i&2&&(Me.$$scope={dirty:i,ctx:e}),mt.$set(Me);const B={};i&2&&(B.$$scope={dirty:i,ctx:e}),ct.$set(B);const be={};i&2&&(be.$$scope={dirty:i,ctx:e}),dt.$set(be);const Te={};i&2&&(Te.$$scope={dirty:i,ctx:e}),ut.$set(Te);const ye={};i&2&&(ye.$$scope={dirty:i,ctx:e}),gt.$set(ye);const Ie={};i&2&&(Ie.$$scope={dirty:i,ctx:e}),ht.$set(Ie);const Xe={};i&2&&(Xe.$$scope={dirty:i,ctx:e}),ft.$set(Xe);const _e={};i&2&&(_e.$$scope={dirty:i,ctx:e}),Mt.$set(_e);const ze={};i&2&&(ze.$$scope={dirty:i,ctx:e}),bt.$set(ze);const we={};i&2&&(we.$$scope={dirty:i,ctx:e}),Tt.$set(we);const Be={};i&2&&(Be.$$scope={dirty:i,ctx:e}),yt.$set(Be);const $e={};i&2&&($e.$$scope={dirty:i,ctx:e}),_t.$set($e);const ve={};i&2&&(ve.$$scope={dirty:i,ctx:e}),wt.$set(ve);const Je={};i&2&&(Je.$$scope={dirty:i,ctx:e}),$t.$set(Je);const Se={};i&2&&(Se.$$scope={dirty:i,ctx:e}),vt.$set(Se);const qe={};i&2&&(qe.$$scope={dirty:i,ctx:e}),Jt.$set(qe);const He={};i&2&&(He.$$scope={dirty:i,ctx:e}),jt.$set(He);const Ee={};i&2&&(Ee.$$scope={dirty:i,ctx:e}),kt.$set(Ee);const Qe={};i&2&&(Qe.$$scope={dirty:i,ctx:e}),xt.$set(Qe);const je={};i&2&&(je.$$scope={dirty:i,ctx:e}),Ut.$set(je);const Le={};i&2&&(Le.$$scope={dirty:i,ctx:e}),Rt.$set(Le);const Oe={};i&2&&(Oe.$$scope={dirty:i,ctx:e}),Zt.$set(Oe);const Ye={};i&2&&(Ye.$$scope={dirty:i,ctx:e}),Wt.$set(Ye);const ke={};i&2&&(ke.$$scope={dirty:i,ctx:e}),Ft.$set(ke);const Ae={};i&2&&(Ae.$$scope={dirty:i,ctx:e}),Nt.$set(Ae);const Pe={};i&2&&(Pe.$$scope={dirty:i,ctx:e}),Ct.$set(Pe);const De={};i&2&&(De.$$scope={dirty:i,ctx:e}),Gt.$set(De);const xe={};i&2&&(xe.$$scope={dirty:i,ctx:e}),Vt.$set(xe);const Ke={};i&2&&(Ke.$$scope={dirty:i,ctx:e}),It.$set(Ke);const Ue={};i&2&&(Ue.$$scope={dirty:i,ctx:e}),Xt.$set(Ue);const Jp={};i&2&&(Jp.$$scope={dirty:i,ctx:e}),zt.$set(Jp);const jp={};i&2&&(jp.$$scope={dirty:i,ctx:e}),Bt.$set(jp);const kp={};i&2&&(kp.$$scope={dirty:i,ctx:e}),St.$set(kp);const xp={};i&2&&(xp.$$scope={dirty:i,ctx:e}),qt.$set(xp);const Up={};i&2&&(Up.$$scope={dirty:i,ctx:e}),Ht.$set(Up);const Rp={};i&2&&(Rp.$$scope={dirty:i,ctx:e}),Et.$set(Rp);const Zp={};i&2&&(Zp.$$scope={dirty:i,ctx:e}),Qt.$set(Zp);const Wp={};i&2&&(Wp.$$scope={dirty:i,ctx:e}),Lt.$set(Wp);const Fp={};i&2&&(Fp.$$scope={dirty:i,ctx:e}),Ot.$set(Fp);const Np={};i&2&&(Np.$$scope={dirty:i,ctx:e}),Yt.$set(Np);const Cp={};i&2&&(Cp.$$scope={dirty:i,ctx:e}),At.$set(Cp)},i(e){xa||(b(m.$$.fragment,e),b(_.$$.fragment,e),b(Pt.$$.fragment,e),b(Kt.$$.fragment,e),b(en.$$.fragment,e),b(tn.$$.fragment,e),b(nn.$$.fragment,e),b(sn.$$.fragment,e),b(an.$$.fragment,e),b(ln.$$.fragment,e),b(rn.$$.fragment,e),b(tt.$$.fragment,e),b(nt.$$.fragment,e),b(st.$$.fragment,e),b(pn.$$.fragment,e),b(mn.$$.fragment,e),b(cn.$$.fragment,e),b(ot.$$.fragment,e),b(at.$$.fragment,e),b(lt.$$.fragment,e),b(dn.$$.fragment,e),b(un.$$.fragment,e),b(gn.$$.fragment,e),b(rt.$$.fragment,e),b(it.$$.fragment,e),b(pt.$$.fragment,e),b(hn.$$.fragment,e),b(fn.$$.fragment,e),b(Mn.$$.fragment,e),b(mt.$$.fragment,e),b(ct.$$.fragment,e),b(dt.$$.fragment,e),b(ut.$$.fragment,e),b(bn.$$.fragment,e),b(Tn.$$.fragment,e),b(yn.$$.fragment,e),b(gt.$$.fragment,e),b(ht.$$.fragment,e),b(ft.$$.fragment,e),b(_n.$$.fragment,e),b(wn.$$.fragment,e),b($n.$$.fragment,e),b(Mt.$$.fragment,e),b(bt.$$.fragment,e),b(vn.$$.fragment,e),b(Jn.$$.fragment,e),b(jn.$$.fragment,e),b(Tt.$$.fragment,e),b(yt.$$.fragment,e),b(_t.$$.fragment,e),b(kn.$$.fragment,e),b(Un.$$.fragment,e),b(Rn.$$.fragment,e),b(Zn.$$.fragment,e),b(wt.$$.fragment,e),b($t.$$.fragment,e),b(vt.$$.fragment,e),b(Wn.$$.fragment,e),b(Fn.$$.fragment,e),b(Nn.$$.fragment,e),b(Jt.$$.fragment,e),b(jt.$$.fragment,e),b(kt.$$.fragment,e),b(Cn.$$.fragment,e),b(Vn.$$.fragment,e),b(In.$$.fragment,e),b(Xn.$$.fragment,e),b(xt.$$.fragment,e),b(Ut.$$.fragment,e),b(Rt.$$.fragment,e),b(zn.$$.fragment,e),b(Bn.$$.fragment,e),b(Sn.$$.fragment,e),b(Zt.$$.fragment,e),b(Wt.$$.fragment,e),b(qn.$$.fragment,e),b(Hn.$$.fragment,e),b(En.$$.fragment,e),b(Ft.$$.fragment,e),b(Nt.$$.fragment,e),b(Qn.$$.fragment,e),b(Ln.$$.fragment,e),b(On.$$.fragment,e),b(Ct.$$.fragment,e),b(Gt.$$.fragment,e),b(Vt.$$.fragment,e),b(Yn.$$.fragment,e),b(An.$$.fragment,e),b(Pn.$$.fragment,e),b(It.$$.fragment,e),b(Xt.$$.fragment,e),b(Dn.$$.fragment,e),b(es.$$.fragment,e),b(ts.$$.fragment,e),b(ns.$$.fragment,e),b(zt.$$.fragment,e),b(Bt.$$.fragment,e),b(St.$$.fragment,e),b(ss.$$.fragment,e),b(os.$$.fragment,e),b(as.$$.fragment,e),b(qt.$$.fragment,e),b(Ht.$$.fragment,e),b(ls.$$.fragment,e),b(is.$$.fragment,e),b(ps.$$.fragment,e),b(ms.$$.fragment,e),b(Et.$$.fragment,e),b(Qt.$$.fragment,e),b(Lt.$$.fragment,e),b(cs.$$.fragment,e),b(ds.$$.fragment,e),b(us.$$.fragment,e),b(Ot.$$.fragment,e),b(Yt.$$.fragment,e),b(At.$$.fragment,e),xa=!0)},o(e){T(m.$$.fragment,e),T(_.$$.fragment,e),T(Pt.$$.fragment,e),T(Kt.$$.fragment,e),T(en.$$.fragment,e),T(tn.$$.fragment,e),T(nn.$$.fragment,e),T(sn.$$.fragment,e),T(an.$$.fragment,e),T(ln.$$.fragment,e),T(rn.$$.fragment,e),T(tt.$$.fragment,e),T(nt.$$.fragment,e),T(st.$$.fragment,e),T(pn.$$.fragment,e),T(mn.$$.fragment,e),T(cn.$$.fragment,e),T(ot.$$.fragment,e),T(at.$$.fragment,e),T(lt.$$.fragment,e),T(dn.$$.fragment,e),T(un.$$.fragment,e),T(gn.$$.fragment,e),T(rt.$$.fragment,e),T(it.$$.fragment,e),T(pt.$$.fragment,e),T(hn.$$.fragment,e),T(fn.$$.fragment,e),T(Mn.$$.fragment,e),T(mt.$$.fragment,e),T(ct.$$.fragment,e),T(dt.$$.fragment,e),T(ut.$$.fragment,e),T(bn.$$.fragment,e),T(Tn.$$.fragment,e),T(yn.$$.fragment,e),T(gt.$$.fragment,e),T(ht.$$.fragment,e),T(ft.$$.fragment,e),T(_n.$$.fragment,e),T(wn.$$.fragment,e),T($n.$$.fragment,e),T(Mt.$$.fragment,e),T(bt.$$.fragment,e),T(vn.$$.fragment,e),T(Jn.$$.fragment,e),T(jn.$$.fragment,e),T(Tt.$$.fragment,e),T(yt.$$.fragment,e),T(_t.$$.fragment,e),T(kn.$$.fragment,e),T(Un.$$.fragment,e),T(Rn.$$.fragment,e),T(Zn.$$.fragment,e),T(wt.$$.fragment,e),T($t.$$.fragment,e),T(vt.$$.fragment,e),T(Wn.$$.fragment,e),T(Fn.$$.fragment,e),T(Nn.$$.fragment,e),T(Jt.$$.fragment,e),T(jt.$$.fragment,e),T(kt.$$.fragment,e),T(Cn.$$.fragment,e),T(Vn.$$.fragment,e),T(In.$$.fragment,e),T(Xn.$$.fragment,e),T(xt.$$.fragment,e),T(Ut.$$.fragment,e),T(Rt.$$.fragment,e),T(zn.$$.fragment,e),T(Bn.$$.fragment,e),T(Sn.$$.fragment,e),T(Zt.$$.fragment,e),T(Wt.$$.fragment,e),T(qn.$$.fragment,e),T(Hn.$$.fragment,e),T(En.$$.fragment,e),T(Ft.$$.fragment,e),T(Nt.$$.fragment,e),T(Qn.$$.fragment,e),T(Ln.$$.fragment,e),T(On.$$.fragment,e),T(Ct.$$.fragment,e),T(Gt.$$.fragment,e),T(Vt.$$.fragment,e),T(Yn.$$.fragment,e),T(An.$$.fragment,e),T(Pn.$$.fragment,e),T(It.$$.fragment,e),T(Xt.$$.fragment,e),T(Dn.$$.fragment,e),T(es.$$.fragment,e),T(ts.$$.fragment,e),T(ns.$$.fragment,e),T(zt.$$.fragment,e),T(Bt.$$.fragment,e),T(St.$$.fragment,e),T(ss.$$.fragment,e),T(os.$$.fragment,e),T(as.$$.fragment,e),T(qt.$$.fragment,e),T(Ht.$$.fragment,e),T(ls.$$.fragment,e),T(is.$$.fragment,e),T(ps.$$.fragment,e),T(ms.$$.fragment,e),T(Et.$$.fragment,e),T(Qt.$$.fragment,e),T(Lt.$$.fragment,e),T(cs.$$.fragment,e),T(ds.$$.fragment,e),T(us.$$.fragment,e),T(Ot.$$.fragment,e),T(Yt.$$.fragment,e),T(At.$$.fragment,e),xa=!1},d(e){e&&(p(g),p(o),p(s),p(t),p(Zo),p(Wo),p(Dt),p(Fo),p(No),p(Z),p(Co),p(Go),p(on),p(Vo),p(Io),p(ee),p(Xo),p(zo),p(te),p(Bo),p(So),p(ne),p(qo),p(Ho),p(G),p(Eo),p(Qo),p(V),p(Lo),p(Oo),p(I),p(Yo),p(Ao),p(se),p(Po),p(Do),p(xn),p(Ko),p(ea),p(oe),p(ta),p(na),p(ae),p(sa),p(oa),p(Gn),p(aa),p(la),p(X),p(ra),p(ia),p(le),p(pa),p(ma),p(re),p(ca),p(da),p(ie),p(ua),p(ga),p(pe),p(ha),p(fa),p(Kn),p(Ma),p(ba),p(me),p(Ta),p(ya),p(ce),p(_a),p(wa),p(rs),p($a),p(va),p(de),p(Ja),p(ja),p(ue),p(ka),p(Ro)),p(n),y(m,e),y(_,e),y(Pt,e),y(Kt,e),y(en),y(tn),y(nn),y(sn,e),y(an,e),y(ln),y(rn),y(tt),y(nt),y(st),y(pn,e),y(mn),y(cn),y(ot),y(at),y(lt),y(dn,e),y(un),y(gn),y(rt),y(it),y(pt),y(hn,e),y(fn),y(Mn),y(mt),y(ct),y(dt),y(ut),y(bn,e),y(Tn),y(yn),y(gt),y(ht),y(ft),y(_n,e),y(wn),y($n),y(Mt),y(bt),y(vn,e),y(Jn),y(jn),y(Tt),y(yt),y(_t),y(kn,e),y(Un,e),y(Rn),y(Zn),y(wt),y($t),y(vt),y(Wn,e),y(Fn),y(Nn),y(Jt),y(jt),y(kt),y(Cn,e),y(Vn,e),y(In),y(Xn),y(xt),y(Ut),y(Rt),y(zn,e),y(Bn),y(Sn),y(Zt),y(Wt),y(qn,e),y(Hn),y(En),y(Ft),y(Nt),y(Qn,e),y(Ln),y(On),y(Ct),y(Gt),y(Vt),y(Yn,e),y(An),y(Pn),y(It),y(Xt),y(Dn,e),y(es,e),y(ts),y(ns),y(zt),y(Bt),y(St),y(ss,e),y(os),y(as),y(qt),y(Ht),y(ls,e),y(is,e),y(ps),y(ms),y(Et),y(Qt),y(Lt),y(cs,e),y(ds),y(us),y(Ot),y(Yt),y(At)}}}const Xm='{"title":"ONNX Runtime Models","local":"onnx-runtime-models","sections":[{"title":"Generic model classes","local":"generic-model-classes","sections":[{"title":"ORTModel","local":"optimum.onnxruntime.ORTModel","sections":[],"depth":3}],"depth":2},{"title":"Natural Language Processing","local":"natural-language-processing","sections":[{"title":"ORTModelForCausalLM","local":"optimum.onnxruntime.ORTModelForCausalLM","sections":[],"depth":3},{"title":"ORTModelForMaskedLM","local":"optimum.onnxruntime.ORTModelForMaskedLM","sections":[],"depth":3},{"title":"ORTModelForSeq2SeqLM","local":"optimum.onnxruntime.ORTModelForSeq2SeqLM","sections":[],"depth":3},{"title":"ORTModelForSequenceClassification","local":"optimum.onnxruntime.ORTModelForSequenceClassification","sections":[],"depth":3},{"title":"ORTModelForTokenClassification","local":"optimum.onnxruntime.ORTModelForTokenClassification","sections":[],"depth":3},{"title":"ORTModelForMultipleChoice","local":"optimum.onnxruntime.ORTModelForMultipleChoice","sections":[],"depth":3},{"title":"ORTModelForQuestionAnswering","local":"optimum.onnxruntime.ORTModelForQuestionAnswering","sections":[],"depth":3}],"depth":2},{"title":"Computer vision","local":"computer-vision","sections":[{"title":"ORTModelForImageClassification","local":"optimum.onnxruntime.ORTModelForImageClassification","sections":[],"depth":3},{"title":"ORTModelForSemanticSegmentation","local":"optimum.onnxruntime.ORTModelForSemanticSegmentation","sections":[],"depth":3}],"depth":2},{"title":"Audio","local":"audio","sections":[{"title":"ORTModelForAudioClassification","local":"optimum.onnxruntime.ORTModelForAudioClassification","sections":[],"depth":3},{"title":"ORTModelForAudioFrameClassification","local":"optimum.onnxruntime.ORTModelForAudioFrameClassification","sections":[],"depth":3},{"title":"ORTModelForCTC","local":"optimum.onnxruntime.ORTModelForCTC","sections":[],"depth":3},{"title":"ORTModelForSpeechSeq2Seq","local":"optimum.onnxruntime.ORTModelForSpeechSeq2Seq","sections":[],"depth":3},{"title":"ORTModelForAudioXVector","local":"optimum.onnxruntime.ORTModelForAudioXVector","sections":[],"depth":3}],"depth":2},{"title":"Multimodal","local":"multimodal","sections":[{"title":"ORTModelForVision2Seq","local":"optimum.onnxruntime.ORTModelForVision2Seq","sections":[],"depth":3},{"title":"ORTModelForPix2Struct","local":"optimum.onnxruntime.ORTModelForPix2Struct","sections":[],"depth":3}],"depth":2},{"title":"Custom Tasks","local":"custom-tasks","sections":[{"title":"ORTModelForCustomTasks","local":"optimum.onnxruntime.ORTModelForCustomTasks","sections":[],"depth":4},{"title":"ORTModelForFeatureExtraction","local":"optimum.onnxruntime.ORTModelForFeatureExtraction","sections":[],"depth":4}],"depth":2}],"depth":1}';function zm($){return Vp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Om extends Ip{constructor(n){super(),Xp(this,n,zm,Im,Gp,{})}}export{Om as component};
