import{s as Jt,o as It,n as Ne}from"../chunks/scheduler.bdbef820.js";import{S as Wt,i as Ht,g as i,s as o,r as p,A as Ut,h as d,f as a,c as s,j as J,u as m,x as _,k as I,y as n,a as c,v as u,d as h,t as f,w as g}from"../chunks/index.33f81d56.js";import{T as qt}from"../chunks/Tip.34194030.js";import{D as R}from"../chunks/Docstring.662771b3.js";import{C as Bt}from"../chunks/CodeBlock.3bad7fc9.js";import{E as Ft}from"../chunks/ExampleCodeBlock.32707fc1.js";import{H as le,E as Et}from"../chunks/index.e01163b6.js";function Ot(P){let r,T="Example:",l,C,M;return C=new Bt({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=i("p"),r.textContent=T,l=o(),p(C.$$.fragment)},l(b){r=d(b,"P",{"data-svelte-h":!0}),_(r)!=="svelte-11lpom8"&&(r.textContent=T),l=s(b),m(C.$$.fragment,b)},m(b,A){c(b,r,A),c(b,l,A),u(C,b,A),M=!0},p:Ne,i(b){M||(h(C.$$.fragment,b),M=!0)},o(b){f(C.$$.fragment,b),M=!1},d(b){b&&(a(r),a(l)),g(C,b)}}}function Nt(P){let r,T=`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=i("p"),r.innerHTML=T},l(l){r=d(l,"P",{"data-svelte-h":!0}),_(r)!=="svelte-fincs2"&&(r.innerHTML=T)},m(l,C){c(l,r,C)},p:Ne,d(l){l&&a(r)}}}function Rt(P){let r,T=`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=i("p"),r.innerHTML=T},l(l){r=d(l,"P",{"data-svelte-h":!0}),_(r)!=="svelte-fincs2"&&(r.innerHTML=T)},m(l,C){c(l,r,C)},p:Ne,d(l){l&&a(r)}}}function Gt(P){let r,T;return r=new Bt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENQTUFudFRva2VuaXplciUyQyUyMENwbUFudEZvckNhdXNhbExNJTBBJTBBdGV4dHMlMjAlM0QlMjAlMjIlRTQlQkIlOEElRTUlQTQlQTklRTUlQTQlQTklRTYlQjAlOTQlRTQlQjglOEQlRTklOTQlOTklRUYlQkMlOEMlMjIlMEFtb2RlbCUyMCUzRCUyMENwbUFudEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYm1iJTJGY3BtLWFudC0xMGIlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQ1BNQW50VG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYm1iJTJGY3BtLWFudC0xMGIlMjIpJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHRzJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dF9pZHMpJTBBb3V0cHV0X3RleHRzJTIwJTNEJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZShvdXRwdXRzKSUwQXByaW50KG91dHB1dF90ZXh0cyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CPMAntTokenizer, CpmAntForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>texts = <span class="hljs-string">&quot;今天天气不错，&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>tokenizer = CPMAntTokenizer.from_pretrained(<span class="hljs-string">&quot;openbmb/cpm-ant-10b&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(texts, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model.generate(**input_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>output_texts = tokenizer.batch_decode(outputs)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(output_texts)
[<span class="hljs-string">&#x27;今天天气不错，阳光明媚，我和妈妈一起去超市买东西。\\n在超市里，我看到了一个很好玩的玩具，它的名字叫“机器人”。它有一个圆圆的脑袋，两只圆圆的眼睛，还有一个圆圆的&#x27;</span>]`,wrap:!1}}),{c(){p(r.$$.fragment)},l(l){m(r.$$.fragment,l)},m(l,C){u(r,l,C),T=!0},p:Ne,i(l){T||(h(r.$$.fragment,l),T=!0)},o(l){f(r.$$.fragment,l),T=!1},d(l){g(r,l)}}}function Zt(P){let r,T,l,C,M,b,A,Ae,G,ht='CPM-Ant は、10B パラメータを備えたオープンソースの中国語の事前トレーニング済み言語モデル (PLM) です。これは、CPM-Live のライブ トレーニング プロセスの最初のマイルストーンでもあります。トレーニングプロセスは費用対効果が高く、環境に優しいものです。 CPM-Ant は、CUGE ベンチマークでのデルタ チューニングでも有望な結果を達成しています。フル モデルに加えて、さまざまなハードウェア構成の要件を満たすさまざまな圧縮バージョンも提供しています。 <a href="https://github.com/OpenBMB/CPM-Live/tree/cpm-ant/cpm-live" rel="nofollow">詳細を見る</a>',ze,Z,ft='このモデルは <a href="https://huggingface.co/openbmb" rel="nofollow">OpenBMB</a> によって提供されました。元のコードは <a href="https://github.com/OpenBMB/CPM-Live/tree/cpm-ant/cpm-live" rel="nofollow">ここ</a> にあります。',Le,D,Pe,Q,gt='<li><a href="https://github.com/OpenBMB/CPM-Live/tree/cpm-ant/cpm-live" rel="nofollow">CPM-Live</a> に関するチュートリアル。</li>',je,S,qe,$,V,Re,ce,_t=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/ja/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.`,Ge,pe,bt=`Configuration objects inherit from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/main/ja/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ze,H,Fe,X,Be,w,Y,De,me,Tt="Construct a CPMAnt tokenizer. Based on byte-level Byte-Pair-Encoding.",Qe,j,K,Se,ue,Ct=`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:`,Ve,he,kt="<li>single sequence: <code>[BOS] Sequence</code>.</li>",Xe,U,ee,Ye,fe,vt=`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.`,Je,te,Ie,v,ne,Ke,ge,yt="The bare Cpmant Model outputting raw hidden-states without any specific head on top.",et,_e,$t=`This model inherits from <a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,tt,be,wt=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,nt,q,oe,ot,Te,Mt='The <a href="/docs/transformers/main/ja/model_doc/cpmant#transformers.CpmAntModel">CpmAntModel</a> forward method, overrides the <code>__call__</code> special method.',st,E,We,se,He,y,ae,at,Ce,xt="The CPMAnt Model with a language modeling head on top (linear layer with weights tied to the input embeddings).",rt,ke,At=`This model inherits from <a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,it,ve,zt=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,dt,k,re,lt,ye,Lt='The <a href="/docs/transformers/main/ja/model_doc/cpmant#transformers.CpmAntForCausalLM">CpmAntForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',ct,O,pt,$e,Pt="Example:",mt,we,jt="Text Generation with CpmAntForCausalLM.",ut,N,Ue,ie,Ee,xe,Oe;return M=new le({props:{title:"CPMAnt",local:"cpmant",headingTag:"h1"}}),A=new le({props:{title:"Overview",local:"overview",headingTag:"h2"}}),D=new le({props:{title:"Resources",local:"resources",headingTag:"h2"}}),S=new le({props:{title:"CpmAntConfig",local:"transformers.CpmAntConfig",headingTag:"h2"}}),V=new R({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/main/ja/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.0) &#x2014;
The dropout probability 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-06) &#x2014;
The epsilon used by the layer normalization layers.`,name:"eps"},{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"},{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"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cpmant/configuration_cpmant.py#L24"}}),H=new Ft({props:{anchor:"transformers.CpmAntConfig.example",$$slots:{default:[Ot]},$$scope:{ctx:P}}}),X=new le({props:{title:"CpmAntTokenizer",local:"transformers.CpmAntTokenizer",headingTag:"h2"}}),Y=new R({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/main/src/transformers/models/cpmant/tokenization_cpmant.py#L79"}}),K=new R({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.Optional[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/main/src/transformers/models/cpmant/tokenization_cpmant.py#L225",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The model input with special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),ee=new R({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/main/src/transformers/models/cpmant/tokenization_cpmant.py#L245",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


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


<p><code>List[int]</code></p>
`}}),te=new le({props:{title:"CpmAntModel",local:"transformers.CpmAntModel",headingTag:"h2"}}),ne=new R({props:{name:"class transformers.CpmAntModel",anchor:"transformers.CpmAntModel",parameters:[{name:"config",val:": CpmAntConfig"}],parametersDescription:[{anchor:"transformers.CpmAntModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ja/model_doc/cpmant#transformers.CpmAntConfig">CpmAntConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cpmant/modeling_cpmant.py#L547"}}),oe=new R({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/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.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. See <code>attentions</code> under returned
tensors for more detail.`,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. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.CpmAntModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[torch.Tensor]]</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <code>Cache</code> instance, see our <a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>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>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,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.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cpmant/modeling_cpmant.py#L586",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ja/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/main/ja/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ja/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast"
>transformers.modeling_outputs.BaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),E=new qt({props:{$$slots:{default:[Nt]},$$scope:{ctx:P}}}),se=new le({props:{title:"CpmAntForCausalLM",local:"transformers.CpmAntForCausalLM",headingTag:"h2"}}),ae=new R({props:{name:"class transformers.CpmAntForCausalLM",anchor:"transformers.CpmAntForCausalLM",parameters:[{name:"config",val:": CpmAntConfig"}],parametersDescription:[{anchor:"transformers.CpmAntForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/ja/model_doc/cpmant#transformers.CpmAntConfig">CpmAntConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/ja/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cpmant/modeling_cpmant.py#L693"}}),re=new R({props:{name:"forward",anchor:"transformers.CpmAntForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[typing.Tuple[torch.Tensor, torch.Tensor]]] = 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/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/ja/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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>List[Tuple[torch.Tensor, torch.Tensor]]</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <code>Cache</code> instance, see our <a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>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>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,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. See <code>attentions</code> under returned
tensors for more detail.`,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. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.CpmAntForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss.`,name:"labels"},{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/main/ja/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.CpmAntForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/cpmant/modeling_cpmant.py#L711",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/ja/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/main/ja/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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/ja/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),O=new qt({props:{$$slots:{default:[Rt]},$$scope:{ctx:P}}}),N=new Ft({props:{anchor:"transformers.CpmAntForCausalLM.forward.example",$$slots:{default:[Gt]},$$scope:{ctx:P}}}),ie=new Et({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/ja/model_doc/cpmant.md"}}),{c(){r=i("meta"),T=o(),l=i("p"),C=o(),p(M.$$.fragment),b=o(),p(A.$$.fragment),Ae=o(),G=i("p"),G.innerHTML=ht,ze=o(),Z=i("p"),Z.innerHTML=ft,Le=o(),p(D.$$.fragment),Pe=o(),Q=i("ul"),Q.innerHTML=gt,je=o(),p(S.$$.fragment),qe=o(),$=i("div"),p(V.$$.fragment),Re=o(),ce=i("p"),ce.innerHTML=_t,Ge=o(),pe=i("p"),pe.innerHTML=bt,Ze=o(),p(H.$$.fragment),Fe=o(),p(X.$$.fragment),Be=o(),w=i("div"),p(Y.$$.fragment),De=o(),me=i("p"),me.textContent=Tt,Qe=o(),j=i("div"),p(K.$$.fragment),Se=o(),ue=i("p"),ue.textContent=Ct,Ve=o(),he=i("ul"),he.innerHTML=kt,Xe=o(),U=i("div"),p(ee.$$.fragment),Ye=o(),fe=i("p"),fe.innerHTML=vt,Je=o(),p(te.$$.fragment),Ie=o(),v=i("div"),p(ne.$$.fragment),Ke=o(),ge=i("p"),ge.textContent=yt,et=o(),_e=i("p"),_e.innerHTML=$t,tt=o(),be=i("p"),be.innerHTML=wt,nt=o(),q=i("div"),p(oe.$$.fragment),ot=o(),Te=i("p"),Te.innerHTML=Mt,st=o(),p(E.$$.fragment),We=o(),p(se.$$.fragment),He=o(),y=i("div"),p(ae.$$.fragment),at=o(),Ce=i("p"),Ce.textContent=xt,rt=o(),ke=i("p"),ke.innerHTML=At,it=o(),ve=i("p"),ve.innerHTML=zt,dt=o(),k=i("div"),p(re.$$.fragment),lt=o(),ye=i("p"),ye.innerHTML=Lt,ct=o(),p(O.$$.fragment),pt=o(),$e=i("p"),$e.textContent=Pt,mt=o(),we=i("p"),we.textContent=jt,ut=o(),p(N.$$.fragment),Ue=o(),p(ie.$$.fragment),Ee=o(),xe=i("p"),this.h()},l(e){const t=Ut("svelte-u9bgzb",document.head);r=d(t,"META",{name:!0,content:!0}),t.forEach(a),T=s(e),l=d(e,"P",{}),J(l).forEach(a),C=s(e),m(M.$$.fragment,e),b=s(e),m(A.$$.fragment,e),Ae=s(e),G=d(e,"P",{"data-svelte-h":!0}),_(G)!=="svelte-1u8yeuk"&&(G.innerHTML=ht),ze=s(e),Z=d(e,"P",{"data-svelte-h":!0}),_(Z)!=="svelte-56e9ul"&&(Z.innerHTML=ft),Le=s(e),m(D.$$.fragment,e),Pe=s(e),Q=d(e,"UL",{"data-svelte-h":!0}),_(Q)!=="svelte-zuce7s"&&(Q.innerHTML=gt),je=s(e),m(S.$$.fragment,e),qe=s(e),$=d(e,"DIV",{class:!0});var z=J($);m(V.$$.fragment,z),Re=s(z),ce=d(z,"P",{"data-svelte-h":!0}),_(ce)!=="svelte-f7p6ow"&&(ce.innerHTML=_t),Ge=s(z),pe=d(z,"P",{"data-svelte-h":!0}),_(pe)!=="svelte-1s6wgpv"&&(pe.innerHTML=bt),Ze=s(z),m(H.$$.fragment,z),z.forEach(a),Fe=s(e),m(X.$$.fragment,e),Be=s(e),w=d(e,"DIV",{class:!0});var L=J(w);m(Y.$$.fragment,L),De=s(L),me=d(L,"P",{"data-svelte-h":!0}),_(me)!=="svelte-16scib2"&&(me.textContent=Tt),Qe=s(L),j=d(L,"DIV",{class:!0});var W=J(j);m(K.$$.fragment,W),Se=s(W),ue=d(W,"P",{"data-svelte-h":!0}),_(ue)!=="svelte-1noycua"&&(ue.textContent=Ct),Ve=s(W),he=d(W,"UL",{"data-svelte-h":!0}),_(he)!=="svelte-9q72go"&&(he.innerHTML=kt),W.forEach(a),Xe=s(L),U=d(L,"DIV",{class:!0});var de=J(U);m(ee.$$.fragment,de),Ye=s(de),fe=d(de,"P",{"data-svelte-h":!0}),_(fe)!=="svelte-1f4f5kp"&&(fe.innerHTML=vt),de.forEach(a),L.forEach(a),Je=s(e),m(te.$$.fragment,e),Ie=s(e),v=d(e,"DIV",{class:!0});var F=J(v);m(ne.$$.fragment,F),Ke=s(F),ge=d(F,"P",{"data-svelte-h":!0}),_(ge)!=="svelte-oq06uz"&&(ge.textContent=yt),et=s(F),_e=d(F,"P",{"data-svelte-h":!0}),_(_e)!=="svelte-eisylu"&&(_e.innerHTML=$t),tt=s(F),be=d(F,"P",{"data-svelte-h":!0}),_(be)!=="svelte-hswkmf"&&(be.innerHTML=wt),nt=s(F),q=d(F,"DIV",{class:!0});var Me=J(q);m(oe.$$.fragment,Me),ot=s(Me),Te=d(Me,"P",{"data-svelte-h":!0}),_(Te)!=="svelte-1sbwvmg"&&(Te.innerHTML=Mt),st=s(Me),m(E.$$.fragment,Me),Me.forEach(a),F.forEach(a),We=s(e),m(se.$$.fragment,e),He=s(e),y=d(e,"DIV",{class:!0});var B=J(y);m(ae.$$.fragment,B),at=s(B),Ce=d(B,"P",{"data-svelte-h":!0}),_(Ce)!=="svelte-12po86d"&&(Ce.textContent=xt),rt=s(B),ke=d(B,"P",{"data-svelte-h":!0}),_(ke)!=="svelte-eisylu"&&(ke.innerHTML=At),it=s(B),ve=d(B,"P",{"data-svelte-h":!0}),_(ve)!=="svelte-hswkmf"&&(ve.innerHTML=zt),dt=s(B),k=d(B,"DIV",{class:!0});var x=J(k);m(re.$$.fragment,x),lt=s(x),ye=d(x,"P",{"data-svelte-h":!0}),_(ye)!=="svelte-1pkdfn4"&&(ye.innerHTML=Lt),ct=s(x),m(O.$$.fragment,x),pt=s(x),$e=d(x,"P",{"data-svelte-h":!0}),_($e)!=="svelte-11lpom8"&&($e.textContent=Pt),mt=s(x),we=d(x,"P",{"data-svelte-h":!0}),_(we)!=="svelte-ri92c5"&&(we.textContent=jt),ut=s(x),m(N.$$.fragment,x),x.forEach(a),B.forEach(a),Ue=s(e),m(ie.$$.fragment,e),Ee=s(e),xe=d(e,"P",{}),J(xe).forEach(a),this.h()},h(){I(r,"name","hf:doc:metadata"),I(r,"content",Dt),I($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(y,"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){n(document.head,r),c(e,T,t),c(e,l,t),c(e,C,t),u(M,e,t),c(e,b,t),u(A,e,t),c(e,Ae,t),c(e,G,t),c(e,ze,t),c(e,Z,t),c(e,Le,t),u(D,e,t),c(e,Pe,t),c(e,Q,t),c(e,je,t),u(S,e,t),c(e,qe,t),c(e,$,t),u(V,$,null),n($,Re),n($,ce),n($,Ge),n($,pe),n($,Ze),u(H,$,null),c(e,Fe,t),u(X,e,t),c(e,Be,t),c(e,w,t),u(Y,w,null),n(w,De),n(w,me),n(w,Qe),n(w,j),u(K,j,null),n(j,Se),n(j,ue),n(j,Ve),n(j,he),n(w,Xe),n(w,U),u(ee,U,null),n(U,Ye),n(U,fe),c(e,Je,t),u(te,e,t),c(e,Ie,t),c(e,v,t),u(ne,v,null),n(v,Ke),n(v,ge),n(v,et),n(v,_e),n(v,tt),n(v,be),n(v,nt),n(v,q),u(oe,q,null),n(q,ot),n(q,Te),n(q,st),u(E,q,null),c(e,We,t),u(se,e,t),c(e,He,t),c(e,y,t),u(ae,y,null),n(y,at),n(y,Ce),n(y,rt),n(y,ke),n(y,it),n(y,ve),n(y,dt),n(y,k),u(re,k,null),n(k,lt),n(k,ye),n(k,ct),u(O,k,null),n(k,pt),n(k,$e),n(k,mt),n(k,we),n(k,ut),u(N,k,null),c(e,Ue,t),u(ie,e,t),c(e,Ee,t),c(e,xe,t),Oe=!0},p(e,[t]){const z={};t&2&&(z.$$scope={dirty:t,ctx:e}),H.$set(z);const L={};t&2&&(L.$$scope={dirty:t,ctx:e}),E.$set(L);const W={};t&2&&(W.$$scope={dirty:t,ctx:e}),O.$set(W);const de={};t&2&&(de.$$scope={dirty:t,ctx:e}),N.$set(de)},i(e){Oe||(h(M.$$.fragment,e),h(A.$$.fragment,e),h(D.$$.fragment,e),h(S.$$.fragment,e),h(V.$$.fragment,e),h(H.$$.fragment,e),h(X.$$.fragment,e),h(Y.$$.fragment,e),h(K.$$.fragment,e),h(ee.$$.fragment,e),h(te.$$.fragment,e),h(ne.$$.fragment,e),h(oe.$$.fragment,e),h(E.$$.fragment,e),h(se.$$.fragment,e),h(ae.$$.fragment,e),h(re.$$.fragment,e),h(O.$$.fragment,e),h(N.$$.fragment,e),h(ie.$$.fragment,e),Oe=!0)},o(e){f(M.$$.fragment,e),f(A.$$.fragment,e),f(D.$$.fragment,e),f(S.$$.fragment,e),f(V.$$.fragment,e),f(H.$$.fragment,e),f(X.$$.fragment,e),f(Y.$$.fragment,e),f(K.$$.fragment,e),f(ee.$$.fragment,e),f(te.$$.fragment,e),f(ne.$$.fragment,e),f(oe.$$.fragment,e),f(E.$$.fragment,e),f(se.$$.fragment,e),f(ae.$$.fragment,e),f(re.$$.fragment,e),f(O.$$.fragment,e),f(N.$$.fragment,e),f(ie.$$.fragment,e),Oe=!1},d(e){e&&(a(T),a(l),a(C),a(b),a(Ae),a(G),a(ze),a(Z),a(Le),a(Pe),a(Q),a(je),a(qe),a($),a(Fe),a(Be),a(w),a(Je),a(Ie),a(v),a(We),a(He),a(y),a(Ue),a(Ee),a(xe)),a(r),g(M,e),g(A,e),g(D,e),g(S,e),g(V),g(H),g(X,e),g(Y),g(K),g(ee),g(te,e),g(ne),g(oe),g(E),g(se,e),g(ae),g(re),g(O),g(N),g(ie,e)}}}const Dt='{"title":"CPMAnt","local":"cpmant","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"CpmAntConfig","local":"transformers.CpmAntConfig","sections":[],"depth":2},{"title":"CpmAntTokenizer","local":"transformers.CpmAntTokenizer","sections":[],"depth":2},{"title":"CpmAntModel","local":"transformers.CpmAntModel","sections":[],"depth":2},{"title":"CpmAntForCausalLM","local":"transformers.CpmAntForCausalLM","sections":[],"depth":2}],"depth":1}';function Qt(P){return It(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class nn extends Wt{constructor(r){super(),Ht(this,r,Qt,Zt,Jt,{})}}export{nn as component};
