import{s as np,o as sp,n as v}from"../chunks/scheduler.5f3e6389.js";import{S as op,i as ap,e as p,s as l,c as h,h as lp,a as c,d as m,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 rp,H as R}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.84e44acb.js";import{D as k}from"../chunks/Docstring.5071903f.js";import{C as U}from"../chunks/CodeBlock.d743bcd5.js";import{E as x}from"../chunks/ExampleCodeBlock.b5fbe1d3.js";function ip($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function mp($){let n,g="Example of text generation:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function pp($){let n,g="Example using <code>transformers.pipelines</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function cp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function dp($){let n,g="Example of feature extraction:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function up($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function gp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function hp($){let n,g="Example of text generation:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function fp($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Mp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function bp($){let n,g="Example of single-label classification:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Tp($){let n,g="Example using <code>transformers.pipelines</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function yp($){let n,g="Example using zero-shot-classification <code>transformers.pipelines</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function _p($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function wp($){let n,g="Example of token classification:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function $p($){let n,g="Example using <code>transformers.pipelines</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function vp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function Jp($){let n,g="Example of multiple choice:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function jp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function kp($){let n,g="Example of question answering:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function xp($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Up($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function Rp($){let n,g="Example of image classification:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Zp($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Wp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function Np($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function Fp($){let n,g="Example of semantic segmentation:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Cp($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Gp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function Ip($){let n,g="Example of audio classification:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Vp($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Xp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function zp($){let n,g="Example of audio frame classification:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Bp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function Sp($){let n,g="Example of CTC:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function qp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function Hp($){let n,g="Example of text generation:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Ep($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Lp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function Qp($){let n,g="Example of Audio XVector:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function Yp($){let n,g="Example of text generation:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Ap($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function Dp($){let n,g="Example of pix2struct:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function Kp($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function ec($){let n,g="Example of custom tasks(e.g. a sentence transformers taking <code>pooler_output</code> as output):",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function tc($){let n,g="Example using <code>transformers.pipelines</code>(only if the task is supported):",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function nc($){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=p("p"),n.innerHTML=g},l(o){n=c(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&&m(n)}}}function sc($){let n,g="Example of feature extraction:",o,s,d;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=p("p"),n.textContent=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function oc($){let n,g="Example using <code>transformers.pipeline</code>:",o,s,d;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=p("p"),n.innerHTML=g,o=l(),h(s.$$.fragment)},l(t){n=c(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,_),d=!0},p:v,i(t){d||(b(s.$$.fragment,t),d=!0)},o(t){T(s.$$.fragment,t),d=!1},d(t){t&&(m(n),m(o)),y(s,t)}}}function ac($){let n,g,o,s,d,t,_,So,nn,qo,sn,$i="The following ORT classes are available for instantiating a base model class without a specific head.",Ho,on,Eo,Z,an,Sa,$s,vi="Base class for implementing models using ONNX Runtime.",qa,vs,Ji=`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.`,Ha,Js,ji="Class attributes:",Ea,js,ki=`<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>`,La,ot,ln,Qa,ks,xi="Returns whether this model can generate sequences with <code>.generate()</code>.",Oa,F,rn,Ya,xs,Ui="Instantiate a pretrained model from a pre-trained model configuration.",Aa,Us,Ri=`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.`,Pa,Rs,Zi="<p>Parameters for decoder models (ORTModelForCausalLM, ORTModelForSeq2SeqLM, ORTModelForSeq2SeqLM, ORTModelForSpeechSeq2Seq, ORTModelForVision2Seq)</p>",Da,Zs,Wi=`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>.`,Ka,Ws,Ni=`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.`,Lo,mn,Qo,pn,Fi="The following ORT classes are available for the following natural language processing tasks.",Oo,cn,Yo,ee,dn,el,Ns,Ci=`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_79/en/onnxruntime/package_reference/modeling#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,Fs,Gi='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',nl,S,un,sl,Cs,Ii="The <code>ORTModelForCausalLM</code> forward method, overrides the <code>__call__</code> special method.",ol,at,al,lt,ll,rt,Ao,gn,Po,te,hn,rl,Gs,Vi=`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_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,il,Is,Xi='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',ml,q,fn,pl,Vs,zi="The <code>ORTModelForMaskedLM</code> forward method, overrides the <code>__call__</code> special method.",cl,it,dl,mt,ul,pt,Do,Mn,Ko,ne,bn,gl,Xs,Bi=`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.ORTModelForConditionalGeneration</code>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,hl,zs,Si="This class should be initialized using the <code>onnxruntime.modeling.ORTModelForConditionalGeneration.from_pretrained</code> method.",fl,H,Tn,Ml,Bs,qi="The <code>ORTModelForSeq2SeqLM</code> forward method, overrides the <code>__call__</code> special method.",bl,ct,Tl,dt,yl,ut,ea,yn,ta,G,_n,_l,Ss,Hi=`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.`,wl,qs,Ei=`This model inherits from <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,$l,Hs,Li='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',vl,C,wn,Jl,Es,Qi="The <code>ORTModelForSequenceClassification</code> forward method, overrides the <code>__call__</code> special method.",jl,gt,kl,ht,xl,ft,Ul,Mt,na,$n,sa,I,vn,Rl,Ls,Oi=`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.`,Zl,Qs,Yi=`This model inherits from <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Wl,Os,Ai='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',Nl,E,Jn,Fl,Ys,Pi="The <code>ORTModelForTokenClassification</code> forward method, overrides the <code>__call__</code> special method.",Cl,bt,Gl,Tt,Il,yt,oa,jn,aa,V,kn,Vl,As,Di=`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.`,Xl,Ps,Ki=`This model inherits from <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#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,Ds,em='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',Bl,Ze,xn,Sl,Ks,tm="The <code>ORTModelForMultipleChoice</code> forward method, overrides the <code>__call__</code> special method.",ql,_t,Hl,wt,la,Un,ra,se,Rn,El,eo,nm=`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_79/en/onnxruntime/package_reference/modeling#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,to,sm='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',Ql,L,Zn,Ol,no,om="The <code>ORTModelForQuestionAnswering</code> forward method, overrides the <code>__call__</code> special method.",Yl,$t,Al,vt,Pl,Jt,ia,Wn,ma,Nn,am="The following ORT classes are available for the following computer vision tasks.",pa,Fn,ca,oe,Cn,Dl,so,lm=`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_79/en/onnxruntime/package_reference/modeling#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,oo,rm='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',er,Q,Gn,tr,ao,im="The <code>ORTModelForImageClassification</code> forward method, overrides the <code>__call__</code> special method.",nr,jt,sr,kt,or,xt,da,In,ua,ae,Vn,ar,lo,mm=`ONNX Model for zero-shot-image-classification tasks. This class officially supports clip, metaclip-2.
This model inherits from <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,lr,ro,pm='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',rr,nt,Xn,ir,io,cm="The <code>ORTModelForZeroShotImageClassification</code> forward method, overrides the <code>__call__</code> special method.",mr,Ut,ga,zn,ha,le,Bn,pr,mo,dm=`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_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,cr,po,um='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',dr,O,Sn,ur,co,gm="The <code>ORTModelForSemanticSegmentation</code> forward method, overrides the <code>__call__</code> special method.",gr,Rt,hr,Zt,fr,Wt,fa,qn,Ma,Hn,hm="The following ORT classes are available for the following audio tasks.",ba,En,Ta,X,Ln,Mr,uo,fm=`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.`,br,go,Mm=`This model inherits from <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#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,ho,bm='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',yr,Y,Qn,_r,fo,Tm="The <code>ORTModelForAudioClassification</code> forward method, overrides the <code>__call__</code> special method.",wr,Nt,$r,Ft,vr,Ct,ya,On,_a,re,Yn,Jr,Mo,ym=`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_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,jr,bo,_m='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',kr,We,An,xr,To,wm="The <code>ORTModelForAudioFrameClassification</code> forward method, overrides the <code>__call__</code> special method.",Ur,Gt,Rr,It,wa,Pn,$a,ie,Dn,Zr,yo,$m=`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_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Wr,_o,vm='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',Nr,Ne,Kn,Fr,wo,Jm="The <code>ORTModelForCTC</code> forward method, overrides the <code>__call__</code> special method.",Cr,Vt,Gr,Xt,va,es,Ja,me,ts,Ir,$o,jm=`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.ORTModelForConditionalGeneration</code>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Vr,vo,km="This class should be initialized using the <code>onnxruntime.modeling.ORTModelForConditionalGeneration.from_pretrained</code> method.",Xr,A,ns,zr,Jo,xm="The <code>ORTModelForSpeechSeq2Seq</code> forward method, overrides the <code>__call__</code> special method.",Br,zt,Sr,Bt,qr,St,ja,ss,ka,pe,os,Hr,jo,Um=`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_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Er,ko,Rm='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',Lr,Fe,as,Qr,xo,Zm="The <code>ORTModelForAudioXVector</code> forward method, overrides the <code>__call__</code> special method.",Or,qt,Yr,Ht,xa,ls,Ua,rs,Wm="The following ORT classes are available for the following multimodal tasks.",Ra,is,Za,ce,ms,Ar,Uo,Nm=`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.ORTModelForConditionalGeneration</code>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Pr,Ro,Fm="This class should be initialized using the <code>onnxruntime.modeling.ORTModelForConditionalGeneration.from_pretrained</code> method.",Dr,P,ps,Kr,Zo,Cm="The <code>ORTModelForVision2Seq</code> forward method, overrides the <code>__call__</code> special method.",ei,Et,ti,Lt,ni,Qt,Wa,cs,Na,de,ds,si,Wo,Gm=`Pix2Struct model with a language modeling head for ONNX Runtime inference. This class officially supports pix2struct.
This model inherits from <code>~onnxruntime.modeling.ORTModelForConditionalGeneration</code>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,oi,No,Im="This class should be initialized using the <code>onnxruntime.modeling.ORTModelForConditionalGeneration.from_pretrained</code> method.",ai,Ce,us,li,Fo,Vm="The <code>ORTModelForPix2Struct</code> forward method, overrides the <code>__call__</code> special method.",ri,Ot,ii,Yt,Fa,gs,Ca,hs,Xm="The following ORT classes are available for the following custom tasks.",Ga,fs,Ia,ue,Ms,mi,Co,zm=`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_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,pi,Go,Bm='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',ci,D,bs,di,Io,Sm="The <code>ORTModelForCustomTasks</code> forward method, overrides the <code>__call__</code> special method.",ui,At,gi,Pt,hi,Dt,Va,Ts,Xa,ge,ys,fi,Vo,qm=`ONNX Model for feature-extraction task.
This model inherits from <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel">ORTModel</a>, check its documentation for the generic methods the
library implements for all its model (such as downloading or saving).`,Mi,Xo,Hm='This class should be initialized using the <a href="/docs/optimum/pr_79/en/onnxruntime/package_reference/modeling#optimum.onnxruntime.ORTModel.from_pretrained">onnxruntime.modeling_ort.ORTModel.from_pretrained()</a> method.',bi,K,_s,Ti,zo,Em="The <code>ORTModelForFeatureExtraction</code> forward method, overrides the <code>__call__</code> special method.",yi,Kt,_i,en,wi,tn,za,Bo,Ba;return d=new rp({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"}}),nn=new R({props:{title:"Generic model classes",local:"generic-model-classes",headingTag:"h2"}}),on=new R({props:{title:"ORTModel",local:"optimum.onnxruntime.ORTModel",headingTag:"h3"}}),an=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_79/optimum/onnxruntime/modeling.py#L156"}}),ln=new k({props:{name:"can_generate",anchor:"optimum.onnxruntime.ORTModel.can_generate",parameters:[],source:"https://github.com/huggingface/optimum-onnx/blob/vr_79/optimum/onnxruntime/modeling.py#L594"}}),rn=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_79/optimum/onnxruntime/modeling.py#L468",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>
`}}),mn=new R({props:{title:"Natural Language Processing",local:"natural-language-processing",headingTag:"h2"}}),cn=new R({props:{title:"ORTModelForCausalLM",local:"optimum.onnxruntime.ORTModelForCausalLM",headingTag:"h3"}}),dn=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_79/optimum/onnxruntime/modeling_decoder.py#L123"}}),un=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_79/optimum/onnxruntime/modeling_decoder.py#L249"}}),at=new W({props:{$$slots:{default:[ip]},$$scope:{ctx:$}}}),lt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForCausalLM.forward.example",$$slots:{default:[mp]},$$scope:{ctx:$}}}),rt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForCausalLM.forward.example-2",$$slots:{default:[pp]},$$scope:{ctx:$}}}),gn=new R({props:{title:"ORTModelForMaskedLM",local:"optimum.onnxruntime.ORTModelForMaskedLM",headingTag:"h3"}}),hn=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_79/optimum/onnxruntime/modeling.py#L774"}}),fn=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_79/optimum/onnxruntime/modeling.py#L780"}}),it=new W({props:{$$slots:{default:[cp]},$$scope:{ctx:$}}}),mt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForMaskedLM.forward.example",$$slots:{default:[dp]},$$scope:{ctx:$}}}),pt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForMaskedLM.forward.example-2",$$slots:{default:[up]},$$scope:{ctx:$}}}),Mn=new R({props:{title:"ORTModelForSeq2SeqLM",local:"optimum.onnxruntime.ORTModelForSeq2SeqLM",headingTag:"h3"}}),bn=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_79/optimum/onnxruntime/modeling_seq2seq.py#L1218"}}),Tn=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_79/optimum/onnxruntime/modeling_seq2seq.py#L1226"}}),ct=new W({props:{$$slots:{default:[gp]},$$scope:{ctx:$}}}),dt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSeq2SeqLM.forward.example",$$slots:{default:[hp]},$$scope:{ctx:$}}}),ut=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSeq2SeqLM.forward.example-2",$$slots:{default:[fp]},$$scope:{ctx:$}}}),yn=new R({props:{title:"ORTModelForSequenceClassification",local:"optimum.onnxruntime.ORTModelForSequenceClassification",headingTag:"h3"}}),_n=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_79/optimum/onnxruntime/modeling.py#L988"}}),wn=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_79/optimum/onnxruntime/modeling.py#L996"}}),gt=new W({props:{$$slots:{default:[Mp]},$$scope:{ctx:$}}}),ht=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSequenceClassification.forward.example",$$slots:{default:[bp]},$$scope:{ctx:$}}}),ft=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSequenceClassification.forward.example-2",$$slots:{default:[Tp]},$$scope:{ctx:$}}}),Mt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSequenceClassification.forward.example-3",$$slots:{default:[yp]},$$scope:{ctx:$}}}),$n=new R({props:{title:"ORTModelForTokenClassification",local:"optimum.onnxruntime.ORTModelForTokenClassification",headingTag:"h3"}}),vn=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_79/optimum/onnxruntime/modeling.py#L1089"}}),Jn=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_79/optimum/onnxruntime/modeling.py#L1098"}}),bt=new W({props:{$$slots:{default:[_p]},$$scope:{ctx:$}}}),Tt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForTokenClassification.forward.example",$$slots:{default:[wp]},$$scope:{ctx:$}}}),yt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForTokenClassification.forward.example-2",$$slots:{default:[$p]},$$scope:{ctx:$}}}),jn=new R({props:{title:"ORTModelForMultipleChoice",local:"optimum.onnxruntime.ORTModelForMultipleChoice",headingTag:"h3"}}),kn=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_79/optimum/onnxruntime/modeling.py#L1185"}}),xn=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_79/optimum/onnxruntime/modeling.py#L1193"}}),_t=new W({props:{$$slots:{default:[vp]},$$scope:{ctx:$}}}),wt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForMultipleChoice.forward.example",$$slots:{default:[Jp]},$$scope:{ctx:$}}}),Un=new R({props:{title:"ORTModelForQuestionAnswering",local:"optimum.onnxruntime.ORTModelForQuestionAnswering",headingTag:"h3"}}),Rn=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_79/optimum/onnxruntime/modeling.py#L873"}}),Zn=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_79/optimum/onnxruntime/modeling.py#L879"}}),$t=new W({props:{$$slots:{default:[jp]},$$scope:{ctx:$}}}),vt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForQuestionAnswering.forward.example",$$slots:{default:[kp]},$$scope:{ctx:$}}}),Jt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForQuestionAnswering.forward.example-2",$$slots:{default:[xp]},$$scope:{ctx:$}}}),Wn=new R({props:{title:"Computer vision",local:"computer-vision",headingTag:"h2"}}),Fn=new R({props:{title:"ORTModelForImageClassification",local:"optimum.onnxruntime.ORTModelForImageClassification",headingTag:"h3"}}),Cn=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_79/optimum/onnxruntime/modeling.py#L1290"}}),Gn=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_79/optimum/onnxruntime/modeling.py#L1295"}}),jt=new W({props:{$$slots:{default:[Up]},$$scope:{ctx:$}}}),kt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForImageClassification.forward.example",$$slots:{default:[Rp]},$$scope:{ctx:$}}}),xt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForImageClassification.forward.example-2",$$slots:{default:[Zp]},$$scope:{ctx:$}}}),In=new R({props:{title:"ORTModelForZeroShotImageClassification",local:"optimum.onnxruntime.ORTModelForZeroShotImageClassification",headingTag:"h3"}}),Vn=new k({props:{name:"class optimum.onnxruntime.ORTModelForZeroShotImageClassification",anchor:"optimum.onnxruntime.ORTModelForZeroShotImageClassification",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_79/optimum/onnxruntime/modeling.py#L1346"}}),Xn=new k({props:{name:"forward",anchor:"optimum.onnxruntime.ORTModelForZeroShotImageClassification.forward",parameters:[{name:"input_ids",val:": torch.Tensor | np.ndarray"},{name:"pixel_values",val:": torch.Tensor | np.ndarray"},{name:"attention_mask",val:": torch.Tensor | np.ndarray | None = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"optimum.onnxruntime.ORTModelForZeroShotImageClassification.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.ORTModelForZeroShotImageClassification.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.ORTModelForZeroShotImageClassification.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"},{anchor:"optimum.onnxruntime.ORTModelForZeroShotImageClassification.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_79/optimum/onnxruntime/modeling.py#L1351"}}),Ut=new W({props:{$$slots:{default:[Wp]},$$scope:{ctx:$}}}),zn=new R({props:{title:"ORTModelForSemanticSegmentation",local:"optimum.onnxruntime.ORTModelForSemanticSegmentation",headingTag:"h3"}}),Bn=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_79/optimum/onnxruntime/modeling.py#L1446"}}),Sn=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_79/optimum/onnxruntime/modeling.py#L1460"}}),Rt=new W({props:{$$slots:{default:[Np]},$$scope:{ctx:$}}}),Zt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSemanticSegmentation.forward.example",$$slots:{default:[Fp]},$$scope:{ctx:$}}}),Wt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSemanticSegmentation.forward.example-2",$$slots:{default:[Cp]},$$scope:{ctx:$}}}),qn=new R({props:{title:"Audio",local:"audio",headingTag:"h2"}}),En=new R({props:{title:"ORTModelForAudioClassification",local:"optimum.onnxruntime.ORTModelForAudioClassification",headingTag:"h3"}}),Ln=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_79/optimum/onnxruntime/modeling.py#L1565"}}),Qn=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_79/optimum/onnxruntime/modeling.py#L1573"}}),Nt=new W({props:{$$slots:{default:[Gp]},$$scope:{ctx:$}}}),Ft=new x({props:{anchor:"optimum.onnxruntime.ORTModelForAudioClassification.forward.example",$$slots:{default:[Ip]},$$scope:{ctx:$}}}),Ct=new x({props:{anchor:"optimum.onnxruntime.ORTModelForAudioClassification.forward.example-2",$$slots:{default:[Vp]},$$scope:{ctx:$}}}),On=new R({props:{title:"ORTModelForAudioFrameClassification",local:"optimum.onnxruntime.ORTModelForAudioFrameClassification",headingTag:"h3"}}),Yn=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_79/optimum/onnxruntime/modeling.py#L1854"}}),An=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_79/optimum/onnxruntime/modeling.py#L1860"}}),Gt=new W({props:{$$slots:{default:[Xp]},$$scope:{ctx:$}}}),It=new x({props:{anchor:"optimum.onnxruntime.ORTModelForAudioFrameClassification.forward.example",$$slots:{default:[zp]},$$scope:{ctx:$}}}),Pn=new R({props:{title:"ORTModelForCTC",local:"optimum.onnxruntime.ORTModelForCTC",headingTag:"h3"}}),Dn=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_79/optimum/onnxruntime/modeling.py#L1667"}}),Kn=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_79/optimum/onnxruntime/modeling.py#L1673"}}),Vt=new W({props:{$$slots:{default:[Bp]},$$scope:{ctx:$}}}),Xt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForCTC.forward.example",$$slots:{default:[Sp]},$$scope:{ctx:$}}}),es=new R({props:{title:"ORTModelForSpeechSeq2Seq",local:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq",headingTag:"h3"}}),ts=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_79/optimum/onnxruntime/modeling_seq2seq.py#L1283"}}),ns=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_79/optimum/onnxruntime/modeling_seq2seq.py#L1308"}}),zt=new W({props:{$$slots:{default:[qp]},$$scope:{ctx:$}}}),Bt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq.forward.example",$$slots:{default:[Hp]},$$scope:{ctx:$}}}),St=new x({props:{anchor:"optimum.onnxruntime.ORTModelForSpeechSeq2Seq.forward.example-2",$$slots:{default:[Ep]},$$scope:{ctx:$}}}),ss=new R({props:{title:"ORTModelForAudioXVector",local:"optimum.onnxruntime.ORTModelForAudioXVector",headingTag:"h3"}}),os=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_79/optimum/onnxruntime/modeling.py#L1768"}}),as=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_79/optimum/onnxruntime/modeling.py#L1774"}}),qt=new W({props:{$$slots:{default:[Lp]},$$scope:{ctx:$}}}),Ht=new x({props:{anchor:"optimum.onnxruntime.ORTModelForAudioXVector.forward.example",$$slots:{default:[Qp]},$$scope:{ctx:$}}}),ls=new R({props:{title:"Multimodal",local:"multimodal",headingTag:"h2"}}),is=new R({props:{title:"ORTModelForVision2Seq",local:"optimum.onnxruntime.ORTModelForVision2Seq",headingTag:"h3"}}),ms=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_79/optimum/onnxruntime/modeling_seq2seq.py#L1455"}}),ps=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_79/optimum/onnxruntime/modeling_seq2seq.py#L1470"}}),Et=new W({props:{$$slots:{default:[Op]},$$scope:{ctx:$}}}),Lt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForVision2Seq.forward.example",$$slots:{default:[Yp]},$$scope:{ctx:$}}}),Qt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForVision2Seq.forward.example-2",$$slots:{default:[Ap]},$$scope:{ctx:$}}}),cs=new R({props:{title:"ORTModelForPix2Struct",local:"optimum.onnxruntime.ORTModelForPix2Struct",headingTag:"h3"}}),ds=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_79/optimum/onnxruntime/modeling_seq2seq.py#L1527"}}),us=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_79/optimum/onnxruntime/modeling_seq2seq.py#L1540"}}),Ot=new W({props:{$$slots:{default:[Pp]},$$scope:{ctx:$}}}),Yt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForPix2Struct.forward.example",$$slots:{default:[Dp]},$$scope:{ctx:$}}}),gs=new R({props:{title:"Custom Tasks",local:"custom-tasks",headingTag:"h2"}}),fs=new R({props:{title:"ORTModelForCustomTasks",local:"optimum.onnxruntime.ORTModelForCustomTasks",headingTag:"h4"}}),Ms=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_79/optimum/onnxruntime/modeling.py#L2019"}}),bs=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_79/optimum/onnxruntime/modeling.py#L2022"}}),At=new W({props:{$$slots:{default:[Kp]},$$scope:{ctx:$}}}),Pt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForCustomTasks.forward.example",$$slots:{default:[ec]},$$scope:{ctx:$}}}),Dt=new x({props:{anchor:"optimum.onnxruntime.ORTModelForCustomTasks.forward.example-2",$$slots:{default:[tc]},$$scope:{ctx:$}}}),Ts=new R({props:{title:"ORTModelForFeatureExtraction",local:"optimum.onnxruntime.ORTModelForFeatureExtraction",headingTag:"h4"}}),ys=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_79/optimum/onnxruntime/modeling.py#L648"}}),_s=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_79/optimum/onnxruntime/modeling.py#L654"}}),Kt=new W({props:{$$slots:{default:[nc]},$$scope:{ctx:$}}}),en=new x({props:{anchor:"optimum.onnxruntime.ORTModelForFeatureExtraction.forward.example",$$slots:{default:[sc]},$$scope:{ctx:$}}}),tn=new x({props:{anchor:"optimum.onnxruntime.ORTModelForFeatureExtraction.forward.example-2",$$slots:{default:[oc]},$$scope:{ctx:$}}}),{c(){n=p("meta"),g=l(),o=p("p"),s=l(),h(d.$$.fragment),t=l(),h(_.$$.fragment),So=l(),h(nn.$$.fragment),qo=l(),sn=p("p"),sn.textContent=$i,Ho=l(),h(on.$$.fragment),Eo=l(),Z=p("div"),h(an.$$.fragment),Sa=l(),$s=p("p"),$s.textContent=vi,qa=l(),vs=p("p"),vs.innerHTML=Ji,Ha=l(),Js=p("p"),Js.textContent=ji,Ea=l(),js=p("ul"),js.innerHTML=ki,La=l(),ot=p("div"),h(ln.$$.fragment),Qa=l(),ks=p("p"),ks.innerHTML=xi,Oa=l(),F=p("div"),h(rn.$$.fragment),Ya=l(),xs=p("p"),xs.textContent=Ui,Aa=l(),Us=p("p"),Us.innerHTML=Ri,Pa=l(),Rs=p("blockquote"),Rs.innerHTML=Zi,Da=l(),Zs=p("p"),Zs.innerHTML=Wi,Ka=l(),Ws=p("p"),Ws.innerHTML=Ni,Lo=l(),h(mn.$$.fragment),Qo=l(),pn=p("p"),pn.textContent=Fi,Oo=l(),h(cn.$$.fragment),Yo=l(),ee=p("div"),h(dn.$$.fragment),el=l(),Ns=p("p"),Ns.innerHTML=Ci,tl=l(),Fs=p("p"),Fs.innerHTML=Gi,nl=l(),S=p("div"),h(un.$$.fragment),sl=l(),Cs=p("p"),Cs.innerHTML=Ii,ol=l(),h(at.$$.fragment),al=l(),h(lt.$$.fragment),ll=l(),h(rt.$$.fragment),Ao=l(),h(gn.$$.fragment),Po=l(),te=p("div"),h(hn.$$.fragment),rl=l(),Gs=p("p"),Gs.innerHTML=Vi,il=l(),Is=p("p"),Is.innerHTML=Xi,ml=l(),q=p("div"),h(fn.$$.fragment),pl=l(),Vs=p("p"),Vs.innerHTML=zi,cl=l(),h(it.$$.fragment),dl=l(),h(mt.$$.fragment),ul=l(),h(pt.$$.fragment),Do=l(),h(Mn.$$.fragment),Ko=l(),ne=p("div"),h(bn.$$.fragment),gl=l(),Xs=p("p"),Xs.innerHTML=Bi,hl=l(),zs=p("p"),zs.innerHTML=Si,fl=l(),H=p("div"),h(Tn.$$.fragment),Ml=l(),Bs=p("p"),Bs.innerHTML=qi,bl=l(),h(ct.$$.fragment),Tl=l(),h(dt.$$.fragment),yl=l(),h(ut.$$.fragment),ea=l(),h(yn.$$.fragment),ta=l(),G=p("div"),h(_n.$$.fragment),_l=l(),Ss=p("p"),Ss.textContent=Hi,wl=l(),qs=p("p"),qs.innerHTML=Ei,$l=l(),Hs=p("p"),Hs.innerHTML=Li,vl=l(),C=p("div"),h(wn.$$.fragment),Jl=l(),Es=p("p"),Es.innerHTML=Qi,jl=l(),h(gt.$$.fragment),kl=l(),h(ht.$$.fragment),xl=l(),h(ft.$$.fragment),Ul=l(),h(Mt.$$.fragment),na=l(),h($n.$$.fragment),sa=l(),I=p("div"),h(vn.$$.fragment),Rl=l(),Ls=p("p"),Ls.textContent=Oi,Zl=l(),Qs=p("p"),Qs.innerHTML=Yi,Wl=l(),Os=p("p"),Os.innerHTML=Ai,Nl=l(),E=p("div"),h(Jn.$$.fragment),Fl=l(),Ys=p("p"),Ys.innerHTML=Pi,Cl=l(),h(bt.$$.fragment),Gl=l(),h(Tt.$$.fragment),Il=l(),h(yt.$$.fragment),oa=l(),h(jn.$$.fragment),aa=l(),V=p("div"),h(kn.$$.fragment),Vl=l(),As=p("p"),As.textContent=Di,Xl=l(),Ps=p("p"),Ps.innerHTML=Ki,zl=l(),Ds=p("p"),Ds.innerHTML=em,Bl=l(),Ze=p("div"),h(xn.$$.fragment),Sl=l(),Ks=p("p"),Ks.innerHTML=tm,ql=l(),h(_t.$$.fragment),Hl=l(),h(wt.$$.fragment),la=l(),h(Un.$$.fragment),ra=l(),se=p("div"),h(Rn.$$.fragment),El=l(),eo=p("p"),eo.innerHTML=nm,Ll=l(),to=p("p"),to.innerHTML=sm,Ql=l(),L=p("div"),h(Zn.$$.fragment),Ol=l(),no=p("p"),no.innerHTML=om,Yl=l(),h($t.$$.fragment),Al=l(),h(vt.$$.fragment),Pl=l(),h(Jt.$$.fragment),ia=l(),h(Wn.$$.fragment),ma=l(),Nn=p("p"),Nn.textContent=am,pa=l(),h(Fn.$$.fragment),ca=l(),oe=p("div"),h(Cn.$$.fragment),Dl=l(),so=p("p"),so.innerHTML=lm,Kl=l(),oo=p("p"),oo.innerHTML=rm,er=l(),Q=p("div"),h(Gn.$$.fragment),tr=l(),ao=p("p"),ao.innerHTML=im,nr=l(),h(jt.$$.fragment),sr=l(),h(kt.$$.fragment),or=l(),h(xt.$$.fragment),da=l(),h(In.$$.fragment),ua=l(),ae=p("div"),h(Vn.$$.fragment),ar=l(),lo=p("p"),lo.innerHTML=mm,lr=l(),ro=p("p"),ro.innerHTML=pm,rr=l(),nt=p("div"),h(Xn.$$.fragment),ir=l(),io=p("p"),io.innerHTML=cm,mr=l(),h(Ut.$$.fragment),ga=l(),h(zn.$$.fragment),ha=l(),le=p("div"),h(Bn.$$.fragment),pr=l(),mo=p("p"),mo.innerHTML=dm,cr=l(),po=p("p"),po.innerHTML=um,dr=l(),O=p("div"),h(Sn.$$.fragment),ur=l(),co=p("p"),co.innerHTML=gm,gr=l(),h(Rt.$$.fragment),hr=l(),h(Zt.$$.fragment),fr=l(),h(Wt.$$.fragment),fa=l(),h(qn.$$.fragment),Ma=l(),Hn=p("p"),Hn.textContent=hm,ba=l(),h(En.$$.fragment),Ta=l(),X=p("div"),h(Ln.$$.fragment),Mr=l(),uo=p("p"),uo.textContent=fm,br=l(),go=p("p"),go.innerHTML=Mm,Tr=l(),ho=p("p"),ho.innerHTML=bm,yr=l(),Y=p("div"),h(Qn.$$.fragment),_r=l(),fo=p("p"),fo.innerHTML=Tm,wr=l(),h(Nt.$$.fragment),$r=l(),h(Ft.$$.fragment),vr=l(),h(Ct.$$.fragment),ya=l(),h(On.$$.fragment),_a=l(),re=p("div"),h(Yn.$$.fragment),Jr=l(),Mo=p("p"),Mo.innerHTML=ym,jr=l(),bo=p("p"),bo.innerHTML=_m,kr=l(),We=p("div"),h(An.$$.fragment),xr=l(),To=p("p"),To.innerHTML=wm,Ur=l(),h(Gt.$$.fragment),Rr=l(),h(It.$$.fragment),wa=l(),h(Pn.$$.fragment),$a=l(),ie=p("div"),h(Dn.$$.fragment),Zr=l(),yo=p("p"),yo.innerHTML=$m,Wr=l(),_o=p("p"),_o.innerHTML=vm,Nr=l(),Ne=p("div"),h(Kn.$$.fragment),Fr=l(),wo=p("p"),wo.innerHTML=Jm,Cr=l(),h(Vt.$$.fragment),Gr=l(),h(Xt.$$.fragment),va=l(),h(es.$$.fragment),Ja=l(),me=p("div"),h(ts.$$.fragment),Ir=l(),$o=p("p"),$o.innerHTML=jm,Vr=l(),vo=p("p"),vo.innerHTML=km,Xr=l(),A=p("div"),h(ns.$$.fragment),zr=l(),Jo=p("p"),Jo.innerHTML=xm,Br=l(),h(zt.$$.fragment),Sr=l(),h(Bt.$$.fragment),qr=l(),h(St.$$.fragment),ja=l(),h(ss.$$.fragment),ka=l(),pe=p("div"),h(os.$$.fragment),Hr=l(),jo=p("p"),jo.innerHTML=Um,Er=l(),ko=p("p"),ko.innerHTML=Rm,Lr=l(),Fe=p("div"),h(as.$$.fragment),Qr=l(),xo=p("p"),xo.innerHTML=Zm,Or=l(),h(qt.$$.fragment),Yr=l(),h(Ht.$$.fragment),xa=l(),h(ls.$$.fragment),Ua=l(),rs=p("p"),rs.textContent=Wm,Ra=l(),h(is.$$.fragment),Za=l(),ce=p("div"),h(ms.$$.fragment),Ar=l(),Uo=p("p"),Uo.innerHTML=Nm,Pr=l(),Ro=p("p"),Ro.innerHTML=Fm,Dr=l(),P=p("div"),h(ps.$$.fragment),Kr=l(),Zo=p("p"),Zo.innerHTML=Cm,ei=l(),h(Et.$$.fragment),ti=l(),h(Lt.$$.fragment),ni=l(),h(Qt.$$.fragment),Wa=l(),h(cs.$$.fragment),Na=l(),de=p("div"),h(ds.$$.fragment),si=l(),Wo=p("p"),Wo.innerHTML=Gm,oi=l(),No=p("p"),No.innerHTML=Im,ai=l(),Ce=p("div"),h(us.$$.fragment),li=l(),Fo=p("p"),Fo.innerHTML=Vm,ri=l(),h(Ot.$$.fragment),ii=l(),h(Yt.$$.fragment),Fa=l(),h(gs.$$.fragment),Ca=l(),hs=p("p"),hs.textContent=Xm,Ga=l(),h(fs.$$.fragment),Ia=l(),ue=p("div"),h(Ms.$$.fragment),mi=l(),Co=p("p"),Co.innerHTML=zm,pi=l(),Go=p("p"),Go.innerHTML=Bm,ci=l(),D=p("div"),h(bs.$$.fragment),di=l(),Io=p("p"),Io.innerHTML=Sm,ui=l(),h(At.$$.fragment),gi=l(),h(Pt.$$.fragment),hi=l(),h(Dt.$$.fragment),Va=l(),h(Ts.$$.fragment),Xa=l(),ge=p("div"),h(ys.$$.fragment),fi=l(),Vo=p("p"),Vo.innerHTML=qm,Mi=l(),Xo=p("p"),Xo.innerHTML=Hm,bi=l(),K=p("div"),h(_s.$$.fragment),Ti=l(),zo=p("p"),zo.innerHTML=Em,yi=l(),h(Kt.$$.fragment),_i=l(),h(en.$$.fragment),wi=l(),h(tn.$$.fragment),za=l(),Bo=p("p"),this.h()},l(e){const i=lp("svelte-u9bgzb",document.head);n=c(i,"META",{name:!0,content:!0}),i.forEach(m),g=r(e),o=c(e,"P",{}),J(o).forEach(m),s=r(e),f(d.$$.fragment,e),t=r(e),f(_.$$.fragment,e),So=r(e),f(nn.$$.fragment,e),qo=r(e),sn=c(e,"P",{"data-svelte-h":!0}),w(sn)!=="svelte-uyecg"&&(sn.textContent=$i),Ho=r(e),f(on.$$.fragment,e),Eo=r(e),Z=c(e,"DIV",{class:!0});var N=J(Z);f(an.$$.fragment,N),Sa=r(N),$s=c(N,"P",{"data-svelte-h":!0}),w($s)!=="svelte-12yueui"&&($s.textContent=vi),qa=r(N),vs=c(N,"P",{"data-svelte-h":!0}),w(vs)!=="svelte-zarm0s"&&(vs.innerHTML=Ji),Ha=r(N),Js=c(N,"P",{"data-svelte-h":!0}),w(Js)!=="svelte-wz8va1"&&(Js.textContent=ji),Ea=r(N),js=c(N,"UL",{"data-svelte-h":!0}),w(js)!=="svelte-qpxha0"&&(js.innerHTML=ki),La=r(N),ot=c(N,"DIV",{class:!0});var ws=J(ot);f(ln.$$.fragment,ws),Qa=r(ws),ks=c(ws,"P",{"data-svelte-h":!0}),w(ks)!=="svelte-1r2xt0l"&&(ks.innerHTML=xi),ws.forEach(m),Oa=r(N),F=c(N,"DIV",{class:!0});var z=J(F);f(rn.$$.fragment,z),Ya=r(z),xs=c(z,"P",{"data-svelte-h":!0}),w(xs)!=="svelte-18vxhwp"&&(xs.textContent=Ui),Aa=r(z),Us=c(z,"P",{"data-svelte-h":!0}),w(Us)!=="svelte-1mrbn81"&&(Us.innerHTML=Ri),Pa=r(z),Rs=c(z,"BLOCKQUOTE",{"data-svelte-h":!0}),w(Rs)!=="svelte-1uv5y3f"&&(Rs.innerHTML=Zi),Da=r(z),Zs=c(z,"P",{"data-svelte-h":!0}),w(Zs)!=="svelte-vzi3zk"&&(Zs.innerHTML=Wi),Ka=r(z),Ws=c(z,"P",{"data-svelte-h":!0}),w(Ws)!=="svelte-111jrpf"&&(Ws.innerHTML=Ni),z.forEach(m),N.forEach(m),Lo=r(e),f(mn.$$.fragment,e),Qo=r(e),pn=c(e,"P",{"data-svelte-h":!0}),w(pn)!=="svelte-1tlroh"&&(pn.textContent=Fi),Oo=r(e),f(cn.$$.fragment,e),Yo=r(e),ee=c(e,"DIV",{class:!0});var Ge=J(ee);f(dn.$$.fragment,Ge),el=r(Ge),Ns=c(Ge,"P",{"data-svelte-h":!0}),w(Ns)!=="svelte-ul76ta"&&(Ns.innerHTML=Ci),tl=r(Ge),Fs=c(Ge,"P",{"data-svelte-h":!0}),w(Fs)!=="svelte-iqidxs"&&(Fs.innerHTML=Gi),nl=r(Ge),S=c(Ge,"DIV",{class:!0});var he=J(S);f(un.$$.fragment,he),sl=r(he),Cs=c(he,"P",{"data-svelte-h":!0}),w(Cs)!=="svelte-1ox9av6"&&(Cs.innerHTML=Ii),ol=r(he),f(at.$$.fragment,he),al=r(he),f(lt.$$.fragment,he),ll=r(he),f(rt.$$.fragment,he),he.forEach(m),Ge.forEach(m),Ao=r(e),f(gn.$$.fragment,e),Po=r(e),te=c(e,"DIV",{class:!0});var Ie=J(te);f(hn.$$.fragment,Ie),rl=r(Ie),Gs=c(Ie,"P",{"data-svelte-h":!0}),w(Gs)!=="svelte-zzqdv1"&&(Gs.innerHTML=Vi),il=r(Ie),Is=c(Ie,"P",{"data-svelte-h":!0}),w(Is)!=="svelte-iqidxs"&&(Is.innerHTML=Xi),ml=r(Ie),q=c(Ie,"DIV",{class:!0});var fe=J(q);f(fn.$$.fragment,fe),pl=r(fe),Vs=c(fe,"P",{"data-svelte-h":!0}),w(Vs)!=="svelte-1xqof9m"&&(Vs.innerHTML=zi),cl=r(fe),f(it.$$.fragment,fe),dl=r(fe),f(mt.$$.fragment,fe),ul=r(fe),f(pt.$$.fragment,fe),fe.forEach(m),Ie.forEach(m),Do=r(e),f(Mn.$$.fragment,e),Ko=r(e),ne=c(e,"DIV",{class:!0});var Ve=J(ne);f(bn.$$.fragment,Ve),gl=r(Ve),Xs=c(Ve,"P",{"data-svelte-h":!0}),w(Xs)!=="svelte-1la46b6"&&(Xs.innerHTML=Bi),hl=r(Ve),zs=c(Ve,"P",{"data-svelte-h":!0}),w(zs)!=="svelte-1e4b1f1"&&(zs.innerHTML=Si),fl=r(Ve),H=c(Ve,"DIV",{class:!0});var Me=J(H);f(Tn.$$.fragment,Me),Ml=r(Me),Bs=c(Me,"P",{"data-svelte-h":!0}),w(Bs)!=="svelte-n65k7h"&&(Bs.innerHTML=qi),bl=r(Me),f(ct.$$.fragment,Me),Tl=r(Me),f(dt.$$.fragment,Me),yl=r(Me),f(ut.$$.fragment,Me),Me.forEach(m),Ve.forEach(m),ea=r(e),f(yn.$$.fragment,e),ta=r(e),G=c(e,"DIV",{class:!0});var be=J(G);f(_n.$$.fragment,be),_l=r(be),Ss=c(be,"P",{"data-svelte-h":!0}),w(Ss)!=="svelte-1fcejq5"&&(Ss.textContent=Hi),wl=r(be),qs=c(be,"P",{"data-svelte-h":!0}),w(qs)!=="svelte-y2r9kp"&&(qs.innerHTML=Ei),$l=r(be),Hs=c(be,"P",{"data-svelte-h":!0}),w(Hs)!=="svelte-iqidxs"&&(Hs.innerHTML=Li),vl=r(be),C=c(be,"DIV",{class:!0});var B=J(C);f(wn.$$.fragment,B),Jl=r(B),Es=c(B,"P",{"data-svelte-h":!0}),w(Es)!=="svelte-1plx9t"&&(Es.innerHTML=Qi),jl=r(B),f(gt.$$.fragment,B),kl=r(B),f(ht.$$.fragment,B),xl=r(B),f(ft.$$.fragment,B),Ul=r(B),f(Mt.$$.fragment,B),B.forEach(m),be.forEach(m),na=r(e),f($n.$$.fragment,e),sa=r(e),I=c(e,"DIV",{class:!0});var Te=J(I);f(vn.$$.fragment,Te),Rl=r(Te),Ls=c(Te,"P",{"data-svelte-h":!0}),w(Ls)!=="svelte-1uwjkkt"&&(Ls.textContent=Oi),Zl=r(Te),Qs=c(Te,"P",{"data-svelte-h":!0}),w(Qs)!=="svelte-y2r9kp"&&(Qs.innerHTML=Yi),Wl=r(Te),Os=c(Te,"P",{"data-svelte-h":!0}),w(Os)!=="svelte-iqidxs"&&(Os.innerHTML=Ai),Nl=r(Te),E=c(Te,"DIV",{class:!0});var ye=J(E);f(Jn.$$.fragment,ye),Fl=r(ye),Ys=c(ye,"P",{"data-svelte-h":!0}),w(Ys)!=="svelte-xk2xch"&&(Ys.innerHTML=Pi),Cl=r(ye),f(bt.$$.fragment,ye),Gl=r(ye),f(Tt.$$.fragment,ye),Il=r(ye),f(yt.$$.fragment,ye),ye.forEach(m),Te.forEach(m),oa=r(e),f(jn.$$.fragment,e),aa=r(e),V=c(e,"DIV",{class:!0});var _e=J(V);f(kn.$$.fragment,_e),Vl=r(_e),As=c(_e,"P",{"data-svelte-h":!0}),w(As)!=="svelte-dcahwi"&&(As.textContent=Di),Xl=r(_e),Ps=c(_e,"P",{"data-svelte-h":!0}),w(Ps)!=="svelte-y2r9kp"&&(Ps.innerHTML=Ki),zl=r(_e),Ds=c(_e,"P",{"data-svelte-h":!0}),w(Ds)!=="svelte-iqidxs"&&(Ds.innerHTML=em),Bl=r(_e),Ze=c(_e,"DIV",{class:!0});var Xe=J(Ze);f(xn.$$.fragment,Xe),Sl=r(Xe),Ks=c(Xe,"P",{"data-svelte-h":!0}),w(Ks)!=="svelte-qesv8n"&&(Ks.innerHTML=tm),ql=r(Xe),f(_t.$$.fragment,Xe),Hl=r(Xe),f(wt.$$.fragment,Xe),Xe.forEach(m),_e.forEach(m),la=r(e),f(Un.$$.fragment,e),ra=r(e),se=c(e,"DIV",{class:!0});var ze=J(se);f(Rn.$$.fragment,ze),El=r(ze),eo=c(ze,"P",{"data-svelte-h":!0}),w(eo)!=="svelte-i9opca"&&(eo.innerHTML=nm),Ll=r(ze),to=c(ze,"P",{"data-svelte-h":!0}),w(to)!=="svelte-iqidxs"&&(to.innerHTML=sm),Ql=r(ze),L=c(ze,"DIV",{class:!0});var we=J(L);f(Zn.$$.fragment,we),Ol=r(we),no=c(we,"P",{"data-svelte-h":!0}),w(no)!=="svelte-1dng7rw"&&(no.innerHTML=om),Yl=r(we),f($t.$$.fragment,we),Al=r(we),f(vt.$$.fragment,we),Pl=r(we),f(Jt.$$.fragment,we),we.forEach(m),ze.forEach(m),ia=r(e),f(Wn.$$.fragment,e),ma=r(e),Nn=c(e,"P",{"data-svelte-h":!0}),w(Nn)!=="svelte-1h2y3wu"&&(Nn.textContent=am),pa=r(e),f(Fn.$$.fragment,e),ca=r(e),oe=c(e,"DIV",{class:!0});var Be=J(oe);f(Cn.$$.fragment,Be),Dl=r(Be),so=c(Be,"P",{"data-svelte-h":!0}),w(so)!=="svelte-uhl632"&&(so.innerHTML=lm),Kl=r(Be),oo=c(Be,"P",{"data-svelte-h":!0}),w(oo)!=="svelte-iqidxs"&&(oo.innerHTML=rm),er=r(Be),Q=c(Be,"DIV",{class:!0});var $e=J(Q);f(Gn.$$.fragment,$e),tr=r($e),ao=c($e,"P",{"data-svelte-h":!0}),w(ao)!=="svelte-1azuqx"&&(ao.innerHTML=im),nr=r($e),f(jt.$$.fragment,$e),sr=r($e),f(kt.$$.fragment,$e),or=r($e),f(xt.$$.fragment,$e),$e.forEach(m),Be.forEach(m),da=r(e),f(In.$$.fragment,e),ua=r(e),ae=c(e,"DIV",{class:!0});var Se=J(ae);f(Vn.$$.fragment,Se),ar=r(Se),lo=c(Se,"P",{"data-svelte-h":!0}),w(lo)!=="svelte-1xx2ypa"&&(lo.innerHTML=mm),lr=r(Se),ro=c(Se,"P",{"data-svelte-h":!0}),w(ro)!=="svelte-iqidxs"&&(ro.innerHTML=pm),rr=r(Se),nt=c(Se,"DIV",{class:!0});var st=J(nt);f(Xn.$$.fragment,st),ir=r(st),io=c(st,"P",{"data-svelte-h":!0}),w(io)!=="svelte-q10zmj"&&(io.innerHTML=cm),mr=r(st),f(Ut.$$.fragment,st),st.forEach(m),Se.forEach(m),ga=r(e),f(zn.$$.fragment,e),ha=r(e),le=c(e,"DIV",{class:!0});var qe=J(le);f(Bn.$$.fragment,qe),pr=r(qe),mo=c(qe,"P",{"data-svelte-h":!0}),w(mo)!=="svelte-hnvpw8"&&(mo.innerHTML=dm),cr=r(qe),po=c(qe,"P",{"data-svelte-h":!0}),w(po)!=="svelte-iqidxs"&&(po.innerHTML=um),dr=r(qe),O=c(qe,"DIV",{class:!0});var ve=J(O);f(Sn.$$.fragment,ve),ur=r(ve),co=c(ve,"P",{"data-svelte-h":!0}),w(co)!=="svelte-1s27jle"&&(co.innerHTML=gm),gr=r(ve),f(Rt.$$.fragment,ve),hr=r(ve),f(Zt.$$.fragment,ve),fr=r(ve),f(Wt.$$.fragment,ve),ve.forEach(m),qe.forEach(m),fa=r(e),f(qn.$$.fragment,e),Ma=r(e),Hn=c(e,"P",{"data-svelte-h":!0}),w(Hn)!=="svelte-liyjdz"&&(Hn.textContent=hm),ba=r(e),f(En.$$.fragment,e),Ta=r(e),X=c(e,"DIV",{class:!0});var Je=J(X);f(Ln.$$.fragment,Je),Mr=r(Je),uo=c(Je,"P",{"data-svelte-h":!0}),w(uo)!=="svelte-1uwrr47"&&(uo.textContent=fm),br=r(Je),go=c(Je,"P",{"data-svelte-h":!0}),w(go)!=="svelte-y2r9kp"&&(go.innerHTML=Mm),Tr=r(Je),ho=c(Je,"P",{"data-svelte-h":!0}),w(ho)!=="svelte-iqidxs"&&(ho.innerHTML=bm),yr=r(Je),Y=c(Je,"DIV",{class:!0});var je=J(Y);f(Qn.$$.fragment,je),_r=r(je),fo=c(je,"P",{"data-svelte-h":!0}),w(fo)!=="svelte-p67kxo"&&(fo.innerHTML=Tm),wr=r(je),f(Nt.$$.fragment,je),$r=r(je),f(Ft.$$.fragment,je),vr=r(je),f(Ct.$$.fragment,je),je.forEach(m),Je.forEach(m),ya=r(e),f(On.$$.fragment,e),_a=r(e),re=c(e,"DIV",{class:!0});var He=J(re);f(Yn.$$.fragment,He),Jr=r(He),Mo=c(He,"P",{"data-svelte-h":!0}),w(Mo)!=="svelte-15eq9ap"&&(Mo.innerHTML=ym),jr=r(He),bo=c(He,"P",{"data-svelte-h":!0}),w(bo)!=="svelte-iqidxs"&&(bo.innerHTML=_m),kr=r(He),We=c(He,"DIV",{class:!0});var Ee=J(We);f(An.$$.fragment,Ee),xr=r(Ee),To=c(Ee,"P",{"data-svelte-h":!0}),w(To)!=="svelte-18aced7"&&(To.innerHTML=wm),Ur=r(Ee),f(Gt.$$.fragment,Ee),Rr=r(Ee),f(It.$$.fragment,Ee),Ee.forEach(m),He.forEach(m),wa=r(e),f(Pn.$$.fragment,e),$a=r(e),ie=c(e,"DIV",{class:!0});var Le=J(ie);f(Dn.$$.fragment,Le),Zr=r(Le),yo=c(Le,"P",{"data-svelte-h":!0}),w(yo)!=="svelte-1235a0h"&&(yo.innerHTML=$m),Wr=r(Le),_o=c(Le,"P",{"data-svelte-h":!0}),w(_o)!=="svelte-iqidxs"&&(_o.innerHTML=vm),Nr=r(Le),Ne=c(Le,"DIV",{class:!0});var Qe=J(Ne);f(Kn.$$.fragment,Qe),Fr=r(Qe),wo=c(Qe,"P",{"data-svelte-h":!0}),w(wo)!=="svelte-1szjv6u"&&(wo.innerHTML=Jm),Cr=r(Qe),f(Vt.$$.fragment,Qe),Gr=r(Qe),f(Xt.$$.fragment,Qe),Qe.forEach(m),Le.forEach(m),va=r(e),f(es.$$.fragment,e),Ja=r(e),me=c(e,"DIV",{class:!0});var Oe=J(me);f(ts.$$.fragment,Oe),Ir=r(Oe),$o=c(Oe,"P",{"data-svelte-h":!0}),w($o)!=="svelte-1rjeyub"&&($o.innerHTML=jm),Vr=r(Oe),vo=c(Oe,"P",{"data-svelte-h":!0}),w(vo)!=="svelte-1e4b1f1"&&(vo.innerHTML=km),Xr=r(Oe),A=c(Oe,"DIV",{class:!0});var ke=J(A);f(ns.$$.fragment,ke),zr=r(ke),Jo=c(ke,"P",{"data-svelte-h":!0}),w(Jo)!=="svelte-1e3zkhy"&&(Jo.innerHTML=xm),Br=r(ke),f(zt.$$.fragment,ke),Sr=r(ke),f(Bt.$$.fragment,ke),qr=r(ke),f(St.$$.fragment,ke),ke.forEach(m),Oe.forEach(m),ja=r(e),f(ss.$$.fragment,e),ka=r(e),pe=c(e,"DIV",{class:!0});var Ye=J(pe);f(os.$$.fragment,Ye),Hr=r(Ye),jo=c(Ye,"P",{"data-svelte-h":!0}),w(jo)!=="svelte-weoc21"&&(jo.innerHTML=Um),Er=r(Ye),ko=c(Ye,"P",{"data-svelte-h":!0}),w(ko)!=="svelte-iqidxs"&&(ko.innerHTML=Rm),Lr=r(Ye),Fe=c(Ye,"DIV",{class:!0});var Ae=J(Fe);f(as.$$.fragment,Ae),Qr=r(Ae),xo=c(Ae,"P",{"data-svelte-h":!0}),w(xo)!=="svelte-1fuxgrl"&&(xo.innerHTML=Zm),Or=r(Ae),f(qt.$$.fragment,Ae),Yr=r(Ae),f(Ht.$$.fragment,Ae),Ae.forEach(m),Ye.forEach(m),xa=r(e),f(ls.$$.fragment,e),Ua=r(e),rs=c(e,"P",{"data-svelte-h":!0}),w(rs)!=="svelte-1gk58z"&&(rs.textContent=Wm),Ra=r(e),f(is.$$.fragment,e),Za=r(e),ce=c(e,"DIV",{class:!0});var Pe=J(ce);f(ms.$$.fragment,Pe),Ar=r(Pe),Uo=c(Pe,"P",{"data-svelte-h":!0}),w(Uo)!=="svelte-12xo197"&&(Uo.innerHTML=Nm),Pr=r(Pe),Ro=c(Pe,"P",{"data-svelte-h":!0}),w(Ro)!=="svelte-1e4b1f1"&&(Ro.innerHTML=Fm),Dr=r(Pe),P=c(Pe,"DIV",{class:!0});var xe=J(P);f(ps.$$.fragment,xe),Kr=r(xe),Zo=c(xe,"P",{"data-svelte-h":!0}),w(Zo)!=="svelte-11xalzp"&&(Zo.innerHTML=Cm),ei=r(xe),f(Et.$$.fragment,xe),ti=r(xe),f(Lt.$$.fragment,xe),ni=r(xe),f(Qt.$$.fragment,xe),xe.forEach(m),Pe.forEach(m),Wa=r(e),f(cs.$$.fragment,e),Na=r(e),de=c(e,"DIV",{class:!0});var De=J(de);f(ds.$$.fragment,De),si=r(De),Wo=c(De,"P",{"data-svelte-h":!0}),w(Wo)!=="svelte-881496"&&(Wo.innerHTML=Gm),oi=r(De),No=c(De,"P",{"data-svelte-h":!0}),w(No)!=="svelte-1e4b1f1"&&(No.innerHTML=Im),ai=r(De),Ce=c(De,"DIV",{class:!0});var Ke=J(Ce);f(us.$$.fragment,Ke),li=r(Ke),Fo=c(Ke,"P",{"data-svelte-h":!0}),w(Fo)!=="svelte-eywb10"&&(Fo.innerHTML=Vm),ri=r(Ke),f(Ot.$$.fragment,Ke),ii=r(Ke),f(Yt.$$.fragment,Ke),Ke.forEach(m),De.forEach(m),Fa=r(e),f(gs.$$.fragment,e),Ca=r(e),hs=c(e,"P",{"data-svelte-h":!0}),w(hs)!=="svelte-1n8n3ms"&&(hs.textContent=Xm),Ga=r(e),f(fs.$$.fragment,e),Ia=r(e),ue=c(e,"DIV",{class:!0});var et=J(ue);f(Ms.$$.fragment,et),mi=r(et),Co=c(et,"P",{"data-svelte-h":!0}),w(Co)!=="svelte-3yu9pa"&&(Co.innerHTML=zm),pi=r(et),Go=c(et,"P",{"data-svelte-h":!0}),w(Go)!=="svelte-iqidxs"&&(Go.innerHTML=Bm),ci=r(et),D=c(et,"DIV",{class:!0});var Ue=J(D);f(bs.$$.fragment,Ue),di=r(Ue),Io=c(Ue,"P",{"data-svelte-h":!0}),w(Io)!=="svelte-1usnw5b"&&(Io.innerHTML=Sm),ui=r(Ue),f(At.$$.fragment,Ue),gi=r(Ue),f(Pt.$$.fragment,Ue),hi=r(Ue),f(Dt.$$.fragment,Ue),Ue.forEach(m),et.forEach(m),Va=r(e),f(Ts.$$.fragment,e),Xa=r(e),ge=c(e,"DIV",{class:!0});var tt=J(ge);f(ys.$$.fragment,tt),fi=r(tt),Vo=c(tt,"P",{"data-svelte-h":!0}),w(Vo)!=="svelte-1ai2yx1"&&(Vo.innerHTML=qm),Mi=r(tt),Xo=c(tt,"P",{"data-svelte-h":!0}),w(Xo)!=="svelte-iqidxs"&&(Xo.innerHTML=Hm),bi=r(tt),K=c(tt,"DIV",{class:!0});var Re=J(K);f(_s.$$.fragment,Re),Ti=r(Re),zo=c(Re,"P",{"data-svelte-h":!0}),w(zo)!=="svelte-iqwqsz"&&(zo.innerHTML=Em),yi=r(Re),f(Kt.$$.fragment,Re),_i=r(Re),f(en.$$.fragment,Re),wi=r(Re),f(tn.$$.fragment,Re),Re.forEach(m),tt.forEach(m),za=r(e),Bo=c(e,"P",{}),J(Bo).forEach(m),this.h()},h(){j(n,"name","hf:doc:metadata"),j(n,"content",lc),j(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),j(F,"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(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(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(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(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(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(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(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(nt,"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(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(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(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(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(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(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(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(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(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(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(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(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(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(ue,"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(ge,"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(d,e,i),u(e,t,i),M(_,e,i),u(e,So,i),M(nn,e,i),u(e,qo,i),u(e,sn,i),u(e,Ho,i),M(on,e,i),u(e,Eo,i),u(e,Z,i),M(an,Z,null),a(Z,Sa),a(Z,$s),a(Z,qa),a(Z,vs),a(Z,Ha),a(Z,Js),a(Z,Ea),a(Z,js),a(Z,La),a(Z,ot),M(ln,ot,null),a(ot,Qa),a(ot,ks),a(Z,Oa),a(Z,F),M(rn,F,null),a(F,Ya),a(F,xs),a(F,Aa),a(F,Us),a(F,Pa),a(F,Rs),a(F,Da),a(F,Zs),a(F,Ka),a(F,Ws),u(e,Lo,i),M(mn,e,i),u(e,Qo,i),u(e,pn,i),u(e,Oo,i),M(cn,e,i),u(e,Yo,i),u(e,ee,i),M(dn,ee,null),a(ee,el),a(ee,Ns),a(ee,tl),a(ee,Fs),a(ee,nl),a(ee,S),M(un,S,null),a(S,sl),a(S,Cs),a(S,ol),M(at,S,null),a(S,al),M(lt,S,null),a(S,ll),M(rt,S,null),u(e,Ao,i),M(gn,e,i),u(e,Po,i),u(e,te,i),M(hn,te,null),a(te,rl),a(te,Gs),a(te,il),a(te,Is),a(te,ml),a(te,q),M(fn,q,null),a(q,pl),a(q,Vs),a(q,cl),M(it,q,null),a(q,dl),M(mt,q,null),a(q,ul),M(pt,q,null),u(e,Do,i),M(Mn,e,i),u(e,Ko,i),u(e,ne,i),M(bn,ne,null),a(ne,gl),a(ne,Xs),a(ne,hl),a(ne,zs),a(ne,fl),a(ne,H),M(Tn,H,null),a(H,Ml),a(H,Bs),a(H,bl),M(ct,H,null),a(H,Tl),M(dt,H,null),a(H,yl),M(ut,H,null),u(e,ea,i),M(yn,e,i),u(e,ta,i),u(e,G,i),M(_n,G,null),a(G,_l),a(G,Ss),a(G,wl),a(G,qs),a(G,$l),a(G,Hs),a(G,vl),a(G,C),M(wn,C,null),a(C,Jl),a(C,Es),a(C,jl),M(gt,C,null),a(C,kl),M(ht,C,null),a(C,xl),M(ft,C,null),a(C,Ul),M(Mt,C,null),u(e,na,i),M($n,e,i),u(e,sa,i),u(e,I,i),M(vn,I,null),a(I,Rl),a(I,Ls),a(I,Zl),a(I,Qs),a(I,Wl),a(I,Os),a(I,Nl),a(I,E),M(Jn,E,null),a(E,Fl),a(E,Ys),a(E,Cl),M(bt,E,null),a(E,Gl),M(Tt,E,null),a(E,Il),M(yt,E,null),u(e,oa,i),M(jn,e,i),u(e,aa,i),u(e,V,i),M(kn,V,null),a(V,Vl),a(V,As),a(V,Xl),a(V,Ps),a(V,zl),a(V,Ds),a(V,Bl),a(V,Ze),M(xn,Ze,null),a(Ze,Sl),a(Ze,Ks),a(Ze,ql),M(_t,Ze,null),a(Ze,Hl),M(wt,Ze,null),u(e,la,i),M(Un,e,i),u(e,ra,i),u(e,se,i),M(Rn,se,null),a(se,El),a(se,eo),a(se,Ll),a(se,to),a(se,Ql),a(se,L),M(Zn,L,null),a(L,Ol),a(L,no),a(L,Yl),M($t,L,null),a(L,Al),M(vt,L,null),a(L,Pl),M(Jt,L,null),u(e,ia,i),M(Wn,e,i),u(e,ma,i),u(e,Nn,i),u(e,pa,i),M(Fn,e,i),u(e,ca,i),u(e,oe,i),M(Cn,oe,null),a(oe,Dl),a(oe,so),a(oe,Kl),a(oe,oo),a(oe,er),a(oe,Q),M(Gn,Q,null),a(Q,tr),a(Q,ao),a(Q,nr),M(jt,Q,null),a(Q,sr),M(kt,Q,null),a(Q,or),M(xt,Q,null),u(e,da,i),M(In,e,i),u(e,ua,i),u(e,ae,i),M(Vn,ae,null),a(ae,ar),a(ae,lo),a(ae,lr),a(ae,ro),a(ae,rr),a(ae,nt),M(Xn,nt,null),a(nt,ir),a(nt,io),a(nt,mr),M(Ut,nt,null),u(e,ga,i),M(zn,e,i),u(e,ha,i),u(e,le,i),M(Bn,le,null),a(le,pr),a(le,mo),a(le,cr),a(le,po),a(le,dr),a(le,O),M(Sn,O,null),a(O,ur),a(O,co),a(O,gr),M(Rt,O,null),a(O,hr),M(Zt,O,null),a(O,fr),M(Wt,O,null),u(e,fa,i),M(qn,e,i),u(e,Ma,i),u(e,Hn,i),u(e,ba,i),M(En,e,i),u(e,Ta,i),u(e,X,i),M(Ln,X,null),a(X,Mr),a(X,uo),a(X,br),a(X,go),a(X,Tr),a(X,ho),a(X,yr),a(X,Y),M(Qn,Y,null),a(Y,_r),a(Y,fo),a(Y,wr),M(Nt,Y,null),a(Y,$r),M(Ft,Y,null),a(Y,vr),M(Ct,Y,null),u(e,ya,i),M(On,e,i),u(e,_a,i),u(e,re,i),M(Yn,re,null),a(re,Jr),a(re,Mo),a(re,jr),a(re,bo),a(re,kr),a(re,We),M(An,We,null),a(We,xr),a(We,To),a(We,Ur),M(Gt,We,null),a(We,Rr),M(It,We,null),u(e,wa,i),M(Pn,e,i),u(e,$a,i),u(e,ie,i),M(Dn,ie,null),a(ie,Zr),a(ie,yo),a(ie,Wr),a(ie,_o),a(ie,Nr),a(ie,Ne),M(Kn,Ne,null),a(Ne,Fr),a(Ne,wo),a(Ne,Cr),M(Vt,Ne,null),a(Ne,Gr),M(Xt,Ne,null),u(e,va,i),M(es,e,i),u(e,Ja,i),u(e,me,i),M(ts,me,null),a(me,Ir),a(me,$o),a(me,Vr),a(me,vo),a(me,Xr),a(me,A),M(ns,A,null),a(A,zr),a(A,Jo),a(A,Br),M(zt,A,null),a(A,Sr),M(Bt,A,null),a(A,qr),M(St,A,null),u(e,ja,i),M(ss,e,i),u(e,ka,i),u(e,pe,i),M(os,pe,null),a(pe,Hr),a(pe,jo),a(pe,Er),a(pe,ko),a(pe,Lr),a(pe,Fe),M(as,Fe,null),a(Fe,Qr),a(Fe,xo),a(Fe,Or),M(qt,Fe,null),a(Fe,Yr),M(Ht,Fe,null),u(e,xa,i),M(ls,e,i),u(e,Ua,i),u(e,rs,i),u(e,Ra,i),M(is,e,i),u(e,Za,i),u(e,ce,i),M(ms,ce,null),a(ce,Ar),a(ce,Uo),a(ce,Pr),a(ce,Ro),a(ce,Dr),a(ce,P),M(ps,P,null),a(P,Kr),a(P,Zo),a(P,ei),M(Et,P,null),a(P,ti),M(Lt,P,null),a(P,ni),M(Qt,P,null),u(e,Wa,i),M(cs,e,i),u(e,Na,i),u(e,de,i),M(ds,de,null),a(de,si),a(de,Wo),a(de,oi),a(de,No),a(de,ai),a(de,Ce),M(us,Ce,null),a(Ce,li),a(Ce,Fo),a(Ce,ri),M(Ot,Ce,null),a(Ce,ii),M(Yt,Ce,null),u(e,Fa,i),M(gs,e,i),u(e,Ca,i),u(e,hs,i),u(e,Ga,i),M(fs,e,i),u(e,Ia,i),u(e,ue,i),M(Ms,ue,null),a(ue,mi),a(ue,Co),a(ue,pi),a(ue,Go),a(ue,ci),a(ue,D),M(bs,D,null),a(D,di),a(D,Io),a(D,ui),M(At,D,null),a(D,gi),M(Pt,D,null),a(D,hi),M(Dt,D,null),u(e,Va,i),M(Ts,e,i),u(e,Xa,i),u(e,ge,i),M(ys,ge,null),a(ge,fi),a(ge,Vo),a(ge,Mi),a(ge,Xo),a(ge,bi),a(ge,K),M(_s,K,null),a(K,Ti),a(K,zo),a(K,yi),M(Kt,K,null),a(K,_i),M(en,K,null),a(K,wi),M(tn,K,null),u(e,za,i),u(e,Bo,i),Ba=!0},p(e,[i]){const N={};i&2&&(N.$$scope={dirty:i,ctx:e}),at.$set(N);const ws={};i&2&&(ws.$$scope={dirty:i,ctx:e}),lt.$set(ws);const z={};i&2&&(z.$$scope={dirty:i,ctx:e}),rt.$set(z);const Ge={};i&2&&(Ge.$$scope={dirty:i,ctx:e}),it.$set(Ge);const he={};i&2&&(he.$$scope={dirty:i,ctx:e}),mt.$set(he);const Ie={};i&2&&(Ie.$$scope={dirty:i,ctx:e}),pt.$set(Ie);const fe={};i&2&&(fe.$$scope={dirty:i,ctx:e}),ct.$set(fe);const Ve={};i&2&&(Ve.$$scope={dirty:i,ctx:e}),dt.$set(Ve);const Me={};i&2&&(Me.$$scope={dirty:i,ctx:e}),ut.$set(Me);const be={};i&2&&(be.$$scope={dirty:i,ctx:e}),gt.$set(be);const B={};i&2&&(B.$$scope={dirty:i,ctx:e}),ht.$set(B);const Te={};i&2&&(Te.$$scope={dirty:i,ctx:e}),ft.$set(Te);const ye={};i&2&&(ye.$$scope={dirty:i,ctx:e}),Mt.$set(ye);const _e={};i&2&&(_e.$$scope={dirty:i,ctx:e}),bt.$set(_e);const Xe={};i&2&&(Xe.$$scope={dirty:i,ctx:e}),Tt.$set(Xe);const ze={};i&2&&(ze.$$scope={dirty:i,ctx:e}),yt.$set(ze);const we={};i&2&&(we.$$scope={dirty:i,ctx:e}),_t.$set(we);const Be={};i&2&&(Be.$$scope={dirty:i,ctx:e}),wt.$set(Be);const $e={};i&2&&($e.$$scope={dirty:i,ctx:e}),$t.$set($e);const Se={};i&2&&(Se.$$scope={dirty:i,ctx:e}),vt.$set(Se);const st={};i&2&&(st.$$scope={dirty:i,ctx:e}),Jt.$set(st);const qe={};i&2&&(qe.$$scope={dirty:i,ctx:e}),jt.$set(qe);const ve={};i&2&&(ve.$$scope={dirty:i,ctx:e}),kt.$set(ve);const Je={};i&2&&(Je.$$scope={dirty:i,ctx:e}),xt.$set(Je);const je={};i&2&&(je.$$scope={dirty:i,ctx:e}),Ut.$set(je);const He={};i&2&&(He.$$scope={dirty:i,ctx:e}),Rt.$set(He);const Ee={};i&2&&(Ee.$$scope={dirty:i,ctx:e}),Zt.$set(Ee);const Le={};i&2&&(Le.$$scope={dirty:i,ctx:e}),Wt.$set(Le);const Qe={};i&2&&(Qe.$$scope={dirty:i,ctx:e}),Nt.$set(Qe);const Oe={};i&2&&(Oe.$$scope={dirty:i,ctx:e}),Ft.$set(Oe);const ke={};i&2&&(ke.$$scope={dirty:i,ctx:e}),Ct.$set(ke);const Ye={};i&2&&(Ye.$$scope={dirty:i,ctx:e}),Gt.$set(Ye);const Ae={};i&2&&(Ae.$$scope={dirty:i,ctx:e}),It.$set(Ae);const Pe={};i&2&&(Pe.$$scope={dirty:i,ctx:e}),Vt.$set(Pe);const xe={};i&2&&(xe.$$scope={dirty:i,ctx:e}),Xt.$set(xe);const De={};i&2&&(De.$$scope={dirty:i,ctx:e}),zt.$set(De);const Ke={};i&2&&(Ke.$$scope={dirty:i,ctx:e}),Bt.$set(Ke);const et={};i&2&&(et.$$scope={dirty:i,ctx:e}),St.$set(et);const Ue={};i&2&&(Ue.$$scope={dirty:i,ctx:e}),qt.$set(Ue);const tt={};i&2&&(tt.$$scope={dirty:i,ctx:e}),Ht.$set(tt);const Re={};i&2&&(Re.$$scope={dirty:i,ctx:e}),Et.$set(Re);const Lm={};i&2&&(Lm.$$scope={dirty:i,ctx:e}),Lt.$set(Lm);const Qm={};i&2&&(Qm.$$scope={dirty:i,ctx:e}),Qt.$set(Qm);const Om={};i&2&&(Om.$$scope={dirty:i,ctx:e}),Ot.$set(Om);const Ym={};i&2&&(Ym.$$scope={dirty:i,ctx:e}),Yt.$set(Ym);const Am={};i&2&&(Am.$$scope={dirty:i,ctx:e}),At.$set(Am);const Pm={};i&2&&(Pm.$$scope={dirty:i,ctx:e}),Pt.$set(Pm);const Dm={};i&2&&(Dm.$$scope={dirty:i,ctx:e}),Dt.$set(Dm);const Km={};i&2&&(Km.$$scope={dirty:i,ctx:e}),Kt.$set(Km);const ep={};i&2&&(ep.$$scope={dirty:i,ctx:e}),en.$set(ep);const tp={};i&2&&(tp.$$scope={dirty:i,ctx:e}),tn.$set(tp)},i(e){Ba||(b(d.$$.fragment,e),b(_.$$.fragment,e),b(nn.$$.fragment,e),b(on.$$.fragment,e),b(an.$$.fragment,e),b(ln.$$.fragment,e),b(rn.$$.fragment,e),b(mn.$$.fragment,e),b(cn.$$.fragment,e),b(dn.$$.fragment,e),b(un.$$.fragment,e),b(at.$$.fragment,e),b(lt.$$.fragment,e),b(rt.$$.fragment,e),b(gn.$$.fragment,e),b(hn.$$.fragment,e),b(fn.$$.fragment,e),b(it.$$.fragment,e),b(mt.$$.fragment,e),b(pt.$$.fragment,e),b(Mn.$$.fragment,e),b(bn.$$.fragment,e),b(Tn.$$.fragment,e),b(ct.$$.fragment,e),b(dt.$$.fragment,e),b(ut.$$.fragment,e),b(yn.$$.fragment,e),b(_n.$$.fragment,e),b(wn.$$.fragment,e),b(gt.$$.fragment,e),b(ht.$$.fragment,e),b(ft.$$.fragment,e),b(Mt.$$.fragment,e),b($n.$$.fragment,e),b(vn.$$.fragment,e),b(Jn.$$.fragment,e),b(bt.$$.fragment,e),b(Tt.$$.fragment,e),b(yt.$$.fragment,e),b(jn.$$.fragment,e),b(kn.$$.fragment,e),b(xn.$$.fragment,e),b(_t.$$.fragment,e),b(wt.$$.fragment,e),b(Un.$$.fragment,e),b(Rn.$$.fragment,e),b(Zn.$$.fragment,e),b($t.$$.fragment,e),b(vt.$$.fragment,e),b(Jt.$$.fragment,e),b(Wn.$$.fragment,e),b(Fn.$$.fragment,e),b(Cn.$$.fragment,e),b(Gn.$$.fragment,e),b(jt.$$.fragment,e),b(kt.$$.fragment,e),b(xt.$$.fragment,e),b(In.$$.fragment,e),b(Vn.$$.fragment,e),b(Xn.$$.fragment,e),b(Ut.$$.fragment,e),b(zn.$$.fragment,e),b(Bn.$$.fragment,e),b(Sn.$$.fragment,e),b(Rt.$$.fragment,e),b(Zt.$$.fragment,e),b(Wt.$$.fragment,e),b(qn.$$.fragment,e),b(En.$$.fragment,e),b(Ln.$$.fragment,e),b(Qn.$$.fragment,e),b(Nt.$$.fragment,e),b(Ft.$$.fragment,e),b(Ct.$$.fragment,e),b(On.$$.fragment,e),b(Yn.$$.fragment,e),b(An.$$.fragment,e),b(Gt.$$.fragment,e),b(It.$$.fragment,e),b(Pn.$$.fragment,e),b(Dn.$$.fragment,e),b(Kn.$$.fragment,e),b(Vt.$$.fragment,e),b(Xt.$$.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(ms.$$.fragment,e),b(ps.$$.fragment,e),b(Et.$$.fragment,e),b(Lt.$$.fragment,e),b(Qt.$$.fragment,e),b(cs.$$.fragment,e),b(ds.$$.fragment,e),b(us.$$.fragment,e),b(Ot.$$.fragment,e),b(Yt.$$.fragment,e),b(gs.$$.fragment,e),b(fs.$$.fragment,e),b(Ms.$$.fragment,e),b(bs.$$.fragment,e),b(At.$$.fragment,e),b(Pt.$$.fragment,e),b(Dt.$$.fragment,e),b(Ts.$$.fragment,e),b(ys.$$.fragment,e),b(_s.$$.fragment,e),b(Kt.$$.fragment,e),b(en.$$.fragment,e),b(tn.$$.fragment,e),Ba=!0)},o(e){T(d.$$.fragment,e),T(_.$$.fragment,e),T(nn.$$.fragment,e),T(on.$$.fragment,e),T(an.$$.fragment,e),T(ln.$$.fragment,e),T(rn.$$.fragment,e),T(mn.$$.fragment,e),T(cn.$$.fragment,e),T(dn.$$.fragment,e),T(un.$$.fragment,e),T(at.$$.fragment,e),T(lt.$$.fragment,e),T(rt.$$.fragment,e),T(gn.$$.fragment,e),T(hn.$$.fragment,e),T(fn.$$.fragment,e),T(it.$$.fragment,e),T(mt.$$.fragment,e),T(pt.$$.fragment,e),T(Mn.$$.fragment,e),T(bn.$$.fragment,e),T(Tn.$$.fragment,e),T(ct.$$.fragment,e),T(dt.$$.fragment,e),T(ut.$$.fragment,e),T(yn.$$.fragment,e),T(_n.$$.fragment,e),T(wn.$$.fragment,e),T(gt.$$.fragment,e),T(ht.$$.fragment,e),T(ft.$$.fragment,e),T(Mt.$$.fragment,e),T($n.$$.fragment,e),T(vn.$$.fragment,e),T(Jn.$$.fragment,e),T(bt.$$.fragment,e),T(Tt.$$.fragment,e),T(yt.$$.fragment,e),T(jn.$$.fragment,e),T(kn.$$.fragment,e),T(xn.$$.fragment,e),T(_t.$$.fragment,e),T(wt.$$.fragment,e),T(Un.$$.fragment,e),T(Rn.$$.fragment,e),T(Zn.$$.fragment,e),T($t.$$.fragment,e),T(vt.$$.fragment,e),T(Jt.$$.fragment,e),T(Wn.$$.fragment,e),T(Fn.$$.fragment,e),T(Cn.$$.fragment,e),T(Gn.$$.fragment,e),T(jt.$$.fragment,e),T(kt.$$.fragment,e),T(xt.$$.fragment,e),T(In.$$.fragment,e),T(Vn.$$.fragment,e),T(Xn.$$.fragment,e),T(Ut.$$.fragment,e),T(zn.$$.fragment,e),T(Bn.$$.fragment,e),T(Sn.$$.fragment,e),T(Rt.$$.fragment,e),T(Zt.$$.fragment,e),T(Wt.$$.fragment,e),T(qn.$$.fragment,e),T(En.$$.fragment,e),T(Ln.$$.fragment,e),T(Qn.$$.fragment,e),T(Nt.$$.fragment,e),T(Ft.$$.fragment,e),T(Ct.$$.fragment,e),T(On.$$.fragment,e),T(Yn.$$.fragment,e),T(An.$$.fragment,e),T(Gt.$$.fragment,e),T(It.$$.fragment,e),T(Pn.$$.fragment,e),T(Dn.$$.fragment,e),T(Kn.$$.fragment,e),T(Vt.$$.fragment,e),T(Xt.$$.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(ms.$$.fragment,e),T(ps.$$.fragment,e),T(Et.$$.fragment,e),T(Lt.$$.fragment,e),T(Qt.$$.fragment,e),T(cs.$$.fragment,e),T(ds.$$.fragment,e),T(us.$$.fragment,e),T(Ot.$$.fragment,e),T(Yt.$$.fragment,e),T(gs.$$.fragment,e),T(fs.$$.fragment,e),T(Ms.$$.fragment,e),T(bs.$$.fragment,e),T(At.$$.fragment,e),T(Pt.$$.fragment,e),T(Dt.$$.fragment,e),T(Ts.$$.fragment,e),T(ys.$$.fragment,e),T(_s.$$.fragment,e),T(Kt.$$.fragment,e),T(en.$$.fragment,e),T(tn.$$.fragment,e),Ba=!1},d(e){e&&(m(g),m(o),m(s),m(t),m(So),m(qo),m(sn),m(Ho),m(Eo),m(Z),m(Lo),m(Qo),m(pn),m(Oo),m(Yo),m(ee),m(Ao),m(Po),m(te),m(Do),m(Ko),m(ne),m(ea),m(ta),m(G),m(na),m(sa),m(I),m(oa),m(aa),m(V),m(la),m(ra),m(se),m(ia),m(ma),m(Nn),m(pa),m(ca),m(oe),m(da),m(ua),m(ae),m(ga),m(ha),m(le),m(fa),m(Ma),m(Hn),m(ba),m(Ta),m(X),m(ya),m(_a),m(re),m(wa),m($a),m(ie),m(va),m(Ja),m(me),m(ja),m(ka),m(pe),m(xa),m(Ua),m(rs),m(Ra),m(Za),m(ce),m(Wa),m(Na),m(de),m(Fa),m(Ca),m(hs),m(Ga),m(Ia),m(ue),m(Va),m(Xa),m(ge),m(za),m(Bo)),m(n),y(d,e),y(_,e),y(nn,e),y(on,e),y(an),y(ln),y(rn),y(mn,e),y(cn,e),y(dn),y(un),y(at),y(lt),y(rt),y(gn,e),y(hn),y(fn),y(it),y(mt),y(pt),y(Mn,e),y(bn),y(Tn),y(ct),y(dt),y(ut),y(yn,e),y(_n),y(wn),y(gt),y(ht),y(ft),y(Mt),y($n,e),y(vn),y(Jn),y(bt),y(Tt),y(yt),y(jn,e),y(kn),y(xn),y(_t),y(wt),y(Un,e),y(Rn),y(Zn),y($t),y(vt),y(Jt),y(Wn,e),y(Fn,e),y(Cn),y(Gn),y(jt),y(kt),y(xt),y(In,e),y(Vn),y(Xn),y(Ut),y(zn,e),y(Bn),y(Sn),y(Rt),y(Zt),y(Wt),y(qn,e),y(En,e),y(Ln),y(Qn),y(Nt),y(Ft),y(Ct),y(On,e),y(Yn),y(An),y(Gt),y(It),y(Pn,e),y(Dn),y(Kn),y(Vt),y(Xt),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(ms),y(ps),y(Et),y(Lt),y(Qt),y(cs,e),y(ds),y(us),y(Ot),y(Yt),y(gs,e),y(fs,e),y(Ms),y(bs),y(At),y(Pt),y(Dt),y(Ts,e),y(ys),y(_s),y(Kt),y(en),y(tn)}}}const lc='{"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":"ORTModelForZeroShotImageClassification","local":"optimum.onnxruntime.ORTModelForZeroShotImageClassification","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 rc($){return sp(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class hc extends op{constructor(n){super(),ap(this,n,rc,ac,np,{})}}export{hc as component};
