import{s as At,o as Ft,n as ht}from"../chunks/scheduler.9bc65507.js";import{S as Zt,i as Xt,g as o,s as n,r as h,A as Nt,h as i,f as r,c as s,j as z,u as k,x as d,k as J,y as t,a as c,v as b,d as v,t as T,w as $}from"../chunks/index.707bf1b6.js";import{T as Wt}from"../chunks/Tip.c2ecdbf4.js";import{D as q}from"../chunks/Docstring.17db21ae.js";import{C as kt}from"../chunks/CodeBlock.54a9f38d.js";import{E as Pt}from"../chunks/ExampleCodeBlock.4f515aa9.js";import{H as ze}from"../chunks/Heading.342b1fa6.js";function Gt(E){let p,x=`Herbert implementation is the same as <code>BERT</code> except for the tokenization method. Refer to <a href="bert">BERT documentation</a>
for API reference and examples.`;return{c(){p=o("p"),p.innerHTML=x},l(u){p=i(u,"P",{"data-svelte-h":!0}),d(p)!=="svelte-71d2k4"&&(p.innerHTML=x)},m(u,f){c(u,p,f)},p:ht,d(u){u&&r(p)}}}function St(E){let p,x="pair mask has the following format:",u,f,y;return f=new kt({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`,wrap:!1}}),{c(){p=o("p"),p.textContent=x,u=n(),h(f.$$.fragment)},l(l){p=i(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-qjgeij"&&(p.textContent=x),u=s(l),k(f.$$.fragment,l)},m(l,M){c(l,p,M),c(l,u,M),b(f,l,M),y=!0},p:ht,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){T(f.$$.fragment,l),y=!1},d(l){l&&(r(p),r(u)),$(f,l)}}}function Yt(E){let p,x="BERT sequence pair mask has the following format:",u,f,y;return f=new kt({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`,wrap:!1}}),{c(){p=o("p"),p.textContent=x,u=n(),h(f.$$.fragment)},l(l){p=i(l,"P",{"data-svelte-h":!0}),d(p)!=="svelte-thc81r"&&(p.textContent=x),u=s(l),k(f.$$.fragment,l)},m(l,M){c(l,p,M),c(l,u,M),b(f,l,M),y=!0},p:ht,i(l){y||(v(f.$$.fragment,l),y=!0)},o(l){T(f.$$.fragment,l),y=!1},d(l){l&&(r(p),r(u)),$(f,l)}}}function Ot(E){let p,x,u,f,y,l,M,Je,F,bt=`The HerBERT model was proposed in <a href="https://www.aclweb.org/anthology/2020.acl-main.111.pdf" rel="nofollow">KLEJ: Comprehensive Benchmark for Polish Language Understanding</a> by Piotr Rybak, Robert Mroczkowski, Janusz Tracz, and
Ireneusz Gawlik. It is a BERT-based Language Model trained on Polish Corpora using only MLM objective with dynamic
masking of whole words.`,He,Z,vt="The abstract from the paper is the following:",Ce,X,Tt=`<em>In recent years, a series of Transformer-based models unlocked major improvements in general natural language
understanding (NLU) tasks. Such a fast pace of research would not be possible without general NLU benchmarks, which
allow for a fair comparison of the proposed methods. However, such benchmarks are available only for a handful of
languages. To alleviate this issue, we introduce a comprehensive multi-task benchmark for the Polish language
understanding, accompanied by an online leaderboard. It consists of a diverse set of tasks, adopted from existing
datasets for named entity recognition, question-answering, textual entailment, and others. We also introduce a new
sentiment analysis task for the e-commerce domain, named Allegro Reviews (AR). To ensure a common evaluation scheme and
promote models that generalize to different NLU tasks, the benchmark includes datasets from varying domains and
applications. Additionally, we release HerBERT, a Transformer-based model trained specifically for the Polish language,
which has the best average performance and obtains the best results for three out of nine tasks. Finally, we provide an
extensive evaluation, including several standard baselines and recently proposed, multilingual Transformer-based
models.</em>`,je,N,$t=`This model was contributed by <a href="https://huggingface.co/rmroczkowski" rel="nofollow">rmroczkowski</a>. The original code can be found
<a href="https://github.com/allegro/HerBERT" rel="nofollow">here</a>.`,Ie,W,qe,G,Ee,U,Ue,S,De,m,Y,Ze,ie,yt="Construct a BPE tokenizer for HerBERT.",Xe,le,wt="Peculiarities:",Ne,pe,Mt=`<li><p>uses BERT’s pre-tokenizer: BaseTokenizer splits tokens on spaces, and also on punctuation. Each occurrence of a
punctuation character will be treated separately.</p></li> <li><p>Such pretokenized input is BPE subtokenized</p></li>`,We,ce,xt=`This tokenizer inherits from <a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMTokenizer">XLMTokenizer</a> which contains most of the methods. Users should refer to the
superclass for more information regarding methods.`,Ge,H,O,Se,de,Lt=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM sequence has the following format:`,Ye,me,zt="<li>single sequence: <code>&lt;s&gt; X &lt;/s&gt;</code></li> <li>pair of sequences: <code>&lt;s&gt; A &lt;/s&gt; B &lt;/s&gt;</code></li>",Oe,D,Q,Qe,fe,Jt="Converts a sequence of tokens (string) in a single string.",Ke,L,K,et,ue,Ht="Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLM sequence",tt,V,nt,_e,Ct="If <code>token_ids_1</code> is <code>None</code>, this method only returns the first portion of the mask (0s).",st,R,ee,rt,ge,jt=`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer <code>prepare_for_model</code> method.`,Ve,te,Re,_,ne,at,he,It="Construct a “Fast” BPE tokenizer for HerBERT (backed by HuggingFace’s <em>tokenizers</em> library).",ot,ke,qt="Peculiarities:",it,be,Et=`<li>uses BERT’s pre-tokenizer: BertPreTokenizer splits tokens on spaces, and also on punctuation. Each occurrence of
a punctuation character will be treated separately.</li>`,lt,ve,Ut=`This tokenizer inherits from <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains most of the methods. Users should refer to the
superclass for more information regarding methods.`,pt,C,se,ct,Te,Dt=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An HerBERT, like BERT sequence has the following format:`,dt,$e,Vt="<li>single sequence: <code>&lt;s&gt; X &lt;/s&gt;</code></li> <li>pair of sequences: <code>&lt;s&gt; A &lt;/s&gt; B &lt;/s&gt;</code></li>",mt,j,re,ft,ye,Rt="Create a mask from the two sequences passed to be used in a sequence-pair classification task. HerBERT, like",ut,B,_t,P,ae,gt,we,Bt=`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer <code>prepare_for_model</code> method.`,Be,Le,Pe;return y=new ze({props:{title:"HerBERT",local:"herbert",headingTag:"h1"}}),M=new ze({props:{title:"Overview",local:"overview",headingTag:"h2"}}),W=new ze({props:{title:"Usage example",local:"usage-example",headingTag:"h2"}}),G=new kt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEhlcmJlcnRUb2tlbml6ZXIlMkMlMjBSb2JlcnRhTW9kZWwlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBIZXJiZXJ0VG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJhbGxlZ3JvJTJGaGVyYmVydC1rbGVqLWNhc2VkLXRva2VuaXplci12MSUyMiklMEFtb2RlbCUyMCUzRCUyMFJvYmVydGFNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyYWxsZWdybyUyRmhlcmJlcnQta2xlai1jYXNlZC12MSUyMiklMEElMEFlbmNvZGVkX2lucHV0JTIwJTNEJTIwdG9rZW5pemVyLmVuY29kZSglMjJLdG8lMjBtYSUyMGxlcHN6JUM0JTg1JTIwc3p0dWslQzQlOTklMkMlMjBtYSUyMGxlcHN6eSUyMHJ6JUM0JTg1ZCUyMCVFMiU4MCU5MyUyMHRvJTIwamFzbmUuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoZW5jb2RlZF9pbnB1dCklMEElMEElMjMlMjBIZXJCRVJUJTIwY2FuJTIwYWxzbyUyMGJlJTIwbG9hZGVkJTIwdXNpbmclMjBBdXRvVG9rZW5pemVyJTIwYW5kJTIwQXV0b01vZGVsJTNBJTBBaW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b01vZGVsJTJDJTIwQXV0b1Rva2VuaXplciUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmFsbGVncm8lMkZoZXJiZXJ0LWtsZWotY2FzZWQtdG9rZW5pemVyLXYxJTIyKSUwQW1vZGVsJTIwJTNEJTIwQXV0b01vZGVsLmZyb21fcHJldHJhaW5lZCglMjJhbGxlZ3JvJTJGaGVyYmVydC1rbGVqLWNhc2VkLXYxJTIyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> HerbertTokenizer, RobertaModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = HerbertTokenizer.from_pretrained(<span class="hljs-string">&quot;allegro/herbert-klej-cased-tokenizer-v1&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaModel.from_pretrained(<span class="hljs-string">&quot;allegro/herbert-klej-cased-v1&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>encoded_input = tokenizer.encode(<span class="hljs-string">&quot;Kto ma lepszą sztukę, ma lepszy rząd – to jasne.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(encoded_input)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># HerBERT can also be loaded using AutoTokenizer and AutoModel:</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModel, AutoTokenizer

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;allegro/herbert-klej-cased-tokenizer-v1&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModel.from_pretrained(<span class="hljs-string">&quot;allegro/herbert-klej-cased-v1&quot;</span>)`,wrap:!1}}),U=new Wt({props:{$$slots:{default:[Gt]},$$scope:{ctx:E}}}),S=new ze({props:{title:"HerbertTokenizer",local:"transformers.HerbertTokenizer",headingTag:"h2"}}),Y=new q({props:{name:"class transformers.HerbertTokenizer",anchor:"transformers.HerbertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"tokenizer_file",val:" = None"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"sep_token",val:" = '</s>'"},{name:"bos_token",val:" = '<s>'"},{name:"do_lowercase_and_remove_accent",val:" = False"},{name:"additional_special_tokens",val:" = ['<special0>', '<special1>', '<special2>', '<special3>', '<special4>', '<special5>', '<special6>', '<special7>', '<special8>', '<special9>']"},{name:"lang2id",val:" = None"},{name:"id2lang",val:" = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/herbert/tokenization_herbert.py#L289"}}),O=new q({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.HerbertTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.HerbertTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.HerbertTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/herbert/tokenization_herbert.py#L526",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Q=new q({props:{name:"convert_tokens_to_string",anchor:"transformers.HerbertTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/herbert/tokenization_herbert.py#L520"}}),K=new q({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.HerbertTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.HerbertTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.HerbertTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/herbert/tokenization_herbert.py#L583",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),V=new Pt({props:{anchor:"transformers.HerbertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[St]},$$scope:{ctx:E}}}),ee=new q({props:{name:"get_special_tokens_mask",anchor:"transformers.HerbertTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.HerbertTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.HerbertTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.HerbertTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/herbert/tokenization_herbert.py#L554",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),te=new ze({props:{title:"HerbertTokenizerFast",local:"transformers.HerbertTokenizerFast",headingTag:"h2"}}),ne=new q({props:{name:"class transformers.HerbertTokenizerFast",anchor:"transformers.HerbertTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"merges_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"sep_token",val:" = '</s>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.HerbertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.HerbertTokenizerFast.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Path to the merges file.`,name:"merges_file"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/herbert/tokenization_herbert_fast.py#L40"}}),se=new q({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.HerbertTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.HerbertTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.HerbertTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/herbert/tokenization_herbert_fast.py#L89",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),re=new q({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.HerbertTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.HerbertTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.HerbertTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/herbert/tokenization_herbert_fast.py#L143",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),B=new Pt({props:{anchor:"transformers.HerbertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Yt]},$$scope:{ctx:E}}}),ae=new q({props:{name:"get_special_tokens_mask",anchor:"transformers.HerbertTokenizerFast.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.HerbertTokenizerFast.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.HerbertTokenizerFast.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.HerbertTokenizerFast.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/herbert/tokenization_herbert_fast.py#L116",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),{c(){p=o("meta"),x=n(),u=o("p"),f=n(),h(y.$$.fragment),l=n(),h(M.$$.fragment),Je=n(),F=o("p"),F.innerHTML=bt,He=n(),Z=o("p"),Z.textContent=vt,Ce=n(),X=o("p"),X.innerHTML=Tt,je=n(),N=o("p"),N.innerHTML=$t,Ie=n(),h(W.$$.fragment),qe=n(),h(G.$$.fragment),Ee=n(),h(U.$$.fragment),Ue=n(),h(S.$$.fragment),De=n(),m=o("div"),h(Y.$$.fragment),Ze=n(),ie=o("p"),ie.textContent=yt,Xe=n(),le=o("p"),le.textContent=wt,Ne=n(),pe=o("ul"),pe.innerHTML=Mt,We=n(),ce=o("p"),ce.innerHTML=xt,Ge=n(),H=o("div"),h(O.$$.fragment),Se=n(),de=o("p"),de.textContent=Lt,Ye=n(),me=o("ul"),me.innerHTML=zt,Oe=n(),D=o("div"),h(Q.$$.fragment),Qe=n(),fe=o("p"),fe.textContent=Jt,Ke=n(),L=o("div"),h(K.$$.fragment),et=n(),ue=o("p"),ue.textContent=Ht,tt=n(),h(V.$$.fragment),nt=n(),_e=o("p"),_e.innerHTML=Ct,st=n(),R=o("div"),h(ee.$$.fragment),rt=n(),ge=o("p"),ge.innerHTML=jt,Ve=n(),h(te.$$.fragment),Re=n(),_=o("div"),h(ne.$$.fragment),at=n(),he=o("p"),he.innerHTML=It,ot=n(),ke=o("p"),ke.textContent=qt,it=n(),be=o("ul"),be.innerHTML=Et,lt=n(),ve=o("p"),ve.innerHTML=Ut,pt=n(),C=o("div"),h(se.$$.fragment),ct=n(),Te=o("p"),Te.textContent=Dt,dt=n(),$e=o("ul"),$e.innerHTML=Vt,mt=n(),j=o("div"),h(re.$$.fragment),ft=n(),ye=o("p"),ye.textContent=Rt,ut=n(),h(B.$$.fragment),_t=n(),P=o("div"),h(ae.$$.fragment),gt=n(),we=o("p"),we.innerHTML=Bt,Be=n(),Le=o("p"),this.h()},l(e){const a=Nt("svelte-u9bgzb",document.head);p=i(a,"META",{name:!0,content:!0}),a.forEach(r),x=s(e),u=i(e,"P",{}),z(u).forEach(r),f=s(e),k(y.$$.fragment,e),l=s(e),k(M.$$.fragment,e),Je=s(e),F=i(e,"P",{"data-svelte-h":!0}),d(F)!=="svelte-innugr"&&(F.innerHTML=bt),He=s(e),Z=i(e,"P",{"data-svelte-h":!0}),d(Z)!=="svelte-vfdo9a"&&(Z.textContent=vt),Ce=s(e),X=i(e,"P",{"data-svelte-h":!0}),d(X)!=="svelte-1frp4qn"&&(X.innerHTML=Tt),je=s(e),N=i(e,"P",{"data-svelte-h":!0}),d(N)!=="svelte-1jq061t"&&(N.innerHTML=$t),Ie=s(e),k(W.$$.fragment,e),qe=s(e),k(G.$$.fragment,e),Ee=s(e),k(U.$$.fragment,e),Ue=s(e),k(S.$$.fragment,e),De=s(e),m=i(e,"DIV",{class:!0});var g=z(m);k(Y.$$.fragment,g),Ze=s(g),ie=i(g,"P",{"data-svelte-h":!0}),d(ie)!=="svelte-irtuqb"&&(ie.textContent=yt),Xe=s(g),le=i(g,"P",{"data-svelte-h":!0}),d(le)!=="svelte-r7777v"&&(le.textContent=wt),Ne=s(g),pe=i(g,"UL",{"data-svelte-h":!0}),d(pe)!=="svelte-15v80xk"&&(pe.innerHTML=Mt),We=s(g),ce=i(g,"P",{"data-svelte-h":!0}),d(ce)!=="svelte-1xpuuz9"&&(ce.innerHTML=xt),Ge=s(g),H=i(g,"DIV",{class:!0});var I=z(H);k(O.$$.fragment,I),Se=s(I),de=i(I,"P",{"data-svelte-h":!0}),d(de)!=="svelte-1xo6smc"&&(de.textContent=Lt),Ye=s(I),me=i(I,"UL",{"data-svelte-h":!0}),d(me)!=="svelte-1w73b42"&&(me.innerHTML=zt),I.forEach(r),Oe=s(g),D=i(g,"DIV",{class:!0});var oe=z(D);k(Q.$$.fragment,oe),Qe=s(oe),fe=i(oe,"P",{"data-svelte-h":!0}),d(fe)!=="svelte-b3k2yi"&&(fe.textContent=Jt),oe.forEach(r),Ke=s(g),L=i(g,"DIV",{class:!0});var A=z(L);k(K.$$.fragment,A),et=s(A),ue=i(A,"P",{"data-svelte-h":!0}),d(ue)!=="svelte-17m549d"&&(ue.textContent=Ht),tt=s(A),k(V.$$.fragment,A),nt=s(A),_e=i(A,"P",{"data-svelte-h":!0}),d(_e)!=="svelte-owoxgn"&&(_e.innerHTML=Ct),A.forEach(r),st=s(g),R=i(g,"DIV",{class:!0});var Ae=z(R);k(ee.$$.fragment,Ae),rt=s(Ae),ge=i(Ae,"P",{"data-svelte-h":!0}),d(ge)!=="svelte-1f4f5kp"&&(ge.innerHTML=jt),Ae.forEach(r),g.forEach(r),Ve=s(e),k(te.$$.fragment,e),Re=s(e),_=i(e,"DIV",{class:!0});var w=z(_);k(ne.$$.fragment,w),at=s(w),he=i(w,"P",{"data-svelte-h":!0}),d(he)!=="svelte-1n4shqg"&&(he.innerHTML=It),ot=s(w),ke=i(w,"P",{"data-svelte-h":!0}),d(ke)!=="svelte-r7777v"&&(ke.textContent=qt),it=s(w),be=i(w,"UL",{"data-svelte-h":!0}),d(be)!=="svelte-lbio7x"&&(be.innerHTML=Et),lt=s(w),ve=i(w,"P",{"data-svelte-h":!0}),d(ve)!=="svelte-jf96o3"&&(ve.innerHTML=Ut),pt=s(w),C=i(w,"DIV",{class:!0});var Me=z(C);k(se.$$.fragment,Me),ct=s(Me),Te=i(Me,"P",{"data-svelte-h":!0}),d(Te)!=="svelte-11s9gqx"&&(Te.textContent=Dt),dt=s(Me),$e=i(Me,"UL",{"data-svelte-h":!0}),d($e)!=="svelte-1w73b42"&&($e.innerHTML=Vt),Me.forEach(r),mt=s(w),j=i(w,"DIV",{class:!0});var xe=z(j);k(re.$$.fragment,xe),ft=s(xe),ye=i(xe,"P",{"data-svelte-h":!0}),d(ye)!=="svelte-xgjhc7"&&(ye.textContent=Rt),ut=s(xe),k(B.$$.fragment,xe),xe.forEach(r),_t=s(w),P=i(w,"DIV",{class:!0});var Fe=z(P);k(ae.$$.fragment,Fe),gt=s(Fe),we=i(Fe,"P",{"data-svelte-h":!0}),d(we)!=="svelte-1f4f5kp"&&(we.innerHTML=Bt),Fe.forEach(r),w.forEach(r),Be=s(e),Le=i(e,"P",{}),z(Le).forEach(r),this.h()},h(){J(p,"name","hf:doc:metadata"),J(p,"content",Qt),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(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(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(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),J(m,"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(j,"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(_,"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,a){t(document.head,p),c(e,x,a),c(e,u,a),c(e,f,a),b(y,e,a),c(e,l,a),b(M,e,a),c(e,Je,a),c(e,F,a),c(e,He,a),c(e,Z,a),c(e,Ce,a),c(e,X,a),c(e,je,a),c(e,N,a),c(e,Ie,a),b(W,e,a),c(e,qe,a),b(G,e,a),c(e,Ee,a),b(U,e,a),c(e,Ue,a),b(S,e,a),c(e,De,a),c(e,m,a),b(Y,m,null),t(m,Ze),t(m,ie),t(m,Xe),t(m,le),t(m,Ne),t(m,pe),t(m,We),t(m,ce),t(m,Ge),t(m,H),b(O,H,null),t(H,Se),t(H,de),t(H,Ye),t(H,me),t(m,Oe),t(m,D),b(Q,D,null),t(D,Qe),t(D,fe),t(m,Ke),t(m,L),b(K,L,null),t(L,et),t(L,ue),t(L,tt),b(V,L,null),t(L,nt),t(L,_e),t(m,st),t(m,R),b(ee,R,null),t(R,rt),t(R,ge),c(e,Ve,a),b(te,e,a),c(e,Re,a),c(e,_,a),b(ne,_,null),t(_,at),t(_,he),t(_,ot),t(_,ke),t(_,it),t(_,be),t(_,lt),t(_,ve),t(_,pt),t(_,C),b(se,C,null),t(C,ct),t(C,Te),t(C,dt),t(C,$e),t(_,mt),t(_,j),b(re,j,null),t(j,ft),t(j,ye),t(j,ut),b(B,j,null),t(_,_t),t(_,P),b(ae,P,null),t(P,gt),t(P,we),c(e,Be,a),c(e,Le,a),Pe=!0},p(e,[a]){const g={};a&2&&(g.$$scope={dirty:a,ctx:e}),U.$set(g);const I={};a&2&&(I.$$scope={dirty:a,ctx:e}),V.$set(I);const oe={};a&2&&(oe.$$scope={dirty:a,ctx:e}),B.$set(oe)},i(e){Pe||(v(y.$$.fragment,e),v(M.$$.fragment,e),v(W.$$.fragment,e),v(G.$$.fragment,e),v(U.$$.fragment,e),v(S.$$.fragment,e),v(Y.$$.fragment,e),v(O.$$.fragment,e),v(Q.$$.fragment,e),v(K.$$.fragment,e),v(V.$$.fragment,e),v(ee.$$.fragment,e),v(te.$$.fragment,e),v(ne.$$.fragment,e),v(se.$$.fragment,e),v(re.$$.fragment,e),v(B.$$.fragment,e),v(ae.$$.fragment,e),Pe=!0)},o(e){T(y.$$.fragment,e),T(M.$$.fragment,e),T(W.$$.fragment,e),T(G.$$.fragment,e),T(U.$$.fragment,e),T(S.$$.fragment,e),T(Y.$$.fragment,e),T(O.$$.fragment,e),T(Q.$$.fragment,e),T(K.$$.fragment,e),T(V.$$.fragment,e),T(ee.$$.fragment,e),T(te.$$.fragment,e),T(ne.$$.fragment,e),T(se.$$.fragment,e),T(re.$$.fragment,e),T(B.$$.fragment,e),T(ae.$$.fragment,e),Pe=!1},d(e){e&&(r(x),r(u),r(f),r(l),r(Je),r(F),r(He),r(Z),r(Ce),r(X),r(je),r(N),r(Ie),r(qe),r(Ee),r(Ue),r(De),r(m),r(Ve),r(Re),r(_),r(Be),r(Le)),r(p),$(y,e),$(M,e),$(W,e),$(G,e),$(U,e),$(S,e),$(Y),$(O),$(Q),$(K),$(V),$(ee),$(te,e),$(ne),$(se),$(re),$(B),$(ae)}}}const Qt='{"title":"HerBERT","local":"herbert","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage example","local":"usage-example","sections":[],"depth":2},{"title":"HerbertTokenizer","local":"transformers.HerbertTokenizer","sections":[],"depth":2},{"title":"HerbertTokenizerFast","local":"transformers.HerbertTokenizerFast","sections":[],"depth":2}],"depth":1}';function Kt(E){return Ft(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ln extends Zt{constructor(p){super(),Xt(this,p,Kt,Ot,At,{})}}export{ln as component};
