import{S as Lt,i as Ft,s as St,e as c,k as i,w,t as h,M as xt,c as m,d as l,m as u,x as g,a as $,h as d,b as O,G as f,g as p,y,o as _,p as J,q as b,B as q,v as Ct,n as Q}from"../../chunks/vendor-hf-doc-builder.js";import{T as At}from"../../chunks/Tip-hf-doc-builder.js";import{Y as Pt}from"../../chunks/Youtube-hf-doc-builder.js";import{C as v}from"../../chunks/CodeBlock-hf-doc-builder.js";import{D as Dt}from"../../chunks/DocNotebookDropdown-hf-doc-builder.js";import{F as Mt}from"../../chunks/FrameworkSwitchCourse-hf-doc-builder.js";function Nt(j){let t,r;return t=new Dt({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/chapter2/section5_tf.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/chapter2/section5_tf.ipynb"}]}}),{c(){w(t.$$.fragment)},l(e){g(t.$$.fragment,e)},m(e,o){y(t,e,o),r=!0},i(e){r||(b(t.$$.fragment,e),r=!0)},o(e){_(t.$$.fragment,e),r=!1},d(e){q(t,e)}}}function Bt(j){let t,r;return t=new Dt({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/master/course/chapter2/section5_pt.ipynb"},{label:"Aws Studio",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/master/course/chapter2/section5_pt.ipynb"}]}}),{c(){w(t.$$.fragment)},l(e){g(t.$$.fragment,e)},m(e,o){y(t,e,o),r=!0},i(e){r||(b(t.$$.fragment,e),r=!0)},o(e){_(t.$$.fragment,e),r=!1},d(e){q(t,e)}}}function Ht(j){let t,r;return t=new Pt({props:{id:"ROxrFOEbsQE"}}),{c(){w(t.$$.fragment)},l(e){g(t.$$.fragment,e)},m(e,o){y(t,e,o),r=!0},i(e){r||(b(t.$$.fragment,e),r=!0)},o(e){_(t.$$.fragment,e),r=!1},d(e){q(t,e)}}}function Ut(j){let t,r;return t=new Pt({props:{id:"M6adb1j2jPI"}}),{c(){w(t.$$.fragment)},l(e){g(t.$$.fragment,e)},m(e,o){y(t,e,o),r=!0},i(e){r||(b(t.$$.fragment,e),r=!0)},o(e){_(t.$$.fragment,e),r=!1},d(e){q(t,e)}}}function Ot(j){let t,r,e,o;return t=new v({props:{code:`

`,highlighted:`<span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFAutoModelForSequenceClassification

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

sequence = <span class="hljs-string">&quot;I&#x27;ve been waiting for a HuggingFace course my whole life.&quot;</span>

tokens = tokenizer.tokenize(sequence)
ids = tokenizer.convert_tokens_to_ids(tokens)
input_ids = tf.constant(ids)
<span class="hljs-comment"># This line will fail.</span>
model(input_ids)`}}),e=new v({props:{code:"InvalidArgumentError: Input to reshape is a tensor with 14 values, but the requested shape has 196 [Op:Reshape]",highlighted:'InvalidArgumentError: Input to reshape <span class="hljs-keyword">is</span> a tensor <span class="hljs-keyword">with</span> <span class="hljs-number">14</span> values, but the requested shape has <span class="hljs-number">196</span> [Op:Reshape]'}}),{c(){w(t.$$.fragment),r=i(),w(e.$$.fragment)},l(n){g(t.$$.fragment,n),r=u(n),g(e.$$.fragment,n)},m(n,k){y(t,n,k),p(n,r,k),y(e,n,k),o=!0},i(n){o||(b(t.$$.fragment,n),b(e.$$.fragment,n),o=!0)},o(n){_(t.$$.fragment,n),_(e.$$.fragment,n),o=!1},d(n){q(t,n),n&&l(r),q(e,n)}}}function Rt(j){let t,r,e,o;return t=new v({props:{code:`

`,highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForSequenceClassification

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

sequence = <span class="hljs-string">&quot;I&#x27;ve been waiting for a HuggingFace course my whole life.&quot;</span>

tokens = tokenizer.tokenize(sequence)
ids = tokenizer.convert_tokens_to_ids(tokens)
input_ids = torch.tensor(ids)
<span class="hljs-comment"># This line will fail.</span>
model(input_ids)`}}),e=new v({props:{code:"IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)",highlighted:'IndexError: Dimension out of <span class="hljs-built_in">range</span> (expected to be <span class="hljs-keyword">in</span> <span class="hljs-built_in">range</span> of [-<span class="hljs-number">1</span>, <span class="hljs-number">0</span>], but got <span class="hljs-number">1</span>)'}}),{c(){w(t.$$.fragment),r=i(),w(e.$$.fragment)},l(n){g(t.$$.fragment,n),r=u(n),g(e.$$.fragment,n)},m(n,k){y(t,n,k),p(n,r,k),y(e,n,k),o=!0},i(n){o||(b(t.$$.fragment,n),b(e.$$.fragment,n),o=!0)},o(n){_(t.$$.fragment,n),_(e.$$.fragment,n),o=!1},d(n){q(t,n),n&&l(r),q(e,n)}}}function Gt(j){let t,r,e,o;return t=new v({props:{code:`tokenized_inputs = tokenizer(sequence, return_tensors="tf")
print(tokenized_inputs["input_ids"])`,highlighted:`tokenized_inputs = tokenizer(sequence, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-built_in">print</span>(tokenized_inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])`}}),e=new v({props:{code:`tf.Tensor: shape=(1, 16), dtype=int32, numpy=
array([[  101,  1045,  1005,  2310,  2042,  3403,  2005,  1037, 17662,
        12172,  2607,  2026,  2878,  2166,  1012,   102]], dtype=int32)>`,highlighted:`tf.Tensor: shape=(<span class="hljs-number">1</span>, <span class="hljs-number">16</span>), dtype=int32, numpy=
array([[  <span class="hljs-number">101</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">1005</span>,  <span class="hljs-number">2310</span>,  <span class="hljs-number">2042</span>,  <span class="hljs-number">3403</span>,  <span class="hljs-number">2005</span>,  <span class="hljs-number">1037</span>, <span class="hljs-number">17662</span>,
        <span class="hljs-number">12172</span>,  <span class="hljs-number">2607</span>,  <span class="hljs-number">2026</span>,  <span class="hljs-number">2878</span>,  <span class="hljs-number">2166</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>]], dtype=int32)&gt;`}}),{c(){w(t.$$.fragment),r=i(),w(e.$$.fragment)},l(n){g(t.$$.fragment,n),r=u(n),g(e.$$.fragment,n)},m(n,k){y(t,n,k),p(n,r,k),y(e,n,k),o=!0},i(n){o||(b(t.$$.fragment,n),b(e.$$.fragment,n),o=!0)},o(n){_(t.$$.fragment,n),_(e.$$.fragment,n),o=!1},d(n){q(t,n),n&&l(r),q(e,n)}}}function Yt(j){let t,r,e,o;return t=new v({props:{code:`tokenized_inputs = tokenizer(sequence, return_tensors="pt")
print(tokenized_inputs["input_ids"])`,highlighted:`tokenized_inputs = tokenizer(sequence, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-built_in">print</span>(tokenized_inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])`}}),e=new v({props:{code:`tensor([[  101,  1045,  1005,  2310,  2042,  3403,  2005,  1037, 17662, 12172,
          2607,  2026,  2878,  2166,  1012,   102]])`,highlighted:`tensor([[  <span class="hljs-number">101</span>,  <span class="hljs-number">1045</span>,  <span class="hljs-number">1005</span>,  <span class="hljs-number">2310</span>,  <span class="hljs-number">2042</span>,  <span class="hljs-number">3403</span>,  <span class="hljs-number">2005</span>,  <span class="hljs-number">1037</span>, <span class="hljs-number">17662</span>, <span class="hljs-number">12172</span>,
          <span class="hljs-number">2607</span>,  <span class="hljs-number">2026</span>,  <span class="hljs-number">2878</span>,  <span class="hljs-number">2166</span>,  <span class="hljs-number">1012</span>,   <span class="hljs-number">102</span>]])`}}),{c(){w(t.$$.fragment),r=i(),w(e.$$.fragment)},l(n){g(t.$$.fragment,n),r=u(n),g(e.$$.fragment,n)},m(n,k){y(t,n,k),p(n,r,k),y(e,n,k),o=!0},i(n){o||(b(t.$$.fragment,n),b(e.$$.fragment,n),o=!0)},o(n){_(t.$$.fragment,n),_(e.$$.fragment,n),o=!1},d(n){q(t,n),n&&l(r),q(e,n)}}}function Jt(j){let t,r;return t=new v({props:{code:`



`,highlighted:`<span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFAutoModelForSequenceClassification

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

sequence = <span class="hljs-string">&quot;I&#x27;ve been waiting for a HuggingFace course my whole life.&quot;</span>

tokens = tokenizer.tokenize(sequence)
ids = tokenizer.convert_tokens_to_ids(tokens)

input_ids = tf.constant([ids])
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Input IDs:&quot;</span>, input_ids)

output = model(input_ids)
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Logits:&quot;</span>, output.logits)`}}),{c(){w(t.$$.fragment)},l(e){g(t.$$.fragment,e)},m(e,o){y(t,e,o),r=!0},i(e){r||(b(t.$$.fragment,e),r=!0)},o(e){_(t.$$.fragment,e),r=!1},d(e){q(t,e)}}}function Qt(j){let t,r;return t=new v({props:{code:`



`,highlighted:`<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AutoModelForSequenceClassification

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

sequence = <span class="hljs-string">&quot;I&#x27;ve been waiting for a HuggingFace course my whole life.&quot;</span>

tokens = tokenizer.tokenize(sequence)
ids = tokenizer.convert_tokens_to_ids(tokens)

input_ids = torch.tensor([ids])
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Input IDs:&quot;</span>, input_ids)

output = model(input_ids)
<span class="hljs-built_in">print</span>(<span class="hljs-string">&quot;Logits:&quot;</span>, output.logits)`}}),{c(){w(t.$$.fragment)},l(e){g(t.$$.fragment,e)},m(e,o){y(t,e,o),r=!0},i(e){r||(b(t.$$.fragment,e),r=!0)},o(e){_(t.$$.fragment,e),r=!1},d(e){q(t,e)}}}function Kt(j){let t,r;return t=new v({props:{code:`Input IDs: tf.Tensor(
[[ 1045  1005  2310  2042  3403  2005  1037 17662 12172  2607  2026  2878
   2166  1012]], shape=(1, 14), dtype=int32)
Logits: tf.Tensor([[-2.7276208  2.8789377]], shape=(1, 2), dtype=float32)`,highlighted:`Input IDs: tf.Tensor(
[[ <span class="hljs-number">1045</span>  <span class="hljs-number">1005</span>  <span class="hljs-number">2310</span>  <span class="hljs-number">2042</span>  <span class="hljs-number">3403</span>  <span class="hljs-number">2005</span>  <span class="hljs-number">1037</span> <span class="hljs-number">17662</span> <span class="hljs-number">12172</span>  <span class="hljs-number">2607</span>  <span class="hljs-number">2026</span>  <span class="hljs-number">2878</span>
   <span class="hljs-number">2166</span>  <span class="hljs-number">1012</span>]], shape=(<span class="hljs-number">1</span>, <span class="hljs-number">14</span>), dtype=int32)
Logits: tf.Tensor([[-<span class="hljs-number">2.7276208</span>  <span class="hljs-number">2.8789377</span>]], shape=(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>), dtype=float32)`}}),{c(){w(t.$$.fragment)},l(e){g(t.$$.fragment,e)},m(e,o){y(t,e,o),r=!0},i(e){r||(b(t.$$.fragment,e),r=!0)},o(e){_(t.$$.fragment,e),r=!1},d(e){q(t,e)}}}function Vt(j){let t,r;return t=new v({props:{code:`Input IDs: [[ 1045,  1005,  2310,  2042,  3403,  2005,  1037, 17662, 12172,  2607, 2026,  2878,  2166,  1012]]
Logits: [[-2.7276,  2.8789]]`,highlighted:`Input IDs: [[ <span class="hljs-number">1045</span>,  <span class="hljs-number">1005</span>,  <span class="hljs-number">2310</span>,  <span class="hljs-number">2042</span>,  <span class="hljs-number">3403</span>,  <span class="hljs-number">2005</span>,  <span class="hljs-number">1037</span>, <span class="hljs-number">17662</span>, <span class="hljs-number">12172</span>,  <span class="hljs-number">2607</span>, <span class="hljs-number">2026</span>,  <span class="hljs-number">2878</span>,  <span class="hljs-number">2166</span>,  <span class="hljs-number">1012</span>]]
Logits: [[-<span class="hljs-number">2.7276</span>,  <span class="hljs-number">2.8789</span>]]`}}),{c(){w(t.$$.fragment)},l(e){g(t.$$.fragment,e)},m(e,o){y(t,e,o),r=!0},i(e){r||(b(t.$$.fragment,e),r=!0)},o(e){_(t.$$.fragment,e),r=!1},d(e){q(t,e)}}}function Wt(j){let t,r,e,o,n;return{c(){t=c("p"),r=h("\u270F\uFE0F "),e=c("strong"),o=h("Try it out!"),n=h(" \u8BD5\u8BD5\u770B\uFF01\u5C06\u6B64\u5217\u8868\u8F6C\u6362\u4E3A\u5F20\u91CF\u5E76\u901A\u8FC7\u6A21\u578B\u4F20\u9012\u3002\u68C0\u67E5\u60A8\u662F\u5426\u83B7\u5F97\u4E0E\u4E4B\u524D\u76F8\u540C\u7684\u767B\u5F55\uFF08\u4F46\u662F\u53EA\u6709\u4E24\u6B21\uFF09")},l(k){t=m(k,"P",{});var z=$(t);r=d(z,"\u270F\uFE0F "),e=m(z,"STRONG",{});var E=$(e);o=d(E,"Try it out!"),E.forEach(l),n=d(z," \u8BD5\u8BD5\u770B\uFF01\u5C06\u6B64\u5217\u8868\u8F6C\u6362\u4E3A\u5F20\u91CF\u5E76\u901A\u8FC7\u6A21\u578B\u4F20\u9012\u3002\u68C0\u67E5\u60A8\u662F\u5426\u83B7\u5F97\u4E0E\u4E4B\u524D\u76F8\u540C\u7684\u767B\u5F55\uFF08\u4F46\u662F\u53EA\u6709\u4E24\u6B21\uFF09"),z.forEach(l)},m(k,z){p(k,t,z),f(t,r),f(t,e),f(e,o),f(t,n)},d(k){k&&l(t)}}}function Xt(j){let t,r,e,o;return t=new v({props:{code:`
`,highlighted:`model = TFAutoModelForSequenceClassification.from_pretrained(checkpoint)

sequence1_ids = [[<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, <span class="hljs-number">200</span>]]
sequence2_ids = [[<span class="hljs-number">200</span>, <span class="hljs-number">200</span>]]
batched_ids = [
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, <span class="hljs-number">200</span>],
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, tokenizer.pad_token_id],
]

<span class="hljs-built_in">print</span>(model(tf.constant(sequence1_ids)).logits)
<span class="hljs-built_in">print</span>(model(tf.constant(sequence2_ids)).logits)
<span class="hljs-built_in">print</span>(model(tf.constant(batched_ids)).logits)`}}),e=new v({props:{code:`tf.Tensor([[ 1.5693678 -1.3894581]], shape=(1, 2), dtype=float32)
tf.Tensor([[ 0.5803005  -0.41252428]], shape=(1, 2), dtype=float32)
tf.Tensor(
[[ 1.5693681 -1.3894582]
 [ 1.3373486 -1.2163193]], shape=(2, 2), dtype=float32)`,highlighted:`tf.Tensor([[ <span class="hljs-number">1.5693678</span> -<span class="hljs-number">1.3894581</span>]], shape=(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>), dtype=float32)
tf.Tensor([[ <span class="hljs-number">0.5803005</span>  -<span class="hljs-number">0.41252428</span>]], shape=(<span class="hljs-number">1</span>, <span class="hljs-number">2</span>), dtype=float32)
tf.Tensor(
[[ <span class="hljs-number">1.5693681</span> -<span class="hljs-number">1.3894582</span>]
 [ <span class="hljs-number">1.3373486</span> -<span class="hljs-number">1.2163193</span>]], shape=(<span class="hljs-number">2</span>, <span class="hljs-number">2</span>), dtype=float32)`}}),{c(){w(t.$$.fragment),r=i(),w(e.$$.fragment)},l(n){g(t.$$.fragment,n),r=u(n),g(e.$$.fragment,n)},m(n,k){y(t,n,k),p(n,r,k),y(e,n,k),o=!0},i(n){o||(b(t.$$.fragment,n),b(e.$$.fragment,n),o=!0)},o(n){_(t.$$.fragment,n),_(e.$$.fragment,n),o=!1},d(n){q(t,n),n&&l(r),q(e,n)}}}function Zt(j){let t,r,e,o;return t=new v({props:{code:`
`,highlighted:`model = AutoModelForSequenceClassification.from_pretrained(checkpoint)

sequence1_ids = [[<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, <span class="hljs-number">200</span>]]
sequence2_ids = [[<span class="hljs-number">200</span>, <span class="hljs-number">200</span>]]
batched_ids = [
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, <span class="hljs-number">200</span>],
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, tokenizer.pad_token_id],
]

<span class="hljs-built_in">print</span>(model(torch.tensor(sequence1_ids)).logits)
<span class="hljs-built_in">print</span>(model(torch.tensor(sequence2_ids)).logits)
<span class="hljs-built_in">print</span>(model(torch.tensor(batched_ids)).logits)`}}),e=new v({props:{code:`tensor([[ 1.5694, -1.3895]], grad_fn=<AddmmBackward>)
tensor([[ 0.5803, -0.4125]], grad_fn=<AddmmBackward>)
tensor([[ 1.5694, -1.3895],
        [ 1.3373, -1.2163]], grad_fn=<AddmmBackward>)`,highlighted:`tensor([[ <span class="hljs-number">1.5694</span>, -<span class="hljs-number">1.3895</span>]], grad_fn=&lt;AddmmBackward&gt;)
tensor([[ <span class="hljs-number">0.5803</span>, -<span class="hljs-number">0.4125</span>]], grad_fn=&lt;AddmmBackward&gt;)
tensor([[ <span class="hljs-number">1.5694</span>, -<span class="hljs-number">1.3895</span>],
        [ <span class="hljs-number">1.3373</span>, -<span class="hljs-number">1.2163</span>]], grad_fn=&lt;AddmmBackward&gt;)`}}),{c(){w(t.$$.fragment),r=i(),w(e.$$.fragment)},l(n){g(t.$$.fragment,n),r=u(n),g(e.$$.fragment,n)},m(n,k){y(t,n,k),p(n,r,k),y(e,n,k),o=!0},i(n){o||(b(t.$$.fragment,n),b(e.$$.fragment,n),o=!0)},o(n){_(t.$$.fragment,n),_(e.$$.fragment,n),o=!1},d(n){q(t,n),n&&l(r),q(e,n)}}}function sl(j){let t,r,e,o;return t=new v({props:{code:`
`,highlighted:`batched_ids = [
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, <span class="hljs-number">200</span>],
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, tokenizer.pad_token_id],
]

attention_mask = [
    [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
    [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>],
]

outputs = model(tf.constant(batched_ids), attention_mask=tf.constant(attention_mask))
<span class="hljs-built_in">print</span>(outputs.logits)`}}),e=new v({props:{code:`tf.Tensor(
[[ 1.5693681  -1.3894582 ]
 [ 0.5803021  -0.41252586]], shape=(2, 2), dtype=float32)`,highlighted:`tf.Tensor(
[[ <span class="hljs-number">1.5693681</span>  -<span class="hljs-number">1.3894582</span> ]
 [ <span class="hljs-number">0.5803021</span>  -<span class="hljs-number">0.41252586</span>]], shape=(<span class="hljs-number">2</span>, <span class="hljs-number">2</span>), dtype=float32)`}}),{c(){w(t.$$.fragment),r=i(),w(e.$$.fragment)},l(n){g(t.$$.fragment,n),r=u(n),g(e.$$.fragment,n)},m(n,k){y(t,n,k),p(n,r,k),y(e,n,k),o=!0},i(n){o||(b(t.$$.fragment,n),b(e.$$.fragment,n),o=!0)},o(n){_(t.$$.fragment,n),_(e.$$.fragment,n),o=!1},d(n){q(t,n),n&&l(r),q(e,n)}}}function el(j){let t,r,e,o;return t=new v({props:{code:`
`,highlighted:`batched_ids = [
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, <span class="hljs-number">200</span>],
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, tokenizer.pad_token_id],
]

attention_mask = [
    [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">1</span>],
    [<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, <span class="hljs-number">0</span>],
]

outputs = model(torch.tensor(batched_ids), attention_mask=torch.tensor(attention_mask))
<span class="hljs-built_in">print</span>(outputs.logits)`}}),e=new v({props:{code:`tensor([[ 1.5694, -1.3895],
        [ 0.5803, -0.4125]], grad_fn=<AddmmBackward>)`,highlighted:`tensor([[ <span class="hljs-number">1.5694</span>, -<span class="hljs-number">1.3895</span>],
        [ <span class="hljs-number">0.5803</span>, -<span class="hljs-number">0.4125</span>]], grad_fn=&lt;AddmmBackward&gt;)`}}),{c(){w(t.$$.fragment),r=i(),w(e.$$.fragment)},l(n){g(t.$$.fragment,n),r=u(n),g(e.$$.fragment,n)},m(n,k){y(t,n,k),p(n,r,k),y(e,n,k),o=!0},i(n){o||(b(t.$$.fragment,n),b(e.$$.fragment,n),o=!0)},o(n){_(t.$$.fragment,n),_(e.$$.fragment,n),o=!1},d(n){q(t,n),n&&l(r),q(e,n)}}}function nl(j){let t,r;return{c(){t=c("p"),r=h("\u270F\uFE0F \u8BD5\u8BD5\u770B\uFF01\u5728\u7B2C2\u8282\u4E2D\u4F7F\u7528\u7684\u4E24\u4E2A\u53E5\u5B50\u4E0A\u624B\u52A8\u5E94\u7528\u6807\u8BB0\u5316\uFF08\u201C\u6211\u4E00\u751F\u90FD\u5728\u7B49\u5F85\u62E5\u62B1\u8BFE\u7A0B\u3002\u201D\u548C\u201C\u6211\u975E\u5E38\u8BA8\u538C\u8FD9\u4E2A\uFF01\u201D\uFF09\u3002\u901A\u8FC7\u6A21\u578B\u4F20\u9012\u5B83\u4EEC\uFF0C\u5E76\u68C0\u67E5\u60A8\u662F\u5426\u83B7\u5F97\u4E0E\u7B2C2\u8282\u4E2D\u76F8\u540C\u7684\u767B\u5F55\u3002\u73B0\u5728\u4F7F\u7528\u586B\u5145\u6807\u8BB0\u5C06\u5B83\u4EEC\u6279\u5904\u7406\u5728\u4E00\u8D77\uFF0C\u7136\u540E\u521B\u5EFA\u9002\u5F53\u7684\u6CE8\u610F\u63A9\u7801\u3002\u68C0\u67E5\u901A\u8FC7\u6A21\u578B\u65F6\u662F\u5426\u83B7\u5F97\u76F8\u540C\u7684\u7ED3\u679C\uFF01")},l(e){t=m(e,"P",{});var o=$(t);r=d(o,"\u270F\uFE0F \u8BD5\u8BD5\u770B\uFF01\u5728\u7B2C2\u8282\u4E2D\u4F7F\u7528\u7684\u4E24\u4E2A\u53E5\u5B50\u4E0A\u624B\u52A8\u5E94\u7528\u6807\u8BB0\u5316\uFF08\u201C\u6211\u4E00\u751F\u90FD\u5728\u7B49\u5F85\u62E5\u62B1\u8BFE\u7A0B\u3002\u201D\u548C\u201C\u6211\u975E\u5E38\u8BA8\u538C\u8FD9\u4E2A\uFF01\u201D\uFF09\u3002\u901A\u8FC7\u6A21\u578B\u4F20\u9012\u5B83\u4EEC\uFF0C\u5E76\u68C0\u67E5\u60A8\u662F\u5426\u83B7\u5F97\u4E0E\u7B2C2\u8282\u4E2D\u76F8\u540C\u7684\u767B\u5F55\u3002\u73B0\u5728\u4F7F\u7528\u586B\u5145\u6807\u8BB0\u5C06\u5B83\u4EEC\u6279\u5904\u7406\u5728\u4E00\u8D77\uFF0C\u7136\u540E\u521B\u5EFA\u9002\u5F53\u7684\u6CE8\u610F\u63A9\u7801\u3002\u68C0\u67E5\u901A\u8FC7\u6A21\u578B\u65F6\u662F\u5426\u83B7\u5F97\u76F8\u540C\u7684\u7ED3\u679C\uFF01"),o.forEach(l)},m(e,o){p(e,t,o),f(t,r)},d(e){e&&l(t)}}}function tl(j){let t,r,e,o,n,k,z,E,I,bs,T,A,$s,hs,Xe,_e,ds,te,Ze,be,ks,le,sn,$e,js,ae,en,he,ws,re,nn,de,gs,tn,ke,K,ln,je,ys,an,we,P,D,qs,vs,rn,ge,Es,pn,ye,L,F,zs,Is,on,qe,S,x,Ts,As,un,ve,C,M,Ps,V,pe,fn,cn,Ee,W,ze,Ds,mn,Ie,G,Te,Ls,_n,Ae,X,bn,Pe,Fs,$n,De,Z,Le,Ss,hn,Fe,ss,Se,xs,dn,xe,N,B,Cs,Ms,kn,Ce,Ns,jn,Me,es,wn,Ne,ns,oe,gn,yn,Be,Bs,qn,He,H,U,Hs,Us,vn,Ue,Os,En,Oe,Y,Re,ts,zn,Ge,Rs,In,Ye,Gs,ie,Tn,Je,Ys,ue,An,Qe,R,Pn,ls,Dn,Ln,as,Fn,Sn,Ke,Js,xn,Ve,rs,We;e=new Mt({props:{fw:j[0]}});const Nn=[Bt,Nt],ps=[];function Bn(s,a){return s[0]==="pt"?0:1}E=Bn(j),I=ps[E]=Nn[E](j);const Hn=[Ut,Ht],os=[];function Un(s,a){return s[0]==="pt"?0:1}T=Un(j),A=os[T]=Hn[T](j);const On=[Rt,Ot],is=[];function Rn(s,a){return s[0]==="pt"?0:1}P=Rn(j),D=is[P]=On[P](j);const Gn=[Yt,Gt],us=[];function Yn(s,a){return s[0]==="pt"?0:1}L=Yn(j),F=us[L]=Gn[L](j);const Jn=[Qt,Jt],fs=[];function Qn(s,a){return s[0]==="pt"?0:1}S=Qn(j),x=fs[S]=Jn[S](j);const Kn=[Vt,Kt],cs=[];function Vn(s,a){return s[0]==="pt"?0:1}C=Vn(j),M=cs[C]=Kn[C](j),W=new v({props:{code:"batched_ids = [ids, ids]",highlighted:'<span class="hljs-attr">batched_ids</span> = [ids, ids]'}}),G=new At({props:{$$slots:{default:[Wt]},$$scope:{ctx:j}}}),Z=new v({props:{code:`batched_ids = [
    [200, 200, 200],
    [200, 200]
]`,highlighted:`batched_ids = [
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, <span class="hljs-number">200</span>],
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>]
]`}}),ss=new v({props:{code:"",highlighted:`padding_id = <span class="hljs-number">100</span>

batched_ids = [
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, <span class="hljs-number">200</span>],
    [<span class="hljs-number">200</span>, <span class="hljs-number">200</span>, padding_id],
]`}});const Wn=[Zt,Xt],ms=[];function Xn(s,a){return s[0]==="pt"?0:1}N=Xn(j),B=ms[N]=Wn[N](j);const Zn=[el,sl],_s=[];function st(s,a){return s[0]==="pt"?0:1}return H=st(j),U=_s[H]=Zn[H](j),Y=new At({props:{$$slots:{default:[nl]},$$scope:{ctx:j}}}),rs=new v({props:{code:"sequence = sequence[:max_sequence_length]",highlighted:"sequence = sequence[:max_sequence_length]"}}),{c(){t=c("meta"),r=i(),w(e.$$.fragment),o=i(),n=c("h1"),k=h("\u5904\u7406\u591A\u4E2A\u5E8F\u5217"),z=i(),I.c(),bs=i(),A.c(),$s=i(),hs=c("p"),Xe=h("\u5728\u4E0A\u4E00\u8282\u4E2D\uFF0C\u6211\u4EEC\u63A2\u8BA8\u4E86\u6700\u7B80\u5355\u7684\u7528\u4F8B\uFF1A\u5BF9\u4E00\u4E2A\u5C0F\u957F\u5EA6\u7684\u5E8F\u5217\u8FDB\u884C\u63A8\u7406\u3002\u7136\u800C\uFF0C\u4E00\u4E9B\u95EE\u9898\u5DF2\u7ECF\u51FA\u73B0\uFF1A"),_e=i(),ds=c("ul"),te=c("li"),Ze=h("\u6211\u4EEC\u5982\u4F55\u5904\u7406\u591A\u4E2A\u5E8F\u5217\uFF1F"),be=i(),ks=c("ul"),le=c("li"),sn=h("\u6211\u4EEC\u5982\u4F55\u5904\u7406\u591A\u4E2A\u5E8F\u5217\u4E0D\u540C\u957F\u5EA6?"),$e=i(),js=c("ul"),ae=c("li"),en=h("\u8BCD\u6C47\u7D22\u5F15\u662F\u8BA9\u6A21\u578B\u6B63\u5E38\u5DE5\u4F5C\u7684\u552F\u4E00\u8F93\u5165\u5417\uFF1F"),he=i(),ws=c("ul"),re=c("li"),nn=h("\u662F\u5426\u5B58\u5728\u5E8F\u5217\u592A\u957F\u7684\u95EE\u9898\uFF1F"),de=i(),gs=c("p"),tn=h("\u8BA9\u6211\u4EEC\u770B\u770B\u8FD9\u4E9B\u95EE\u9898\u4F1A\u5E26\u6765\u4EC0\u4E48\u6837\u7684\u95EE\u9898\uFF0C\u4EE5\u53CA\u5982\u4F55\u4F7F\u7528\u{1F917} Transformers API\u89E3\u51B3\u5B83\u4EEC"),ke=i(),K=c("h2"),ln=h("\u6A21\u578B\u9700\u8981\u4E00\u6279\u8F93\u5165"),je=i(),ys=c("p"),an=h("\u5728\u4E0A\u4E00\u4E2A\u7EC3\u4E60\u4E2D\uFF0C\u60A8\u770B\u5230\u4E86\u5E8F\u5217\u5982\u4F55\u8F6C\u6362\u4E3A\u6570\u5B57\u5217\u8868\u3002\u8BA9\u6211\u4EEC\u5C06\u6B64\u6570\u5B57\u5217\u8868\u8F6C\u6362\u4E3A\u5F20\u91CF\uFF0C\u5E76\u5C06\u5176\u53D1\u9001\u5230\u6A21\u578B\uFF1A"),we=i(),D.c(),qs=i(),vs=c("p"),rn=h("\u54E6\uFF0C\u4E0D\uFF01\u4E3A\u4EC0\u4E48\u5931\u8D25\u4E86\uFF1F\u201C\u6211\u4EEC\u9075\u5FAA\u4E86\u7B2C2\u8282\u4E2D\u7BA1\u9053\u7684\u6B65\u9AA4\u3002"),ge=i(),Es=c("p"),pn=h("\u95EE\u9898\u662F\u6211\u4EEC\u5411\u6A21\u578B\u53D1\u9001\u4E86\u4E00\u4E2A\u5E8F\u5217\uFF0C\u800C\u{1F917} Transformers\u6A21\u578B\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u9700\u8981\u591A\u4E2A\u53E5\u5B50\u3002\u5728\u8FD9\u91CC\uFF0C\u5F53\u6211\u4EEC\u5C06\u5206\u8BCD\u5668\u5E94\u7528\u4E8E\u4E00\u4E2A\u5E94\u7528\u7A0B\u5E8F\u65F6\uFF0C\u6211\u4EEC\u5C1D\u8BD5\u5728\u5E55\u540E\u5B8C\u6210\u5206\u8BCD\u5668\u6240\u505A\u7684\u4E00\u5207\uFF0C\u4F46\u5982\u679C\u4ED4\u7EC6\u89C2\u5BDF\uFF0C\u60A8\u4F1A\u53D1\u73B0\u5B83\u4E0D\u4EC5\u5C06\u8F93\u5165ID\u5217\u8868\u8F6C\u6362\u4E3A\u5F20\u91CF\uFF0C\u8FD8\u5728\u5176\u9876\u90E8\u6DFB\u52A0\u4E86\u4E00\u4E2A\u7EF4\u5EA6\uFF1A"),ye=i(),F.c(),zs=i(),Is=c("p"),on=h("\u8BA9\u6211\u4EEC\u91CD\u8BD5\u5E76\u6DFB\u52A0\u4E00\u4E2A\u65B0\u7EF4\u5EA6\uFF1A"),qe=i(),x.c(),Ts=i(),As=c("p"),un=h("\u6211\u4EEC\u6253\u5370\u8F93\u5165ID\u4EE5\u53CA\u751F\u6210\u7684logits-\u4EE5\u4E0B\u662F\u8F93\u51FA\uFF1A"),ve=i(),M.c(),Ps=i(),V=c("p"),pe=c("em"),fn=h("Batching"),cn=h(" \u662F\u4E00\u6B21\u901A\u8FC7\u6A21\u578B\u53D1\u9001\u591A\u4E2A\u53E5\u5B50\u7684\u884C\u4E3A\u3002\u5982\u679C\u4F60\u53EA\u6709\u4E00\u53E5\u8BDD\uFF0C\u4F60\u53EF\u4EE5\u7528\u4E00\u4E2A\u5E8F\u5217\u6784\u5EFA\u4E00\u4E2A\u6279\u6B21\uFF1A"),Ee=i(),w(W.$$.fragment),ze=i(),Ds=c("p"),mn=h("\u8FD9\u662F\u4E00\u6279\u4E24\u4E2A\u76F8\u540C\u7684\u5E8F\u5217\uFF01"),Ie=i(),w(G.$$.fragment),Te=i(),Ls=c("p"),_n=h("\u6279\u5904\u7406\u5141\u8BB8\u6A21\u578B\u5728\u8F93\u5165\u591A\u4E2A\u53E5\u5B50\u65F6\u5DE5\u4F5C\u3002\u4F7F\u7528\u591A\u4E2A\u5E8F\u5217\u5C31\u50CF\u4F7F\u7528\u5355\u4E2A\u5E8F\u5217\u6784\u5EFA\u6279\u4E00\u6837\u7B80\u5355\u3002\u4E0D\u8FC7\uFF0C\u8FD8\u6709\u7B2C\u4E8C\u4E2A\u95EE\u9898\u3002\u5F53\u4F60\u8BD5\u56FE\u5C06\u4E24\u4E2A\uFF08\u6216\u66F4\u591A\uFF09\u53E5\u5B50\u7EC4\u5408\u5728\u4E00\u8D77\u65F6\uFF0C\u5B83\u4EEC\u7684\u957F\u5EA6\u53EF\u80FD\u4E0D\u540C\u3002\u5982\u679C\u60A8\u4EE5\u524D\u4F7F\u7528\u8FC7\u5F20\u91CF\uFF0C\u90A3\u4E48\u60A8\u77E5\u9053\u5B83\u4EEC\u5FC5\u987B\u662F\u77E9\u5F62\uFF0C\u56E0\u6B64\u65E0\u6CD5\u5C06\u8F93\u5165ID\u5217\u8868\u76F4\u63A5\u8F6C\u6362\u4E3A\u5F20\u91CF\u3002\u4E3A\u4E86\u89E3\u51B3\u8FD9\u4E2A\u95EE\u9898\uFF0C\u6211\u4EEC\u901A\u5E38\u586B\u5145\u8F93\u5165\u3002"),Ae=i(),X=c("h2"),bn=h("\u586B\u5145\u8F93\u5165"),Pe=i(),Fs=c("p"),$n=h("\u4EE5\u4E0B\u5217\u8868\u4E0D\u80FD\u8F6C\u6362\u4E3A\u5F20\u91CF\uFF1A"),De=i(),w(Z.$$.fragment),Le=i(),Ss=c("p"),hn=h("\u4E3A\u4E86\u89E3\u51B3\u8FD9\u4E2A\u95EE\u9898\uFF0C\u6211\u4EEC\u5C06\u4F7F\u7528\u586B\u5145\u4F7F\u5F20\u91CF\u5177\u6709\u77E9\u5F62\u3002Padding\u901A\u8FC7\u5728\u503C\u8F83\u5C11\u7684\u53E5\u5B50\u4E2D\u6DFB\u52A0\u4E00\u4E2A\u540D\u4E3APadding token\u7684\u7279\u6B8A\u5355\u8BCD\u6765\u786E\u4FDD\u6211\u4EEC\u6240\u6709\u7684\u53E5\u5B50\u957F\u5EA6\u76F8\u540C\u3002\u4F8B\u5982\uFF0C\u5982\u679C\u4F60\u670910\u4E2A\u5305\u542B10\u4E2A\u5355\u8BCD\u7684\u53E5\u5B50\u548C1\u4E2A\u5305\u542B20\u4E2A\u5355\u8BCD\u7684\u53E5\u5B50\uFF0C\u586B\u5145\u5C06\u786E\u4FDD\u6240\u6709\u53E5\u5B50\u90FD\u5305\u542B20\u4E2A\u5355\u8BCD\u3002\u5728\u6211\u4EEC\u7684\u793A\u4F8B\u4E2D\uFF0C\u751F\u6210\u7684\u5F20\u91CF\u5982\u4E0B\u6240\u793A\uFF1A"),Fe=i(),w(ss.$$.fragment),Se=i(),xs=c("p"),dn=h("\u53EF\u4EE5\u5728tokenizer.pad_token_id\u4E2D\u627E\u5230\u586B\u5145\u4EE4\u724CID. \u8BA9\u6211\u4EEC\u4F7F\u7528\u5B83\uFF0C\u5C06\u6211\u4EEC\u7684\u4E24\u53E5\u8BDD\u5206\u522B\u53D1\u9001\u5230\u6A21\u578B\u4E2D\uFF0C\u5E76\u5206\u6279\u53D1\u9001\u5230\u4E00\u8D77\uFF1A"),xe=i(),B.c(),Cs=i(),Ms=c("p"),kn=h("\u6211\u4EEC\u6279\u5904\u7406\u9884\u6D4B\u4E2D\u7684logits\u6709\u70B9\u95EE\u9898\uFF1A\u7B2C\u4E8C\u884C\u5E94\u8BE5\u4E0E\u7B2C\u4E8C\u53E5\u7684logits\u76F8\u540C\uFF0C\u4F46\u6211\u4EEC\u5F97\u5230\u4E86\u5B8C\u5168\u4E0D\u540C\u7684\u503C\uFF01"),Ce=i(),Ns=c("p"),jn=h("\u8FD9\u662F\u56E0\u4E3ATransformer\u6A21\u578B\u7684\u5173\u952E\u7279\u6027\u662F\u5173\u6CE8\u5C42\uFF0C\u5B83\u5C06\u6BCF\u4E2A\u6807\u8BB0\u4E0A\u4E0B\u6587\u5316\u3002\u8FD9\u4E9B\u5C06\u8003\u8651\u586B\u5145\u6807\u8BB0\uFF0C\u56E0\u4E3A\u5B83\u4EEC\u6D89\u53CA\u5E8F\u5217\u4E2D\u7684\u6240\u6709\u6807\u8BB0\u3002\u4E3A\u4E86\u5728\u901A\u8FC7\u6A21\u578B\u4F20\u9012\u4E0D\u540C\u957F\u5EA6\u7684\u5355\u4E2A\u53E5\u5B50\u65F6\uFF0C\u6216\u8005\u5728\u4F20\u9012\u4E00\u6279\u5E94\u7528\u4E86\u76F8\u540C\u53E5\u5B50\u548C\u586B\u5145\u7684\u53E5\u5B50\u65F6\u83B7\u5F97\u76F8\u540C\u7684\u7ED3\u679C\uFF0C\u6211\u4EEC\u9700\u8981\u544A\u8BC9\u8FD9\u4E9B\u6CE8\u610F\u5C42\u5FFD\u7565\u586B\u5145\u6807\u8BB0\u3002\u8FD9\u662F\u901A\u8FC7\u4F7F\u7528 attention mask\u6765\u5B9E\u73B0\u7684\u3002"),Me=i(),es=c("h2"),wn=h("\u6CE8\u610F\u529B\u9762\u5177"),Ne=i(),ns=c("p"),oe=c("em"),gn=h("Attention masks"),yn=h("\u662F\u4E0E\u8F93\u5165ID\u5F20\u91CF\u5F62\u72B6\u5B8C\u5168\u76F8\u540C\u7684\u5F20\u91CF\uFF0C\u75280\u548C1\u586B\u5145\uFF1A1s\u8868\u793A\u5E94\u6CE8\u610F\u76F8\u5E94\u7684\u6807\u8BB0\uFF0C0s\u8868\u793A\u4E0D\u5E94\u6CE8\u610F\u76F8\u5E94\u7684\u6807\u8BB0\uFF08\u5373\uFF0C\u6A21\u578B\u7684\u6CE8\u610F\u529B\u5C42\u5E94\u5FFD\u7565\u5B83\u4EEC\uFF09\u3002"),Be=i(),Bs=c("p"),qn=h("\u8BA9\u6211\u4EEC\u7528attention mask\u5B8C\u6210\u4E0A\u4E00\u4E2A\u793A\u4F8B\uFF1A"),He=i(),U.c(),Hs=i(),Us=c("p"),vn=h("\u73B0\u5728\u6211\u4EEC\u5F97\u5230\u4E86\u8BE5\u6279\u4E2D\u7B2C\u4E8C\u4E2A\u53E5\u5B50\u7684\u76F8\u540C\u767B\u5F55\u3002"),Ue=i(),Os=c("p"),En=h("\u8BF7\u6CE8\u610F\uFF0C\u7B2C\u4E8C\u4E2A\u5E8F\u5217\u7684\u6700\u540E\u4E00\u4E2A\u503C\u662F\u4E00\u4E2A\u586B\u5145ID\uFF0C\u5B83\u5728attention mask\u4E2D\u662F\u4E00\u4E2A0\u503C\u3002"),Oe=i(),w(Y.$$.fragment),Re=i(),ts=c("h2"),zn=h("\u957F\u5E8F\u5217"),Ge=i(),Rs=c("p"),In=h("\u5BF9\u4E8ETransformers\u6A21\u578B\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u6A21\u578B\u7684\u5E8F\u5217\u957F\u5EA6\u662F\u6709\u9650\u7684\u3002\u5927\u591A\u6570\u6A21\u578B\u5904\u7406\u591A\u8FBE512\u62161024\u4E2A\u4EE4\u724C\u7684\u5E8F\u5217\uFF0C\u5F53\u8981\u6C42\u5904\u7406\u66F4\u957F\u7684\u5E8F\u5217\u65F6\uFF0C\u4F1A\u5D29\u6E83\u3002\u6B64\u95EE\u9898\u6709\u4E24\u79CD\u89E3\u51B3\u65B9\u6848\uFF1A"),Ye=i(),Gs=c("ul"),ie=c("li"),Tn=h("\u4F7F\u7528\u652F\u6301\u7684\u5E8F\u5217\u957F\u5EA6\u8F83\u957F\u7684\u6A21\u578B\u3002"),Je=i(),Ys=c("ul"),ue=c("li"),An=h("\u622A\u65AD\u5E8F\u5217\u3002"),Qe=i(),R=c("p"),Pn=h(`\u6A21\u578B\u6709\u4E0D\u540C\u7684\u652F\u6301\u5E8F\u5217\u957F\u5EA6\uFF0C\u6709\u4E9B\u6A21\u578B\u4E13\u95E8\u5904\u7406\u5F88\u957F\u7684\u5E8F\u5217\u3002
`),ls=c("a"),Dn=h("Longformer"),Ln=h(`
\u8FD9\u662F\u4E00\u4E2A\u4F8B\u5B50\uFF0C\u53E6\u4E00\u4E2A\u662F
`),as=c("a"),Fn=h("LED"),Sn=h(`
. \u5982\u679C\u60A8\u6B63\u5728\u5904\u7406\u4E00\u9879\u9700\u8981\u5F88\u957F\u5E8F\u5217\u7684\u4EFB\u52A1\uFF0C\u6211\u4EEC\u5EFA\u8BAE\u60A8\u67E5\u770B\u8FD9\u4E9B\u6A21\u578B\u3002`),Ke=i(),Js=c("p"),xn=h("\u5426\u5219\uFF0C\u6211\u4EEC\u5EFA\u8BAE\u60A8\u901A\u8FC7\u6307\u5B9Amax_sequence_length\u53C2\u6570\uFF1A"),Ve=i(),w(rs.$$.fragment),this.h()},l(s){const a=xt('[data-svelte="svelte-1phssyn"]',document.head);t=m(a,"META",{name:!0,content:!0}),a.forEach(l),r=u(s),g(e.$$.fragment,s),o=u(s),n=m(s,"H1",{id:!0});var fe=$(n);k=d(fe,"\u5904\u7406\u591A\u4E2A\u5E8F\u5217"),fe.forEach(l),z=u(s),I.l(s),bs=u(s),A.l(s),$s=u(s),hs=m(s,"P",{});var Qs=$(hs);Xe=d(Qs,"\u5728\u4E0A\u4E00\u8282\u4E2D\uFF0C\u6211\u4EEC\u63A2\u8BA8\u4E86\u6700\u7B80\u5355\u7684\u7528\u4F8B\uFF1A\u5BF9\u4E00\u4E2A\u5C0F\u957F\u5EA6\u7684\u5E8F\u5217\u8FDB\u884C\u63A8\u7406\u3002\u7136\u800C\uFF0C\u4E00\u4E9B\u95EE\u9898\u5DF2\u7ECF\u51FA\u73B0\uFF1A"),Qs.forEach(l),_e=u(s),ds=m(s,"UL",{});var Ks=$(ds);te=m(Ks,"LI",{});var Vs=$(te);Ze=d(Vs,"\u6211\u4EEC\u5982\u4F55\u5904\u7406\u591A\u4E2A\u5E8F\u5217\uFF1F"),Vs.forEach(l),Ks.forEach(l),be=u(s),ks=m(s,"UL",{});var Ws=$(ks);le=m(Ws,"LI",{});var Xs=$(le);sn=d(Xs,"\u6211\u4EEC\u5982\u4F55\u5904\u7406\u591A\u4E2A\u5E8F\u5217\u4E0D\u540C\u957F\u5EA6?"),Xs.forEach(l),Ws.forEach(l),$e=u(s),js=m(s,"UL",{});var Zs=$(js);ae=m(Zs,"LI",{});var ce=$(ae);en=d(ce,"\u8BCD\u6C47\u7D22\u5F15\u662F\u8BA9\u6A21\u578B\u6B63\u5E38\u5DE5\u4F5C\u7684\u552F\u4E00\u8F93\u5165\u5417\uFF1F"),ce.forEach(l),Zs.forEach(l),he=u(s),ws=m(s,"UL",{});var se=$(ws);re=m(se,"LI",{});var ee=$(re);nn=d(ee,"\u662F\u5426\u5B58\u5728\u5E8F\u5217\u592A\u957F\u7684\u95EE\u9898\uFF1F"),ee.forEach(l),se.forEach(l),de=u(s),gs=m(s,"P",{});var me=$(gs);tn=d(me,"\u8BA9\u6211\u4EEC\u770B\u770B\u8FD9\u4E9B\u95EE\u9898\u4F1A\u5E26\u6765\u4EC0\u4E48\u6837\u7684\u95EE\u9898\uFF0C\u4EE5\u53CA\u5982\u4F55\u4F7F\u7528\u{1F917} Transformers API\u89E3\u51B3\u5B83\u4EEC"),me.forEach(l),ke=u(s),K=m(s,"H2",{id:!0});var et=$(K);ln=d(et,"\u6A21\u578B\u9700\u8981\u4E00\u6279\u8F93\u5165"),et.forEach(l),je=u(s),ys=m(s,"P",{});var nt=$(ys);an=d(nt,"\u5728\u4E0A\u4E00\u4E2A\u7EC3\u4E60\u4E2D\uFF0C\u60A8\u770B\u5230\u4E86\u5E8F\u5217\u5982\u4F55\u8F6C\u6362\u4E3A\u6570\u5B57\u5217\u8868\u3002\u8BA9\u6211\u4EEC\u5C06\u6B64\u6570\u5B57\u5217\u8868\u8F6C\u6362\u4E3A\u5F20\u91CF\uFF0C\u5E76\u5C06\u5176\u53D1\u9001\u5230\u6A21\u578B\uFF1A"),nt.forEach(l),we=u(s),D.l(s),qs=u(s),vs=m(s,"P",{});var tt=$(vs);rn=d(tt,"\u54E6\uFF0C\u4E0D\uFF01\u4E3A\u4EC0\u4E48\u5931\u8D25\u4E86\uFF1F\u201C\u6211\u4EEC\u9075\u5FAA\u4E86\u7B2C2\u8282\u4E2D\u7BA1\u9053\u7684\u6B65\u9AA4\u3002"),tt.forEach(l),ge=u(s),Es=m(s,"P",{});var lt=$(Es);pn=d(lt,"\u95EE\u9898\u662F\u6211\u4EEC\u5411\u6A21\u578B\u53D1\u9001\u4E86\u4E00\u4E2A\u5E8F\u5217\uFF0C\u800C\u{1F917} Transformers\u6A21\u578B\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u9700\u8981\u591A\u4E2A\u53E5\u5B50\u3002\u5728\u8FD9\u91CC\uFF0C\u5F53\u6211\u4EEC\u5C06\u5206\u8BCD\u5668\u5E94\u7528\u4E8E\u4E00\u4E2A\u5E94\u7528\u7A0B\u5E8F\u65F6\uFF0C\u6211\u4EEC\u5C1D\u8BD5\u5728\u5E55\u540E\u5B8C\u6210\u5206\u8BCD\u5668\u6240\u505A\u7684\u4E00\u5207\uFF0C\u4F46\u5982\u679C\u4ED4\u7EC6\u89C2\u5BDF\uFF0C\u60A8\u4F1A\u53D1\u73B0\u5B83\u4E0D\u4EC5\u5C06\u8F93\u5165ID\u5217\u8868\u8F6C\u6362\u4E3A\u5F20\u91CF\uFF0C\u8FD8\u5728\u5176\u9876\u90E8\u6DFB\u52A0\u4E86\u4E00\u4E2A\u7EF4\u5EA6\uFF1A"),lt.forEach(l),ye=u(s),F.l(s),zs=u(s),Is=m(s,"P",{});var at=$(Is);on=d(at,"\u8BA9\u6211\u4EEC\u91CD\u8BD5\u5E76\u6DFB\u52A0\u4E00\u4E2A\u65B0\u7EF4\u5EA6\uFF1A"),at.forEach(l),qe=u(s),x.l(s),Ts=u(s),As=m(s,"P",{});var rt=$(As);un=d(rt,"\u6211\u4EEC\u6253\u5370\u8F93\u5165ID\u4EE5\u53CA\u751F\u6210\u7684logits-\u4EE5\u4E0B\u662F\u8F93\u51FA\uFF1A"),rt.forEach(l),ve=u(s),M.l(s),Ps=u(s),V=m(s,"P",{});var Cn=$(V);pe=m(Cn,"EM",{});var pt=$(pe);fn=d(pt,"Batching"),pt.forEach(l),cn=d(Cn," \u662F\u4E00\u6B21\u901A\u8FC7\u6A21\u578B\u53D1\u9001\u591A\u4E2A\u53E5\u5B50\u7684\u884C\u4E3A\u3002\u5982\u679C\u4F60\u53EA\u6709\u4E00\u53E5\u8BDD\uFF0C\u4F60\u53EF\u4EE5\u7528\u4E00\u4E2A\u5E8F\u5217\u6784\u5EFA\u4E00\u4E2A\u6279\u6B21\uFF1A"),Cn.forEach(l),Ee=u(s),g(W.$$.fragment,s),ze=u(s),Ds=m(s,"P",{});var ot=$(Ds);mn=d(ot,"\u8FD9\u662F\u4E00\u6279\u4E24\u4E2A\u76F8\u540C\u7684\u5E8F\u5217\uFF01"),ot.forEach(l),Ie=u(s),g(G.$$.fragment,s),Te=u(s),Ls=m(s,"P",{});var it=$(Ls);_n=d(it,"\u6279\u5904\u7406\u5141\u8BB8\u6A21\u578B\u5728\u8F93\u5165\u591A\u4E2A\u53E5\u5B50\u65F6\u5DE5\u4F5C\u3002\u4F7F\u7528\u591A\u4E2A\u5E8F\u5217\u5C31\u50CF\u4F7F\u7528\u5355\u4E2A\u5E8F\u5217\u6784\u5EFA\u6279\u4E00\u6837\u7B80\u5355\u3002\u4E0D\u8FC7\uFF0C\u8FD8\u6709\u7B2C\u4E8C\u4E2A\u95EE\u9898\u3002\u5F53\u4F60\u8BD5\u56FE\u5C06\u4E24\u4E2A\uFF08\u6216\u66F4\u591A\uFF09\u53E5\u5B50\u7EC4\u5408\u5728\u4E00\u8D77\u65F6\uFF0C\u5B83\u4EEC\u7684\u957F\u5EA6\u53EF\u80FD\u4E0D\u540C\u3002\u5982\u679C\u60A8\u4EE5\u524D\u4F7F\u7528\u8FC7\u5F20\u91CF\uFF0C\u90A3\u4E48\u60A8\u77E5\u9053\u5B83\u4EEC\u5FC5\u987B\u662F\u77E9\u5F62\uFF0C\u56E0\u6B64\u65E0\u6CD5\u5C06\u8F93\u5165ID\u5217\u8868\u76F4\u63A5\u8F6C\u6362\u4E3A\u5F20\u91CF\u3002\u4E3A\u4E86\u89E3\u51B3\u8FD9\u4E2A\u95EE\u9898\uFF0C\u6211\u4EEC\u901A\u5E38\u586B\u5145\u8F93\u5165\u3002"),it.forEach(l),Ae=u(s),X=m(s,"H2",{id:!0});var ut=$(X);bn=d(ut,"\u586B\u5145\u8F93\u5165"),ut.forEach(l),Pe=u(s),Fs=m(s,"P",{});var ft=$(Fs);$n=d(ft,"\u4EE5\u4E0B\u5217\u8868\u4E0D\u80FD\u8F6C\u6362\u4E3A\u5F20\u91CF\uFF1A"),ft.forEach(l),De=u(s),g(Z.$$.fragment,s),Le=u(s),Ss=m(s,"P",{});var ct=$(Ss);hn=d(ct,"\u4E3A\u4E86\u89E3\u51B3\u8FD9\u4E2A\u95EE\u9898\uFF0C\u6211\u4EEC\u5C06\u4F7F\u7528\u586B\u5145\u4F7F\u5F20\u91CF\u5177\u6709\u77E9\u5F62\u3002Padding\u901A\u8FC7\u5728\u503C\u8F83\u5C11\u7684\u53E5\u5B50\u4E2D\u6DFB\u52A0\u4E00\u4E2A\u540D\u4E3APadding token\u7684\u7279\u6B8A\u5355\u8BCD\u6765\u786E\u4FDD\u6211\u4EEC\u6240\u6709\u7684\u53E5\u5B50\u957F\u5EA6\u76F8\u540C\u3002\u4F8B\u5982\uFF0C\u5982\u679C\u4F60\u670910\u4E2A\u5305\u542B10\u4E2A\u5355\u8BCD\u7684\u53E5\u5B50\u548C1\u4E2A\u5305\u542B20\u4E2A\u5355\u8BCD\u7684\u53E5\u5B50\uFF0C\u586B\u5145\u5C06\u786E\u4FDD\u6240\u6709\u53E5\u5B50\u90FD\u5305\u542B20\u4E2A\u5355\u8BCD\u3002\u5728\u6211\u4EEC\u7684\u793A\u4F8B\u4E2D\uFF0C\u751F\u6210\u7684\u5F20\u91CF\u5982\u4E0B\u6240\u793A\uFF1A"),ct.forEach(l),Fe=u(s),g(ss.$$.fragment,s),Se=u(s),xs=m(s,"P",{});var mt=$(xs);dn=d(mt,"\u53EF\u4EE5\u5728tokenizer.pad_token_id\u4E2D\u627E\u5230\u586B\u5145\u4EE4\u724CID. \u8BA9\u6211\u4EEC\u4F7F\u7528\u5B83\uFF0C\u5C06\u6211\u4EEC\u7684\u4E24\u53E5\u8BDD\u5206\u522B\u53D1\u9001\u5230\u6A21\u578B\u4E2D\uFF0C\u5E76\u5206\u6279\u53D1\u9001\u5230\u4E00\u8D77\uFF1A"),mt.forEach(l),xe=u(s),B.l(s),Cs=u(s),Ms=m(s,"P",{});var _t=$(Ms);kn=d(_t,"\u6211\u4EEC\u6279\u5904\u7406\u9884\u6D4B\u4E2D\u7684logits\u6709\u70B9\u95EE\u9898\uFF1A\u7B2C\u4E8C\u884C\u5E94\u8BE5\u4E0E\u7B2C\u4E8C\u53E5\u7684logits\u76F8\u540C\uFF0C\u4F46\u6211\u4EEC\u5F97\u5230\u4E86\u5B8C\u5168\u4E0D\u540C\u7684\u503C\uFF01"),_t.forEach(l),Ce=u(s),Ns=m(s,"P",{});var bt=$(Ns);jn=d(bt,"\u8FD9\u662F\u56E0\u4E3ATransformer\u6A21\u578B\u7684\u5173\u952E\u7279\u6027\u662F\u5173\u6CE8\u5C42\uFF0C\u5B83\u5C06\u6BCF\u4E2A\u6807\u8BB0\u4E0A\u4E0B\u6587\u5316\u3002\u8FD9\u4E9B\u5C06\u8003\u8651\u586B\u5145\u6807\u8BB0\uFF0C\u56E0\u4E3A\u5B83\u4EEC\u6D89\u53CA\u5E8F\u5217\u4E2D\u7684\u6240\u6709\u6807\u8BB0\u3002\u4E3A\u4E86\u5728\u901A\u8FC7\u6A21\u578B\u4F20\u9012\u4E0D\u540C\u957F\u5EA6\u7684\u5355\u4E2A\u53E5\u5B50\u65F6\uFF0C\u6216\u8005\u5728\u4F20\u9012\u4E00\u6279\u5E94\u7528\u4E86\u76F8\u540C\u53E5\u5B50\u548C\u586B\u5145\u7684\u53E5\u5B50\u65F6\u83B7\u5F97\u76F8\u540C\u7684\u7ED3\u679C\uFF0C\u6211\u4EEC\u9700\u8981\u544A\u8BC9\u8FD9\u4E9B\u6CE8\u610F\u5C42\u5FFD\u7565\u586B\u5145\u6807\u8BB0\u3002\u8FD9\u662F\u901A\u8FC7\u4F7F\u7528 attention mask\u6765\u5B9E\u73B0\u7684\u3002"),bt.forEach(l),Me=u(s),es=m(s,"H2",{id:!0});var $t=$(es);wn=d($t,"\u6CE8\u610F\u529B\u9762\u5177"),$t.forEach(l),Ne=u(s),ns=m(s,"P",{});var Mn=$(ns);oe=m(Mn,"EM",{});var ht=$(oe);gn=d(ht,"Attention masks"),ht.forEach(l),yn=d(Mn,"\u662F\u4E0E\u8F93\u5165ID\u5F20\u91CF\u5F62\u72B6\u5B8C\u5168\u76F8\u540C\u7684\u5F20\u91CF\uFF0C\u75280\u548C1\u586B\u5145\uFF1A1s\u8868\u793A\u5E94\u6CE8\u610F\u76F8\u5E94\u7684\u6807\u8BB0\uFF0C0s\u8868\u793A\u4E0D\u5E94\u6CE8\u610F\u76F8\u5E94\u7684\u6807\u8BB0\uFF08\u5373\uFF0C\u6A21\u578B\u7684\u6CE8\u610F\u529B\u5C42\u5E94\u5FFD\u7565\u5B83\u4EEC\uFF09\u3002"),Mn.forEach(l),Be=u(s),Bs=m(s,"P",{});var dt=$(Bs);qn=d(dt,"\u8BA9\u6211\u4EEC\u7528attention mask\u5B8C\u6210\u4E0A\u4E00\u4E2A\u793A\u4F8B\uFF1A"),dt.forEach(l),He=u(s),U.l(s),Hs=u(s),Us=m(s,"P",{});var kt=$(Us);vn=d(kt,"\u73B0\u5728\u6211\u4EEC\u5F97\u5230\u4E86\u8BE5\u6279\u4E2D\u7B2C\u4E8C\u4E2A\u53E5\u5B50\u7684\u76F8\u540C\u767B\u5F55\u3002"),kt.forEach(l),Ue=u(s),Os=m(s,"P",{});var jt=$(Os);En=d(jt,"\u8BF7\u6CE8\u610F\uFF0C\u7B2C\u4E8C\u4E2A\u5E8F\u5217\u7684\u6700\u540E\u4E00\u4E2A\u503C\u662F\u4E00\u4E2A\u586B\u5145ID\uFF0C\u5B83\u5728attention mask\u4E2D\u662F\u4E00\u4E2A0\u503C\u3002"),jt.forEach(l),Oe=u(s),g(Y.$$.fragment,s),Re=u(s),ts=m(s,"H2",{id:!0});var wt=$(ts);zn=d(wt,"\u957F\u5E8F\u5217"),wt.forEach(l),Ge=u(s),Rs=m(s,"P",{});var gt=$(Rs);In=d(gt,"\u5BF9\u4E8ETransformers\u6A21\u578B\uFF0C\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u6A21\u578B\u7684\u5E8F\u5217\u957F\u5EA6\u662F\u6709\u9650\u7684\u3002\u5927\u591A\u6570\u6A21\u578B\u5904\u7406\u591A\u8FBE512\u62161024\u4E2A\u4EE4\u724C\u7684\u5E8F\u5217\uFF0C\u5F53\u8981\u6C42\u5904\u7406\u66F4\u957F\u7684\u5E8F\u5217\u65F6\uFF0C\u4F1A\u5D29\u6E83\u3002\u6B64\u95EE\u9898\u6709\u4E24\u79CD\u89E3\u51B3\u65B9\u6848\uFF1A"),gt.forEach(l),Ye=u(s),Gs=m(s,"UL",{});var yt=$(Gs);ie=m(yt,"LI",{});var qt=$(ie);Tn=d(qt,"\u4F7F\u7528\u652F\u6301\u7684\u5E8F\u5217\u957F\u5EA6\u8F83\u957F\u7684\u6A21\u578B\u3002"),qt.forEach(l),yt.forEach(l),Je=u(s),Ys=m(s,"UL",{});var vt=$(Ys);ue=m(vt,"LI",{});var Et=$(ue);An=d(Et,"\u622A\u65AD\u5E8F\u5217\u3002"),Et.forEach(l),vt.forEach(l),Qe=u(s),R=m(s,"P",{});var ne=$(R);Pn=d(ne,`\u6A21\u578B\u6709\u4E0D\u540C\u7684\u652F\u6301\u5E8F\u5217\u957F\u5EA6\uFF0C\u6709\u4E9B\u6A21\u578B\u4E13\u95E8\u5904\u7406\u5F88\u957F\u7684\u5E8F\u5217\u3002
`),ls=m(ne,"A",{href:!0,rel:!0});var zt=$(ls);Dn=d(zt,"Longformer"),zt.forEach(l),Ln=d(ne,`
\u8FD9\u662F\u4E00\u4E2A\u4F8B\u5B50\uFF0C\u53E6\u4E00\u4E2A\u662F
`),as=m(ne,"A",{href:!0,rel:!0});var It=$(as);Fn=d(It,"LED"),It.forEach(l),Sn=d(ne,`
. \u5982\u679C\u60A8\u6B63\u5728\u5904\u7406\u4E00\u9879\u9700\u8981\u5F88\u957F\u5E8F\u5217\u7684\u4EFB\u52A1\uFF0C\u6211\u4EEC\u5EFA\u8BAE\u60A8\u67E5\u770B\u8FD9\u4E9B\u6A21\u578B\u3002`),ne.forEach(l),Ke=u(s),Js=m(s,"P",{});var Tt=$(Js);xn=d(Tt,"\u5426\u5219\uFF0C\u6211\u4EEC\u5EFA\u8BAE\u60A8\u901A\u8FC7\u6307\u5B9Amax_sequence_length\u53C2\u6570\uFF1A"),Tt.forEach(l),Ve=u(s),g(rs.$$.fragment,s),this.h()},h(){O(t,"name","hf:doc:metadata"),O(t,"content",JSON.stringify(ll)),O(n,"id",""),O(K,"id",""),O(X,"id",""),O(es,"id",""),O(ts,"id",""),O(ls,"href","https://huggingface.co/transformers/model_doc/longformer.html"),O(ls,"rel","nofollow"),O(as,"href","https://huggingface.co/transformers/model_doc/led.html"),O(as,"rel","nofollow")},m(s,a){f(document.head,t),p(s,r,a),y(e,s,a),p(s,o,a),p(s,n,a),f(n,k),p(s,z,a),ps[E].m(s,a),p(s,bs,a),os[T].m(s,a),p(s,$s,a),p(s,hs,a),f(hs,Xe),p(s,_e,a),p(s,ds,a),f(ds,te),f(te,Ze),p(s,be,a),p(s,ks,a),f(ks,le),f(le,sn),p(s,$e,a),p(s,js,a),f(js,ae),f(ae,en),p(s,he,a),p(s,ws,a),f(ws,re),f(re,nn),p(s,de,a),p(s,gs,a),f(gs,tn),p(s,ke,a),p(s,K,a),f(K,ln),p(s,je,a),p(s,ys,a),f(ys,an),p(s,we,a),is[P].m(s,a),p(s,qs,a),p(s,vs,a),f(vs,rn),p(s,ge,a),p(s,Es,a),f(Es,pn),p(s,ye,a),us[L].m(s,a),p(s,zs,a),p(s,Is,a),f(Is,on),p(s,qe,a),fs[S].m(s,a),p(s,Ts,a),p(s,As,a),f(As,un),p(s,ve,a),cs[C].m(s,a),p(s,Ps,a),p(s,V,a),f(V,pe),f(pe,fn),f(V,cn),p(s,Ee,a),y(W,s,a),p(s,ze,a),p(s,Ds,a),f(Ds,mn),p(s,Ie,a),y(G,s,a),p(s,Te,a),p(s,Ls,a),f(Ls,_n),p(s,Ae,a),p(s,X,a),f(X,bn),p(s,Pe,a),p(s,Fs,a),f(Fs,$n),p(s,De,a),y(Z,s,a),p(s,Le,a),p(s,Ss,a),f(Ss,hn),p(s,Fe,a),y(ss,s,a),p(s,Se,a),p(s,xs,a),f(xs,dn),p(s,xe,a),ms[N].m(s,a),p(s,Cs,a),p(s,Ms,a),f(Ms,kn),p(s,Ce,a),p(s,Ns,a),f(Ns,jn),p(s,Me,a),p(s,es,a),f(es,wn),p(s,Ne,a),p(s,ns,a),f(ns,oe),f(oe,gn),f(ns,yn),p(s,Be,a),p(s,Bs,a),f(Bs,qn),p(s,He,a),_s[H].m(s,a),p(s,Hs,a),p(s,Us,a),f(Us,vn),p(s,Ue,a),p(s,Os,a),f(Os,En),p(s,Oe,a),y(Y,s,a),p(s,Re,a),p(s,ts,a),f(ts,zn),p(s,Ge,a),p(s,Rs,a),f(Rs,In),p(s,Ye,a),p(s,Gs,a),f(Gs,ie),f(ie,Tn),p(s,Je,a),p(s,Ys,a),f(Ys,ue),f(ue,An),p(s,Qe,a),p(s,R,a),f(R,Pn),f(R,ls),f(ls,Dn),f(R,Ln),f(R,as),f(as,Fn),f(R,Sn),p(s,Ke,a),p(s,Js,a),f(Js,xn),p(s,Ve,a),y(rs,s,a),We=!0},p(s,[a]){const fe={};a&1&&(fe.fw=s[0]),e.$set(fe);let Qs=E;E=Bn(s),E!==Qs&&(Q(),_(ps[Qs],1,1,()=>{ps[Qs]=null}),J(),I=ps[E],I||(I=ps[E]=Nn[E](s),I.c()),b(I,1),I.m(bs.parentNode,bs));let Ks=T;T=Un(s),T!==Ks&&(Q(),_(os[Ks],1,1,()=>{os[Ks]=null}),J(),A=os[T],A||(A=os[T]=Hn[T](s),A.c()),b(A,1),A.m($s.parentNode,$s));let Vs=P;P=Rn(s),P!==Vs&&(Q(),_(is[Vs],1,1,()=>{is[Vs]=null}),J(),D=is[P],D||(D=is[P]=On[P](s),D.c()),b(D,1),D.m(qs.parentNode,qs));let Ws=L;L=Yn(s),L!==Ws&&(Q(),_(us[Ws],1,1,()=>{us[Ws]=null}),J(),F=us[L],F||(F=us[L]=Gn[L](s),F.c()),b(F,1),F.m(zs.parentNode,zs));let Xs=S;S=Qn(s),S!==Xs&&(Q(),_(fs[Xs],1,1,()=>{fs[Xs]=null}),J(),x=fs[S],x||(x=fs[S]=Jn[S](s),x.c()),b(x,1),x.m(Ts.parentNode,Ts));let Zs=C;C=Vn(s),C!==Zs&&(Q(),_(cs[Zs],1,1,()=>{cs[Zs]=null}),J(),M=cs[C],M||(M=cs[C]=Kn[C](s),M.c()),b(M,1),M.m(Ps.parentNode,Ps));const ce={};a&2&&(ce.$$scope={dirty:a,ctx:s}),G.$set(ce);let se=N;N=Xn(s),N!==se&&(Q(),_(ms[se],1,1,()=>{ms[se]=null}),J(),B=ms[N],B||(B=ms[N]=Wn[N](s),B.c()),b(B,1),B.m(Cs.parentNode,Cs));let ee=H;H=st(s),H!==ee&&(Q(),_(_s[ee],1,1,()=>{_s[ee]=null}),J(),U=_s[H],U||(U=_s[H]=Zn[H](s),U.c()),b(U,1),U.m(Hs.parentNode,Hs));const me={};a&2&&(me.$$scope={dirty:a,ctx:s}),Y.$set(me)},i(s){We||(b(e.$$.fragment,s),b(I),b(A),b(D),b(F),b(x),b(M),b(W.$$.fragment,s),b(G.$$.fragment,s),b(Z.$$.fragment,s),b(ss.$$.fragment,s),b(B),b(U),b(Y.$$.fragment,s),b(rs.$$.fragment,s),We=!0)},o(s){_(e.$$.fragment,s),_(I),_(A),_(D),_(F),_(x),_(M),_(W.$$.fragment,s),_(G.$$.fragment,s),_(Z.$$.fragment,s),_(ss.$$.fragment,s),_(B),_(U),_(Y.$$.fragment,s),_(rs.$$.fragment,s),We=!1},d(s){l(t),s&&l(r),q(e,s),s&&l(o),s&&l(n),s&&l(z),ps[E].d(s),s&&l(bs),os[T].d(s),s&&l($s),s&&l(hs),s&&l(_e),s&&l(ds),s&&l(be),s&&l(ks),s&&l($e),s&&l(js),s&&l(he),s&&l(ws),s&&l(de),s&&l(gs),s&&l(ke),s&&l(K),s&&l(je),s&&l(ys),s&&l(we),is[P].d(s),s&&l(qs),s&&l(vs),s&&l(ge),s&&l(Es),s&&l(ye),us[L].d(s),s&&l(zs),s&&l(Is),s&&l(qe),fs[S].d(s),s&&l(Ts),s&&l(As),s&&l(ve),cs[C].d(s),s&&l(Ps),s&&l(V),s&&l(Ee),q(W,s),s&&l(ze),s&&l(Ds),s&&l(Ie),q(G,s),s&&l(Te),s&&l(Ls),s&&l(Ae),s&&l(X),s&&l(Pe),s&&l(Fs),s&&l(De),q(Z,s),s&&l(Le),s&&l(Ss),s&&l(Fe),q(ss,s),s&&l(Se),s&&l(xs),s&&l(xe),ms[N].d(s),s&&l(Cs),s&&l(Ms),s&&l(Ce),s&&l(Ns),s&&l(Me),s&&l(es),s&&l(Ne),s&&l(ns),s&&l(Be),s&&l(Bs),s&&l(He),_s[H].d(s),s&&l(Hs),s&&l(Us),s&&l(Ue),s&&l(Os),s&&l(Oe),q(Y,s),s&&l(Re),s&&l(ts),s&&l(Ge),s&&l(Rs),s&&l(Ye),s&&l(Gs),s&&l(Je),s&&l(Ys),s&&l(Qe),s&&l(R),s&&l(Ke),s&&l(Js),s&&l(Ve),q(rs,s)}}}const ll={local:"",sections:[{local:"",title:"\u6A21\u578B\u9700\u8981\u4E00\u6279\u8F93\u5165"},{local:"",title:"\u586B\u5145\u8F93\u5165"},{local:"",title:"\u6CE8\u610F\u529B\u9762\u5177"},{local:"",title:"\u957F\u5E8F\u5217"}],title:"\u5904\u7406\u591A\u4E2A\u5E8F\u5217"};function al(j,t,r){let e="pt";return Ct(()=>{const o=new URLSearchParams(window.location.search);r(0,e=o.get("fw")||"pt")}),[e]}class cl extends Lt{constructor(t){super();Ft(this,t,al,tl,St,{})}}export{cl as default,ll as metadata};
