Buckets:
| import{s as wt,o as xt,n as Te}from"../chunks/scheduler.31fdf58d.js";import{S as At,i as zt,e as p,s as a,c as h,h as Jt,a as m,d as s,b as r,f as q,j as y,g,k as H,l as i,m as c,n as _,t as b,o as C,p as T}from"../chunks/index.2f76fdf0.js";import{T as $t}from"../chunks/Tip.8d349121.js";import{C as Nt}from"../chunks/CopyLLMTxtMenu.53b607bf.js";import{D as Ce}from"../chunks/Docstring.7acc6835.js";import{C as Ie}from"../chunks/CodeBlock.e52df5d6.js";import{E as Mt}from"../chunks/ExampleCodeBlock.f9704f52.js";import{H as ve,E as Bt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.08750ec0.js";import{H as Ft,a as kt}from"../chunks/HfOption.fb051768.js";function Lt($){let t,l;return t=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBJTBBcGlwZSUyMCUzRCUyMHBpcGVsaW5lKCUwQSUyMCUyMCUyMCUyMHRhc2slM0QlMjJ0ZXh0LWdlbmVyYXRpb24lMjIlMkMlMEElMjAlMjAlMjAlMjBtb2RlbCUzRCUyMm9wZW5ibWIlMkZjcG0tYW50LTEwYiUyMiUyQyUwQSklMEFwaXBlKCUyMiVFNCVCQiU4QSVFNSVBNCVBOSVFNSVBNCVBOSVFNiVCMCU5NCVFNSVCRSU4OCVFNSVBNSVCRCVFRiVCQyU4QyUyMik=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline | |
| pipe = pipeline( | |
| task=<span class="hljs-string">"text-generation"</span>, | |
| model=<span class="hljs-string">"openbmb/cpm-ant-10b"</span>, | |
| ) | |
| pipe(<span class="hljs-string">"今天天气很好,"</span>)`,lang:"python",wrap:!1}}),{c(){h(t.$$.fragment)},l(n){g(t.$$.fragment,n)},m(n,u){_(t,n,u),l=!0},p:Te,i(n){l||(b(t.$$.fragment,n),l=!0)},o(n){C(t.$$.fragment,n),l=!1},d(n){T(t,n)}}}function Ut($){let t,l;return t=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENwbUFudEZvckNhdXNhbExNJTJDJTIwQ3BtQW50VG9rZW5pemVyJTBBJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQ3BtQW50VG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYm1iJTJGY3BtLWFudC0xMGIlMjIpJTBBbW9kZWwlMjAlM0QlMjBDcG1BbnRGb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyb3BlbmJtYiUyRmNwbS1hbnQtMTBiJTIyJTJDJTBBJTIwJTIwJTIwJTIwZGV2aWNlX21hcCUzRCUyMmF1dG8lMjIlMkMlMEEpJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMiVFNCVCQiU4QSVFNSVBNCVBOSVFNSVBNCVBOSVFNiVCMCU5NCVFNSVCRSU4OCVFNSVBNSVCRCVFRiVCQyU4QyUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLnRvKG1vZGVsLmRldmljZSklMEElMEFvdXRwdXQlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSgqKmlucHV0X2lkcyUyQyUyMG1heF9uZXdfdG9rZW5zJTNENTApJTBBcHJpbnQodG9rZW5pemVyLmRlY29kZShvdXRwdXQlNUIwJTVEJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CpmAntForCausalLM, CpmAntTokenizer | |
| tokenizer = CpmAntTokenizer.from_pretrained(<span class="hljs-string">"openbmb/cpm-ant-10b"</span>) | |
| model = CpmAntForCausalLM.from_pretrained( | |
| <span class="hljs-string">"openbmb/cpm-ant-10b"</span>, | |
| device_map=<span class="hljs-string">"auto"</span>, | |
| ) | |
| input_ids = tokenizer(<span class="hljs-string">"今天天气很好,"</span>, return_tensors=<span class="hljs-string">"pt"</span>).to(model.device) | |
| output = model.generate(**input_ids, max_new_tokens=<span class="hljs-number">50</span>) | |
| <span class="hljs-built_in">print</span>(tokenizer.decode(output[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>))`,lang:"python",wrap:!1}}),{c(){h(t.$$.fragment)},l(n){g(t.$$.fragment,n)},m(n,u){_(t,n,u),l=!0},p:Te,i(n){l||(b(t.$$.fragment,n),l=!0)},o(n){C(t.$$.fragment,n),l=!1},d(n){T(t,n)}}}function jt($){let t,l,n,u;return t=new kt({props:{id:"usage",option:"Pipeline",$$slots:{default:[Lt]},$$scope:{ctx:$}}}),n=new kt({props:{id:"usage",option:"CpmAntForCausalLM",$$slots:{default:[Ut]},$$scope:{ctx:$}}}),{c(){h(t.$$.fragment),l=a(),h(n.$$.fragment)},l(d){g(t.$$.fragment,d),l=r(d),g(n.$$.fragment,d)},m(d,f){_(t,d,f),c(d,l,f),_(n,d,f),u=!0},p(d,f){const N={};f&2&&(N.$$scope={dirty:f,ctx:d}),t.$set(N);const L={};f&2&&(L.$$scope={dirty:f,ctx:d}),n.$set(L)},i(d){u||(b(t.$$.fragment,d),b(n.$$.fragment,d),u=!0)},o(d){C(t.$$.fragment,d),C(n.$$.fragment,d),u=!1},d(d){d&&s(l),T(t,d),T(n,d)}}}function Wt($){let t,l="Example:",n,u,d;return u=new Ie({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`,lang:"python",wrap:!1}}),{c(){t=p("p"),t.textContent=l,n=a(),h(u.$$.fragment)},l(f){t=m(f,"P",{"data-svelte-h":!0}),y(t)!=="svelte-11lpom8"&&(t.textContent=l),n=r(f),g(u.$$.fragment,f)},m(f,N){c(f,t,N),c(f,n,N),_(u,f,N),d=!0},p:Te,i(f){d||(b(u.$$.fragment,f),d=!0)},o(f){C(u.$$.fragment,f),d=!1},d(f){f&&(s(t),s(n)),T(u,f)}}}function It($){let t,l=`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=l},l(n){t=m(n,"P",{"data-svelte-h":!0}),y(t)!=="svelte-fincs2"&&(t.innerHTML=l)},m(n,u){c(n,t,u)},p:Te,d(n){n&&s(t)}}}function Vt($){let t,l=`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=l},l(n){t=m(n,"P",{"data-svelte-h":!0}),y(t)!=="svelte-fincs2"&&(t.innerHTML=l)},m(n,u){c(n,t,u)},p:Te,d(n){n&&s(t)}}}function Pt($){let t,l;return t=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENQTUFudFRva2VuaXplciUyQyUyMENwbUFudEZvckNhdXNhbExNJTBBJTBBdGV4dHMlMjAlM0QlMjAlMjIlRTQlQkIlOEElRTUlQTQlQTklRTUlQTQlQTklRTYlQjAlOTQlRTQlQjglOEQlRTklOTQlOTklRUYlQkMlOEMlMjIlMEFtb2RlbCUyMCUzRCUyMENwbUFudEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYm1iJTJGY3BtLWFudC0xMGIlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQ1BNQW50VG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYm1iJTJGY3BtLWFudC0xMGIlMjIpJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKHRleHRzJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoKippbnB1dF9pZHMpJTBBb3V0cHV0X3RleHRzJTIwJTNEJTIwdG9rZW5pemVyLmJhdGNoX2RlY29kZShvdXRwdXRzKSUwQXByaW50KG91dHB1dF90ZXh0cyk=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CPMAntTokenizer, CpmAntForCausalLM | |
| <span class="hljs-meta">>>> </span>texts = <span class="hljs-string">"今天天气不错,"</span> | |
| <span class="hljs-meta">>>> </span>model = CpmAntForCausalLM.from_pretrained(<span class="hljs-string">"openbmb/cpm-ant-10b"</span>) | |
| <span class="hljs-meta">>>> </span>tokenizer = CPMAntTokenizer.from_pretrained(<span class="hljs-string">"openbmb/cpm-ant-10b"</span>) | |
| <span class="hljs-meta">>>> </span>input_ids = tokenizer(texts, return_tensors=<span class="hljs-string">"pt"</span>) | |
| <span class="hljs-meta">>>> </span>outputs = model.generate(**input_ids) | |
| <span class="hljs-meta">>>> </span>output_texts = tokenizer.batch_decode(outputs) | |
| <span class="hljs-meta">>>> </span><span class="hljs-built_in">print</span>(output_texts) | |
| [<span class="hljs-string">'今天天气不错,阳光明媚,我和妈妈一起去超市买东西。\\n在超市里,我看到了一个很好玩的玩具,它的名字叫“机器人”。它有一个圆圆的脑袋,两只圆圆的眼睛,还有一个圆圆的'</span>]`,lang:"python",wrap:!1}}),{c(){h(t.$$.fragment)},l(n){g(t.$$.fragment,n)},m(n,u){_(t,n,u),l=!0},p:Te,i(n){l||(b(t.$$.fragment,n),l=!0)},o(n){C(t.$$.fragment,n),l=!1},d(n){T(t,n)}}}function qt($){let t,l,n,u,d,f="<em>This model was contributed to Hugging Face Transformers on 2023-04-12.</em>",N,L,$e,R,Me,Z,rt='<a href="https://github.com/OpenBMB/CPM-Live/tree/cpm-ant/cpm-live" rel="nofollow">CPMAnt</a> is a 10B-parameter open-source Chinese pre-trained language model and the first milestone of the CPM-Live open training project. It achieves strong results with delta tuning on the CUGE benchmark, and compressed variants are available for different hardware configurations.',ke,G,it='The example below demonstrates how to generate text with <a href="/docs/transformers/pr_43265/en/main_classes/pipelines#transformers.Pipeline">Pipeline</a> or the <a href="/docs/transformers/pr_43265/en/model_doc/cpmant#transformers.CpmAntForCausalLM">CpmAntForCausalLM</a> class.',we,j,xe,Q,Ae,x,E,Ve,se,lt=`This is the configuration class to store the configuration of a CpmAntModel. It is used to instantiate a 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 <a href="https://huggingface.co/openbmb/cpm-ant-10b" rel="nofollow">openbmb/cpm-ant-10b</a>`,Pe,ae,dt=`Configuration objects inherit from <a href="/docs/transformers/pr_43265/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_43265/en/main_classes/configuration#transformers.PreTrainedConfig">PreTrainedConfig</a> for more information.`,qe,W,ze,S,Je,U,D,He,re,ct="Construct a CPMAnt tokenizer. Based on byte-level Byte-Pair-Encoding.",Ne,X,Be,M,O,Re,ie,pt="The bare Cpmant Model outputting raw hidden-states without any specific head on top.",Ze,le,mt=`This model inherits from <a href="/docs/transformers/pr_43265/en/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.)`,Ge,de,ut=`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.`,Qe,J,Y,Ee,ce,ft='The <a href="/docs/transformers/pr_43265/en/model_doc/cpmant#transformers.CpmAntModel">CpmAntModel</a> forward method, overrides the <code>__call__</code> special method.',Se,I,De,pe,ht=`<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>Cache</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — It is a <a href="/docs/transformers/pr_43265/en/internal/generation_utils#transformers.Cache">Cache</a> instance. For more details, see our <a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>.</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>`,Fe,K,Le,k,ee,Xe,me,gt="The CPMAnt Model with a language modeling head on top (linear layer with weights tied to the input embeddings).",Oe,ue,_t=`This model inherits from <a href="/docs/transformers/pr_43265/en/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.)`,Ye,fe,bt=`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.`,Ke,v,te,et,he,Ct='The <a href="/docs/transformers/pr_43265/en/model_doc/cpmant#transformers.CpmAntForCausalLM">CpmAntForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',tt,V,nt,ge,Tt=`<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>Cache</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — It is a <a href="/docs/transformers/pr_43265/en/internal/generation_utils#transformers.Cache">Cache</a> instance. For more details, see our <a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>.</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>`,ot,_e,yt="Example:",st,be,vt="Text Generation with CpmAntForCausalLM.",at,P,Ue,ne,je,ye,We;return L=new Nt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),R=new ve({props:{title:"CPMAnt",local:"cpmant",headingTag:"h1"}}),j=new Ft({props:{id:"usage",options:["Pipeline","CpmAntForCausalLM"],$$slots:{default:[jt]},$$scope:{ctx:$}}}),Q=new ve({props:{title:"CpmAntConfig",local:"transformers.CpmAntConfig",headingTag:"h2"}}),E=new Ce({props:{name:"class transformers.CpmAntConfig",anchor:"transformers.CpmAntConfig",parameters:[{name:"transformers_version",val:": str | None = None"},{name:"architectures",val:": list[str] | None = None"},{name:"output_hidden_states",val:": bool | None = False"},{name:"return_dict",val:": bool | None = True"},{name:"dtype",val:": typing.Union[str, ForwardRef('torch.dtype'), NoneType] = None"},{name:"chunk_size_feed_forward",val:": int = 0"},{name:"is_encoder_decoder",val:": bool = False"},{name:"id2label",val:": dict[int, str] | dict[str, str] | None = None"},{name:"label2id",val:": dict[str, int] | dict[str, str] | None = None"},{name:"problem_type",val:": typing.Optional[typing.Literal['regression', 'single_label_classification', 'multi_label_classification']] = None"},{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:": float | int = 0.0"},{name:"position_bias_num_buckets",val:": int = 512"},{name:"position_bias_max_distance",val:": int = 2048"},{name:"eps",val:": float = 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:"tie_word_embeddings",val:": bool = True"}],parametersDescription:[{anchor:"transformers.CpmAntConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>30720</code>) — | |
| Vocabulary size of the model. Defines the number of different tokens that can be represented by the <code>input_ids</code>.`,name:"vocab_size"},{anchor:"transformers.CpmAntConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>4096</code>) — | |
| Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.CpmAntConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to <code>32</code>) — | |
| Number of attention heads for each attention layer in the Transformer decoder.`,name:"num_attention_heads"},{anchor:"transformers.CpmAntConfig.dim_head",description:`<strong>dim_head</strong> (<code>int</code>, <em>optional</em>, defaults to <code>128</code>) — | |
| The attention head dimension. If None, it will default to hidden_size // num_attention_heads`,name:"dim_head"},{anchor:"transformers.CpmAntConfig.dim_ff",description:`<strong>dim_ff</strong> (<code>int</code>, <em>optional</em>, defaults to <code>10240</code>) — | |
| Dimension of the MLP representations.`,name:"dim_ff"},{anchor:"transformers.CpmAntConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to <code>48</code>) — | |
| Number of hidden layers in the Transformer decoder.`,name:"num_hidden_layers"},{anchor:"transformers.CpmAntConfig.dropout_p",description:`<strong>dropout_p</strong> (<code>Union[float, int]</code>, <em>optional</em>, defaults to <code>0.0</code>) — | |
| The ratio for all dropout layers.`,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 <code>1e-06</code>) — | |
| 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 <code>1.0</code>) — | |
| The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,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 or not the model should return the last key/values attentions (not used by all models). Only | |
| relevant if <code>config.is_decoder=True</code> or when the model is a decoder-only generative model.`,name:"use_cache"},{anchor:"transformers.CpmAntConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) — | |
| Whether to tie weight embeddings according to model’s <code>tied_weights_keys</code> mapping.`,name:"tie_word_embeddings"}],source:"https://github.com/huggingface/transformers/blob/vr_43265/src/transformers/models/cpmant/configuration_cpmant.py#L24"}}),W=new Mt({props:{anchor:"transformers.CpmAntConfig.example",$$slots:{default:[Wt]},$$scope:{ctx:$}}}),S=new ve({props:{title:"CpmAntTokenizer",local:"transformers.CpmAntTokenizer",headingTag:"h2"}}),D=new Ce({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_43265/src/transformers/models/cpmant/tokenization_cpmant.py#L77"}}),X=new ve({props:{title:"CpmAntModel",local:"transformers.CpmAntModel",headingTag:"h2"}}),O=new Ce({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/pr_43265/en/model_doc/cpmant#transformers.CpmAntConfig">CpmAntConfig</a>) — | |
| 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/pr_43265/en/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/vr_43265/src/transformers/models/cpmant/modeling_cpmant.py#L536"}}),Y=new Ce({props:{name:"forward",anchor:"transformers.CpmAntModel.forward",parameters:[{name:"input_ids",val:": torch.Tensor | None = None"},{name:"output_attentions",val:": bool | None = None"},{name:"output_hidden_states",val:": bool | None = None"},{name:"past_key_values",val:": transformers.cache_utils.Cache | None = None"},{name:"use_cache",val:": bool | None = None"},{name:"return_dict",val:": bool | None = 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_43265/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and | |
| <a href="/docs/transformers/pr_43265/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.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. 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>) — | |
| 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>~cache_utils.Cache</code>, <em>optional</em>) — | |
| 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>Only <a href="/docs/transformers/pr_43265/en/internal/generation_utils#transformers.Cache">Cache</a> instance is allowed as input, see our <a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>. | |
| If no <code>past_key_values</code> are passed, <a href="/docs/transformers/pr_43265/en/internal/generation_utils#transformers.DynamicCache">DynamicCache</a> will be initialized by default.</p> | |
| <p>The model will output the same cache format that is fed as input.</p> | |
| <p>If <code>past_key_values</code> are used, the user is expected to input only unprocessed <code>input_ids</code> (those that don’t | |
| have their past key value states given to this model) of shape <code>(batch_size, unprocessed_length)</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>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_43265/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_43265/src/transformers/models/cpmant/modeling_cpmant.py#L574",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A <a | |
| href="/docs/transformers/pr_43265/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast" | |
| >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_43265/en/model_doc/cpmant#transformers.CpmAntConfig" | |
| >CpmAntConfig</a>) and inputs.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/transformers/pr_43265/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPast" | |
| >BaseModelOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),I=new $t({props:{$$slots:{default:[It]},$$scope:{ctx:$}}}),K=new ve({props:{title:"CpmAntForCausalLM",local:"transformers.CpmAntForCausalLM",headingTag:"h2"}}),ee=new Ce({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/pr_43265/en/model_doc/cpmant#transformers.CpmAntConfig">CpmAntConfig</a>) — | |
| 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/pr_43265/en/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/vr_43265/src/transformers/models/cpmant/modeling_cpmant.py#L686"}}),te=new Ce({props:{name:"forward",anchor:"transformers.CpmAntForCausalLM.forward",parameters:[{name:"input_ids",val:": torch.Tensor | None = None"},{name:"past_key_values",val:": transformers.cache_utils.Cache | None = None"},{name:"use_cache",val:": bool | None = None"},{name:"output_attentions",val:": bool | None = None"},{name:"output_hidden_states",val:": bool | None = None"},{name:"labels",val:": torch.Tensor | None = None"},{name:"return_dict",val:": bool | None = None"},{name:"attention_mask",val:": torch.Tensor | None = None"},{name:"logits_to_keep",val:": int | torch.Tensor = 0"},{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_43265/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and | |
| <a href="/docs/transformers/pr_43265/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>~cache_utils.Cache</code>, <em>optional</em>) — | |
| 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>Only <a href="/docs/transformers/pr_43265/en/internal/generation_utils#transformers.Cache">Cache</a> instance is allowed as input, see our <a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>. | |
| If no <code>past_key_values</code> are passed, <a href="/docs/transformers/pr_43265/en/internal/generation_utils#transformers.DynamicCache">DynamicCache</a> will be initialized by default.</p> | |
| <p>The model will output the same cache format that is fed as input.</p> | |
| <p>If <code>past_key_values</code> are used, the user is expected to input only unprocessed <code>input_ids</code> (those that don’t | |
| have their past key value states given to this model) of shape <code>(batch_size, unprocessed_length)</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>) — | |
| 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. 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>) — | |
| 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>) — | |
| 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>) — | |
| Whether or not to return a <a href="/docs/transformers/pr_43265/en/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>) — | |
| 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"},{anchor:"transformers.CpmAntForCausalLM.forward.logits_to_keep",description:`<strong>logits_to_keep</strong> (<code>Union[int, torch.Tensor]</code>, <em>optional</em>, defaults to <code>0</code>) — | |
| If an <code>int</code>, compute logits for the last <code>logits_to_keep</code> tokens. If <code>0</code>, calculate logits for all | |
| <code>input_ids</code> (special case). Only last token logits are needed for generation, and calculating them only for that | |
| token can save memory, which becomes pretty significant for long sequences or large vocabulary size. | |
| If a <code>torch.Tensor</code>, must be 1D corresponding to the indices to keep in the sequence length dimension. | |
| This is useful when using packed tensor format (single dimension for batch and sequence length).`,name:"logits_to_keep"}],source:"https://github.com/huggingface/transformers/blob/vr_43265/src/transformers/models/cpmant/modeling_cpmant.py#L699",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A <a | |
| href="/docs/transformers/pr_43265/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast" | |
| >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_43265/en/model_doc/cpmant#transformers.CpmAntConfig" | |
| >CpmAntConfig</a>) and inputs.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><a | |
| href="/docs/transformers/pr_43265/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast" | |
| >CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),V=new $t({props:{$$slots:{default:[Vt]},$$scope:{ctx:$}}}),P=new Mt({props:{anchor:"transformers.CpmAntForCausalLM.forward.example",$$slots:{default:[Pt]},$$scope:{ctx:$}}}),ne=new Bt({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/cpmant.md"}}),{c(){t=p("meta"),l=a(),n=p("p"),u=a(),d=p("p"),d.innerHTML=f,N=a(),h(L.$$.fragment),$e=a(),h(R.$$.fragment),Me=a(),Z=p("p"),Z.innerHTML=rt,ke=a(),G=p("p"),G.innerHTML=it,we=a(),h(j.$$.fragment),xe=a(),h(Q.$$.fragment),Ae=a(),x=p("div"),h(E.$$.fragment),Ve=a(),se=p("p"),se.innerHTML=lt,Pe=a(),ae=p("p"),ae.innerHTML=dt,qe=a(),h(W.$$.fragment),ze=a(),h(S.$$.fragment),Je=a(),U=p("div"),h(D.$$.fragment),He=a(),re=p("p"),re.textContent=ct,Ne=a(),h(X.$$.fragment),Be=a(),M=p("div"),h(O.$$.fragment),Re=a(),ie=p("p"),ie.textContent=pt,Ze=a(),le=p("p"),le.innerHTML=mt,Ge=a(),de=p("p"),de.innerHTML=ut,Qe=a(),J=p("div"),h(Y.$$.fragment),Ee=a(),ce=p("p"),ce.innerHTML=ft,Se=a(),h(I.$$.fragment),De=a(),pe=p("ul"),pe.innerHTML=ht,Fe=a(),h(K.$$.fragment),Le=a(),k=p("div"),h(ee.$$.fragment),Xe=a(),me=p("p"),me.textContent=gt,Oe=a(),ue=p("p"),ue.innerHTML=_t,Ye=a(),fe=p("p"),fe.innerHTML=bt,Ke=a(),v=p("div"),h(te.$$.fragment),et=a(),he=p("p"),he.innerHTML=Ct,tt=a(),h(V.$$.fragment),nt=a(),ge=p("ul"),ge.innerHTML=Tt,ot=a(),_e=p("p"),_e.textContent=yt,st=a(),be=p("p"),be.textContent=vt,at=a(),h(P.$$.fragment),Ue=a(),h(ne.$$.fragment),je=a(),ye=p("p"),this.h()},l(e){const o=Jt("svelte-u9bgzb",document.head);t=m(o,"META",{name:!0,content:!0}),o.forEach(s),l=r(e),n=m(e,"P",{}),q(n).forEach(s),u=r(e),d=m(e,"P",{"data-svelte-h":!0}),y(d)!=="svelte-1arf234"&&(d.innerHTML=f),N=r(e),g(L.$$.fragment,e),$e=r(e),g(R.$$.fragment,e),Me=r(e),Z=m(e,"P",{"data-svelte-h":!0}),y(Z)!=="svelte-sts19i"&&(Z.innerHTML=rt),ke=r(e),G=m(e,"P",{"data-svelte-h":!0}),y(G)!=="svelte-g3g8e0"&&(G.innerHTML=it),we=r(e),g(j.$$.fragment,e),xe=r(e),g(Q.$$.fragment,e),Ae=r(e),x=m(e,"DIV",{class:!0});var B=q(x);g(E.$$.fragment,B),Ve=r(B),se=m(B,"P",{"data-svelte-h":!0}),y(se)!=="svelte-11rd4do"&&(se.innerHTML=lt),Pe=r(B),ae=m(B,"P",{"data-svelte-h":!0}),y(ae)!=="svelte-1e8815j"&&(ae.innerHTML=dt),qe=r(B),g(W.$$.fragment,B),B.forEach(s),ze=r(e),g(S.$$.fragment,e),Je=r(e),U=m(e,"DIV",{class:!0});var oe=q(U);g(D.$$.fragment,oe),He=r(oe),re=m(oe,"P",{"data-svelte-h":!0}),y(re)!=="svelte-16scib2"&&(re.textContent=ct),oe.forEach(s),Ne=r(e),g(X.$$.fragment,e),Be=r(e),M=m(e,"DIV",{class:!0});var A=q(M);g(O.$$.fragment,A),Re=r(A),ie=m(A,"P",{"data-svelte-h":!0}),y(ie)!=="svelte-oq06uz"&&(ie.textContent=pt),Ze=r(A),le=m(A,"P",{"data-svelte-h":!0}),y(le)!=="svelte-1gb3c10"&&(le.innerHTML=mt),Ge=r(A),de=m(A,"P",{"data-svelte-h":!0}),y(de)!=="svelte-hswkmf"&&(de.innerHTML=ut),Qe=r(A),J=m(A,"DIV",{class:!0});var F=q(J);g(Y.$$.fragment,F),Ee=r(F),ce=m(F,"P",{"data-svelte-h":!0}),y(ce)!=="svelte-11j5rdq"&&(ce.innerHTML=ft),Se=r(F),g(I.$$.fragment,F),De=r(F),pe=m(F,"UL",{"data-svelte-h":!0}),y(pe)!=="svelte-xardb3"&&(pe.innerHTML=ht),F.forEach(s),A.forEach(s),Fe=r(e),g(K.$$.fragment,e),Le=r(e),k=m(e,"DIV",{class:!0});var z=q(k);g(ee.$$.fragment,z),Xe=r(z),me=m(z,"P",{"data-svelte-h":!0}),y(me)!=="svelte-12po86d"&&(me.textContent=gt),Oe=r(z),ue=m(z,"P",{"data-svelte-h":!0}),y(ue)!=="svelte-1gb3c10"&&(ue.innerHTML=_t),Ye=r(z),fe=m(z,"P",{"data-svelte-h":!0}),y(fe)!=="svelte-hswkmf"&&(fe.innerHTML=bt),Ke=r(z),v=m(z,"DIV",{class:!0});var w=q(v);g(te.$$.fragment,w),et=r(w),he=m(w,"P",{"data-svelte-h":!0}),y(he)!=="svelte-1hktyly"&&(he.innerHTML=Ct),tt=r(w),g(V.$$.fragment,w),nt=r(w),ge=m(w,"UL",{"data-svelte-h":!0}),y(ge)!=="svelte-1yb5o5x"&&(ge.innerHTML=Tt),ot=r(w),_e=m(w,"P",{"data-svelte-h":!0}),y(_e)!=="svelte-11lpom8"&&(_e.textContent=yt),st=r(w),be=m(w,"P",{"data-svelte-h":!0}),y(be)!=="svelte-ri92c5"&&(be.textContent=vt),at=r(w),g(P.$$.fragment,w),w.forEach(s),z.forEach(s),Ue=r(e),g(ne.$$.fragment,e),je=r(e),ye=m(e,"P",{}),q(ye).forEach(s),this.h()},h(){H(t,"name","hf:doc:metadata"),H(t,"content",Ht),H(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),H(k,"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),c(e,l,o),c(e,n,o),c(e,u,o),c(e,d,o),c(e,N,o),_(L,e,o),c(e,$e,o),_(R,e,o),c(e,Me,o),c(e,Z,o),c(e,ke,o),c(e,G,o),c(e,we,o),_(j,e,o),c(e,xe,o),_(Q,e,o),c(e,Ae,o),c(e,x,o),_(E,x,null),i(x,Ve),i(x,se),i(x,Pe),i(x,ae),i(x,qe),_(W,x,null),c(e,ze,o),_(S,e,o),c(e,Je,o),c(e,U,o),_(D,U,null),i(U,He),i(U,re),c(e,Ne,o),_(X,e,o),c(e,Be,o),c(e,M,o),_(O,M,null),i(M,Re),i(M,ie),i(M,Ze),i(M,le),i(M,Ge),i(M,de),i(M,Qe),i(M,J),_(Y,J,null),i(J,Ee),i(J,ce),i(J,Se),_(I,J,null),i(J,De),i(J,pe),c(e,Fe,o),_(K,e,o),c(e,Le,o),c(e,k,o),_(ee,k,null),i(k,Xe),i(k,me),i(k,Oe),i(k,ue),i(k,Ye),i(k,fe),i(k,Ke),i(k,v),_(te,v,null),i(v,et),i(v,he),i(v,tt),_(V,v,null),i(v,nt),i(v,ge),i(v,ot),i(v,_e),i(v,st),i(v,be),i(v,at),_(P,v,null),c(e,Ue,o),_(ne,e,o),c(e,je,o),c(e,ye,o),We=!0},p(e,[o]){const B={};o&2&&(B.$$scope={dirty:o,ctx:e}),j.$set(B);const oe={};o&2&&(oe.$$scope={dirty:o,ctx:e}),W.$set(oe);const A={};o&2&&(A.$$scope={dirty:o,ctx:e}),I.$set(A);const F={};o&2&&(F.$$scope={dirty:o,ctx:e}),V.$set(F);const z={};o&2&&(z.$$scope={dirty:o,ctx:e}),P.$set(z)},i(e){We||(b(L.$$.fragment,e),b(R.$$.fragment,e),b(j.$$.fragment,e),b(Q.$$.fragment,e),b(E.$$.fragment,e),b(W.$$.fragment,e),b(S.$$.fragment,e),b(D.$$.fragment,e),b(X.$$.fragment,e),b(O.$$.fragment,e),b(Y.$$.fragment,e),b(I.$$.fragment,e),b(K.$$.fragment,e),b(ee.$$.fragment,e),b(te.$$.fragment,e),b(V.$$.fragment,e),b(P.$$.fragment,e),b(ne.$$.fragment,e),We=!0)},o(e){C(L.$$.fragment,e),C(R.$$.fragment,e),C(j.$$.fragment,e),C(Q.$$.fragment,e),C(E.$$.fragment,e),C(W.$$.fragment,e),C(S.$$.fragment,e),C(D.$$.fragment,e),C(X.$$.fragment,e),C(O.$$.fragment,e),C(Y.$$.fragment,e),C(I.$$.fragment,e),C(K.$$.fragment,e),C(ee.$$.fragment,e),C(te.$$.fragment,e),C(V.$$.fragment,e),C(P.$$.fragment,e),C(ne.$$.fragment,e),We=!1},d(e){e&&(s(l),s(n),s(u),s(d),s(N),s($e),s(Me),s(Z),s(ke),s(G),s(we),s(xe),s(Ae),s(x),s(ze),s(Je),s(U),s(Ne),s(Be),s(M),s(Fe),s(Le),s(k),s(Ue),s(je),s(ye)),s(t),T(L,e),T(R,e),T(j,e),T(Q,e),T(E),T(W),T(S,e),T(D),T(X,e),T(O),T(Y),T(I),T(K,e),T(ee),T(te),T(V),T(P),T(ne,e)}}}const Ht='{"title":"CPMAnt","local":"cpmant","sections":[{"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 Rt($){return xt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Kt extends At{constructor(t){super(),zt(this,t,Rt,qt,wt,{})}}export{Kt as component}; | |
Xet Storage Details
- Size:
- 46.5 kB
- Xet hash:
- 9d4902d5f8c1c60eadd76a68bd8c8e8bd1614b4a9010f9c025e465a7d6d09d1e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.