import{s as qn,o as Jn,n as Ke}from"../chunks/scheduler.9bc65507.js";import{S as In,i as jn,g as o,s as l,u as _,A as Wn,h as s,f as t,c as d,j as f,v,y as h,k as p,o as n,a as c,w as b,d as C,t as y,x as T}from"../chunks/index.78c82d43.js";import{T as Ln}from"../chunks/Tip.87d55b76.js";import{D as te}from"../chunks/Docstring.4e7352e2.js";import{C as Dt}from"../chunks/CodeBlock.73e038be.js";import{I as Se}from"../chunks/IconCopyLink.bedaa44d.js";import{E as Ot}from"../chunks/ExampleCodeBlock.872b014d.js";function Fn(z){let r,k="Example:",m,u,g;return u=new Dt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENwbUFudE1vZGVsJTJDJTIwQ3BtQW50Q29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENQTUFudCUyMGNwbS1hbnQtMTBiJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMENwbUFudENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMGNwbS1hbnQtMTBiJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBDcG1BbnRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CpmAntModel, CpmAntConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a CPMAnt cpm-ant-10b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = CpmAntConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the cpm-ant-10b style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CpmAntModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){r=o("p"),r.textContent=k,m=l(),_(u.$$.fragment)},l(a){r=s(a,"P",{"data-svelte-h":!0}),h(r)!=="svelte-11lpom8"&&(r.textContent=k),m=d(a),v(u.$$.fragment,a)},m(a,w){c(a,r,w),c(a,m,w),b(u,a,w),g=!0},p:Ke,i(a){g||(C(u.$$.fragment,a),g=!0)},o(a){y(u.$$.fragment,a),g=!1},d(a){a&&(t(r),t(m)),T(u,a)}}}function Bn(z){let r,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){r=o("p"),r.innerHTML=k},l(m){r=s(m,"P",{"data-svelte-h":!0}),h(r)!=="svelte-fincs2"&&(r.innerHTML=k)},m(m,u){c(m,r,u)},p:Ke,d(m){m&&t(r)}}}function Un(z){let r,k="Example:",m,u,g;return u=new Dt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDcG1BbnRNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmJtYiUyRmNwbS1hbnQtMTBiJTIyKSUwQW1vZGVsJTIwJTNEJTIwQ3BtQW50TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5ibWIlMkZjcG0tYW50LTEwYiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CpmAntModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openbmb/cpm-ant-10b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CpmAntModel.from_pretrained(<span class="hljs-string">&quot;openbmb/cpm-ant-10b&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`,wrap:!1}}),{c(){r=o("p"),r.textContent=k,m=l(),_(u.$$.fragment)},l(a){r=s(a,"P",{"data-svelte-h":!0}),h(r)!=="svelte-11lpom8"&&(r.textContent=k),m=d(a),v(u.$$.fragment,a)},m(a,w){c(a,r,w),c(a,m,w),b(u,a,w),g=!0},p:Ke,i(a){g||(C(u.$$.fragment,a),g=!0)},o(a){y(u.$$.fragment,a),g=!1},d(a){a&&(t(r),t(m)),T(u,a)}}}function En(z){let r,k=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){r=o("p"),r.innerHTML=k},l(m){r=s(m,"P",{"data-svelte-h":!0}),h(r)!=="svelte-fincs2"&&(r.innerHTML=k)},m(m,u){c(m,r,u)},p:Ke,d(m){m&&t(r)}}}function Hn(z){let r,k="Example:",m,u,g;return u=new Dt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMENwbUFudEZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmJtYiUyRmNwbS1hbnQtMTBiJTIyKSUwQW1vZGVsJTIwJTNEJTIwQ3BtQW50Rm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5ibWIlMkZjcG0tYW50LTEwYiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<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> AutoTokenizer, CpmAntForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;openbmb/cpm-ant-10b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = CpmAntForCausalLM.from_pretrained(<span class="hljs-string">&quot;openbmb/cpm-ant-10b&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`,wrap:!1}}),{c(){r=o("p"),r.textContent=k,m=l(),_(u.$$.fragment)},l(a){r=s(a,"P",{"data-svelte-h":!0}),h(r)!=="svelte-11lpom8"&&(r.textContent=k),m=d(a),v(u.$$.fragment,a)},m(a,w){c(a,r,w),c(a,m,w),b(u,a,w),g=!0},p:Ke,i(a){g||(C(u.$$.fragment,a),g=!0)},o(a){y(u.$$.fragment,a),g=!1},d(a){a&&(t(r),t(m)),T(u,a)}}}function Nn(z){let r,k,m,u,g,a,w,ne,yt,ke,Xt="CPMAnt",et,I,U,Ze,oe,Tt,we,Yt="Overview",tt,se,Kt='CPM-Ant is an open-source Chinese pre-trained language model (PLM) with 10B parameters. It is also the first milestone of the live training process of CPM-Live. The training process is cost-effective and environment-friendly. CPM-Ant also achieves promising results with delta tuning on the CUGE benchmark. Besides the full model, we also provide various compressed versions to meet the requirements of different hardware configurations. <a href="https://github.com/OpenBMB/CPM-Live/tree/cpm-ant/cpm-live" rel="nofollow">See more</a>',nt,ae,en="Tips:",ot,re,tn='This model was contributed by <a href="https://huggingface.co/openbmb" rel="nofollow">OpenBMB</a>. The original code can be found <a href="https://github.com/OpenBMB/CPM-Live/tree/cpm-ant/cpm-live" rel="nofollow">here</a>.',st,ie,nn="⚙️ Training & Inference",at,le,on='<li>A tutorial on <a href="https://github.com/OpenBMB/CPM-Live/tree/cpm-ant/cpm-live" rel="nofollow">CPM-Live</a>.</li>',rt,j,E,Ge,de,kt,Me,sn="CpmAntConfig",it,$,ce,wt,$e,an=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.34.0/en/model_doc/cpmant#transformers.CpmAntModel">CpmAntModel</a>. It is used to instantiate an
CPMAnt model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the CPMAnt
<a href="https://huggingface.co/openbmb/cpm-ant-10b" rel="nofollow">openbmb/cpm-ant-10b</a> architecture.`,Mt,Ae,rn=`Configuration objects inherit from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.34.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,$t,H,lt,W,N,Ve,pe,At,xe,ln="CpmAntTokenizer",dt,A,me,xt,ze,dn="Construct a CPMAnt tokenizer. Based on byte-level Byte-Pair-Encoding.",zt,q,ue,Pt,Pe,cn=`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A CPMAnt sequence has the following format:`,Lt,Le,pn="<li>single sequence: <code>[BOS] Sequence</code>.</li>",qt,S,he,Jt,qe,mn=`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.`,ct,F,Z,Re,fe,It,Je,un="CpmAntModel",pt,x,ge,jt,Ie,hn=`The bare CPMAnt Model outputting raw hidden-states without any specific head on top.
This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Wt,je,fn=`Parameters
config (<a href="/docs/transformers/v4.34.0/en/model_doc/cpmant#transformers.CpmAntConfig">~CpmAntConfig</a>): Model configuration class with all the parameters of the
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,Ft,P,_e,Bt,We,gn='The <a href="/docs/transformers/v4.34.0/en/model_doc/cpmant#transformers.CpmAntModel">CpmAntModel</a> forward method, overrides the <code>__call__</code> special method.',Ut,G,Et,V,mt,B,R,Qe,ve,Ht,Fe,_n="CpmAntForCausalLM",ut,M,be,Nt,Be,vn="The CPMAnt Model with a language modeling head on top (linear layer with weights tied to the input embeddings).",St,Ue,bn=`This model is a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`,Zt,Ee,Cn=`Parameters
config (<a href="/docs/transformers/v4.34.0/en/model_doc/cpmant#transformers.CpmAntConfig">~CpmAntConfig</a>): Model configuration class with all the parameters of the
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.34.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,Gt,L,Ce,Vt,He,yn='The <a href="/docs/transformers/v4.34.0/en/model_doc/cpmant#transformers.CpmAntForCausalLM">CpmAntForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',Rt,Q,Qt,O,ht,Oe,ft;return ne=new Se({}),oe=new Se({}),de=new Se({}),ce=new te({props:{name:"class transformers.CpmAntConfig",anchor:"transformers.CpmAntConfig",parameters:[{name:"vocab_size",val:": int = 30720"},{name:"hidden_size",val:": int = 4096"},{name:"num_attention_heads",val:": int = 32"},{name:"dim_head",val:": int = 128"},{name:"dim_ff",val:": int = 10240"},{name:"num_hidden_layers",val:": int = 48"},{name:"dropout_p",val:": int = 0.0"},{name:"position_bias_num_buckets",val:": int = 512"},{name:"position_bias_max_distance",val:": int = 2048"},{name:"eps",val:": int = 1e-06"},{name:"init_std",val:": float = 1.0"},{name:"prompt_types",val:": int = 32"},{name:"prompt_length",val:": int = 32"},{name:"segment_types",val:": int = 32"},{name:"use_cache",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CpmAntConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30720) &#x2014;
Vocabulary size of the CPMAnt model. Defines the number of different tokens that can be represented by the
<code>input</code> passed when calling <a href="/docs/transformers/v4.34.0/en/model_doc/cpmant#transformers.CpmAntModel">CpmAntModel</a>.`,name:"vocab_size"},{anchor:"transformers.CpmAntConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimension of the encoder layers.`,name:"hidden_size"},{anchor:"transformers.CpmAntConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of attention heads in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.CpmAntConfig.dim_head",description:`<strong>dim_head</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Dimension of attention heads for each attention layer in the Transformer encoder.`,name:"dim_head"},{anchor:"transformers.CpmAntConfig.dim_ff",description:`<strong>dim_ff</strong> (<code>int</code>, <em>optional</em>, defaults to 10240) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"dim_ff"},{anchor:"transformers.CpmAntConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 48) &#x2014;
Number of layers of the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.CpmAntConfig.dropout_p",description:`<strong>dropout_p</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder.`,name:"dropout_p"},{anchor:"transformers.CpmAntConfig.position_bias_num_buckets",description:`<strong>position_bias_num_buckets</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The number of position_bias buckets.`,name:"position_bias_num_buckets"},{anchor:"transformers.CpmAntConfig.position_bias_max_distance",description:`<strong>position_bias_max_distance</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"position_bias_max_distance"},{anchor:"transformers.CpmAntConfig.eps",description:`<strong>eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-6) &#x2014;
The epsilon used by the layer normalization layers.`,name:"eps"},{anchor:"transformers.CpmAntConfig.prompt_types",description:`<strong>prompt_types</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The type of prompt.`,name:"prompt_types"},{anchor:"transformers.CpmAntConfig.prompt_length",description:`<strong>prompt_length</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The length of prompt.`,name:"prompt_length"},{anchor:"transformers.CpmAntConfig.segment_types",description:`<strong>segment_types</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
The type of segment.`,name:"segment_types"},{anchor:"transformers.CpmAntConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use cache.`,name:"use_cache"},{anchor:"transformers.CpmAntConfig.init_std",description:`<strong>init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Initialize parameters with std = init_std.`,name:"init_std"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/cpmant/configuration_cpmant.py#L29"}}),H=new Ot({props:{anchor:"transformers.CpmAntConfig.example",$$slots:{default:[Fn]},$$scope:{ctx:z}}}),pe=new Se({}),me=new te({props:{name:"class transformers.CpmAntTokenizer",anchor:"transformers.CpmAntTokenizer",parameters:[{name:"vocab_file",val:""},{name:"bod_token",val:" = '<d>'"},{name:"eod_token",val:" = '</d>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"unk_token",val:" = '<unk>'"},{name:"line_token",val:" = '</n>'"},{name:"space_token",val:" = '</_>'"},{name:"padding_side",val:" = 'left'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CpmAntTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.CpmAntTokenizer.bod_token",description:`<strong>bod_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;d&gt;&quot;</code>) &#x2014;
The beginning of document token.`,name:"bod_token"},{anchor:"transformers.CpmAntTokenizer.eod_token",description:`<strong>eod_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/d&gt;&quot;</code>) &#x2014;
The end of document token.`,name:"eod_token"},{anchor:"transformers.CpmAntTokenizer.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.`,name:"bos_token"},{anchor:"transformers.CpmAntTokenizer.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.`,name:"eos_token"},{anchor:"transformers.CpmAntTokenizer.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.`,name:"pad_token"},{anchor:"transformers.CpmAntTokenizer.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.`,name:"unk_token"},{anchor:"transformers.CpmAntTokenizer.line_token",description:`<strong>line_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/n&gt;&quot;</code>) &#x2014;
The line token.`,name:"line_token"},{anchor:"transformers.CpmAntTokenizer.space_token",description:`<strong>space_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/_&gt;&quot;</code>) &#x2014;
The space token.`,name:"space_token"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/cpmant/tokenization_cpmant.py#L88"}}),ue=new te({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CpmAntTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.List[int] = None"}],parametersDescription:[{anchor:"transformers.CpmAntTokenizer.build_inputs_with_special_tokens.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014; The first tokenized sequence that special tokens will be added.",name:"token_ids_0"},{anchor:"transformers.CpmAntTokenizer.build_inputs_with_special_tokens.token_ids_1",description:"<strong>token_ids_1</strong> (<code>List[int]</code>) &#x2014; The optional second tokenized sequence that special tokens will be added.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/cpmant/tokenization_cpmant.py#L236",returnDescription:`
<p>The model input with special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),he=new te({props:{name:"get_special_tokens_mask",anchor:"transformers.CpmAntTokenizer.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.CpmAntTokenizer.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.CpmAntTokenizer.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.CpmAntTokenizer.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/v4.34.0/src/transformers/models/cpmant/tokenization_cpmant.py#L254",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),fe=new Se({}),ge=new te({props:{name:"class transformers.CpmAntModel",anchor:"transformers.CpmAntModel",parameters:[{name:"config",val:": CpmAntConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/cpmant/modeling_cpmant.py#L603"}}),_e=new te({props:{name:"forward",anchor:"transformers.CpmAntModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.Tensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CpmAntModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, seq_len)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <code>CPMAntTokenizer</code>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CpmAntModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.`,name:"past_key_values"},{anchor:"transformers.CpmAntModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.CpmAntModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers.`,name:"output_attentions"},{anchor:"transformers.CpmAntModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers.`,name:"output_hidden_states"},{anchor:"transformers.CpmAntModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/cpmant/modeling_cpmant.py#L641",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast"
>transformers.modeling_outputs.BaseModelOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.34.0/en/model_doc/cpmant#transformers.CpmAntConfig"
>CpmAntConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast"
>transformers.modeling_outputs.BaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),G=new Ln({props:{$$slots:{default:[Bn]},$$scope:{ctx:z}}}),V=new Ot({props:{anchor:"transformers.CpmAntModel.forward.example",$$slots:{default:[Un]},$$scope:{ctx:z}}}),ve=new Se({}),be=new te({props:{name:"class transformers.CpmAntForCausalLM",anchor:"transformers.CpmAntForCausalLM",parameters:[{name:"config",val:": CpmAntConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/cpmant/modeling_cpmant.py#L750"}}),Ce=new te({props:{name:"forward",anchor:"transformers.CpmAntForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Union[typing.List[typing.Tuple[torch.Tensor, torch.Tensor]], NoneType] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CpmAntForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, seq_len)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <code>CPMAntTokenizer</code>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.CpmAntForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.`,name:"past_key_values"},{anchor:"transformers.CpmAntForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.CpmAntForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers.`,name:"output_attentions"},{anchor:"transformers.CpmAntForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers.`,name:"output_hidden_states"},{anchor:"transformers.CpmAntForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.</p>
<p>Args &#x2014;
input_ids (<code>torch.Tensor</code> of shape <code>(batch_size, seq_len)</code>):
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <code>CPMAntTokenizer</code>. See <a href="/docs/transformers/v4.34.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.34.0/en/model_doc/vits#transformers.VitsTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>
past_key_values (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>):
Contains pre-computed hidden-states (key and values in the self-attention blocks and in the
cross-attention blocks) that can be used (see <code>past_key_values</code> input) to speed up sequential decoding.
use_cache (<code>bool</code>, <em>optional</em>):
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding
(see <code>past_key_values</code>).
output_attentions (<code>bool</code>, <em>optional</em>):
Whether or not to return the attentions tensors of all attention layers.
output_hidden_states (<code>bool</code>, <em>optional</em>):
Whether or not to return the hidden states of all layers.
labels (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
Labels for computing the masked language modeling loss.
return_dict (<code>bool</code>, <em>optional</em>):
Whether or not to return a <a href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.
attention_mask (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
CPMAnt will process attention mask automatically, this parameter is a dummy parameter for
text-generation pipeline.</p>
<p>Example &#x2014;`,name:"return_dict"},{anchor:"transformers.CpmAntForCausalLM.forward.Text",description:"<strong>Text</strong> Generation with CpmAntForCausalLM. &#x2014;",name:"Text"}],source:"https://github.com/huggingface/transformers/blob/v4.34.0/src/transformers/models/cpmant/modeling_cpmant.py#L763",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.34.0/en/model_doc/cpmant#transformers.CpmAntConfig"
>CpmAntConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.34.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Q=new Ln({props:{$$slots:{default:[En]},$$scope:{ctx:z}}}),O=new Ot({props:{anchor:"transformers.CpmAntForCausalLM.forward.example",$$slots:{default:[Hn]},$$scope:{ctx:z}}}),{c(){r=o("meta"),k=l(),m=o("p"),u=l(),g=o("h1"),a=o("a"),w=o("span"),_(ne.$$.fragment),yt=l(),ke=o("span"),ke.textContent=Xt,et=l(),I=o("h2"),U=o("a"),Ze=o("span"),_(oe.$$.fragment),Tt=l(),we=o("span"),we.textContent=Yt,tt=l(),se=o("p"),se.innerHTML=Kt,nt=l(),ae=o("p"),ae.textContent=en,ot=l(),re=o("p"),re.innerHTML=tn,st=l(),ie=o("p"),ie.textContent=nn,at=l(),le=o("ul"),le.innerHTML=on,rt=l(),j=o("h2"),E=o("a"),Ge=o("span"),_(de.$$.fragment),kt=l(),Me=o("span"),Me.textContent=sn,it=l(),$=o("div"),_(ce.$$.fragment),wt=l(),$e=o("p"),$e.innerHTML=an,Mt=l(),Ae=o("p"),Ae.innerHTML=rn,$t=l(),_(H.$$.fragment),lt=l(),W=o("h2"),N=o("a"),Ve=o("span"),_(pe.$$.fragment),At=l(),xe=o("span"),xe.textContent=ln,dt=l(),A=o("div"),_(me.$$.fragment),xt=l(),ze=o("p"),ze.textContent=dn,zt=l(),q=o("div"),_(ue.$$.fragment),Pt=l(),Pe=o("p"),Pe.textContent=cn,Lt=l(),Le=o("ul"),Le.innerHTML=pn,qt=l(),S=o("div"),_(he.$$.fragment),Jt=l(),qe=o("p"),qe.innerHTML=mn,ct=l(),F=o("h2"),Z=o("a"),Re=o("span"),_(fe.$$.fragment),It=l(),Je=o("span"),Je.textContent=un,pt=l(),x=o("div"),_(ge.$$.fragment),jt=l(),Ie=o("p"),Ie.innerHTML=hn,Wt=l(),je=o("p"),je.innerHTML=fn,Ft=l(),P=o("div"),_(_e.$$.fragment),Bt=l(),We=o("p"),We.innerHTML=gn,Ut=l(),_(G.$$.fragment),Et=l(),_(V.$$.fragment),mt=l(),B=o("h2"),R=o("a"),Qe=o("span"),_(ve.$$.fragment),Ht=l(),Fe=o("span"),Fe.textContent=_n,ut=l(),M=o("div"),_(be.$$.fragment),Nt=l(),Be=o("p"),Be.textContent=vn,St=l(),Ue=o("p"),Ue.innerHTML=bn,Zt=l(),Ee=o("p"),Ee.innerHTML=Cn,Gt=l(),L=o("div"),_(Ce.$$.fragment),Vt=l(),He=o("p"),He.innerHTML=yn,Rt=l(),_(Q.$$.fragment),Qt=l(),_(O.$$.fragment),ht=l(),Oe=o("p"),this.h()},l(e){const i=Wn("svelte-1phssyn",document.head);r=s(i,"META",{name:!0,content:!0}),i.forEach(t),k=d(e),m=s(e,"P",{}),f(m).forEach(t),u=d(e),g=s(e,"H1",{class:!0});var ye=f(g);a=s(ye,"A",{id:!0,class:!0,href:!0});var De=f(a);w=s(De,"SPAN",{});var Xe=f(w);v(ne.$$.fragment,Xe),Xe.forEach(t),De.forEach(t),yt=d(ye),ke=s(ye,"SPAN",{"data-svelte-h":!0}),h(ke)!=="svelte-sef3tg"&&(ke.textContent=Xt),ye.forEach(t),et=d(e),I=s(e,"H2",{class:!0});var Te=f(I);U=s(Te,"A",{id:!0,class:!0,href:!0});var Ye=f(U);Ze=s(Ye,"SPAN",{});var Tn=f(Ze);v(oe.$$.fragment,Tn),Tn.forEach(t),Ye.forEach(t),Tt=d(Te),we=s(Te,"SPAN",{"data-svelte-h":!0}),h(we)!=="svelte-1jsw1pg"&&(we.textContent=Yt),Te.forEach(t),tt=d(e),se=s(e,"P",{"data-svelte-h":!0}),h(se)!=="svelte-s2n23o"&&(se.innerHTML=Kt),nt=d(e),ae=s(e,"P",{"data-svelte-h":!0}),h(ae)!=="svelte-axv494"&&(ae.textContent=en),ot=d(e),re=s(e,"P",{"data-svelte-h":!0}),h(re)!=="svelte-5o33hr"&&(re.innerHTML=tn),st=d(e),ie=s(e,"P",{"data-svelte-h":!0}),h(ie)!=="svelte-hb2xpj"&&(ie.textContent=nn),at=d(e),le=s(e,"UL",{"data-svelte-h":!0}),h(le)!=="svelte-1b6hj70"&&(le.innerHTML=on),rt=d(e),j=s(e,"H2",{class:!0});var gt=f(j);E=s(gt,"A",{id:!0,class:!0,href:!0});var kn=f(E);Ge=s(kn,"SPAN",{});var wn=f(Ge);v(de.$$.fragment,wn),wn.forEach(t),kn.forEach(t),kt=d(gt),Me=s(gt,"SPAN",{"data-svelte-h":!0}),h(Me)!=="svelte-1j8fwyy"&&(Me.textContent=sn),gt.forEach(t),it=d(e),$=s(e,"DIV",{class:!0});var D=f($);v(ce.$$.fragment,D),wt=d(D),$e=s(D,"P",{"data-svelte-h":!0}),h($e)!=="svelte-1xs40lc"&&($e.innerHTML=an),Mt=d(D),Ae=s(D,"P",{"data-svelte-h":!0}),h(Ae)!=="svelte-10kqkkl"&&(Ae.innerHTML=rn),$t=d(D),v(H.$$.fragment,D),D.forEach(t),lt=d(e),W=s(e,"H2",{class:!0});var _t=f(W);N=s(_t,"A",{id:!0,class:!0,href:!0});var Mn=f(N);Ve=s(Mn,"SPAN",{});var $n=f(Ve);v(pe.$$.fragment,$n),$n.forEach(t),Mn.forEach(t),At=d(_t),xe=s(_t,"SPAN",{"data-svelte-h":!0}),h(xe)!=="svelte-4hxfer"&&(xe.textContent=ln),_t.forEach(t),dt=d(e),A=s(e,"DIV",{class:!0});var X=f(A);v(me.$$.fragment,X),xt=d(X),ze=s(X,"P",{"data-svelte-h":!0}),h(ze)!=="svelte-16scib2"&&(ze.textContent=dn),zt=d(X),q=s(X,"DIV",{class:!0});var Ne=f(q);v(ue.$$.fragment,Ne),Pt=d(Ne),Pe=s(Ne,"P",{"data-svelte-h":!0}),h(Pe)!=="svelte-1noycua"&&(Pe.textContent=cn),Lt=d(Ne),Le=s(Ne,"UL",{"data-svelte-h":!0}),h(Le)!=="svelte-9q72go"&&(Le.innerHTML=pn),Ne.forEach(t),qt=d(X),S=s(X,"DIV",{class:!0});var vt=f(S);v(he.$$.fragment,vt),Jt=d(vt),qe=s(vt,"P",{"data-svelte-h":!0}),h(qe)!=="svelte-1f4f5kp"&&(qe.innerHTML=mn),vt.forEach(t),X.forEach(t),ct=d(e),F=s(e,"H2",{class:!0});var bt=f(F);Z=s(bt,"A",{id:!0,class:!0,href:!0});var An=f(Z);Re=s(An,"SPAN",{});var xn=f(Re);v(fe.$$.fragment,xn),xn.forEach(t),An.forEach(t),It=d(bt),Je=s(bt,"SPAN",{"data-svelte-h":!0}),h(Je)!=="svelte-cez8df"&&(Je.textContent=un),bt.forEach(t),pt=d(e),x=s(e,"DIV",{class:!0});var Y=f(x);v(ge.$$.fragment,Y),jt=d(Y),Ie=s(Y,"P",{"data-svelte-h":!0}),h(Ie)!=="svelte-vm2tc8"&&(Ie.innerHTML=hn),Wt=d(Y),je=s(Y,"P",{"data-svelte-h":!0}),h(je)!=="svelte-1o2yi3d"&&(je.innerHTML=fn),Ft=d(Y),P=s(Y,"DIV",{class:!0});var K=f(P);v(_e.$$.fragment,K),Bt=d(K),We=s(K,"P",{"data-svelte-h":!0}),h(We)!=="svelte-1axgwai"&&(We.innerHTML=gn),Ut=d(K),v(G.$$.fragment,K),Et=d(K),v(V.$$.fragment,K),K.forEach(t),Y.forEach(t),mt=d(e),B=s(e,"H2",{class:!0});var Ct=f(B);R=s(Ct,"A",{id:!0,class:!0,href:!0});var zn=f(R);Qe=s(zn,"SPAN",{});var Pn=f(Qe);v(ve.$$.fragment,Pn),Pn.forEach(t),zn.forEach(t),Ht=d(Ct),Fe=s(Ct,"SPAN",{"data-svelte-h":!0}),h(Fe)!=="svelte-1lt0b77"&&(Fe.textContent=_n),Ct.forEach(t),ut=d(e),M=s(e,"DIV",{class:!0});var J=f(M);v(be.$$.fragment,J),Nt=d(J),Be=s(J,"P",{"data-svelte-h":!0}),h(Be)!=="svelte-12po86d"&&(Be.textContent=vn),St=d(J),Ue=s(J,"P",{"data-svelte-h":!0}),h(Ue)!=="svelte-68lg8f"&&(Ue.innerHTML=bn),Zt=d(J),Ee=s(J,"P",{"data-svelte-h":!0}),h(Ee)!=="svelte-1o2yi3d"&&(Ee.innerHTML=Cn),Gt=d(J),L=s(J,"DIV",{class:!0});var ee=f(L);v(Ce.$$.fragment,ee),Vt=d(ee),He=s(ee,"P",{"data-svelte-h":!0}),h(He)!=="svelte-ml29rm"&&(He.innerHTML=yn),Rt=d(ee),v(Q.$$.fragment,ee),Qt=d(ee),v(O.$$.fragment,ee),ee.forEach(t),J.forEach(t),ht=d(e),Oe=s(e,"P",{}),f(Oe).forEach(t),this.h()},h(){p(r,"name","hf:doc:metadata"),p(r,"content",JSON.stringify(Sn)),p(a,"id","cpmant"),p(a,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(a,"href","#cpmant"),p(g,"class","relative group"),p(U,"id","overview"),p(U,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(U,"href","#overview"),p(I,"class","relative group"),p(E,"id","transformers.CpmAntConfig"),p(E,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(E,"href","#transformers.CpmAntConfig"),p(j,"class","relative group"),p($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(N,"id","transformers.CpmAntTokenizer"),p(N,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(N,"href","#transformers.CpmAntTokenizer"),p(W,"class","relative group"),p(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(Z,"id","transformers.CpmAntModel"),p(Z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(Z,"href","#transformers.CpmAntModel"),p(F,"class","relative group"),p(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(R,"id","transformers.CpmAntForCausalLM"),p(R,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),p(R,"href","#transformers.CpmAntForCausalLM"),p(B,"class","relative group"),p(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),p(M,"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,i){n(document.head,r),c(e,k,i),c(e,m,i),c(e,u,i),c(e,g,i),n(g,a),n(a,w),b(ne,w,null),n(g,yt),n(g,ke),c(e,et,i),c(e,I,i),n(I,U),n(U,Ze),b(oe,Ze,null),n(I,Tt),n(I,we),c(e,tt,i),c(e,se,i),c(e,nt,i),c(e,ae,i),c(e,ot,i),c(e,re,i),c(e,st,i),c(e,ie,i),c(e,at,i),c(e,le,i),c(e,rt,i),c(e,j,i),n(j,E),n(E,Ge),b(de,Ge,null),n(j,kt),n(j,Me),c(e,it,i),c(e,$,i),b(ce,$,null),n($,wt),n($,$e),n($,Mt),n($,Ae),n($,$t),b(H,$,null),c(e,lt,i),c(e,W,i),n(W,N),n(N,Ve),b(pe,Ve,null),n(W,At),n(W,xe),c(e,dt,i),c(e,A,i),b(me,A,null),n(A,xt),n(A,ze),n(A,zt),n(A,q),b(ue,q,null),n(q,Pt),n(q,Pe),n(q,Lt),n(q,Le),n(A,qt),n(A,S),b(he,S,null),n(S,Jt),n(S,qe),c(e,ct,i),c(e,F,i),n(F,Z),n(Z,Re),b(fe,Re,null),n(F,It),n(F,Je),c(e,pt,i),c(e,x,i),b(ge,x,null),n(x,jt),n(x,Ie),n(x,Wt),n(x,je),n(x,Ft),n(x,P),b(_e,P,null),n(P,Bt),n(P,We),n(P,Ut),b(G,P,null),n(P,Et),b(V,P,null),c(e,mt,i),c(e,B,i),n(B,R),n(R,Qe),b(ve,Qe,null),n(B,Ht),n(B,Fe),c(e,ut,i),c(e,M,i),b(be,M,null),n(M,Nt),n(M,Be),n(M,St),n(M,Ue),n(M,Zt),n(M,Ee),n(M,Gt),n(M,L),b(Ce,L,null),n(L,Vt),n(L,He),n(L,Rt),b(Q,L,null),n(L,Qt),b(O,L,null),c(e,ht,i),c(e,Oe,i),ft=!0},p(e,[i]){const ye={};i&2&&(ye.$$scope={dirty:i,ctx:e}),H.$set(ye);const De={};i&2&&(De.$$scope={dirty:i,ctx:e}),G.$set(De);const Xe={};i&2&&(Xe.$$scope={dirty:i,ctx:e}),V.$set(Xe);const Te={};i&2&&(Te.$$scope={dirty:i,ctx:e}),Q.$set(Te);const Ye={};i&2&&(Ye.$$scope={dirty:i,ctx:e}),O.$set(Ye)},i(e){ft||(C(ne.$$.fragment,e),C(oe.$$.fragment,e),C(de.$$.fragment,e),C(ce.$$.fragment,e),C(H.$$.fragment,e),C(pe.$$.fragment,e),C(me.$$.fragment,e),C(ue.$$.fragment,e),C(he.$$.fragment,e),C(fe.$$.fragment,e),C(ge.$$.fragment,e),C(_e.$$.fragment,e),C(G.$$.fragment,e),C(V.$$.fragment,e),C(ve.$$.fragment,e),C(be.$$.fragment,e),C(Ce.$$.fragment,e),C(Q.$$.fragment,e),C(O.$$.fragment,e),ft=!0)},o(e){y(ne.$$.fragment,e),y(oe.$$.fragment,e),y(de.$$.fragment,e),y(ce.$$.fragment,e),y(H.$$.fragment,e),y(pe.$$.fragment,e),y(me.$$.fragment,e),y(ue.$$.fragment,e),y(he.$$.fragment,e),y(fe.$$.fragment,e),y(ge.$$.fragment,e),y(_e.$$.fragment,e),y(G.$$.fragment,e),y(V.$$.fragment,e),y(ve.$$.fragment,e),y(be.$$.fragment,e),y(Ce.$$.fragment,e),y(Q.$$.fragment,e),y(O.$$.fragment,e),ft=!1},d(e){e&&(t(k),t(m),t(u),t(g),t(et),t(I),t(tt),t(se),t(nt),t(ae),t(ot),t(re),t(st),t(ie),t(at),t(le),t(rt),t(j),t(it),t($),t(lt),t(W),t(dt),t(A),t(ct),t(F),t(pt),t(x),t(mt),t(B),t(ut),t(M),t(ht),t(Oe)),t(r),T(ne),T(oe),T(de),T(ce),T(H),T(pe),T(me),T(ue),T(he),T(fe),T(ge),T(_e),T(G),T(V),T(ve),T(be),T(Ce),T(Q),T(O)}}}const Sn={local:"cpmant",sections:[{local:"overview",title:"Overview"},{local:"transformers.CpmAntConfig",title:"CpmAntConfig"},{local:"transformers.CpmAntTokenizer",title:"CpmAntTokenizer"},{local:"transformers.CpmAntModel",title:"CpmAntModel"},{local:"transformers.CpmAntForCausalLM",title:"CpmAntForCausalLM"}],title:"CPMAnt"};function Zn(z){return Jn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yn extends In{constructor(r){super(),jn(this,r,Zn,Nn,qn,{})}}export{Yn as component};
