import{s as bt,o as Tt,n as vt}from"../chunks/scheduler.01eeda35.js";import{S as zt,i as wt,g as a,s,r as f,A as xt,h as i,f as n,c as r,j as q,u,x as c,k as v,y as o,a as l,v as g,d as k,t as _,w as b}from"../chunks/index.6dd51b66.js";import{T as qt}from"../chunks/Tip.de9bae2b.js";import{D as P}from"../chunks/Docstring.76e6b3cf.js";import{H as ue,E as yt}from"../chunks/EditOnGithub.7faefd25.js";function At(ge){let m,D=`BARThez implementation is the same as BART, except for tokenization. Refer to <a href="bart">BART documentation</a> for information on
configuration classes and their parameters. BARThez-specific tokenizers are documented below.`;return{c(){m=a("p"),m.innerHTML=D},l(T){m=i(T,"P",{"data-svelte-h":!0}),c(m)!=="svelte-127v6y2"&&(m.innerHTML=D)},m(T,X){l(T,m,X)},p:vt,d(T){T&&n(m)}}}function $t(ge){let m,D,T,X,E,ke,y,tt=`<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/> <img alt="TensorFlow" src="https://img.shields.io/badge/TensorFlow-FF6F00?style=flat&amp;logo=tensorflow&amp;logoColor=white"/> <img alt="Flax" src="https://img.shields.io/badge/Flax-29a79b.svg?style=flat&amp;logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAMAAAANxBKoAAAC7lBMVEUAAADg5vYHPVgAoJH+/v76+v39/f9JbLP///9+AIgAnY3///+mcqzt8fXy9fgkXa3Ax9709fr+///9/f8qXq49qp5AaLGMwrv8/P0eW60VWawxYq8yqJzG2dytt9Wyu9elzci519Lf3O3S2efY3OrY0+Xp7PT///////+dqNCexMc6Z7AGpJeGvbenstPZ5ejQ1OfJzOLa7ejh4+/r8fT29vpccbklWK8PVa0AS6ghW63O498vYa+lsdKz1NDRt9Kw1c672tbD3tnAxt7R6OHp5vDe7OrDyuDn6vLl6/EAQKak0MgATakkppo3ZK/Bz9y8w9yzu9jey97axdvHzeG21NHH4trTwthKZrVGZLSUSpuPQJiGAI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JZL6/3PR5b4syeSjZMQG/T2maGANlXT2v8S4AULWaUkCxfLyW8iW4kdka+nEMjxpL2NCwsYNBp+Q61PF43zyDg9Bm9+3NNySn78jMZUUkumqE4Gp7JmFOdP1vc8PpRrzj9+wPinCy8K1PiJ4aYbnTYpCCbDkBSbzhu2QJ1Gd82t8jI8TH51+OzvXoWbnXUOBkNW+0mWFwGcGOUVpU81/n3TOHb5oMt2FgYGjzau0Nif0Ss7Q3XB33hjjQHjHA5E5aOyIQc8CBrLdQSs3j92VG+3nNEjbkbdbBr9zm04ruvw37vh0QKOdeGIkckc80fX3KH/h7PT4BOjgCty8VZ5ux1MoO5Cf5naca2LAsEgehI+drX8o/0Nu+W0m6K/I9gGPd/dfx/EN/wN62AhsBWuAAAAAElFTkSuQmCC
"/>`,_e,R,be,I,nt=`The BARThez model was proposed in <a href="https://arxiv.org/abs/2010.12321" rel="nofollow">BARThez: a Skilled Pretrained French Sequence-to-Sequence Model</a> by Moussa Kamal Eddine, Antoine J.-P. Tixier, Michalis Vazirgiannis on 23 Oct,
2020.`,Te,M,ot="The abstract of the paper:",ve,O,st=`<em>Inductive transfer learning, enabled by self-supervised learning, have taken the entire Natural Language Processing
(NLP) field by storm, with models such as BERT and BART setting new state of the art on countless natural language
understanding tasks. While there are some notable exceptions, most of the available models and research have been
conducted for the English language. In this work, we introduce BARThez, the first BART model for the French language
(to the best of our knowledge). BARThez was pretrained on a very large monolingual French corpus from past research
that we adapted to suit BART’s perturbation schemes. Unlike already existing BERT-based French language models such as
CamemBERT and FlauBERT, BARThez is particularly well-suited for generative tasks, since not only its encoder but also
its decoder is pretrained. In addition to discriminative tasks from the FLUE benchmark, we evaluate BARThez on a novel
summarization dataset, OrangeSum, that we release with this paper. We also continue the pretraining of an already
pretrained multilingual BART on BARThez’s corpus, and we show that the resulting model, which we call mBARTHez,
provides a significant boost over vanilla BARThez, and is on par with or outperforms CamemBERT and FlauBERT.</em>`,ze,F,rt='This model was contributed by <a href="https://huggingface.co/moussakam" rel="nofollow">moussakam</a>. The Authors’ code can be found <a href="https://github.com/moussaKam/BARThez" rel="nofollow">here</a>.',we,A,xe,S,qe,N,at=`<li>BARThez can be fine-tuned on sequence-to-sequence tasks in a similar way as BART, check:
<a href="https://github.com/huggingface/transformers/tree/main/examples/pytorch/summarization/README.md" rel="nofollow">examples/pytorch/summarization/</a>.</li>`,ye,H,Ae,d,J,Me,ee,it=`Adapted from <a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertTokenizer">CamembertTokenizer</a> and <a href="/docs/transformers/main/en/model_doc/bart#transformers.BartTokenizer">BartTokenizer</a>. Construct a BARThez tokenizer. Based on
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a>.`,Oe,te,lt=`This tokenizer inherits from <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,Fe,z,U,Se,ne,dt=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A BARThez sequence has the following format:`,Ne,oe,ct="<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;&lt;/s&gt; B &lt;/s&gt;</code></li>",He,$,G,Je,se,mt="Converts a sequence of tokens (string) in a single string.",Ue,L,K,Ge,re,pt="Create a mask from the two sequences passed to be used in a sequence-pair classification task.",Ke,B,W,We,ae,ht=`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.`,$e,Z,Le,h,Q,Ze,ie,ft=`Adapted from <a href="/docs/transformers/main/en/model_doc/camembert#transformers.CamembertTokenizer">CamembertTokenizer</a> and <a href="/docs/transformers/main/en/model_doc/bart#transformers.BartTokenizer">BartTokenizer</a>. Construct a “fast” BARThez tokenizer. Based on
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a>.`,Qe,le,ut=`This tokenizer inherits from <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,Ve,w,V,Ye,de,gt=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A BARThez sequence has the following format:`,je,ce,kt="<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;&lt;/s&gt; B &lt;/s&gt;</code></li>",Xe,C,Y,et,me,_t="Create a mask from the two sequences passed to be used in a sequence-pair classification task.",Be,j,Ce,fe,Pe;return E=new ue({props:{title:"BARThez",local:"barthez",headingTag:"h1"}}),R=new ue({props:{title:"Overview",local:"overview",headingTag:"h2"}}),A=new qt({props:{$$slots:{default:[At]},$$scope:{ctx:ge}}}),S=new ue({props:{title:"Resources",local:"resources",headingTag:"h2"}}),H=new ue({props:{title:"BarthezTokenizer",local:"transformers.BarthezTokenizer",headingTag:"h2"}}),J=new P({props:{name:"class transformers.BarthezTokenizer",anchor:"transformers.BarthezTokenizer",parameters:[{name:"vocab_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"sp_model_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BarthezTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.BarthezTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.BarthezTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.BarthezTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.BarthezTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.BarthezTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.BarthezTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.BarthezTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.BarthezTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.BarthezTokenizer.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/barthez/tokenization_barthez.py#L37"}}),U=new P({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.BarthezTokenizer.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.BarthezTokenizer.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.BarthezTokenizer.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/barthez/tokenization_barthez.py#L141",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>
`}}),G=new P({props:{name:"convert_tokens_to_string",anchor:"transformers.BarthezTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/barthez/tokenization_barthez.py#L237"}}),K=new P({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BarthezTokenizer.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.BarthezTokenizer.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.BarthezTokenizer.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/barthez/tokenization_barthez.py#L194",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of zeros.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),W=new P({props:{name:"get_special_tokens_mask",anchor:"transformers.BarthezTokenizer.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.BarthezTokenizer.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.BarthezTokenizer.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.BarthezTokenizer.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/barthez/tokenization_barthez.py#L167",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>
`}}),Z=new ue({props:{title:"BarthezTokenizerFast",local:"transformers.BarthezTokenizerFast",headingTag:"h2"}}),Q=new P({props:{name:"class transformers.BarthezTokenizerFast",anchor:"transformers.BarthezTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BarthezTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.BarthezTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.BarthezTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.BarthezTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.BarthezTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.BarthezTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.BarthezTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.BarthezTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.BarthezTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/barthez/tokenization_barthez_fast.py#L39"}}),V=new P({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.BarthezTokenizerFast.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.BarthezTokenizerFast.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.BarthezTokenizerFast.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/barthez/tokenization_barthez_fast.py#L129",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>
`}}),Y=new P({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BarthezTokenizerFast.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.BarthezTokenizerFast.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.BarthezTokenizerFast.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/barthez/tokenization_barthez_fast.py#L155",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of zeros.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),j=new yt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/barthez.md"}}),{c(){m=a("meta"),D=s(),T=a("p"),X=s(),f(E.$$.fragment),ke=s(),y=a("div"),y.innerHTML=tt,_e=s(),f(R.$$.fragment),be=s(),I=a("p"),I.innerHTML=nt,Te=s(),M=a("p"),M.textContent=ot,ve=s(),O=a("p"),O.innerHTML=st,ze=s(),F=a("p"),F.innerHTML=rt,we=s(),f(A.$$.fragment),xe=s(),f(S.$$.fragment),qe=s(),N=a("ul"),N.innerHTML=at,ye=s(),f(H.$$.fragment),Ae=s(),d=a("div"),f(J.$$.fragment),Me=s(),ee=a("p"),ee.innerHTML=it,Oe=s(),te=a("p"),te.innerHTML=lt,Fe=s(),z=a("div"),f(U.$$.fragment),Se=s(),ne=a("p"),ne.textContent=dt,Ne=s(),oe=a("ul"),oe.innerHTML=ct,He=s(),$=a("div"),f(G.$$.fragment),Je=s(),se=a("p"),se.textContent=mt,Ue=s(),L=a("div"),f(K.$$.fragment),Ge=s(),re=a("p"),re.textContent=pt,Ke=s(),B=a("div"),f(W.$$.fragment),We=s(),ae=a("p"),ae.innerHTML=ht,$e=s(),f(Z.$$.fragment),Le=s(),h=a("div"),f(Q.$$.fragment),Ze=s(),ie=a("p"),ie.innerHTML=ft,Qe=s(),le=a("p"),le.innerHTML=ut,Ve=s(),w=a("div"),f(V.$$.fragment),Ye=s(),de=a("p"),de.textContent=gt,je=s(),ce=a("ul"),ce.innerHTML=kt,Xe=s(),C=a("div"),f(Y.$$.fragment),et=s(),me=a("p"),me.textContent=_t,Be=s(),f(j.$$.fragment),Ce=s(),fe=a("p"),this.h()},l(e){const t=xt("svelte-u9bgzb",document.head);m=i(t,"META",{name:!0,content:!0}),t.forEach(n),D=r(e),T=i(e,"P",{}),q(T).forEach(n),X=r(e),u(E.$$.fragment,e),ke=r(e),y=i(e,"DIV",{class:!0,"data-svelte-h":!0}),c(y)!=="svelte-1px1zvi"&&(y.innerHTML=tt),_e=r(e),u(R.$$.fragment,e),be=r(e),I=i(e,"P",{"data-svelte-h":!0}),c(I)!=="svelte-6jqwe8"&&(I.innerHTML=nt),Te=r(e),M=i(e,"P",{"data-svelte-h":!0}),c(M)!=="svelte-v8ud33"&&(M.textContent=ot),ve=r(e),O=i(e,"P",{"data-svelte-h":!0}),c(O)!=="svelte-libbyk"&&(O.innerHTML=st),ze=r(e),F=i(e,"P",{"data-svelte-h":!0}),c(F)!=="svelte-xolpee"&&(F.innerHTML=rt),we=r(e),u(A.$$.fragment,e),xe=r(e),u(S.$$.fragment,e),qe=r(e),N=i(e,"UL",{"data-svelte-h":!0}),c(N)!=="svelte-1m5bh03"&&(N.innerHTML=at),ye=r(e),u(H.$$.fragment,e),Ae=r(e),d=i(e,"DIV",{class:!0});var p=q(d);u(J.$$.fragment,p),Me=r(p),ee=i(p,"P",{"data-svelte-h":!0}),c(ee)!=="svelte-1u4yp2l"&&(ee.innerHTML=it),Oe=r(p),te=i(p,"P",{"data-svelte-h":!0}),c(te)!=="svelte-1c3t5ty"&&(te.innerHTML=lt),Fe=r(p),z=i(p,"DIV",{class:!0});var pe=q(z);u(U.$$.fragment,pe),Se=r(pe),ne=i(pe,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-js8h2n"&&(ne.textContent=dt),Ne=r(pe),oe=i(pe,"UL",{"data-svelte-h":!0}),c(oe)!=="svelte-rq8uot"&&(oe.innerHTML=ct),pe.forEach(n),He=r(p),$=i(p,"DIV",{class:!0});var De=q($);u(G.$$.fragment,De),Je=r(De),se=i(De,"P",{"data-svelte-h":!0}),c(se)!=="svelte-b3k2yi"&&(se.textContent=mt),De.forEach(n),Ue=r(p),L=i(p,"DIV",{class:!0});var Ee=q(L);u(K.$$.fragment,Ee),Ge=r(Ee),re=i(Ee,"P",{"data-svelte-h":!0}),c(re)!=="svelte-sqjw56"&&(re.textContent=pt),Ee.forEach(n),Ke=r(p),B=i(p,"DIV",{class:!0});var Re=q(B);u(W.$$.fragment,Re),We=r(Re),ae=i(Re,"P",{"data-svelte-h":!0}),c(ae)!=="svelte-1f4f5kp"&&(ae.innerHTML=ht),Re.forEach(n),p.forEach(n),$e=r(e),u(Z.$$.fragment,e),Le=r(e),h=i(e,"DIV",{class:!0});var x=q(h);u(Q.$$.fragment,x),Ze=r(x),ie=i(x,"P",{"data-svelte-h":!0}),c(ie)!=="svelte-15e385w"&&(ie.innerHTML=ft),Qe=r(x),le=i(x,"P",{"data-svelte-h":!0}),c(le)!=="svelte-fh0aq"&&(le.innerHTML=ut),Ve=r(x),w=i(x,"DIV",{class:!0});var he=q(w);u(V.$$.fragment,he),Ye=r(he),de=i(he,"P",{"data-svelte-h":!0}),c(de)!=="svelte-js8h2n"&&(de.textContent=gt),je=r(he),ce=i(he,"UL",{"data-svelte-h":!0}),c(ce)!=="svelte-rq8uot"&&(ce.innerHTML=kt),he.forEach(n),Xe=r(x),C=i(x,"DIV",{class:!0});var Ie=q(C);u(Y.$$.fragment,Ie),et=r(Ie),me=i(Ie,"P",{"data-svelte-h":!0}),c(me)!=="svelte-sqjw56"&&(me.textContent=_t),Ie.forEach(n),x.forEach(n),Be=r(e),u(j.$$.fragment,e),Ce=r(e),fe=i(e,"P",{}),q(fe).forEach(n),this.h()},h(){v(m,"name","hf:doc:metadata"),v(m,"content",Lt),v(y,"class","flex flex-wrap space-x-1"),v(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(d,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),v(h,"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,t){o(document.head,m),l(e,D,t),l(e,T,t),l(e,X,t),g(E,e,t),l(e,ke,t),l(e,y,t),l(e,_e,t),g(R,e,t),l(e,be,t),l(e,I,t),l(e,Te,t),l(e,M,t),l(e,ve,t),l(e,O,t),l(e,ze,t),l(e,F,t),l(e,we,t),g(A,e,t),l(e,xe,t),g(S,e,t),l(e,qe,t),l(e,N,t),l(e,ye,t),g(H,e,t),l(e,Ae,t),l(e,d,t),g(J,d,null),o(d,Me),o(d,ee),o(d,Oe),o(d,te),o(d,Fe),o(d,z),g(U,z,null),o(z,Se),o(z,ne),o(z,Ne),o(z,oe),o(d,He),o(d,$),g(G,$,null),o($,Je),o($,se),o(d,Ue),o(d,L),g(K,L,null),o(L,Ge),o(L,re),o(d,Ke),o(d,B),g(W,B,null),o(B,We),o(B,ae),l(e,$e,t),g(Z,e,t),l(e,Le,t),l(e,h,t),g(Q,h,null),o(h,Ze),o(h,ie),o(h,Qe),o(h,le),o(h,Ve),o(h,w),g(V,w,null),o(w,Ye),o(w,de),o(w,je),o(w,ce),o(h,Xe),o(h,C),g(Y,C,null),o(C,et),o(C,me),l(e,Be,t),g(j,e,t),l(e,Ce,t),l(e,fe,t),Pe=!0},p(e,[t]){const p={};t&2&&(p.$$scope={dirty:t,ctx:e}),A.$set(p)},i(e){Pe||(k(E.$$.fragment,e),k(R.$$.fragment,e),k(A.$$.fragment,e),k(S.$$.fragment,e),k(H.$$.fragment,e),k(J.$$.fragment,e),k(U.$$.fragment,e),k(G.$$.fragment,e),k(K.$$.fragment,e),k(W.$$.fragment,e),k(Z.$$.fragment,e),k(Q.$$.fragment,e),k(V.$$.fragment,e),k(Y.$$.fragment,e),k(j.$$.fragment,e),Pe=!0)},o(e){_(E.$$.fragment,e),_(R.$$.fragment,e),_(A.$$.fragment,e),_(S.$$.fragment,e),_(H.$$.fragment,e),_(J.$$.fragment,e),_(U.$$.fragment,e),_(G.$$.fragment,e),_(K.$$.fragment,e),_(W.$$.fragment,e),_(Z.$$.fragment,e),_(Q.$$.fragment,e),_(V.$$.fragment,e),_(Y.$$.fragment,e),_(j.$$.fragment,e),Pe=!1},d(e){e&&(n(D),n(T),n(X),n(ke),n(y),n(_e),n(be),n(I),n(Te),n(M),n(ve),n(O),n(ze),n(F),n(we),n(xe),n(qe),n(N),n(ye),n(Ae),n(d),n($e),n(Le),n(h),n(Be),n(Ce),n(fe)),n(m),b(E,e),b(R,e),b(A,e),b(S,e),b(H,e),b(J),b(U),b(G),b(K),b(W),b(Z,e),b(Q),b(V),b(Y),b(j,e)}}}const Lt='{"title":"BARThez","local":"barthez","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"BarthezTokenizer","local":"transformers.BarthezTokenizer","sections":[],"depth":2},{"title":"BarthezTokenizerFast","local":"transformers.BarthezTokenizerFast","sections":[],"depth":2}],"depth":1}';function Bt(ge){return Tt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class It extends zt{constructor(m){super(),wt(this,m,Bt,$t,bt,{})}}export{It as component};
