import{s as Ra,o as Xa,n as Ka}from"../chunks/scheduler.9bc65507.js";import{S as Ga,i as Ja,g as s,s as a,r as m,A as Qa,h as l,f as o,c as n,j as v,u as p,x as d,k as _,y as t,a as i,v as c,d as g,t as f,w as u}from"../chunks/index.707bf1b6.js";import{T as Ua}from"../chunks/Tip.c2ecdbf4.js";import{D as C}from"../chunks/Docstring.17db21ae.js";import{H as W}from"../chunks/Heading.342b1fa6.js";function Ya(De){let h,q=`For best performance, this data collator should be used with a dataset having items that are dictionaries or
BatchEncoding, with the <code>&quot;special_tokens_mask&quot;</code> key, as returned by a <a href="/docs/transformers/main/ja/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> or a
<a href="/docs/transformers/main/ja/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a> with the argument <code>return_special_tokens_mask=True</code>.`;return{c(){h=s("p"),h.innerHTML=q},l($){h=l($,"P",{"data-svelte-h":!0}),d(h)!=="svelte-16kvmfy"&&(h.innerHTML=q)},m($,H){i($,h,H)},p:Ka,d($){$&&o(h)}}}function Za(De){let h,q=`This collator relies on details of the implementation of subword tokenization by <a href="/docs/transformers/main/ja/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>, specifically
that subword tokens are prefixed with <em>##</em>. For tokenizers that do not adhere to this scheme, this collator will
produce an output that is roughly equivalent to <code>.DataCollatorForLanguageModeling</code>.`;return{c(){h=s("p"),h.innerHTML=q},l($){h=l($,"P",{"data-svelte-h":!0}),d(h)!=="svelte-1dm4bb3"&&(h.innerHTML=q)},m($,H){i($,h,H)},p:Ka,d($){$&&o(h)}}}function en(De){let h,q,$,H,X,tt,G,ua=`データ照合器は、データセット要素のリストを入力として使用してバッチを形成するオブジェクトです。これらの要素は、
<code>train_dataset</code> または <code>eval_dataset</code> の要素と同じ型。`,at,J,ha=`バッチを構築できるようにするために、データ照合者は何らかの処理 (パディングなど) を適用する場合があります。そのうちのいくつかは（
<code>DataCollat​​orForLanguageModeling</code>) ランダムなデータ拡張 (ランダム マスキングなど) も適用します
形成されたバッチ上で。`,nt,Q,_a='使用例は、<a href="../examples">サンプル スクリプト</a> または <a href="../notebooks">サンプル ノートブック</a> にあります。',ot,Y,rt,D,Z,qt,we,ba=`Very simple data collator that simply collates batches of dict-like objects and performs special handling for
potential keys named:`,Mt,Pe,va="<li><code>label</code>: handles a single value (int or float) per object</li> <li><code>label_ids</code>: handles a list of values per object</li>",zt,Fe,$a=`Does not do any additional preprocessing: property names of the input object will be used as corresponding inputs
to the model. See glue and ner for example of how it’s useful.`,st,ee,lt,y,te,St,Le,ka=`Very simple data collator that simply collates batches of dict-like objects and performs special handling for
potential keys named:`,jt,qe,xa="<li><code>label</code>: handles a single value (int or float) per object</li> <li><code>label_ids</code>: handles a list of values per object</li>",It,Me,Ca=`Does not do any additional preprocessing: property names of the input object will be used as corresponding inputs
to the model. See glue and ner for example of how it’s useful.`,At,ze,ya=`This is an object (like other data collators) rather than a pure function like default_data_collator. This can be
helpful if you need to set a return_tensors value at initialization.`,it,ae,dt,j,ne,Wt,Se,Ta="Data collator that will dynamically pad the inputs received.",mt,oe,pt,I,re,Ht,je,Da="Data collator that will dynamically pad the inputs received, as well as the labels.",ct,se,gt,A,le,Vt,Ie,wa="Data collator that will dynamically pad the inputs received, as well as the labels.",ft,ie,ut,k,de,Et,Ae,Pa=`Data collator used for language modeling. Inputs are dynamically padded to the maximum length of a batch if they
are not all of the same length.`,Nt,V,Ot,E,me,Bt,We,Fa="Prepare masked tokens inputs/labels for masked language modeling: 80% MASK, 10% random, 10% original.",Ut,N,pe,Kt,He,La="Prepare masked tokens inputs/labels for masked language modeling: 80% MASK, 10% random, 10% original.",Rt,O,ce,Xt,Ve,qa="Prepare masked tokens inputs/labels for masked language modeling: 80% MASK, 10% random, 10% original.",ht,ge,_t,b,fe,Gt,Ee,Ma="Data collator used for language modeling that masks entire words.",Jt,Ne,za="<li>collates batches of tensors, honoring their tokenizer’s pad_token</li> <li>preprocesses batches for masked language modeling</li>",Qt,B,Yt,U,ue,Zt,Oe,Sa=`Prepare masked tokens inputs/labels for masked language modeling: 80% MASK, 10% random, 10% original. Set
‘mask_labels’ means we use whole word mask (wwm), we directly mask idxs according to it’s ref.`,ea,K,he,ta,Be,ja=`Prepare masked tokens inputs/labels for masked language modeling: 80% MASK, 10% random, 10% original. Set
‘mask_labels’ means we use whole word mask (wwm), we directly mask idxs according to it’s ref.`,aa,R,_e,na,Ue,Ia=`Prepare masked tokens inputs/labels for masked language modeling: 80% MASK, 10% random, 10% original. Set
‘mask_labels’ means we use whole word mask (wwm), we directly mask idxs according to it’s ref.`,bt,be,vt,x,ve,oa,Ke,Aa="Data collator used for permutation language modeling.",ra,Re,Wa="<li>collates batches of tensors, honoring their tokenizer’s pad_token</li> <li>preprocesses batches for permutation language modeling with procedures specific to XLNet</li>",sa,M,$e,la,Xe,Ha="The masked tokens to be predicted for a particular sequence are determined by the following algorithm:",ia,ke,Va=`<li>Start from the beginning of the sequence by setting <code>cur_len = 0</code> (number of tokens processed so far).</li> <li>Sample a <code>span_length</code> from the interval <code>[1, max_span_length]</code> (length of span of tokens to be masked)</li> <li>Reserve a context of length <code>context_length = span_length / plm_probability</code> to surround span to be
masked</li> <li>Sample a starting point <code>start_index</code> from the interval <code>[cur_len, cur_len + context_length - span_length]</code> and mask tokens <code>start_index:start_index + span_length</code></li> <li>Set <code>cur_len = cur_len + context_length</code>. If <code>cur_len &lt; max_len</code> (i.e. there are tokens remaining in the
sequence to be processed), repeat from Step 1.</li>`,da,z,xe,ma,Ge,Ea="The masked tokens to be predicted for a particular sequence are determined by the following algorithm:",pa,Ce,Na=`<li>Start from the beginning of the sequence by setting <code>cur_len = 0</code> (number of tokens processed so far).</li> <li>Sample a <code>span_length</code> from the interval <code>[1, max_span_length]</code> (length of span of tokens to be masked)</li> <li>Reserve a context of length <code>context_length = span_length / plm_probability</code> to surround span to be
masked</li> <li>Sample a starting point <code>start_index</code> from the interval <code>[cur_len, cur_len + context_length - span_length]</code> and mask tokens <code>start_index:start_index + span_length</code></li> <li>Set <code>cur_len = cur_len + context_length</code>. If <code>cur_len &lt; max_len</code> (i.e. there are tokens remaining in the
sequence to be processed), repeat from Step 1.</li>`,ca,S,ye,ga,Je,Oa="The masked tokens to be predicted for a particular sequence are determined by the following algorithm:",fa,Te,Ba=`<li>Start from the beginning of the sequence by setting <code>cur_len = 0</code> (number of tokens processed so far).</li> <li>Sample a <code>span_length</code> from the interval <code>[1, max_span_length]</code> (length of span of tokens to be masked)</li> <li>Reserve a context of length <code>context_length = span_length / plm_probability</code> to surround span to be
masked</li> <li>Sample a starting point <code>start_index</code> from the interval <code>[cur_len, cur_len + context_length - span_length]</code> and mask tokens <code>start_index:start_index + span_length</code></li> <li>Set <code>cur_len = cur_len + context_length</code>. If <code>cur_len &lt; max_len</code> (i.e. there are tokens remaining in the
sequence to be processed), repeat from Step 1.</li>`,$t,et,kt;return X=new W({props:{title:"データ照合者",local:"データ照合者",headingTag:"h1"}}),Y=new W({props:{title:"Default data collator",local:"transformers.default_data_collator",headingTag:"h2"}}),Z=new C({props:{name:"transformers.default_data_collator",anchor:"transformers.default_data_collator",parameters:[{name:"features",val:": typing.List[InputDataClass]"},{name:"return_tensors",val:" = 'pt'"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L74"}}),ee=new W({props:{title:"DefaultDataCollator",local:"transformers.DefaultDataCollator",headingTag:"h2"}}),te=new C({props:{name:"class transformers.DefaultDataCollator",anchor:"transformers.DefaultDataCollator",parameters:[{name:"return_tensors",val:": str = 'pt'"}],parametersDescription:[{anchor:"transformers.DefaultDataCollator.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pt&quot;</code>) &#x2014;
The type of Tensor to return. Allowable values are &#x201C;np&#x201D;, &#x201C;pt&#x201D; and &#x201C;tf&#x201D;.`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L100"}}),ae=new W({props:{title:"DataCollatorWithPadding",local:"transformers.DataCollatorWithPadding",headingTag:"h2"}}),ne=new C({props:{name:"class transformers.DataCollatorWithPadding",anchor:"transformers.DataCollatorWithPadding",parameters:[{name:"tokenizer",val:": PreTrainedTokenizerBase"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = True"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"return_tensors",val:": str = 'pt'"}],parametersDescription:[{anchor:"transformers.DataCollatorWithPadding.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/ja/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> or <a href="/docs/transformers/main/ja/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>) &#x2014;
The tokenizer used for encoding the data.`,name:"tokenizer"},{anchor:"transformers.DataCollatorWithPadding.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/ja/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Select a strategy to pad the returned sequences (according to the model&#x2019;s padding side and padding index)
among:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code> (default): Pad to the longest sequence in the batch (or no padding if only a single
sequence is provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code>: No padding (i.e., can output a batch with sequences of different lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.DataCollatorWithPadding.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Maximum length of the returned list and optionally padding length (see above).`,name:"max_length"},{anchor:"transformers.DataCollatorWithPadding.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value.</p>
<p>This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability &gt;=
7.5 (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.DataCollatorWithPadding.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pt&quot;</code>) &#x2014;
The type of Tensor to return. Allowable values are &#x201C;np&#x201D;, &#x201C;pt&#x201D; and &#x201C;tf&#x201D;.`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L237"}}),oe=new W({props:{title:"DataCollatorForTokenClassification",local:"transformers.DataCollatorForTokenClassification",headingTag:"h2"}}),re=new C({props:{name:"class transformers.DataCollatorForTokenClassification",anchor:"transformers.DataCollatorForTokenClassification",parameters:[{name:"tokenizer",val:": PreTrainedTokenizerBase"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = True"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"label_pad_token_id",val:": int = -100"},{name:"return_tensors",val:": str = 'pt'"}],parametersDescription:[{anchor:"transformers.DataCollatorForTokenClassification.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/ja/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> or <a href="/docs/transformers/main/ja/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>) &#x2014;
The tokenizer used for encoding the data.`,name:"tokenizer"},{anchor:"transformers.DataCollatorForTokenClassification.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/ja/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Select a strategy to pad the returned sequences (according to the model&#x2019;s padding side and padding index)
among:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code> (default): Pad to the longest sequence in the batch (or no padding if only a single
sequence is provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code>: No padding (i.e., can output a batch with sequences of different lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.DataCollatorForTokenClassification.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Maximum length of the returned list and optionally padding length (see above).`,name:"max_length"},{anchor:"transformers.DataCollatorForTokenClassification.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value.</p>
<p>This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability &gt;=
7.5 (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.DataCollatorForTokenClassification.label_pad_token_id",description:`<strong>label_pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to -100) &#x2014;
The id to use when padding the labels (-100 will be automatically ignore by PyTorch loss functions).`,name:"label_pad_token_id"},{anchor:"transformers.DataCollatorForTokenClassification.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pt&quot;</code>) &#x2014;
The type of Tensor to return. Allowable values are &#x201C;np&#x201D;, &#x201C;pt&#x201D; and &#x201C;tf&#x201D;.`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L289"}}),se=new W({props:{title:"DataCollatorForSeq2Seq",local:"transformers.DataCollatorForSeq2Seq",headingTag:"h2"}}),le=new C({props:{name:"class transformers.DataCollatorForSeq2Seq",anchor:"transformers.DataCollatorForSeq2Seq",parameters:[{name:"tokenizer",val:": PreTrainedTokenizerBase"},{name:"model",val:": typing.Optional[typing.Any] = None"},{name:"padding",val:": typing.Union[bool, str, transformers.utils.generic.PaddingStrategy] = True"},{name:"max_length",val:": typing.Optional[int] = None"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"label_pad_token_id",val:": int = -100"},{name:"return_tensors",val:": str = 'pt'"}],parametersDescription:[{anchor:"transformers.DataCollatorForSeq2Seq.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/ja/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> or <a href="/docs/transformers/main/ja/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>) &#x2014;
The tokenizer used for encoding the data.`,name:"tokenizer"},{anchor:"transformers.DataCollatorForSeq2Seq.model",description:`<strong>model</strong> (<a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>, <em>optional</em>) &#x2014;
The model that is being trained. If set and has the <em>prepare_decoder_input_ids_from_labels</em>, use it to
prepare the <em>decoder_input_ids</em></p>
<p>This is useful when using <em>label_smoothing</em> to avoid calculating loss twice.`,name:"model"},{anchor:"transformers.DataCollatorForSeq2Seq.padding",description:`<strong>padding</strong> (<code>bool</code>, <code>str</code> or <a href="/docs/transformers/main/ja/internal/file_utils#transformers.utils.PaddingStrategy">PaddingStrategy</a>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Select a strategy to pad the returned sequences (according to the model&#x2019;s padding side and padding index)
among:</p>
<ul>
<li><code>True</code> or <code>&apos;longest&apos;</code> (default): Pad to the longest sequence in the batch (or no padding if only a single
sequence is provided).</li>
<li><code>&apos;max_length&apos;</code>: Pad to a maximum length specified with the argument <code>max_length</code> or to the maximum
acceptable input length for the model if that argument is not provided.</li>
<li><code>False</code> or <code>&apos;do_not_pad&apos;</code>: No padding (i.e., can output a batch with sequences of different lengths).</li>
</ul>`,name:"padding"},{anchor:"transformers.DataCollatorForSeq2Seq.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Maximum length of the returned list and optionally padding length (see above).`,name:"max_length"},{anchor:"transformers.DataCollatorForSeq2Seq.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value.</p>
<p>This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability &gt;=
7.5 (Volta).`,name:"pad_to_multiple_of"},{anchor:"transformers.DataCollatorForSeq2Seq.label_pad_token_id",description:`<strong>label_pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to -100) &#x2014;
The id to use when padding the labels (-100 will be automatically ignored by PyTorch loss functions).`,name:"label_pad_token_id"},{anchor:"transformers.DataCollatorForSeq2Seq.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;pt&quot;</code>) &#x2014;
The type of Tensor to return. Allowable values are &#x201C;np&#x201D;, &#x201C;pt&#x201D; and &#x201C;tf&#x201D;.`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L543"}}),ie=new W({props:{title:"DataCollatorForLanguageModeling",local:"transformers.DataCollatorForLanguageModeling",headingTag:"h2"}}),de=new C({props:{name:"class transformers.DataCollatorForLanguageModeling",anchor:"transformers.DataCollatorForLanguageModeling",parameters:[{name:"tokenizer",val:": PreTrainedTokenizerBase"},{name:"mlm",val:": bool = True"},{name:"mlm_probability",val:": float = 0.15"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"tf_experimental_compile",val:": bool = False"},{name:"return_tensors",val:": str = 'pt'"}],parametersDescription:[{anchor:"transformers.DataCollatorForLanguageModeling.tokenizer",description:`<strong>tokenizer</strong> (<a href="/docs/transformers/main/ja/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> or <a href="/docs/transformers/main/ja/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a>) &#x2014;
The tokenizer used for encoding the data.`,name:"tokenizer"},{anchor:"transformers.DataCollatorForLanguageModeling.mlm",description:`<strong>mlm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use masked language modeling. If set to <code>False</code>, the labels are the same as the inputs
with the padding tokens ignored (by setting them to -100). Otherwise, the labels are -100 for non-masked
tokens and the value to predict for the masked token.`,name:"mlm"},{anchor:"transformers.DataCollatorForLanguageModeling.mlm_probability",description:`<strong>mlm_probability</strong> (<code>float</code>, <em>optional</em>, defaults to 0.15) &#x2014;
The probability with which to (randomly) mask tokens in the input, when <code>mlm</code> is set to <code>True</code>.`,name:"mlm_probability"},{anchor:"transformers.DataCollatorForLanguageModeling.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>) &#x2014;
If set will pad the sequence to a multiple of the provided value.`,name:"pad_to_multiple_of"},{anchor:"transformers.DataCollatorForLanguageModeling.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code>) &#x2014;
The type of Tensor to return. Allowable values are &#x201C;np&#x201D;, &#x201C;pt&#x201D; and &#x201C;tf&#x201D;.`,name:"return_tensors"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L634"}}),V=new Ua({props:{$$slots:{default:[Ya]},$$scope:{ctx:De}}}),me=new C({props:{name:"numpy_mask_tokens",anchor:"transformers.DataCollatorForLanguageModeling.numpy_mask_tokens",parameters:[{name:"inputs",val:": typing.Any"},{name:"special_tokens_mask",val:": typing.Optional[typing.Any] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L839"}}),pe=new C({props:{name:"tf_mask_tokens",anchor:"transformers.DataCollatorForLanguageModeling.tf_mask_tokens",parameters:[{name:"inputs",val:": typing.Any"},{name:"vocab_size",val:""},{name:"mask_token_id",val:""},{name:"special_tokens_mask",val:": typing.Optional[typing.Any] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L686"}}),ce=new C({props:{name:"torch_mask_tokens",anchor:"transformers.DataCollatorForLanguageModeling.torch_mask_tokens",parameters:[{name:"inputs",val:": typing.Any"},{name:"special_tokens_mask",val:": typing.Optional[typing.Any] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L782"}}),ge=new W({props:{title:"DataCollatorForWholeWordMask",local:"transformers.DataCollatorForWholeWordMask",headingTag:"h2"}}),fe=new C({props:{name:"class transformers.DataCollatorForWholeWordMask",anchor:"transformers.DataCollatorForWholeWordMask",parameters:[{name:"tokenizer",val:": PreTrainedTokenizerBase"},{name:"mlm",val:": bool = True"},{name:"mlm_probability",val:": float = 0.15"},{name:"pad_to_multiple_of",val:": typing.Optional[int] = None"},{name:"tf_experimental_compile",val:": bool = False"},{name:"return_tensors",val:": str = 'pt'"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L878"}}),B=new Ua({props:{$$slots:{default:[Za]},$$scope:{ctx:De}}}),ue=new C({props:{name:"numpy_mask_tokens",anchor:"transformers.DataCollatorForWholeWordMask.numpy_mask_tokens",parameters:[{name:"inputs",val:": typing.Any"},{name:"mask_labels",val:": typing.Any"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L1108"}}),he=new C({props:{name:"tf_mask_tokens",anchor:"transformers.DataCollatorForWholeWordMask.tf_mask_tokens",parameters:[{name:"inputs",val:": typing.Any"},{name:"mask_labels",val:": typing.Any"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L1066"}}),_e=new C({props:{name:"torch_mask_tokens",anchor:"transformers.DataCollatorForWholeWordMask.torch_mask_tokens",parameters:[{name:"inputs",val:": typing.Any"},{name:"mask_labels",val:": typing.Any"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L1026"}}),be=new W({props:{title:"DataCollatorForPermutationLanguageModeling",local:"transformers.DataCollatorForPermutationLanguageModeling",headingTag:"h2"}}),ve=new C({props:{name:"class transformers.DataCollatorForPermutationLanguageModeling",anchor:"transformers.DataCollatorForPermutationLanguageModeling",parameters:[{name:"tokenizer",val:": PreTrainedTokenizerBase"},{name:"plm_probability",val:": float = 0.16666666666666666"},{name:"max_span_length",val:": int = 5"},{name:"return_tensors",val:": str = 'pt'"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L1233"}}),$e=new C({props:{name:"numpy_mask_tokens",anchor:"transformers.DataCollatorForPermutationLanguageModeling.numpy_mask_tokens",parameters:[{name:"inputs",val:": typing.Any"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L1473"}}),xe=new C({props:{name:"tf_mask_tokens",anchor:"transformers.DataCollatorForPermutationLanguageModeling.tf_mask_tokens",parameters:[{name:"inputs",val:": typing.Any"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L1366"}}),ye=new C({props:{name:"torch_mask_tokens",anchor:"transformers.DataCollatorForPermutationLanguageModeling.torch_mask_tokens",parameters:[{name:"inputs",val:": typing.Any"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/data/data_collator.py#L1267"}}),{c(){h=s("meta"),q=a(),$=s("p"),H=a(),m(X.$$.fragment),tt=a(),G=s("p"),G.innerHTML=ua,at=a(),J=s("p"),J.innerHTML=ha,nt=a(),Q=s("p"),Q.innerHTML=_a,ot=a(),m(Y.$$.fragment),rt=a(),D=s("div"),m(Z.$$.fragment),qt=a(),we=s("p"),we.textContent=ba,Mt=a(),Pe=s("ul"),Pe.innerHTML=va,zt=a(),Fe=s("p"),Fe.textContent=$a,st=a(),m(ee.$$.fragment),lt=a(),y=s("div"),m(te.$$.fragment),St=a(),Le=s("p"),Le.textContent=ka,jt=a(),qe=s("ul"),qe.innerHTML=xa,It=a(),Me=s("p"),Me.textContent=Ca,At=a(),ze=s("p"),ze.textContent=ya,it=a(),m(ae.$$.fragment),dt=a(),j=s("div"),m(ne.$$.fragment),Wt=a(),Se=s("p"),Se.textContent=Ta,mt=a(),m(oe.$$.fragment),pt=a(),I=s("div"),m(re.$$.fragment),Ht=a(),je=s("p"),je.textContent=Da,ct=a(),m(se.$$.fragment),gt=a(),A=s("div"),m(le.$$.fragment),Vt=a(),Ie=s("p"),Ie.textContent=wa,ft=a(),m(ie.$$.fragment),ut=a(),k=s("div"),m(de.$$.fragment),Et=a(),Ae=s("p"),Ae.textContent=Pa,Nt=a(),m(V.$$.fragment),Ot=a(),E=s("div"),m(me.$$.fragment),Bt=a(),We=s("p"),We.textContent=Fa,Ut=a(),N=s("div"),m(pe.$$.fragment),Kt=a(),He=s("p"),He.textContent=La,Rt=a(),O=s("div"),m(ce.$$.fragment),Xt=a(),Ve=s("p"),Ve.textContent=qa,ht=a(),m(ge.$$.fragment),_t=a(),b=s("div"),m(fe.$$.fragment),Gt=a(),Ee=s("p"),Ee.textContent=Ma,Jt=a(),Ne=s("ul"),Ne.innerHTML=za,Qt=a(),m(B.$$.fragment),Yt=a(),U=s("div"),m(ue.$$.fragment),Zt=a(),Oe=s("p"),Oe.textContent=Sa,ea=a(),K=s("div"),m(he.$$.fragment),ta=a(),Be=s("p"),Be.textContent=ja,aa=a(),R=s("div"),m(_e.$$.fragment),na=a(),Ue=s("p"),Ue.textContent=Ia,bt=a(),m(be.$$.fragment),vt=a(),x=s("div"),m(ve.$$.fragment),oa=a(),Ke=s("p"),Ke.textContent=Aa,ra=a(),Re=s("ul"),Re.innerHTML=Wa,sa=a(),M=s("div"),m($e.$$.fragment),la=a(),Xe=s("p"),Xe.textContent=Ha,ia=a(),ke=s("ol"),ke.innerHTML=Va,da=a(),z=s("div"),m(xe.$$.fragment),ma=a(),Ge=s("p"),Ge.textContent=Ea,pa=a(),Ce=s("ol"),Ce.innerHTML=Na,ca=a(),S=s("div"),m(ye.$$.fragment),ga=a(),Je=s("p"),Je.textContent=Oa,fa=a(),Te=s("ol"),Te.innerHTML=Ba,$t=a(),et=s("p"),this.h()},l(e){const r=Qa("svelte-u9bgzb",document.head);h=l(r,"META",{name:!0,content:!0}),r.forEach(o),q=n(e),$=l(e,"P",{}),v($).forEach(o),H=n(e),p(X.$$.fragment,e),tt=n(e),G=l(e,"P",{"data-svelte-h":!0}),d(G)!=="svelte-wq0mnv"&&(G.innerHTML=ua),at=n(e),J=l(e,"P",{"data-svelte-h":!0}),d(J)!=="svelte-c5nfv2"&&(J.innerHTML=ha),nt=n(e),Q=l(e,"P",{"data-svelte-h":!0}),d(Q)!=="svelte-qqt368"&&(Q.innerHTML=_a),ot=n(e),p(Y.$$.fragment,e),rt=n(e),D=l(e,"DIV",{class:!0});var L=v(D);p(Z.$$.fragment,L),qt=n(L),we=l(L,"P",{"data-svelte-h":!0}),d(we)!=="svelte-1hmsgsg"&&(we.textContent=ba),Mt=n(L),Pe=l(L,"UL",{"data-svelte-h":!0}),d(Pe)!=="svelte-1pq8qks"&&(Pe.innerHTML=va),zt=n(L),Fe=l(L,"P",{"data-svelte-h":!0}),d(Fe)!=="svelte-1vi1gug"&&(Fe.textContent=$a),L.forEach(o),st=n(e),p(ee.$$.fragment,e),lt=n(e),y=l(e,"DIV",{class:!0});var w=v(y);p(te.$$.fragment,w),St=n(w),Le=l(w,"P",{"data-svelte-h":!0}),d(Le)!=="svelte-1hmsgsg"&&(Le.textContent=ka),jt=n(w),qe=l(w,"UL",{"data-svelte-h":!0}),d(qe)!=="svelte-1pq8qks"&&(qe.innerHTML=xa),It=n(w),Me=l(w,"P",{"data-svelte-h":!0}),d(Me)!=="svelte-1vi1gug"&&(Me.textContent=Ca),At=n(w),ze=l(w,"P",{"data-svelte-h":!0}),d(ze)!=="svelte-vfvbwr"&&(ze.textContent=ya),w.forEach(o),it=n(e),p(ae.$$.fragment,e),dt=n(e),j=l(e,"DIV",{class:!0});var xt=v(j);p(ne.$$.fragment,xt),Wt=n(xt),Se=l(xt,"P",{"data-svelte-h":!0}),d(Se)!=="svelte-1iebpai"&&(Se.textContent=Ta),xt.forEach(o),mt=n(e),p(oe.$$.fragment,e),pt=n(e),I=l(e,"DIV",{class:!0});var Ct=v(I);p(re.$$.fragment,Ct),Ht=n(Ct),je=l(Ct,"P",{"data-svelte-h":!0}),d(je)!=="svelte-4uvw1w"&&(je.textContent=Da),Ct.forEach(o),ct=n(e),p(se.$$.fragment,e),gt=n(e),A=l(e,"DIV",{class:!0});var yt=v(A);p(le.$$.fragment,yt),Vt=n(yt),Ie=l(yt,"P",{"data-svelte-h":!0}),d(Ie)!=="svelte-4uvw1w"&&(Ie.textContent=wa),yt.forEach(o),ft=n(e),p(ie.$$.fragment,e),ut=n(e),k=l(e,"DIV",{class:!0});var P=v(k);p(de.$$.fragment,P),Et=n(P),Ae=l(P,"P",{"data-svelte-h":!0}),d(Ae)!=="svelte-10km8jk"&&(Ae.textContent=Pa),Nt=n(P),p(V.$$.fragment,P),Ot=n(P),E=l(P,"DIV",{class:!0});var Tt=v(E);p(me.$$.fragment,Tt),Bt=n(Tt),We=l(Tt,"P",{"data-svelte-h":!0}),d(We)!=="svelte-iv4xqf"&&(We.textContent=Fa),Tt.forEach(o),Ut=n(P),N=l(P,"DIV",{class:!0});var Dt=v(N);p(pe.$$.fragment,Dt),Kt=n(Dt),He=l(Dt,"P",{"data-svelte-h":!0}),d(He)!=="svelte-iv4xqf"&&(He.textContent=La),Dt.forEach(o),Rt=n(P),O=l(P,"DIV",{class:!0});var wt=v(O);p(ce.$$.fragment,wt),Xt=n(wt),Ve=l(wt,"P",{"data-svelte-h":!0}),d(Ve)!=="svelte-iv4xqf"&&(Ve.textContent=qa),wt.forEach(o),P.forEach(o),ht=n(e),p(ge.$$.fragment,e),_t=n(e),b=l(e,"DIV",{class:!0});var T=v(b);p(fe.$$.fragment,T),Gt=n(T),Ee=l(T,"P",{"data-svelte-h":!0}),d(Ee)!=="svelte-sjqk55"&&(Ee.textContent=Ma),Jt=n(T),Ne=l(T,"UL",{"data-svelte-h":!0}),d(Ne)!=="svelte-d2ozxj"&&(Ne.innerHTML=za),Qt=n(T),p(B.$$.fragment,T),Yt=n(T),U=l(T,"DIV",{class:!0});var Pt=v(U);p(ue.$$.fragment,Pt),Zt=n(Pt),Oe=l(Pt,"P",{"data-svelte-h":!0}),d(Oe)!=="svelte-10msjh1"&&(Oe.textContent=Sa),Pt.forEach(o),ea=n(T),K=l(T,"DIV",{class:!0});var Ft=v(K);p(he.$$.fragment,Ft),ta=n(Ft),Be=l(Ft,"P",{"data-svelte-h":!0}),d(Be)!=="svelte-10msjh1"&&(Be.textContent=ja),Ft.forEach(o),aa=n(T),R=l(T,"DIV",{class:!0});var Lt=v(R);p(_e.$$.fragment,Lt),na=n(Lt),Ue=l(Lt,"P",{"data-svelte-h":!0}),d(Ue)!=="svelte-10msjh1"&&(Ue.textContent=Ia),Lt.forEach(o),T.forEach(o),bt=n(e),p(be.$$.fragment,e),vt=n(e),x=l(e,"DIV",{class:!0});var F=v(x);p(ve.$$.fragment,F),oa=n(F),Ke=l(F,"P",{"data-svelte-h":!0}),d(Ke)!=="svelte-12inif1"&&(Ke.textContent=Aa),ra=n(F),Re=l(F,"UL",{"data-svelte-h":!0}),d(Re)!=="svelte-1t4qh7k"&&(Re.innerHTML=Wa),sa=n(F),M=l(F,"DIV",{class:!0});var Qe=v(M);p($e.$$.fragment,Qe),la=n(Qe),Xe=l(Qe,"P",{"data-svelte-h":!0}),d(Xe)!=="svelte-1u70phx"&&(Xe.textContent=Ha),ia=n(Qe),ke=l(Qe,"OL",{start:!0,"data-svelte-h":!0}),d(ke)!=="svelte-1r6jrbi"&&(ke.innerHTML=Va),Qe.forEach(o),da=n(F),z=l(F,"DIV",{class:!0});var Ye=v(z);p(xe.$$.fragment,Ye),ma=n(Ye),Ge=l(Ye,"P",{"data-svelte-h":!0}),d(Ge)!=="svelte-1u70phx"&&(Ge.textContent=Ea),pa=n(Ye),Ce=l(Ye,"OL",{start:!0,"data-svelte-h":!0}),d(Ce)!=="svelte-1r6jrbi"&&(Ce.innerHTML=Na),Ye.forEach(o),ca=n(F),S=l(F,"DIV",{class:!0});var Ze=v(S);p(ye.$$.fragment,Ze),ga=n(Ze),Je=l(Ze,"P",{"data-svelte-h":!0}),d(Je)!=="svelte-1u70phx"&&(Je.textContent=Oa),fa=n(Ze),Te=l(Ze,"OL",{start:!0,"data-svelte-h":!0}),d(Te)!=="svelte-1r6jrbi"&&(Te.innerHTML=Ba),Ze.forEach(o),F.forEach(o),$t=n(e),et=l(e,"P",{}),v(et).forEach(o),this.h()},h(){_(h,"name","hf:doc:metadata"),_(h,"content",tn),_(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(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,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(K,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(b,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ke,"start","0"),_(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ce,"start","0"),_(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Te,"start","0"),_(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(x,"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,r){t(document.head,h),i(e,q,r),i(e,$,r),i(e,H,r),c(X,e,r),i(e,tt,r),i(e,G,r),i(e,at,r),i(e,J,r),i(e,nt,r),i(e,Q,r),i(e,ot,r),c(Y,e,r),i(e,rt,r),i(e,D,r),c(Z,D,null),t(D,qt),t(D,we),t(D,Mt),t(D,Pe),t(D,zt),t(D,Fe),i(e,st,r),c(ee,e,r),i(e,lt,r),i(e,y,r),c(te,y,null),t(y,St),t(y,Le),t(y,jt),t(y,qe),t(y,It),t(y,Me),t(y,At),t(y,ze),i(e,it,r),c(ae,e,r),i(e,dt,r),i(e,j,r),c(ne,j,null),t(j,Wt),t(j,Se),i(e,mt,r),c(oe,e,r),i(e,pt,r),i(e,I,r),c(re,I,null),t(I,Ht),t(I,je),i(e,ct,r),c(se,e,r),i(e,gt,r),i(e,A,r),c(le,A,null),t(A,Vt),t(A,Ie),i(e,ft,r),c(ie,e,r),i(e,ut,r),i(e,k,r),c(de,k,null),t(k,Et),t(k,Ae),t(k,Nt),c(V,k,null),t(k,Ot),t(k,E),c(me,E,null),t(E,Bt),t(E,We),t(k,Ut),t(k,N),c(pe,N,null),t(N,Kt),t(N,He),t(k,Rt),t(k,O),c(ce,O,null),t(O,Xt),t(O,Ve),i(e,ht,r),c(ge,e,r),i(e,_t,r),i(e,b,r),c(fe,b,null),t(b,Gt),t(b,Ee),t(b,Jt),t(b,Ne),t(b,Qt),c(B,b,null),t(b,Yt),t(b,U),c(ue,U,null),t(U,Zt),t(U,Oe),t(b,ea),t(b,K),c(he,K,null),t(K,ta),t(K,Be),t(b,aa),t(b,R),c(_e,R,null),t(R,na),t(R,Ue),i(e,bt,r),c(be,e,r),i(e,vt,r),i(e,x,r),c(ve,x,null),t(x,oa),t(x,Ke),t(x,ra),t(x,Re),t(x,sa),t(x,M),c($e,M,null),t(M,la),t(M,Xe),t(M,ia),t(M,ke),t(x,da),t(x,z),c(xe,z,null),t(z,ma),t(z,Ge),t(z,pa),t(z,Ce),t(x,ca),t(x,S),c(ye,S,null),t(S,ga),t(S,Je),t(S,fa),t(S,Te),i(e,$t,r),i(e,et,r),kt=!0},p(e,[r]){const L={};r&2&&(L.$$scope={dirty:r,ctx:e}),V.$set(L);const w={};r&2&&(w.$$scope={dirty:r,ctx:e}),B.$set(w)},i(e){kt||(g(X.$$.fragment,e),g(Y.$$.fragment,e),g(Z.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(ae.$$.fragment,e),g(ne.$$.fragment,e),g(oe.$$.fragment,e),g(re.$$.fragment,e),g(se.$$.fragment,e),g(le.$$.fragment,e),g(ie.$$.fragment,e),g(de.$$.fragment,e),g(V.$$.fragment,e),g(me.$$.fragment,e),g(pe.$$.fragment,e),g(ce.$$.fragment,e),g(ge.$$.fragment,e),g(fe.$$.fragment,e),g(B.$$.fragment,e),g(ue.$$.fragment,e),g(he.$$.fragment,e),g(_e.$$.fragment,e),g(be.$$.fragment,e),g(ve.$$.fragment,e),g($e.$$.fragment,e),g(xe.$$.fragment,e),g(ye.$$.fragment,e),kt=!0)},o(e){f(X.$$.fragment,e),f(Y.$$.fragment,e),f(Z.$$.fragment,e),f(ee.$$.fragment,e),f(te.$$.fragment,e),f(ae.$$.fragment,e),f(ne.$$.fragment,e),f(oe.$$.fragment,e),f(re.$$.fragment,e),f(se.$$.fragment,e),f(le.$$.fragment,e),f(ie.$$.fragment,e),f(de.$$.fragment,e),f(V.$$.fragment,e),f(me.$$.fragment,e),f(pe.$$.fragment,e),f(ce.$$.fragment,e),f(ge.$$.fragment,e),f(fe.$$.fragment,e),f(B.$$.fragment,e),f(ue.$$.fragment,e),f(he.$$.fragment,e),f(_e.$$.fragment,e),f(be.$$.fragment,e),f(ve.$$.fragment,e),f($e.$$.fragment,e),f(xe.$$.fragment,e),f(ye.$$.fragment,e),kt=!1},d(e){e&&(o(q),o($),o(H),o(tt),o(G),o(at),o(J),o(nt),o(Q),o(ot),o(rt),o(D),o(st),o(lt),o(y),o(it),o(dt),o(j),o(mt),o(pt),o(I),o(ct),o(gt),o(A),o(ft),o(ut),o(k),o(ht),o(_t),o(b),o(bt),o(vt),o(x),o($t),o(et)),o(h),u(X,e),u(Y,e),u(Z),u(ee,e),u(te),u(ae,e),u(ne),u(oe,e),u(re),u(se,e),u(le),u(ie,e),u(de),u(V),u(me),u(pe),u(ce),u(ge,e),u(fe),u(B),u(ue),u(he),u(_e),u(be,e),u(ve),u($e),u(xe),u(ye)}}}const tn='{"title":"データ照合者","local":"データ照合者","sections":[{"title":"Default data collator","local":"transformers.default_data_collator","sections":[],"depth":2},{"title":"DefaultDataCollator","local":"transformers.DefaultDataCollator","sections":[],"depth":2},{"title":"DataCollatorWithPadding","local":"transformers.DataCollatorWithPadding","sections":[],"depth":2},{"title":"DataCollatorForTokenClassification","local":"transformers.DataCollatorForTokenClassification","sections":[],"depth":2},{"title":"DataCollatorForSeq2Seq","local":"transformers.DataCollatorForSeq2Seq","sections":[],"depth":2},{"title":"DataCollatorForLanguageModeling","local":"transformers.DataCollatorForLanguageModeling","sections":[],"depth":2},{"title":"DataCollatorForWholeWordMask","local":"transformers.DataCollatorForWholeWordMask","sections":[],"depth":2},{"title":"DataCollatorForPermutationLanguageModeling","local":"transformers.DataCollatorForPermutationLanguageModeling","sections":[],"depth":2}],"depth":1}';function an(De){return Xa(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class dn extends Ga{constructor(h){super(),Ja(this,h,an,en,Ra,{})}}export{dn as component};
