Buckets:
| import{s as zt,o as Lt,n as we}from"../chunks/scheduler.25b97de1.js";import{S as Pt,i as qt,g as p,s as a,r as u,A as Jt,h as m,f as s,c as r,j as I,u as f,x as C,k as W,y as i,a as l,v as h,d as g,t as _,w as b}from"../chunks/index.d9030fc9.js";import{T as xt}from"../chunks/Tip.baa67368.js";import{D as N}from"../chunks/Docstring.ffac8efa.js";import{C as pt}from"../chunks/CodeBlock.e6cd0d95.js";import{E as ct}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as pe,E as Bt}from"../chunks/EditOnGithub.91d95064.js";function It(A){let t,k="Example:",d,c,T;return c=new pt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENwbUFudE1vZGVsJTJDJTIwQ3BtQW50Q29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMENQTUFudCUyMGNwbS1hbnQtMTBiJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMENwbUFudENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMGNwbS1hbnQtMTBiJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBDcG1BbnRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CpmAntModel, CpmAntConfig | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Initializing a CPMAnt cpm-ant-10b style configuration</span> | |
| <span class="hljs-meta">>>> </span>configuration = CpmAntConfig() | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Initializing a model from the cpm-ant-10b style configuration</span> | |
| <span class="hljs-meta">>>> </span>model = CpmAntModel(configuration) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Accessing the model configuration</span> | |
| <span class="hljs-meta">>>> </span>configuration = model.config`,wrap:!1}}),{c(){t=p("p"),t.textContent=k,d=a(),u(c.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=k),d=r(n),f(c.$$.fragment,n)},m(n,v){l(n,t,v),l(n,d,v),h(c,n,v),T=!0},p:we,i(n){T||(g(c.$$.fragment,n),T=!0)},o(n){_(c.$$.fragment,n),T=!1},d(n){n&&(s(t),s(d)),b(c,n)}}}function Wt(A){let t,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(){t=p("p"),t.innerHTML=k},l(d){t=m(d,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=k)},m(d,c){l(d,t,c)},p:we,d(d){d&&s(t)}}}function jt(A){let t,k="Example:",d,c,T;return c=new pt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDcG1BbnRNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmJtYiUyRmNwbS1hbnQtMTBiJTIyKSUwQW1vZGVsJTIwJTNEJTIwQ3BtQW50TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5ibWIlMkZjcG0tYW50LTEwYiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CpmAntModel | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">"openbmb/cpm-ant-10b"</span>) | |
| <span class="hljs-meta">>>> </span>model = CpmAntModel.from_pretrained(<span class="hljs-string">"openbmb/cpm-ant-10b"</span>) | |
| <span class="hljs-meta">>>> </span>inputs = tokenizer(<span class="hljs-string">"Hello, my dog is cute"</span>, return_tensors=<span class="hljs-string">"pt"</span>) | |
| <span class="hljs-meta">>>> </span>outputs = model(**inputs) | |
| <span class="hljs-meta">>>> </span>last_hidden_states = outputs.last_hidden_state`,wrap:!1}}),{c(){t=p("p"),t.textContent=k,d=a(),u(c.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=k),d=r(n),f(c.$$.fragment,n)},m(n,v){l(n,t,v),l(n,d,v),h(c,n,v),T=!0},p:we,i(n){T||(g(c.$$.fragment,n),T=!0)},o(n){_(c.$$.fragment,n),T=!1},d(n){n&&(s(t),s(d)),b(c,n)}}}function Ut(A){let t,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(){t=p("p"),t.innerHTML=k},l(d){t=m(d,"P",{"data-svelte-h":!0}),C(t)!=="svelte-fincs2"&&(t.innerHTML=k)},m(d,c){l(d,t,c)},p:we,d(d){d&&s(t)}}}function Ft(A){let t,k="Example:",d,c,T;return c=new pt({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMENwbUFudEZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyb3BlbmJtYiUyRmNwbS1hbnQtMTBiJTIyKSUwQW1vZGVsJTIwJTNEJTIwQ3BtQW50Rm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMm9wZW5ibWIlMkZjcG0tYW50LTEwYiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">import</span> torch | |
| <span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CpmAntForCausalLM | |
| <span class="hljs-meta">>>> </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">"openbmb/cpm-ant-10b"</span>) | |
| <span class="hljs-meta">>>> </span>model = CpmAntForCausalLM.from_pretrained(<span class="hljs-string">"openbmb/cpm-ant-10b"</span>) | |
| <span class="hljs-meta">>>> </span>inputs = tokenizer(<span class="hljs-string">"Hello, my dog is cute"</span>, return_tensors=<span class="hljs-string">"pt"</span>) | |
| <span class="hljs-meta">>>> </span>outputs = model(**inputs, labels=inputs[<span class="hljs-string">"input_ids"</span>]) | |
| <span class="hljs-meta">>>> </span>loss = outputs.loss | |
| <span class="hljs-meta">>>> </span>logits = outputs.logits`,wrap:!1}}),{c(){t=p("p"),t.textContent=k,d=a(),u(c.$$.fragment)},l(n){t=m(n,"P",{"data-svelte-h":!0}),C(t)!=="svelte-11lpom8"&&(t.textContent=k),d=r(n),f(c.$$.fragment,n)},m(n,v){l(n,t,v),l(n,d,v),h(c,n,v),T=!0},p:we,i(n){T||(g(c.$$.fragment,n),T=!0)},o(n){_(c.$$.fragment,n),T=!1},d(n){n&&(s(t),s(d)),b(c,n)}}}function Ht(A){let t,k,d,c,T,n,v,Ae,O,mt='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>',xe,Q,ut='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>.',ze,S,Le,D,ft='<li>A tutorial on <a href="https://github.com/OpenBMB/CPM-Live/tree/cpm-ant/cpm-live" rel="nofollow">CPM-Live</a>.</li>',Pe,X,qe,y,Y,Ge,me,ht=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_33915/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.`,Ze,ue,gt=`Configuration objects inherit from <a href="/docs/transformers/pr_33915/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/pr_33915/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ve,U,Je,K,Be,M,ee,Re,fe,_t="Construct a CPMAnt tokenizer. Based on byte-level Byte-Pair-Encoding.",Ne,J,te,Oe,he,bt=`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:`,Qe,ge,Tt="<li>single sequence: <code>[BOS] Sequence</code>.</li>",Se,F,ne,De,_e,Ct=`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.`,Ie,oe,We,w,se,Xe,be,kt=`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.`,Ye,Te,vt=`Parameters | |
| config (<a href="/docs/transformers/pr_33915/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/pr_33915/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,Ke,x,ae,et,Ce,$t='The <a href="/docs/transformers/pr_33915/en/model_doc/cpmant#transformers.CpmAntModel">CpmAntModel</a> forward method, overrides the <code>__call__</code> special method.',tt,H,nt,E,je,re,Ue,$,ie,ot,ke,yt="The CPMAnt Model with a language modeling head on top (linear layer with weights tied to the input embeddings).",st,ve,Mt=`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.`,at,$e,wt=`Parameters | |
| config (<a href="/docs/transformers/pr_33915/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/pr_33915/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,rt,z,le,it,ye,At='The <a href="/docs/transformers/pr_33915/en/model_doc/cpmant#transformers.CpmAntForCausalLM">CpmAntForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',lt,G,dt,Z,Fe,de,He,Me,Ee;return T=new pe({props:{title:"CPMAnt",local:"cpmant",headingTag:"h1"}}),v=new pe({props:{title:"Overview",local:"overview",headingTag:"h2"}}),S=new pe({props:{title:"Resources",local:"resources",headingTag:"h2"}}),X=new pe({props:{title:"CpmAntConfig",local:"transformers.CpmAntConfig",headingTag:"h2"}}),Y=new N({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) — | |
| 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/pr_33915/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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| Dimension of the “intermediate” (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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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) — | |
| 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>) — | |
| Whether to use cache.`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/vr_33915/src/transformers/models/cpmant/configuration_cpmant.py#L24"}}),U=new ct({props:{anchor:"transformers.CpmAntConfig.example",$$slots:{default:[It]},$$scope:{ctx:A}}}),K=new pe({props:{title:"CpmAntTokenizer",local:"transformers.CpmAntTokenizer",headingTag:"h2"}}),ee=new N({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>) — | |
| 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>"<d>"</code>) — | |
| 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>"</d>"</code>) — | |
| 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>"<s>"</code>) — | |
| 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>"</s>"</code>) — | |
| 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>"<pad>"</code>) — | |
| 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>"<unk>"</code>) — | |
| 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>"</n>"</code>) — | |
| 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>"</_>"</code>) — | |
| The space token.`,name:"space_token"}],source:"https://github.com/huggingface/transformers/blob/vr_33915/src/transformers/models/cpmant/tokenization_cpmant.py#L79"}}),te=new N({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.CpmAntTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": List = None"}],parametersDescription:[{anchor:"transformers.CpmAntTokenizer.build_inputs_with_special_tokens.token_ids_0",description:"<strong>token_ids_0</strong> (<code>List[int]</code>) — 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>) — The optional second tokenized sequence that special tokens will be added.",name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/vr_33915/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> | |
| `}}),ne=new N({props:{name:"get_special_tokens_mask",anchor:"transformers.CpmAntTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = 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>) — 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>) — 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>) — | |
| 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/vr_33915/src/transformers/models/cpmant/tokenization_cpmant.py#L243",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> | |
| `}}),oe=new pe({props:{title:"CpmAntModel",local:"transformers.CpmAntModel",headingTag:"h2"}}),se=new N({props:{name:"class transformers.CpmAntModel",anchor:"transformers.CpmAntModel",parameters:[{name:"config",val:": CpmAntConfig"}],source:"https://github.com/huggingface/transformers/blob/vr_33915/src/transformers/models/cpmant/modeling_cpmant.py#L589"}}),ae=new N({props:{name:"forward",anchor:"transformers.CpmAntModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"return_dict",val:": Optional = 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>) — | |
| Indices of input sequence tokens in the vocabulary.</p> | |
| <p>Indices can be obtained using <code>CPMAntTokenizer</code>. See <a href="/docs/transformers/pr_33915/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and | |
| <a href="/docs/transformers/pr_33915/en/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.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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_33915/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_33915/src/transformers/models/cpmant/modeling_cpmant.py#L631",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A <a | |
| href="/docs/transformers/pr_33915/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/pr_33915/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:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/transformers/pr_33915/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast" | |
| >transformers.modeling_outputs.BaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),H=new xt({props:{$$slots:{default:[Wt]},$$scope:{ctx:A}}}),E=new ct({props:{anchor:"transformers.CpmAntModel.forward.example",$$slots:{default:[jt]},$$scope:{ctx:A}}}),re=new pe({props:{title:"CpmAntForCausalLM",local:"transformers.CpmAntForCausalLM",headingTag:"h2"}}),ie=new N({props:{name:"class transformers.CpmAntForCausalLM",anchor:"transformers.CpmAntForCausalLM",parameters:[{name:"config",val:": CpmAntConfig"}],source:"https://github.com/huggingface/transformers/blob/vr_33915/src/transformers/models/cpmant/modeling_cpmant.py#L734"}}),le=new N({props:{name:"forward",anchor:"transformers.CpmAntForCausalLM.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"attention_mask",val:": Optional = 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>) — | |
| Indices of input sequence tokens in the vocabulary.</p> | |
| <p>Indices can be obtained using <code>CPMAntTokenizer</code>. See <a href="/docs/transformers/pr_33915/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and | |
| <a href="/docs/transformers/pr_33915/en/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>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.`,name:"past_key_values"},{anchor:"transformers.CpmAntForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<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>).`,name:"use_cache"},{anchor:"transformers.CpmAntForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) — | |
| 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>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_33915/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.</p> | |
| <p>Args — | |
| 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/pr_33915/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and | |
| <a href="/docs/transformers/pr_33915/en/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> | |
| 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/pr_33915/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 —`,name:"return_dict"},{anchor:"transformers.CpmAntForCausalLM.forward.Text",description:"<strong>Text</strong> Generation with CpmAntForCausalLM. —",name:"Text"}],source:"https://github.com/huggingface/transformers/blob/vr_33915/src/transformers/models/cpmant/modeling_cpmant.py#L753",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A <a | |
| href="/docs/transformers/pr_33915/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/pr_33915/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:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/transformers/pr_33915/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast" | |
| >transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),G=new xt({props:{$$slots:{default:[Ut]},$$scope:{ctx:A}}}),Z=new ct({props:{anchor:"transformers.CpmAntForCausalLM.forward.example",$$slots:{default:[Ft]},$$scope:{ctx:A}}}),de=new Bt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/cpmant.md"}}),{c(){t=p("meta"),k=a(),d=p("p"),c=a(),u(T.$$.fragment),n=a(),u(v.$$.fragment),Ae=a(),O=p("p"),O.innerHTML=mt,xe=a(),Q=p("p"),Q.innerHTML=ut,ze=a(),u(S.$$.fragment),Le=a(),D=p("ul"),D.innerHTML=ft,Pe=a(),u(X.$$.fragment),qe=a(),y=p("div"),u(Y.$$.fragment),Ge=a(),me=p("p"),me.innerHTML=ht,Ze=a(),ue=p("p"),ue.innerHTML=gt,Ve=a(),u(U.$$.fragment),Je=a(),u(K.$$.fragment),Be=a(),M=p("div"),u(ee.$$.fragment),Re=a(),fe=p("p"),fe.textContent=_t,Ne=a(),J=p("div"),u(te.$$.fragment),Oe=a(),he=p("p"),he.textContent=bt,Qe=a(),ge=p("ul"),ge.innerHTML=Tt,Se=a(),F=p("div"),u(ne.$$.fragment),De=a(),_e=p("p"),_e.innerHTML=Ct,Ie=a(),u(oe.$$.fragment),We=a(),w=p("div"),u(se.$$.fragment),Xe=a(),be=p("p"),be.innerHTML=kt,Ye=a(),Te=p("p"),Te.innerHTML=vt,Ke=a(),x=p("div"),u(ae.$$.fragment),et=a(),Ce=p("p"),Ce.innerHTML=$t,tt=a(),u(H.$$.fragment),nt=a(),u(E.$$.fragment),je=a(),u(re.$$.fragment),Ue=a(),$=p("div"),u(ie.$$.fragment),ot=a(),ke=p("p"),ke.textContent=yt,st=a(),ve=p("p"),ve.innerHTML=Mt,at=a(),$e=p("p"),$e.innerHTML=wt,rt=a(),z=p("div"),u(le.$$.fragment),it=a(),ye=p("p"),ye.innerHTML=At,lt=a(),u(G.$$.fragment),dt=a(),u(Z.$$.fragment),Fe=a(),u(de.$$.fragment),He=a(),Me=p("p"),this.h()},l(e){const o=Jt("svelte-u9bgzb",document.head);t=m(o,"META",{name:!0,content:!0}),o.forEach(s),k=r(e),d=m(e,"P",{}),I(d).forEach(s),c=r(e),f(T.$$.fragment,e),n=r(e),f(v.$$.fragment,e),Ae=r(e),O=m(e,"P",{"data-svelte-h":!0}),C(O)!=="svelte-s2n23o"&&(O.innerHTML=mt),xe=r(e),Q=m(e,"P",{"data-svelte-h":!0}),C(Q)!=="svelte-5o33hr"&&(Q.innerHTML=ut),ze=r(e),f(S.$$.fragment,e),Le=r(e),D=m(e,"UL",{"data-svelte-h":!0}),C(D)!=="svelte-1b6hj70"&&(D.innerHTML=ft),Pe=r(e),f(X.$$.fragment,e),qe=r(e),y=m(e,"DIV",{class:!0});var L=I(y);f(Y.$$.fragment,L),Ge=r(L),me=m(L,"P",{"data-svelte-h":!0}),C(me)!=="svelte-1q2jxib"&&(me.innerHTML=ht),Ze=r(L),ue=m(L,"P",{"data-svelte-h":!0}),C(ue)!=="svelte-vtzevr"&&(ue.innerHTML=gt),Ve=r(L),f(U.$$.fragment,L),L.forEach(s),Je=r(e),f(K.$$.fragment,e),Be=r(e),M=m(e,"DIV",{class:!0});var P=I(M);f(ee.$$.fragment,P),Re=r(P),fe=m(P,"P",{"data-svelte-h":!0}),C(fe)!=="svelte-16scib2"&&(fe.textContent=_t),Ne=r(P),J=m(P,"DIV",{class:!0});var j=I(J);f(te.$$.fragment,j),Oe=r(j),he=m(j,"P",{"data-svelte-h":!0}),C(he)!=="svelte-1noycua"&&(he.textContent=bt),Qe=r(j),ge=m(j,"UL",{"data-svelte-h":!0}),C(ge)!=="svelte-9q72go"&&(ge.innerHTML=Tt),j.forEach(s),Se=r(P),F=m(P,"DIV",{class:!0});var ce=I(F);f(ne.$$.fragment,ce),De=r(ce),_e=m(ce,"P",{"data-svelte-h":!0}),C(_e)!=="svelte-1f4f5kp"&&(_e.innerHTML=Ct),ce.forEach(s),P.forEach(s),Ie=r(e),f(oe.$$.fragment,e),We=r(e),w=m(e,"DIV",{class:!0});var q=I(w);f(se.$$.fragment,q),Xe=r(q),be=m(q,"P",{"data-svelte-h":!0}),C(be)!=="svelte-vm2tc8"&&(be.innerHTML=kt),Ye=r(q),Te=m(q,"P",{"data-svelte-h":!0}),C(Te)!=="svelte-er9l93"&&(Te.innerHTML=vt),Ke=r(q),x=m(q,"DIV",{class:!0});var V=I(x);f(ae.$$.fragment,V),et=r(V),Ce=m(V,"P",{"data-svelte-h":!0}),C(Ce)!=="svelte-1w8biw3"&&(Ce.innerHTML=$t),tt=r(V),f(H.$$.fragment,V),nt=r(V),f(E.$$.fragment,V),V.forEach(s),q.forEach(s),je=r(e),f(re.$$.fragment,e),Ue=r(e),$=m(e,"DIV",{class:!0});var B=I($);f(ie.$$.fragment,B),ot=r(B),ke=m(B,"P",{"data-svelte-h":!0}),C(ke)!=="svelte-12po86d"&&(ke.textContent=yt),st=r(B),ve=m(B,"P",{"data-svelte-h":!0}),C(ve)!=="svelte-68lg8f"&&(ve.innerHTML=Mt),at=r(B),$e=m(B,"P",{"data-svelte-h":!0}),C($e)!=="svelte-er9l93"&&($e.innerHTML=wt),rt=r(B),z=m(B,"DIV",{class:!0});var R=I(z);f(le.$$.fragment,R),it=r(R),ye=m(R,"P",{"data-svelte-h":!0}),C(ye)!=="svelte-7a44kr"&&(ye.innerHTML=At),lt=r(R),f(G.$$.fragment,R),dt=r(R),f(Z.$$.fragment,R),R.forEach(s),B.forEach(s),Fe=r(e),f(de.$$.fragment,e),He=r(e),Me=m(e,"P",{}),I(Me).forEach(s),this.h()},h(){W(t,"name","hf:doc:metadata"),W(t,"content",Et),W(y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(w,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W($,"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,o){i(document.head,t),l(e,k,o),l(e,d,o),l(e,c,o),h(T,e,o),l(e,n,o),h(v,e,o),l(e,Ae,o),l(e,O,o),l(e,xe,o),l(e,Q,o),l(e,ze,o),h(S,e,o),l(e,Le,o),l(e,D,o),l(e,Pe,o),h(X,e,o),l(e,qe,o),l(e,y,o),h(Y,y,null),i(y,Ge),i(y,me),i(y,Ze),i(y,ue),i(y,Ve),h(U,y,null),l(e,Je,o),h(K,e,o),l(e,Be,o),l(e,M,o),h(ee,M,null),i(M,Re),i(M,fe),i(M,Ne),i(M,J),h(te,J,null),i(J,Oe),i(J,he),i(J,Qe),i(J,ge),i(M,Se),i(M,F),h(ne,F,null),i(F,De),i(F,_e),l(e,Ie,o),h(oe,e,o),l(e,We,o),l(e,w,o),h(se,w,null),i(w,Xe),i(w,be),i(w,Ye),i(w,Te),i(w,Ke),i(w,x),h(ae,x,null),i(x,et),i(x,Ce),i(x,tt),h(H,x,null),i(x,nt),h(E,x,null),l(e,je,o),h(re,e,o),l(e,Ue,o),l(e,$,o),h(ie,$,null),i($,ot),i($,ke),i($,st),i($,ve),i($,at),i($,$e),i($,rt),i($,z),h(le,z,null),i(z,it),i(z,ye),i(z,lt),h(G,z,null),i(z,dt),h(Z,z,null),l(e,Fe,o),h(de,e,o),l(e,He,o),l(e,Me,o),Ee=!0},p(e,[o]){const L={};o&2&&(L.$$scope={dirty:o,ctx:e}),U.$set(L);const P={};o&2&&(P.$$scope={dirty:o,ctx:e}),H.$set(P);const j={};o&2&&(j.$$scope={dirty:o,ctx:e}),E.$set(j);const ce={};o&2&&(ce.$$scope={dirty:o,ctx:e}),G.$set(ce);const q={};o&2&&(q.$$scope={dirty:o,ctx:e}),Z.$set(q)},i(e){Ee||(g(T.$$.fragment,e),g(v.$$.fragment,e),g(S.$$.fragment,e),g(X.$$.fragment,e),g(Y.$$.fragment,e),g(U.$$.fragment,e),g(K.$$.fragment,e),g(ee.$$.fragment,e),g(te.$$.fragment,e),g(ne.$$.fragment,e),g(oe.$$.fragment,e),g(se.$$.fragment,e),g(ae.$$.fragment,e),g(H.$$.fragment,e),g(E.$$.fragment,e),g(re.$$.fragment,e),g(ie.$$.fragment,e),g(le.$$.fragment,e),g(G.$$.fragment,e),g(Z.$$.fragment,e),g(de.$$.fragment,e),Ee=!0)},o(e){_(T.$$.fragment,e),_(v.$$.fragment,e),_(S.$$.fragment,e),_(X.$$.fragment,e),_(Y.$$.fragment,e),_(U.$$.fragment,e),_(K.$$.fragment,e),_(ee.$$.fragment,e),_(te.$$.fragment,e),_(ne.$$.fragment,e),_(oe.$$.fragment,e),_(se.$$.fragment,e),_(ae.$$.fragment,e),_(H.$$.fragment,e),_(E.$$.fragment,e),_(re.$$.fragment,e),_(ie.$$.fragment,e),_(le.$$.fragment,e),_(G.$$.fragment,e),_(Z.$$.fragment,e),_(de.$$.fragment,e),Ee=!1},d(e){e&&(s(k),s(d),s(c),s(n),s(Ae),s(O),s(xe),s(Q),s(ze),s(Le),s(D),s(Pe),s(qe),s(y),s(Je),s(Be),s(M),s(Ie),s(We),s(w),s(je),s(Ue),s($),s(Fe),s(He),s(Me)),s(t),b(T,e),b(v,e),b(S,e),b(X,e),b(Y),b(U),b(K,e),b(ee),b(te),b(ne),b(oe,e),b(se),b(ae),b(H),b(E),b(re,e),b(ie),b(le),b(G),b(Z),b(de,e)}}}const Et='{"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 Gt(A){return Lt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Dt extends Pt{constructor(t){super(),qt(this,t,Gt,Ht,zt,{})}}export{Dt as component}; | |
Xet Storage Details
- Size:
- 45.2 kB
- Xet hash:
- 99d7e4ba3c3061c0c1ff57f04e4349ddc305b2a310bede2f7f2d6c9d24f43ca4
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.