import{s as $t,o as wt,n as tt}from"../chunks/scheduler.01eeda35.js";import{S as Ct,i as xt,g as l,s as a,r as u,A as Tt,h as p,f as t,c as o,j as I,u as g,x as f,k as L,y as s,a as m,v as _,d as h,t as k,w as v}from"../chunks/index.6dd51b66.js";import{T as yt}from"../chunks/Tip.de9bae2b.js";import{D as H}from"../chunks/Docstring.76e6b3cf.js";import{C as bt}from"../chunks/CodeBlock.864da1b0.js";import{E as vt}from"../chunks/ExampleCodeBlock.6a36fb6b.js";import{H as De,E as Mt}from"../chunks/EditOnGithub.7faefd25.js";function Lt(q){let i,x=`CPM’s architecture is the same as GPT-2, except for tokenization method. Refer to <a href="gpt2">GPT-2 documentation</a> for
API reference information.`;return{c(){i=l("p"),i.innerHTML=x},l(d){i=p(d,"P",{"data-svelte-h":!0}),f(i)!=="svelte-fdozrf"&&(i.innerHTML=x)},m(d,c){m(d,i,c)},p:tt,d(d){d&&t(i)}}}function At(q){let i,x="sequence pair mask has the following format:",d,c,b;return c=new bt({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(){i=l("p"),i.textContent=x,d=a(),u(c.$$.fragment)},l(r){i=p(r,"P",{"data-svelte-h":!0}),f(i)!=="svelte-16klr56"&&(i.textContent=x),d=o(r),g(c.$$.fragment,r)},m(r,w){m(r,i,w),m(r,d,w),_(c,r,w),b=!0},p:tt,i(r){b||(h(c.$$.fragment,r),b=!0)},o(r){k(c.$$.fragment,r),b=!1},d(r){r&&(t(i),t(d)),v(c,r)}}}function Pt(q){let i,x="sequence pair mask has the following format:",d,c,b;return c=new bt({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(){i=l("p"),i.textContent=x,d=a(),u(c.$$.fragment)},l(r){i=p(r,"P",{"data-svelte-h":!0}),f(i)!=="svelte-16klr56"&&(i.textContent=x),d=o(r),g(c.$$.fragment,r)},m(r,w){m(r,i,w),m(r,d,w),_(c,r,w),b=!0},p:tt,i(r){b||(h(c.$$.fragment,r),b=!0)},o(r){k(c.$$.fragment,r),b=!1},d(r){r&&(t(i),t(d)),v(c,r)}}}function It(q){let i,x,d,c,b,r,w,nt=`<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,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAtCAMAAAANxBKoAAAC7lBMVEUAAADg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/lDhW/5RHHteeWFN60qo98YJuoq1nK3uW5AabyspC1BcIEpOhft+SZAShYoLSvnmSfnYADUERP5jJn2h5XtsgCRuhYQqAvwTwn33+YWEKUI72HX5AtfSAZDe8F2DtPPm77afhl0EkthzuCQU0BWApgQIH9+KB0JhopMM7bJrdTRoleM2JAVNMyPF+wdoaz+XJpGoVAQ7WXUkcV7gT3oUZyi/ISIJAVKhgNp+4b4veCFhYVJw4locdSjZCp9cPUhLF9EZ3KKzURepMEtCDPP3VcWFx4UIiZIklIpFNfHpdEafIF2aRmOcrUmjohbT2WUllbmRvgfbythbQO3222fpDJoufaQPncYYuqoGtUEsCJZL6/3PR5b4syeSjZMQG/T2maGANlXT2v8S4AULWaUkCxfLyW8iW4kdka+nEMjxpL2NCwsYNBp+Q61PF43zyDg9Bm9+3NNySn78jMZUUkumqE4Gp7JmFOdP1vc8PpRrzj9+wPinCy8K1PiJ4aYbnTYpCCbDkBSbzhu2QJ1Gd82t8jI8TH51+OzvXoWbnXUOBkNW+0mWFwGcGOUVpU81/n3TOHb5oMt2FgYGjzau0Nif0Ss7Q3XB33hjjQHjHA5E5aOyIQc8CBrLdQSs3j92VG+3nNEjbkbdbBr9zm04ruvw37vh0QKOdeGIkckc80fX3KH/h7PT4BOjgCty8VZ5ux1MoO5Cf5naca2LAsEgehI+drX8o/0Nu+W0m6K/I9gGPd/dfx/EN/wN62AhsBWuAAAAAElFTkSuQmCC
"/>`,be,S,$e,Z,st=`The CPM model was proposed in <a href="https://arxiv.org/abs/2012.00413" rel="nofollow">CPM: A Large-scale Generative Chinese Pre-trained Language Model</a> by Zhengyan Zhang, Xu Han, Hao Zhou, Pei Ke, Yuxian Gu, Deming Ye, Yujia Qin,
Yusheng Su, Haozhe Ji, Jian Guan, Fanchao Qi, Xiaozhi Wang, Yanan Zheng, Guoyang Zeng, Huanqi Cao, Shengqi Chen,
Daixuan Li, Zhenbo Sun, Zhiyuan Liu, Minlie Huang, Wentao Han, Jie Tang, Juanzi Li, Xiaoyan Zhu, Maosong Sun.`,we,F,at="The abstract from the paper is the following:",Ce,V,ot=`<em>Pre-trained Language Models (PLMs) have proven to be beneficial for various downstream NLP tasks. Recently, GPT-3,
with 175 billion parameters and 570GB training data, drew a lot of attention due to the capacity of few-shot (even
zero-shot) learning. However, applying GPT-3 to address Chinese NLP tasks is still challenging, as the training corpus
of GPT-3 is primarily English, and the parameters are not publicly available. In this technical report, we release the
Chinese Pre-trained Language Model (CPM) with generative pre-training on large-scale Chinese training data. To the best
of our knowledge, CPM, with 2.6 billion parameters and 100GB Chinese training data, is the largest Chinese pre-trained
language model, which could facilitate several downstream Chinese NLP tasks, such as conversation, essay generation,
cloze test, and language understanding. Extensive experiments demonstrate that CPM achieves strong performance on many
NLP tasks in the settings of few-shot (even zero-shot) learning.</em>`,xe,X,rt=`This model was contributed by <a href="https://huggingface.co/canwenxu" rel="nofollow">canwenxu</a>. The original implementation can be found
here: <a href="https://github.com/TsinghuaAI/CPM-Generate" rel="nofollow">https://github.com/TsinghuaAI/CPM-Generate</a>`,Te,D,ye,Y,Me,$,K,Je,re,it="Runs pre-tokenization with Jieba segmentation tool. It is used in CPM models.",Ne,A,Q,je,ie,lt=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLNet sequence has the following format:`,Ee,le,pt="<li>single sequence: <code>X &lt;sep&gt; &lt;cls&gt;</code></li> <li>pair of sequences: <code>A &lt;sep&gt; B &lt;sep&gt; &lt;cls&gt;</code></li>",Ge,J,W,Oe,pe,mt="Converts a sequence of tokens (strings for sub-words) in a single string.",Ue,y,R,He,me,ct="Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLNet",Se,N,Ze,ce,dt="If <code>token_ids_1</code> is <code>None</code>, this method only returns the first portion of the mask (0s).",Fe,j,B,Ve,de,ft=`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.`,Le,ee,Ae,T,te,Xe,fe,ut="Runs pre-tokenization with Jieba segmentation tool. It is used in CPM models.",Ye,P,ne,Ke,ue,gt=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLNet sequence has the following format:`,Qe,ge,_t="<li>single sequence: <code>X &lt;sep&gt; &lt;cls&gt;</code></li> <li>pair of sequences: <code>A &lt;sep&gt; B &lt;sep&gt; &lt;cls&gt;</code></li>",We,M,se,Re,_e,ht="Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLNet",Be,E,et,he,kt="If <code>token_ids_1</code> is <code>None</code>, this method only returns the first portion of the mask (0s).",Pe,ae,Ie,ve,ze;return b=new De({props:{title:"CPM",local:"cpm",headingTag:"h1"}}),S=new De({props:{title:"Overview",local:"overview",headingTag:"h2"}}),D=new yt({props:{$$slots:{default:[Lt]},$$scope:{ctx:q}}}),Y=new De({props:{title:"CpmTokenizer",local:"transformers.CpmTokenizer",headingTag:"h2"}}),K=new H({props:{name:"class transformers.CpmTokenizer",anchor:"transformers.CpmTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = False"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = False"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '<sep>'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '<cls>'"},{name:"mask_token",val:" = '<mask>'"},{name:"additional_special_tokens",val:" = ['<eop>', '<eod>']"},{name:"sp_model_kwargs",val:": typing.Optional[typing.Dict[str, typing.Any]] = None"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cpm/tokenization_cpm.py#L33"}}),Q=new H({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CpmTokenizer.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.CpmTokenizer.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.CpmTokenizer.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/cpm/tokenization_cpm.py#L239",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>
`}}),W=new H({props:{name:"convert_tokens_to_string",anchor:"transformers.CpmTokenizer.convert_tokens_to_string",parameters:[{name:"tokens",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cpm/tokenization_cpm.py#L233"}}),R=new H({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CpmTokenizer.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.CpmTokenizer.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.CpmTokenizer.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/cpm/tokenization_cpm.py#L294",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>
`}}),N=new vt({props:{anchor:"transformers.CpmTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[At]},$$scope:{ctx:q}}}),B=new H({props:{name:"get_special_tokens_mask",anchor:"transformers.CpmTokenizer.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.CpmTokenizer.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.CpmTokenizer.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.CpmTokenizer.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/cpm/tokenization_cpm.py#L265",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>
`}}),ee=new De({props:{title:"CpmTokenizerFast",local:"transformers.CpmTokenizerFast",headingTag:"h2"}}),te=new H({props:{name:"class transformers.CpmTokenizerFast",anchor:"transformers.CpmTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = False"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = False"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '<sep>'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '<cls>'"},{name:"mask_token",val:" = '<mask>'"},{name:"additional_special_tokens",val:" = ['<eop>', '<eod>']"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cpm/tokenization_cpm_fast.py#L30"}}),ne=new H({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CpmTokenizerFast.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.CpmTokenizerFast.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.CpmTokenizerFast.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/cpm/tokenization_cpm_fast.py#L152",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>
`}}),se=new H({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.CpmTokenizerFast.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.CpmTokenizerFast.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.CpmTokenizerFast.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/cpm/tokenization_cpm_fast.py#L178",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>
`}}),E=new vt({props:{anchor:"transformers.CpmTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Pt]},$$scope:{ctx:q}}}),ae=new Mt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/cpm.md"}}),{c(){i=l("meta"),x=a(),d=l("p"),c=a(),u(b.$$.fragment),r=a(),w=l("div"),w.innerHTML=nt,be=a(),u(S.$$.fragment),$e=a(),Z=l("p"),Z.innerHTML=st,we=a(),F=l("p"),F.textContent=at,Ce=a(),V=l("p"),V.innerHTML=ot,xe=a(),X=l("p"),X.innerHTML=rt,Te=a(),u(D.$$.fragment),ye=a(),u(Y.$$.fragment),Me=a(),$=l("div"),u(K.$$.fragment),Je=a(),re=l("p"),re.textContent=it,Ne=a(),A=l("div"),u(Q.$$.fragment),je=a(),ie=l("p"),ie.textContent=lt,Ee=a(),le=l("ul"),le.innerHTML=pt,Ge=a(),J=l("div"),u(W.$$.fragment),Oe=a(),pe=l("p"),pe.textContent=mt,Ue=a(),y=l("div"),u(R.$$.fragment),He=a(),me=l("p"),me.textContent=ct,Se=a(),u(N.$$.fragment),Ze=a(),ce=l("p"),ce.innerHTML=dt,Fe=a(),j=l("div"),u(B.$$.fragment),Ve=a(),de=l("p"),de.innerHTML=ft,Le=a(),u(ee.$$.fragment),Ae=a(),T=l("div"),u(te.$$.fragment),Xe=a(),fe=l("p"),fe.textContent=ut,Ye=a(),P=l("div"),u(ne.$$.fragment),Ke=a(),ue=l("p"),ue.textContent=gt,Qe=a(),ge=l("ul"),ge.innerHTML=_t,We=a(),M=l("div"),u(se.$$.fragment),Re=a(),_e=l("p"),_e.textContent=ht,Be=a(),u(E.$$.fragment),et=a(),he=l("p"),he.innerHTML=kt,Pe=a(),u(ae.$$.fragment),Ie=a(),ve=l("p"),this.h()},l(e){const n=Tt("svelte-u9bgzb",document.head);i=p(n,"META",{name:!0,content:!0}),n.forEach(t),x=o(e),d=p(e,"P",{}),I(d).forEach(t),c=o(e),g(b.$$.fragment,e),r=o(e),w=p(e,"DIV",{class:!0,"data-svelte-h":!0}),f(w)!=="svelte-1px1zvi"&&(w.innerHTML=nt),be=o(e),g(S.$$.fragment,e),$e=o(e),Z=p(e,"P",{"data-svelte-h":!0}),f(Z)!=="svelte-pb6aeb"&&(Z.innerHTML=st),we=o(e),F=p(e,"P",{"data-svelte-h":!0}),f(F)!=="svelte-vfdo9a"&&(F.textContent=at),Ce=o(e),V=p(e,"P",{"data-svelte-h":!0}),f(V)!=="svelte-2grs0w"&&(V.innerHTML=ot),xe=o(e),X=p(e,"P",{"data-svelte-h":!0}),f(X)!=="svelte-deid5f"&&(X.innerHTML=rt),Te=o(e),g(D.$$.fragment,e),ye=o(e),g(Y.$$.fragment,e),Me=o(e),$=p(e,"DIV",{class:!0});var C=I($);g(K.$$.fragment,C),Je=o(C),re=p(C,"P",{"data-svelte-h":!0}),f(re)!=="svelte-ejpd0l"&&(re.textContent=it),Ne=o(C),A=p(C,"DIV",{class:!0});var z=I(A);g(Q.$$.fragment,z),je=o(z),ie=p(z,"P",{"data-svelte-h":!0}),f(ie)!=="svelte-1dgk30w"&&(ie.textContent=lt),Ee=o(z),le=p(z,"UL",{"data-svelte-h":!0}),f(le)!=="svelte-zi1mnq"&&(le.innerHTML=pt),z.forEach(t),Ge=o(C),J=p(C,"DIV",{class:!0});var oe=I(J);g(W.$$.fragment,oe),Oe=o(oe),pe=p(oe,"P",{"data-svelte-h":!0}),f(pe)!=="svelte-1ne8awa"&&(pe.textContent=mt),oe.forEach(t),Ue=o(C),y=p(C,"DIV",{class:!0});var G=I(y);g(R.$$.fragment,G),He=o(G),me=p(G,"P",{"data-svelte-h":!0}),f(me)!=="svelte-1nwvqaq"&&(me.textContent=ct),Se=o(G),g(N.$$.fragment,G),Ze=o(G),ce=p(G,"P",{"data-svelte-h":!0}),f(ce)!=="svelte-owoxgn"&&(ce.innerHTML=dt),G.forEach(t),Fe=o(C),j=p(C,"DIV",{class:!0});var qe=I(j);g(B.$$.fragment,qe),Ve=o(qe),de=p(qe,"P",{"data-svelte-h":!0}),f(de)!=="svelte-1f4f5kp"&&(de.innerHTML=ft),qe.forEach(t),C.forEach(t),Le=o(e),g(ee.$$.fragment,e),Ae=o(e),T=p(e,"DIV",{class:!0});var O=I(T);g(te.$$.fragment,O),Xe=o(O),fe=p(O,"P",{"data-svelte-h":!0}),f(fe)!=="svelte-ejpd0l"&&(fe.textContent=ut),Ye=o(O),P=p(O,"DIV",{class:!0});var ke=I(P);g(ne.$$.fragment,ke),Ke=o(ke),ue=p(ke,"P",{"data-svelte-h":!0}),f(ue)!=="svelte-1dgk30w"&&(ue.textContent=gt),Qe=o(ke),ge=p(ke,"UL",{"data-svelte-h":!0}),f(ge)!=="svelte-zi1mnq"&&(ge.innerHTML=_t),ke.forEach(t),We=o(O),M=p(O,"DIV",{class:!0});var U=I(M);g(se.$$.fragment,U),Re=o(U),_e=p(U,"P",{"data-svelte-h":!0}),f(_e)!=="svelte-1nwvqaq"&&(_e.textContent=ht),Be=o(U),g(E.$$.fragment,U),et=o(U),he=p(U,"P",{"data-svelte-h":!0}),f(he)!=="svelte-owoxgn"&&(he.innerHTML=kt),U.forEach(t),O.forEach(t),Pe=o(e),g(ae.$$.fragment,e),Ie=o(e),ve=p(e,"P",{}),I(ve).forEach(t),this.h()},h(){L(i,"name","hf:doc:metadata"),L(i,"content",zt),L(w,"class","flex flex-wrap space-x-1"),L(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),L(T,"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,n){s(document.head,i),m(e,x,n),m(e,d,n),m(e,c,n),_(b,e,n),m(e,r,n),m(e,w,n),m(e,be,n),_(S,e,n),m(e,$e,n),m(e,Z,n),m(e,we,n),m(e,F,n),m(e,Ce,n),m(e,V,n),m(e,xe,n),m(e,X,n),m(e,Te,n),_(D,e,n),m(e,ye,n),_(Y,e,n),m(e,Me,n),m(e,$,n),_(K,$,null),s($,Je),s($,re),s($,Ne),s($,A),_(Q,A,null),s(A,je),s(A,ie),s(A,Ee),s(A,le),s($,Ge),s($,J),_(W,J,null),s(J,Oe),s(J,pe),s($,Ue),s($,y),_(R,y,null),s(y,He),s(y,me),s(y,Se),_(N,y,null),s(y,Ze),s(y,ce),s($,Fe),s($,j),_(B,j,null),s(j,Ve),s(j,de),m(e,Le,n),_(ee,e,n),m(e,Ae,n),m(e,T,n),_(te,T,null),s(T,Xe),s(T,fe),s(T,Ye),s(T,P),_(ne,P,null),s(P,Ke),s(P,ue),s(P,Qe),s(P,ge),s(T,We),s(T,M),_(se,M,null),s(M,Re),s(M,_e),s(M,Be),_(E,M,null),s(M,et),s(M,he),m(e,Pe,n),_(ae,e,n),m(e,Ie,n),m(e,ve,n),ze=!0},p(e,[n]){const C={};n&2&&(C.$$scope={dirty:n,ctx:e}),D.$set(C);const z={};n&2&&(z.$$scope={dirty:n,ctx:e}),N.$set(z);const oe={};n&2&&(oe.$$scope={dirty:n,ctx:e}),E.$set(oe)},i(e){ze||(h(b.$$.fragment,e),h(S.$$.fragment,e),h(D.$$.fragment,e),h(Y.$$.fragment,e),h(K.$$.fragment,e),h(Q.$$.fragment,e),h(W.$$.fragment,e),h(R.$$.fragment,e),h(N.$$.fragment,e),h(B.$$.fragment,e),h(ee.$$.fragment,e),h(te.$$.fragment,e),h(ne.$$.fragment,e),h(se.$$.fragment,e),h(E.$$.fragment,e),h(ae.$$.fragment,e),ze=!0)},o(e){k(b.$$.fragment,e),k(S.$$.fragment,e),k(D.$$.fragment,e),k(Y.$$.fragment,e),k(K.$$.fragment,e),k(Q.$$.fragment,e),k(W.$$.fragment,e),k(R.$$.fragment,e),k(N.$$.fragment,e),k(B.$$.fragment,e),k(ee.$$.fragment,e),k(te.$$.fragment,e),k(ne.$$.fragment,e),k(se.$$.fragment,e),k(E.$$.fragment,e),k(ae.$$.fragment,e),ze=!1},d(e){e&&(t(x),t(d),t(c),t(r),t(w),t(be),t($e),t(Z),t(we),t(F),t(Ce),t(V),t(xe),t(X),t(Te),t(ye),t(Me),t($),t(Le),t(Ae),t(T),t(Pe),t(Ie),t(ve)),t(i),v(b,e),v(S,e),v(D,e),v(Y,e),v(K),v(Q),v(W),v(R),v(N),v(B),v(ee,e),v(te),v(ne),v(se),v(E),v(ae,e)}}}const zt='{"title":"CPM","local":"cpm","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"CpmTokenizer","local":"transformers.CpmTokenizer","sections":[],"depth":2},{"title":"CpmTokenizerFast","local":"transformers.CpmTokenizerFast","sections":[],"depth":2}],"depth":1}';function qt(q){return wt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ut extends Ct{constructor(i){super(),xt(this,i,qt,It,$t,{})}}export{Ut as component};
