Buckets:
| import{s as _n,o as wn,n as Ge}from"../chunks/scheduler.31fdf58d.js";import{S as bn,i as yn,e as l,s as o,c as p,h as Mn,a as d,d as n,b as s,f as B,j as m,g as h,k as F,l as i,m as a,n as u,t as f,o as g,p as _}from"../chunks/index.2f76fdf0.js";import{T as Gt}from"../chunks/Tip.8d349121.js";import{C as vn}from"../chunks/CopyLLMTxtMenu.53b607bf.js";import{D as Me}from"../chunks/Docstring.7acc6835.js";import{C as ft}from"../chunks/CodeBlock.e52df5d6.js";import{E as gn}from"../chunks/ExampleCodeBlock.f9704f52.js";import{H as ve,E as Tn}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.08750ec0.js";function Cn(x){let r,w;return r=new ft({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEN3bU1vZGVsJTJDJTIwQ3dtQ29uZmlnJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMEN3bSUyMGN3bS03YiUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBDd21Db25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBjd20tN2IlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEN3bU1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CwmModel, CwmConfig | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Initializing a Cwm cwm-7b style configuration</span> | |
| <span class="hljs-meta">>>> </span>configuration = CwmConfig() | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Initializing a model from the cwm-7b style configuration</span> | |
| <span class="hljs-meta">>>> </span>model = CwmModel(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(){p(r.$$.fragment)},l(c){h(r.$$.fragment,c)},m(c,b){u(r,c,b),w=!0},p:Ge,i(c){w||(f(r.$$.fragment,c),w=!0)},o(c){g(r.$$.fragment,c),w=!1},d(c){_(r,c)}}}function kn(x){let r,w=`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 | |
| registered hooks while the latter silently ignores them.`;return{c(){r=l("p"),r.innerHTML=w},l(c){r=d(c,"P",{"data-svelte-h":!0}),m(r)!=="svelte-rqqap8"&&(r.innerHTML=w)},m(c,b){a(c,r,b)},p:Ge,d(c){c&&n(r)}}}function $n(x){let r,w=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code> | |
| instance afterwards instead of this since the former takes care of running the pre and post processing steps while | |
| the latter silently ignores them.`;return{c(){r=l("p"),r.innerHTML=w},l(c){r=d(c,"P",{"data-svelte-h":!0}),m(r)!=="svelte-fincs2"&&(r.innerHTML=w)},m(c,b){a(c,r,b)},p:Ge,d(c){c&&n(r)}}}function xn(x){let r,w=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code> | |
| instance afterwards instead of this since the former takes care of running the pre and post processing steps while | |
| the latter silently ignores them.`;return{c(){r=l("p"),r.innerHTML=w},l(c){r=d(c,"P",{"data-svelte-h":!0}),m(r)!=="svelte-fincs2"&&(r.innerHTML=w)},m(c,b){a(c,r,b)},p:Ge,d(c){c&&n(r)}}}function Un(x){let r,w="Example:",c,b,U;return b=new ft({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDd21Gb3JDYXVzYWxMTSUwQSUwQW1vZGVsJTIwJTNEJTIwQ3dtRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMm1ldGEtY3dtJTJGQ3dtLTItN2ItaGYlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybWV0YS1jd20lMkZDd20tMi03Yi1oZiUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJIZXklMkMlMjBhcmUlMjB5b3UlMjBjb25zY2lvdXMlM0YlMjBDYW4lMjB5b3UlMjB0YWxrJTIwdG8lMjBtZSUzRiUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihwcm9tcHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMEdlbmVyYXRlJTBBZ2VuZXJhdGVfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRzLmlucHV0X2lkcyUyQyUyMG1heF9sZW5ndGglM0QzMCklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwY2xlYW5fdXBfdG9rZW5pemF0aW9uX3NwYWNlcyUzREZhbHNlKSU1QjAlNUQ=",highlighted:`<span class="hljs-meta">>>> </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, CwmForCausalLM | |
| <span class="hljs-meta">>>> </span>model = CwmForCausalLM.from_pretrained(<span class="hljs-string">"meta-cwm/Cwm-2-7b-hf"</span>) | |
| <span class="hljs-meta">>>> </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">"meta-cwm/Cwm-2-7b-hf"</span>) | |
| <span class="hljs-meta">>>> </span>prompt = <span class="hljs-string">"Hey, are you conscious? Can you talk to me?"</span> | |
| <span class="hljs-meta">>>> </span>inputs = tokenizer(prompt, return_tensors=<span class="hljs-string">"pt"</span>) | |
| <span class="hljs-meta">>>> </span><span class="hljs-comment"># Generate</span> | |
| <span class="hljs-meta">>>> </span>generate_ids = model.generate(inputs.input_ids, max_length=<span class="hljs-number">30</span>) | |
| <span class="hljs-meta">>>> </span>tokenizer.batch_decode(generate_ids, skip_special_tokens=<span class="hljs-literal">True</span>, clean_up_tokenization_spaces=<span class="hljs-literal">False</span>)[<span class="hljs-number">0</span>] | |
| <span class="hljs-string">"Hey, are you conscious? Can you talk to me?\\nI'm not conscious, but I can talk to you."</span>`,lang:"python",wrap:!1}}),{c(){r=l("p"),r.textContent=w,c=o(),p(b.$$.fragment)},l(y){r=d(y,"P",{"data-svelte-h":!0}),m(r)!=="svelte-11lpom8"&&(r.textContent=w),c=s(y),h(b.$$.fragment,y)},m(y,P){a(y,r,P),a(y,c,P),u(b,y,P),U=!0},p:Ge,i(y){U||(f(b.$$.fragment,y),U=!0)},o(y){g(b.$$.fragment,y),U=!1},d(y){y&&(n(r),n(c)),_(b,y)}}}function jn(x){let r,w,c,b,U,y="<— Copyright 2025 the HuggingFace Team. All rights reserved.",P,V,Rt=`Licensed under the Apache License, Version 2.0 (the “License”); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at`,Re,X,Ht='<a href="http://www.apache.org/licenses/LICENSE-2.0" rel="nofollow">http://www.apache.org/licenses/LICENSE-2.0</a>',He,Q,qt=`Unless required by applicable law or agreed to in writing, software | |
| distributed under the License is distributed on an “AS IS” BASIS, | |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| See the License for the specific language governing permissions and | |
| limitations under the License.`,qe,S,Et="⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be rendered properly in your Markdown viewer.",Ee,A,Vt=`—> | |
| <em>This model was contributed to Hugging Face Transformers on 2025-10-09.</em>`,Ve,Y,Xe,D,Qe,O,Se,K,Xt=`The Code World Model (CWM) model was proposed in <a href="https://ai.facebook.com/research/publications/cwm" rel="nofollow">CWM: An Open-Weights LLM for Research on Code | |
| Generation with World Models</a> by Meta FAIR CodeGen Team. | |
| CWM is an LLM for code generation and reasoning about code that has, in particular, been trained | |
| to better represent and reason about how code and commands affect the state of a program or system. | |
| Specifically, we mid-trained CWM on a large number of observation-action trajectories from Python | |
| execution traces and agentic interactions in containerized environments. We post-trained with | |
| extensive multi-task RL in verifiable coding, math, and multi-turn software engineering environments.`,Ae,ee,Qt="The abstract from the paper is the following:",Ye,te,St=`<p><em>We release Code World Model (CWM), a 32-billion-parameter open-weights LLM, to advance research | |
| on code generation with world models. To improve code understanding beyond what can be learned | |
| from training on static code alone, we mid-train CWM on a large amount of observation-action | |
| trajectories from Python interpreter and agentic Docker environments, and perform extensive multi- | |
| task reasoning RL in verifiable coding, math, and multi-turn software engineering environments. With | |
| CWM, we provide a strong testbed for researchers to explore the opportunities world modeling affords | |
| for improving code generation with reasoning and planning in computational environments. We | |
| present first steps of how world models can benefit agentic coding, enable step-by-step simulation of | |
| Python code execution, and show early results of how reasoning can benefit from the latter. CWM is | |
| a dense, decoder-only LLM trained with a context size of up to 131 k tokens. Independent of its world | |
| modeling capabilities, CWM offers strong performance on general coding and math tasks: it reaches | |
| pass@1 scores of 65.8 % on SWE-bench Verified (with test-time scaling), 68.9 % on LiveCodeBench, | |
| 96.6 % on Math-500, and 76.0 % on AIME 2024. To support further research on code world modeling, | |
| we release model checkpoints after mid-training, SFT, and RL.</em></p>`,De,ne,At="Tips:",Oe,oe,Yt=`CWM requires a dedicated system prompt to function optimally during inference. Without proper prompt | |
| configuration, CWM’s output quality may be significantly degraded. The following serves as the default | |
| system prompt for reasoning tasks. For agentic workflows, append the relevant tool specifications | |
| after this base prompt. Checkout the original code repository for more details.`,Ke,se,et,ae,Dt=`This model was contributed by <a href="https://huggingface.co/facebook" rel="nofollow">Meta FAIR CodeGen Team</a>. | |
| The original code can be found <a href="https://github.com/facebookresearch/cwm" rel="nofollow">here</a>.`,tt,re,nt,ie,ot,le,Ot=`<summary>Produces the following output:</summary> <p>Okay, I need to write a haiku about recursion in programming. Let’s start by recalling what recursion is. Recursion is a programming technique where a function calls itself in its own definition, often used to solve problems that can be broken down into smaller, similar sub-problems.</p> <p>A haiku is a three-line poem with a syllable count of 5-7-5. So, I need to capture the essence of recursion in a concise and poetic way. Let’s think about the key elements of recursion: the function calling itself, the base case that stops the recursion, and the idea of breaking down problems into smaller parts.</p> <p>Maybe I can use imagery related to mirrors or reflections, since recursion often involves a function reflecting or repeating itself. Alternatively, I could use natural imagery like a spiral or a tree, which suggests self-similar patterns.</p> <p>Let me try to come up with some ideas. For example, “Function calls itself” could be a starting point. But how to make that into a haiku? Maybe something like:</p> <p>Function calls itself | |
| Base case stops the endless loop | |
| Spiral of code</p> <p>Hmm, that’s a start. But maybe I can make it more poetic. Let’s think about the idea of a function calling itself as a kind of infinite loop, but with a base case that stops it. That’s like a spiral that unwinds at the center.</p> <p>Another angle: recursion is often used for problems that have a recursive structure, like tree traversals or factorial calculations. Maybe I can use a natural image to represent that.</p> <p>How about:</p> <p>Branches split again | |
| Leaves unfold in endless dance | |
| Roots hold the base case</p> <p>That’s a bit more poetic. The branches splitting represent the recursive calls, the leaves unfolding could represent the processing of each sub-problem, and the roots holding the base case are what stops the recursion.</p> <p>Alternatively, maybe something simpler:</p> <p>Mirror within mirror | |
| Reflections infinite deep | |
| Base case breaks the glass</p> <p>This uses the mirror metaphor to represent the function calling itself, with the base case being the point where the recursion stops, breaking the infinite reflection.</p> <p>I think I like the mirror idea better. Let me refine that:</p> <p>Mirror within mirror | |
| Infinite reflections dance | |
| Base case shatters glass</p> <p>Yes, that seems to capture the idea of recursion well. The mirror represents the function calling itself, the infinite reflections are the recursive calls, and the base case shattering the glass is what stops the recursion.</p> <p>Let me check the syllable count:</p> <p>Mirror within mirror (5 syllables: Mir-ror-with-in-mir-ror) | |
| Infinite reflections dance (7 syllables: In-fi-nite-ref-lec-tions-dance) | |
| Base case shatters glass (5 syllables: Base-case-shat-ters-glass)</p> <p>Yes, that fits the 5-7-5 structure. I think that’s a good haiku about recursion.</p> | |
| </think> | |
| Mirror within mirror | |
| Infinite reflections dance | |
| Base case shatters glass<|eot_id|>`,st,de,at,C,ce,gt,Te,Kt=`This is the configuration class to store the configuration of a CwmModel. It is used to instantiate a Cwm | |
| 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/facebook/cwm" rel="nofollow">facebook/cwm</a>`,_t,Ce,en=`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.`,wt,G,rt,me,it,k,pe,bt,ke,tn=`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.)`,yt,$e,nn=`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.`,Mt,j,he,vt,xe,on="Define the computation performed at every call.",Tt,Ue,sn="Should be overridden by all subclasses.",Ct,R,lt,ue,dt,M,fe,kt,je,an="The bare Cwm Model outputting raw hidden-states without any specific head on top.",$t,Je,rn=`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.)`,xt,Ie,ln=`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.`,Ut,J,ge,jt,We,dn='The <a href="/docs/transformers/pr_43265/en/model_doc/cwm#transformers.CwmModel">CwmModel</a> forward method, overrides the <code>__call__</code> special method.',Jt,H,It,ze,cn=`<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>`,ct,_e,mt,v,we,Wt,Le,mn="The Cwm Model for causal language modeling.",zt,Ne,pn=`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.)`,Lt,Ze,hn=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass. | |
| Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage | |
| and behavior.`,Nt,T,be,Zt,Be,un='The <a href="/docs/transformers/pr_43265/en/model_doc/cwm#transformers.CwmForCausalLM">CwmForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',Bt,q,Ft,Fe,fn=`<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>`,Pt,E,pt,ye,ht,Pe,ut;return Y=new vn({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),D=new ve({props:{title:"Code World Model (CWM)",local:"code-world-model-cwm",headingTag:"h1"}}),O=new ve({props:{title:"Overview",local:"overview",headingTag:"h2"}}),se=new ft({props:{code:"WW91JTIwYXJlJTIwYSUyMGhlbHBmdWwlMjBBSSUyMGFzc2lzdGFudC4lMjBZb3UlMjBhbHdheXMlMjByZWFzb24lMjBiZWZvcmUlMjByZXNwb25kaW5nJTJDJTIwdXNpbmclMjB0aGUlMjBmb2xsb3dpbmclMjBmb3JtYXQlM0ElMEElMEElM0N0aGluayUzRSUwQXlvdXIlMjBpbnRlcm5hbCUyMHJlYXNvbmluZyUwQSUzQyUyRnRoaW5rJTNFJTBBeW91ciUyMGV4dGVybmFsJTIwcmVzcG9uc2U=",highlighted:`You are a helpful AI assistant. You always reason before responding, using the following format: | |
| <think> | |
| your internal reasoning | |
| </think> | |
| your external response`,lang:"text",wrap:!1}}),re=new ve({props:{title:"Usage examples",local:"usage-examples",headingTag:"h2"}}),ie=new ft({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNJTJDJTIwQXV0b1Rva2VuaXplciUwQSUwQSUwQW1vZGVsX25hbWUlMjAlM0QlMjAnZmFjZWJvb2slMkZjd20nJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQobW9kZWxfbmFtZSklMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjBtb2RlbF9uYW1lJTJDJTBBJTIwJTIwJTIwJTIwZGV2aWNlX21hcCUzRCUyMmF1dG8lMjIlMEEpJTBBJTBBc3lzdGVtX3Byb21wdCUyMCUzRCUyMCUyMiUyMiUyMiUwQVlvdSUyMGFyZSUyMGElMjBoZWxwZnVsJTIwQUklMjBhc3Npc3RhbnQuJTIwWW91JTIwYWx3YXlzJTIwcmVhc29uJTIwYmVmb3JlJTIwcmVzcG9uZGluZyUyQyUyMHVzaW5nJTIwdGhlJTIwZm9sbG93aW5nJTIwZm9ybWF0JTNBJTBBJTBBJTNDdGhpbmslM0UlMEF5b3VyJTIwaW50ZXJuYWwlMjByZWFzb25pbmclMEElM0MlMkZ0aGluayUzRSUwQXlvdXIlMjBleHRlcm5hbCUyMHJlc3BvbnNlJTBBJTIyJTIyJTIyLnN0cmlwKCklMEElMEFtZXNzYWdlcyUyMCUzRCUyMCU1QiUwQSUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJzeXN0ZW0lMjIlMkMlMjAlMjJjb250ZW50JTIyJTNBJTIwc3lzdGVtX3Byb21wdCU3RCUyQyUwQSUyMCUyMCUyMCUyMCU3QiUyMnJvbGUlMjIlM0ElMjAlMjJ1c2VyJTIyJTJDJTIwJTIyY29udGVudCUyMiUzQSUyMCUyMldyaXRlJTIwYSUyMGhhaWt1JTIwYWJvdXQlMjByZWN1cnNpb24lMjBpbiUyMHByb2dyYW1taW5nLiUyMiU3RCUwQSU1RCUwQSUwQSUwQXRleHQlMjAlM0QlMjB0b2tlbml6ZXIuYXBwbHlfY2hhdF90ZW1wbGF0ZSglMEElMjAlMjAlMjAlMjBtZXNzYWdlcyUyQyUwQSUyMCUyMCUyMCUyMHRva2VuaXplJTNERmFsc2UlMkMlMEElMjAlMjAlMjAlMjBhZGRfZ2VuZXJhdGlvbl9wcm9tcHQlM0RUcnVlJTJDJTBBJTIwJTIwJTIwJTIwZW5hYmxlX3RoaW5raW5nJTNEVHJ1ZSUyQyUyMCUyMyUyMFN3aXRjaGVzJTIwYmV0d2VlbiUyMHRoaW5raW5nJTIwYW5kJTIwbm9uLXRoaW5raW5nJTIwbW9kZXMuJTIwRGVmYXVsdCUyMGlzJTIwVHJ1ZS4lMEElMjAlMjAlMjAlMjBwcmVzZXJ2ZV9wcmV2aW91c190aGluayUzRFRydWUlMkMlMjAlMjMlMjBTd2l0Y2hlcyUyMGJldHdlZW4lMjBrZWVwaW5nJTIwdGhpbmtpbmclMjBibG9ja3MlMjBmcm9tJTIwcHJldmlvdXMlMjBtZXNzYWdlcyUyMG9yJTIwbm90LiUyMERlZmF1bHQlMjBpcyUyMFRydWUuJTBBKSUwQSUwQW1vZGVsX2lucHV0cyUyMCUzRCUyMHRva2VuaXplciglNUJ0ZXh0JTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikudG8obW9kZWwuZGV2aWNlKSUwQSUwQWdlbmVyYXRlZF9pZHMlMjAlM0QlMjBtb2RlbC5nZW5lcmF0ZSglMEElMjAlMjAlMjAlMjAqKm1vZGVsX2lucHV0cyUyQyUwQSUyMCUyMCUyMCUyMG1heF9uZXdfdG9rZW5zJTNEMTAyNCUwQSklMEFvdXRwdXRfaWRzJTIwJTNEJTIwZ2VuZXJhdGVkX2lkcyU1QjAlNUQlNUJsZW4obW9kZWxfaW5wdXRzLmlucHV0X2lkcyU1QjAlNUQpJTNBJTVELnRvbGlzdCgpJTBBcHJpbnQodG9rZW5pemVyLmRlY29kZShvdXRwdXRfaWRzKSk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer | |
| model_name = <span class="hljs-string">'facebook/cwm'</span> | |
| tokenizer = AutoTokenizer.from_pretrained(model_name) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_name, | |
| device_map=<span class="hljs-string">"auto"</span> | |
| ) | |
| system_prompt = <span class="hljs-string">""" | |
| You are a helpful AI assistant. You always reason before responding, using the following format: | |
| <think> | |
| your internal reasoning | |
| </think> | |
| your external response | |
| """</span>.strip() | |
| messages = [ | |
| {<span class="hljs-string">"role"</span>: <span class="hljs-string">"system"</span>, <span class="hljs-string">"content"</span>: system_prompt}, | |
| {<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">"Write a haiku about recursion in programming."</span>} | |
| ] | |
| text = tokenizer.apply_chat_template( | |
| messages, | |
| tokenize=<span class="hljs-literal">False</span>, | |
| add_generation_prompt=<span class="hljs-literal">True</span>, | |
| enable_thinking=<span class="hljs-literal">True</span>, <span class="hljs-comment"># Switches between thinking and non-thinking modes. Default is True.</span> | |
| preserve_previous_think=<span class="hljs-literal">True</span>, <span class="hljs-comment"># Switches between keeping thinking blocks from previous messages or not. Default is True.</span> | |
| ) | |
| model_inputs = tokenizer([text], return_tensors=<span class="hljs-string">"pt"</span>).to(model.device) | |
| generated_ids = model.generate( | |
| **model_inputs, | |
| max_new_tokens=<span class="hljs-number">1024</span> | |
| ) | |
| output_ids = generated_ids[<span class="hljs-number">0</span>][<span class="hljs-built_in">len</span>(model_inputs.input_ids[<span class="hljs-number">0</span>]):].tolist() | |
| <span class="hljs-built_in">print</span>(tokenizer.decode(output_ids))`,lang:"python",wrap:!1}}),de=new ve({props:{title:"CwmConfig",local:"transformers.CwmConfig",headingTag:"h2"}}),ce=new Me({props:{name:"class transformers.CwmConfig",anchor:"transformers.CwmConfig",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 = 128256"},{name:"hidden_size",val:": int = 6144"},{name:"intermediate_size",val:": int = 21504"},{name:"num_hidden_layers",val:": int = 64"},{name:"num_attention_heads",val:": int = 48"},{name:"num_key_value_heads",val:": int = 8"},{name:"hidden_act",val:": str = 'silu'"},{name:"max_position_embeddings",val:": int = 131072"},{name:"initializer_range",val:": float = 0.02"},{name:"rms_norm_eps",val:": float = 1e-05"},{name:"use_cache",val:": bool = True"},{name:"pad_token_id",val:": int | None = None"},{name:"bos_token_id",val:": int = 128000"},{name:"eos_token_id",val:": int | list[int] | None = None"},{name:"pretraining_tp",val:": int = 1"},{name:"tie_word_embeddings",val:": bool = False"},{name:"rope_parameters",val:": dict | None = None"},{name:"attention_dropout",val:": float | int = 0.0"},{name:"mlp_bias",val:": bool = False"},{name:"head_dim",val:": int = 128"},{name:"sliding_window",val:": int = 8192"},{name:"layer_types",val:": list[str] | None = None"}],parametersDescription:[{anchor:"transformers.CwmConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>128256</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.CwmConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>6144</code>) — | |
| Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.CwmConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>21504</code>) — | |
| Dimension of the MLP representations.`,name:"intermediate_size"},{anchor:"transformers.CwmConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to <code>64</code>) — | |
| Number of hidden layers in the Transformer decoder.`,name:"num_hidden_layers"},{anchor:"transformers.CwmConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to <code>48</code>) — | |
| Number of attention heads for each attention layer in the Transformer decoder.`,name:"num_attention_heads"},{anchor:"transformers.CwmConfig.num_key_value_heads",description:`<strong>num_key_value_heads</strong> (<code>int</code>, <em>optional</em>, defaults to <code>8</code>) — | |
| This is the number of key_value heads that should be used to implement Grouped Query Attention. If | |
| <code>num_key_value_heads=num_attention_heads</code>, the model will use Multi Head Attention (MHA), if | |
| <code>num_key_value_heads=1</code> the model will use Multi Query Attention (MQA) otherwise GQA is used. When | |
| converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed | |
| by meanpooling all the original heads within that group. For more details, check out <a href="https://huggingface.co/papers/2305.13245" rel="nofollow">this | |
| paper</a>. If it is not specified, will default to | |
| <code>num_attention_heads</code>.`,name:"num_key_value_heads"},{anchor:"transformers.CwmConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>silu</code>) — | |
| The non-linear activation function (function or string) in the decoder. For example, <code>"gelu"</code>, | |
| <code>"relu"</code>, <code>"silu"</code>, etc.`,name:"hidden_act"},{anchor:"transformers.CwmConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to <code>131072</code>) — | |
| The maximum sequence length that this model might ever be used with.`,name:"max_position_embeddings"},{anchor:"transformers.CwmConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to <code>0.02</code>) — | |
| The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.CwmConfig.rms_norm_eps",description:`<strong>rms_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1e-05</code>) — | |
| The epsilon used by the rms normalization layers.`,name:"rms_norm_eps"},{anchor:"transformers.CwmConfig.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.CwmConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>) — | |
| Token id used for padding in the vocabulary.`,name:"pad_token_id"},{anchor:"transformers.CwmConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to <code>128000</code>) — | |
| Token id used for beginning-of-stream in the vocabulary.`,name:"bos_token_id"},{anchor:"transformers.CwmConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>Union[int, list[int]]</code>, <em>optional</em>) — | |
| Token id used for end-of-stream in the vocabulary.`,name:"eos_token_id"},{anchor:"transformers.CwmConfig.pretraining_tp",description:`<strong>pretraining_tp</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1</code>) — | |
| Experimental feature. Tensor parallelism rank used during pretraining. Please refer to <a href="https://huggingface.co/docs/transformers/main/perf_train_gpu_many#tensor-parallelism" rel="nofollow">this | |
| document</a> to | |
| understand more about it. This value is necessary to ensure exact reproducibility of the pretraining | |
| results. Please refer to <a href="https://github.com/pytorch/pytorch/issues/76232" rel="nofollow">this issue</a>.`,name:"pretraining_tp"},{anchor:"transformers.CwmConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to tie weight embeddings according to model’s <code>tied_weights_keys</code> mapping.`,name:"tie_word_embeddings"},{anchor:"transformers.CwmConfig.rope_parameters",description:`<strong>rope_parameters</strong> (<code>dict</code>, <em>optional</em>) — | |
| Dictionary containing the configuration parameters for the RoPE embeddings. The dictionary should contain | |
| a value for <code>rope_theta</code> and optionally parameters used for scaling in case you want to use RoPE | |
| with longer <code>max_position_embeddings</code>.`,name:"rope_parameters"},{anchor:"transformers.CwmConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>Union[float, int]</code>, <em>optional</em>, defaults to <code>0.0</code>) — | |
| The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.CwmConfig.mlp_bias",description:`<strong>mlp_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) — | |
| Whether to use a bias in up_proj, down_proj and gate_proj layers in the MLP layers.`,name:"mlp_bias"},{anchor:"transformers.CwmConfig.head_dim",description:`<strong>head_dim</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:"head_dim"},{anchor:"transformers.CwmConfig.sliding_window",description:`<strong>sliding_window</strong> (<code>int</code>, <em>optional</em>, defaults to <code>8192</code>) — | |
| Sliding window attention window size. If <code>None</code>, no sliding window is applied.`,name:"sliding_window"},{anchor:"transformers.CwmConfig.layer_types",description:`<strong>layer_types</strong> (<code>list[str]</code>, <em>optional</em>) — | |
| A list that explicitly maps each layer index with its layer type. If not provided, it will be automatically | |
| generated based on config values.`,name:"layer_types"}],source:"https://github.com/huggingface/transformers/blob/vr_43265/src/transformers/models/cwm/configuration_cwm.py#L30"}}),G=new gn({props:{anchor:"transformers.CwmConfig.example",$$slots:{default:[Cn]},$$scope:{ctx:x}}}),me=new ve({props:{title:"CwmPreTrainedModel",local:"transformers.CwmPreTrainedModel",headingTag:"h2"}}),pe=new Me({props:{name:"class transformers.CwmPreTrainedModel",anchor:"transformers.CwmPreTrainedModel",parameters:[{name:"config",val:": PreTrainedConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.CwmPreTrainedModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_43265/en/main_classes/configuration#transformers.PreTrainedConfig">PreTrainedConfig</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/cwm/modeling_cwm.py#L322"}}),he=new Me({props:{name:"_forward_unimplemented",anchor:"transformers.CwmPreTrainedModel.forward",parameters:[{name:"*input",val:": typing.Any"}],source:"https://github.com/huggingface/transformers/blob/vr_43265/src/torch/nn/modules/module.py#L391"}}),R=new Gt({props:{$$slots:{default:[kn]},$$scope:{ctx:x}}}),ue=new ve({props:{title:"CwmModel",local:"transformers.CwmModel",headingTag:"h2"}}),fe=new Me({props:{name:"class transformers.CwmModel",anchor:"transformers.CwmModel",parameters:[{name:"config",val:": CwmConfig"}],parametersDescription:[{anchor:"transformers.CwmModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_43265/en/model_doc/cwm#transformers.CwmConfig">CwmConfig</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/cwm/modeling_cwm.py#L345"}}),ge=new Me({props:{name:"forward",anchor:"transformers.CwmModel.forward",parameters:[{name:"input_ids",val:": torch.LongTensor | None = None"},{name:"attention_mask",val:": torch.Tensor | None = None"},{name:"position_ids",val:": torch.LongTensor | None = None"},{name:"past_key_values",val:": transformers.cache_utils.Cache | None = None"},{name:"inputs_embeds",val:": torch.FloatTensor | None = None"},{name:"use_cache",val:": bool | None = None"},{name:"**kwargs",val:": typing_extensions.Unpack[transformers.utils.generic.TransformersKwargs]"}],parametersDescription:[{anchor:"transformers.CwmModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p> | |
| <p>Indices can be obtained using <a href="/docs/transformers/pr_43265/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. 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.CwmModel.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.CwmModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p> | |
| <p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CwmModel.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.CwmModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) — | |
| Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This | |
| is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the | |
| model’s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.CwmModel.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"}],source:"https://github.com/huggingface/transformers/blob/vr_43265/src/transformers/models/cwm/modeling_cwm.py#L364",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p>A <code>CwmModelOutputWithPast</code> 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/cwm#transformers.CwmConfig" | |
| >CwmConfig</a>) and inputs.</p> | |
| `,returnType:`<script context="module">export const metadata = 'undefined';<\/script> | |
| <p><code>CwmModelOutputWithPast</code> or <code>tuple(torch.FloatTensor)</code></p> | |
| `}}),H=new Gt({props:{$$slots:{default:[$n]},$$scope:{ctx:x}}}),_e=new ve({props:{title:"CwmForCausalLM",local:"transformers.CwmForCausalLM",headingTag:"h2"}}),we=new Me({props:{name:"class transformers.CwmForCausalLM",anchor:"transformers.CwmForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.CwmForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_43265/en/model_doc/cwm#transformers.CwmForCausalLM">CwmForCausalLM</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/cwm/modeling_cwm.py#L427"}}),be=new Me({props:{name:"forward",anchor:"transformers.CwmForCausalLM.forward",parameters:[{name:"input_ids",val:": torch.LongTensor | None = None"},{name:"attention_mask",val:": torch.Tensor | None = None"},{name:"position_ids",val:": torch.LongTensor | None = None"},{name:"past_key_values",val:": transformers.cache_utils.Cache | None = None"},{name:"inputs_embeds",val:": torch.FloatTensor | None = None"},{name:"labels",val:": torch.LongTensor | None = None"},{name:"use_cache",val:": bool | None = None"},{name:"logits_to_keep",val:": int | torch.Tensor = 0"},{name:"**kwargs",val:": typing_extensions.Unpack[transformers.utils.generic.TransformersKwargs]"}],parametersDescription:[{anchor:"transformers.CwmForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| Indices of input sequence tokens in the vocabulary. Padding will be ignored by default.</p> | |
| <p>Indices can be obtained using <a href="/docs/transformers/pr_43265/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. 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.CwmForCausalLM.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.CwmForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.n_positions - 1]</code>.</p> | |
| <p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.CwmForCausalLM.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.CwmForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) — | |
| Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This | |
| is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the | |
| model’s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.CwmForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) — | |
| Labels for computing the masked language modeling loss. Indices should either be in <code>[0, ..., config.vocab_size]</code> or -100 (see <code>input_ids</code> docstring). Tokens with indices set to <code>-100</code> are ignored | |
| (masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.CwmForCausalLM.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.CwmForCausalLM.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/cwm/modeling_cwm.py#L441",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/cwm#transformers.CwmConfig" | |
| >CwmConfig</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> | |
| `}}),q=new Gt({props:{$$slots:{default:[xn]},$$scope:{ctx:x}}}),E=new gn({props:{anchor:"transformers.CwmForCausalLM.forward.example",$$slots:{default:[Un]},$$scope:{ctx:x}}}),ye=new Tn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/cwm.md"}}),{c(){r=l("meta"),w=o(),c=l("p"),b=o(),U=l("p"),U.textContent=y,P=o(),V=l("p"),V.textContent=Rt,Re=o(),X=l("p"),X.innerHTML=Ht,He=o(),Q=l("p"),Q.textContent=qt,qe=o(),S=l("p"),S.textContent=Et,Ee=o(),A=l("p"),A.innerHTML=Vt,Ve=o(),p(Y.$$.fragment),Xe=o(),p(D.$$.fragment),Qe=o(),p(O.$$.fragment),Se=o(),K=l("p"),K.innerHTML=Xt,Ae=o(),ee=l("p"),ee.textContent=Qt,Ye=o(),te=l("blockquote"),te.innerHTML=St,De=o(),ne=l("p"),ne.textContent=At,Oe=o(),oe=l("p"),oe.textContent=Yt,Ke=o(),p(se.$$.fragment),et=o(),ae=l("p"),ae.innerHTML=Dt,tt=o(),p(re.$$.fragment),nt=o(),p(ie.$$.fragment),ot=o(),le=l("details"),le.innerHTML=Ot,st=o(),p(de.$$.fragment),at=o(),C=l("div"),p(ce.$$.fragment),gt=o(),Te=l("p"),Te.innerHTML=Kt,_t=o(),Ce=l("p"),Ce.innerHTML=en,wt=o(),p(G.$$.fragment),rt=o(),p(me.$$.fragment),it=o(),k=l("div"),p(pe.$$.fragment),bt=o(),ke=l("p"),ke.innerHTML=tn,yt=o(),$e=l("p"),$e.innerHTML=nn,Mt=o(),j=l("div"),p(he.$$.fragment),vt=o(),xe=l("p"),xe.textContent=on,Tt=o(),Ue=l("p"),Ue.textContent=sn,Ct=o(),p(R.$$.fragment),lt=o(),p(ue.$$.fragment),dt=o(),M=l("div"),p(fe.$$.fragment),kt=o(),je=l("p"),je.textContent=an,$t=o(),Je=l("p"),Je.innerHTML=rn,xt=o(),Ie=l("p"),Ie.innerHTML=ln,Ut=o(),J=l("div"),p(ge.$$.fragment),jt=o(),We=l("p"),We.innerHTML=dn,Jt=o(),p(H.$$.fragment),It=o(),ze=l("ul"),ze.innerHTML=cn,ct=o(),p(_e.$$.fragment),mt=o(),v=l("div"),p(we.$$.fragment),Wt=o(),Le=l("p"),Le.textContent=mn,zt=o(),Ne=l("p"),Ne.innerHTML=pn,Lt=o(),Ze=l("p"),Ze.innerHTML=hn,Nt=o(),T=l("div"),p(be.$$.fragment),Zt=o(),Be=l("p"),Be.innerHTML=un,Bt=o(),p(q.$$.fragment),Ft=o(),Fe=l("ul"),Fe.innerHTML=fn,Pt=o(),p(E.$$.fragment),pt=o(),p(ye.$$.fragment),ht=o(),Pe=l("p"),this.h()},l(e){const t=Mn("svelte-u9bgzb",document.head);r=d(t,"META",{name:!0,content:!0}),t.forEach(n),w=s(e),c=d(e,"P",{}),B(c).forEach(n),b=s(e),U=d(e,"P",{"data-svelte-h":!0}),m(U)!=="svelte-4vxqt6"&&(U.textContent=y),P=s(e),V=d(e,"P",{"data-svelte-h":!0}),m(V)!=="svelte-qu2n54"&&(V.textContent=Rt),Re=s(e),X=d(e,"P",{"data-svelte-h":!0}),m(X)!=="svelte-1uwcrln"&&(X.innerHTML=Ht),He=s(e),Q=d(e,"P",{"data-svelte-h":!0}),m(Q)!=="svelte-12a0zv6"&&(Q.textContent=qt),qe=s(e),S=d(e,"P",{"data-svelte-h":!0}),m(S)!=="svelte-1dbjho0"&&(S.textContent=Et),Ee=s(e),A=d(e,"P",{"data-svelte-h":!0}),m(A)!=="svelte-8fwiqn"&&(A.innerHTML=Vt),Ve=s(e),h(Y.$$.fragment,e),Xe=s(e),h(D.$$.fragment,e),Qe=s(e),h(O.$$.fragment,e),Se=s(e),K=d(e,"P",{"data-svelte-h":!0}),m(K)!=="svelte-1x39dl9"&&(K.innerHTML=Xt),Ae=s(e),ee=d(e,"P",{"data-svelte-h":!0}),m(ee)!=="svelte-vfdo9a"&&(ee.textContent=Qt),Ye=s(e),te=d(e,"BLOCKQUOTE",{"data-svelte-h":!0}),m(te)!=="svelte-u12i9c"&&(te.innerHTML=St),De=s(e),ne=d(e,"P",{"data-svelte-h":!0}),m(ne)!=="svelte-axv494"&&(ne.textContent=At),Oe=s(e),oe=d(e,"P",{"data-svelte-h":!0}),m(oe)!=="svelte-1eikn6b"&&(oe.textContent=Yt),Ke=s(e),h(se.$$.fragment,e),et=s(e),ae=d(e,"P",{"data-svelte-h":!0}),m(ae)!=="svelte-1k87p1s"&&(ae.innerHTML=Dt),tt=s(e),h(re.$$.fragment,e),nt=s(e),h(ie.$$.fragment,e),ot=s(e),le=d(e,"DETAILS",{"data-svelte-h":!0}),m(le)!=="svelte-mfnsx5"&&(le.innerHTML=Ot),st=s(e),h(de.$$.fragment,e),at=s(e),C=d(e,"DIV",{class:!0});var I=B(C);h(ce.$$.fragment,I),gt=s(I),Te=d(I,"P",{"data-svelte-h":!0}),m(Te)!=="svelte-1fxulgs"&&(Te.innerHTML=Kt),_t=s(I),Ce=d(I,"P",{"data-svelte-h":!0}),m(Ce)!=="svelte-1e8815j"&&(Ce.innerHTML=en),wt=s(I),h(G.$$.fragment,I),I.forEach(n),rt=s(e),h(me.$$.fragment,e),it=s(e),k=d(e,"DIV",{class:!0});var W=B(k);h(pe.$$.fragment,W),bt=s(W),ke=d(W,"P",{"data-svelte-h":!0}),m(ke)!=="svelte-1gb3c10"&&(ke.innerHTML=tn),yt=s(W),$e=d(W,"P",{"data-svelte-h":!0}),m($e)!=="svelte-hswkmf"&&($e.innerHTML=nn),Mt=s(W),j=d(W,"DIV",{class:!0});var z=B(j);h(he.$$.fragment,z),vt=s(z),xe=d(z,"P",{"data-svelte-h":!0}),m(xe)!=="svelte-1q5ym45"&&(xe.textContent=on),Tt=s(z),Ue=d(z,"P",{"data-svelte-h":!0}),m(Ue)!=="svelte-w8wo9i"&&(Ue.textContent=sn),Ct=s(z),h(R.$$.fragment,z),z.forEach(n),W.forEach(n),lt=s(e),h(ue.$$.fragment,e),dt=s(e),M=d(e,"DIV",{class:!0});var $=B(M);h(fe.$$.fragment,$),kt=s($),je=d($,"P",{"data-svelte-h":!0}),m(je)!=="svelte-1yzbel5"&&(je.textContent=an),$t=s($),Je=d($,"P",{"data-svelte-h":!0}),m(Je)!=="svelte-1gb3c10"&&(Je.innerHTML=rn),xt=s($),Ie=d($,"P",{"data-svelte-h":!0}),m(Ie)!=="svelte-hswkmf"&&(Ie.innerHTML=ln),Ut=s($),J=d($,"DIV",{class:!0});var L=B(J);h(ge.$$.fragment,L),jt=s(L),We=d(L,"P",{"data-svelte-h":!0}),m(We)!=="svelte-1yuusge"&&(We.innerHTML=dn),Jt=s(L),h(H.$$.fragment,L),It=s(L),ze=d(L,"UL",{"data-svelte-h":!0}),m(ze)!=="svelte-xardb3"&&(ze.innerHTML=cn),L.forEach(n),$.forEach(n),ct=s(e),h(_e.$$.fragment,e),mt=s(e),v=d(e,"DIV",{class:!0});var N=B(v);h(we.$$.fragment,N),Wt=s(N),Le=d(N,"P",{"data-svelte-h":!0}),m(Le)!=="svelte-1nk3iuq"&&(Le.textContent=mn),zt=s(N),Ne=d(N,"P",{"data-svelte-h":!0}),m(Ne)!=="svelte-1gb3c10"&&(Ne.innerHTML=pn),Lt=s(N),Ze=d(N,"P",{"data-svelte-h":!0}),m(Ze)!=="svelte-hswkmf"&&(Ze.innerHTML=hn),Nt=s(N),T=d(N,"DIV",{class:!0});var Z=B(T);h(be.$$.fragment,Z),Zt=s(Z),Be=d(Z,"P",{"data-svelte-h":!0}),m(Be)!=="svelte-13v856m"&&(Be.innerHTML=un),Bt=s(Z),h(q.$$.fragment,Z),Ft=s(Z),Fe=d(Z,"UL",{"data-svelte-h":!0}),m(Fe)!=="svelte-1yb5o5x"&&(Fe.innerHTML=fn),Pt=s(Z),h(E.$$.fragment,Z),Z.forEach(n),N.forEach(n),pt=s(e),h(ye.$$.fragment,e),ht=s(e),Pe=d(e,"P",{}),B(Pe).forEach(n),this.h()},h(){F(r,"name","hf:doc:metadata"),F(r,"content",Jn),F(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(T,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),F(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,t){i(document.head,r),a(e,w,t),a(e,c,t),a(e,b,t),a(e,U,t),a(e,P,t),a(e,V,t),a(e,Re,t),a(e,X,t),a(e,He,t),a(e,Q,t),a(e,qe,t),a(e,S,t),a(e,Ee,t),a(e,A,t),a(e,Ve,t),u(Y,e,t),a(e,Xe,t),u(D,e,t),a(e,Qe,t),u(O,e,t),a(e,Se,t),a(e,K,t),a(e,Ae,t),a(e,ee,t),a(e,Ye,t),a(e,te,t),a(e,De,t),a(e,ne,t),a(e,Oe,t),a(e,oe,t),a(e,Ke,t),u(se,e,t),a(e,et,t),a(e,ae,t),a(e,tt,t),u(re,e,t),a(e,nt,t),u(ie,e,t),a(e,ot,t),a(e,le,t),a(e,st,t),u(de,e,t),a(e,at,t),a(e,C,t),u(ce,C,null),i(C,gt),i(C,Te),i(C,_t),i(C,Ce),i(C,wt),u(G,C,null),a(e,rt,t),u(me,e,t),a(e,it,t),a(e,k,t),u(pe,k,null),i(k,bt),i(k,ke),i(k,yt),i(k,$e),i(k,Mt),i(k,j),u(he,j,null),i(j,vt),i(j,xe),i(j,Tt),i(j,Ue),i(j,Ct),u(R,j,null),a(e,lt,t),u(ue,e,t),a(e,dt,t),a(e,M,t),u(fe,M,null),i(M,kt),i(M,je),i(M,$t),i(M,Je),i(M,xt),i(M,Ie),i(M,Ut),i(M,J),u(ge,J,null),i(J,jt),i(J,We),i(J,Jt),u(H,J,null),i(J,It),i(J,ze),a(e,ct,t),u(_e,e,t),a(e,mt,t),a(e,v,t),u(we,v,null),i(v,Wt),i(v,Le),i(v,zt),i(v,Ne),i(v,Lt),i(v,Ze),i(v,Nt),i(v,T),u(be,T,null),i(T,Zt),i(T,Be),i(T,Bt),u(q,T,null),i(T,Ft),i(T,Fe),i(T,Pt),u(E,T,null),a(e,pt,t),u(ye,e,t),a(e,ht,t),a(e,Pe,t),ut=!0},p(e,[t]){const I={};t&2&&(I.$$scope={dirty:t,ctx:e}),G.$set(I);const W={};t&2&&(W.$$scope={dirty:t,ctx:e}),R.$set(W);const z={};t&2&&(z.$$scope={dirty:t,ctx:e}),H.$set(z);const $={};t&2&&($.$$scope={dirty:t,ctx:e}),q.$set($);const L={};t&2&&(L.$$scope={dirty:t,ctx:e}),E.$set(L)},i(e){ut||(f(Y.$$.fragment,e),f(D.$$.fragment,e),f(O.$$.fragment,e),f(se.$$.fragment,e),f(re.$$.fragment,e),f(ie.$$.fragment,e),f(de.$$.fragment,e),f(ce.$$.fragment,e),f(G.$$.fragment,e),f(me.$$.fragment,e),f(pe.$$.fragment,e),f(he.$$.fragment,e),f(R.$$.fragment,e),f(ue.$$.fragment,e),f(fe.$$.fragment,e),f(ge.$$.fragment,e),f(H.$$.fragment,e),f(_e.$$.fragment,e),f(we.$$.fragment,e),f(be.$$.fragment,e),f(q.$$.fragment,e),f(E.$$.fragment,e),f(ye.$$.fragment,e),ut=!0)},o(e){g(Y.$$.fragment,e),g(D.$$.fragment,e),g(O.$$.fragment,e),g(se.$$.fragment,e),g(re.$$.fragment,e),g(ie.$$.fragment,e),g(de.$$.fragment,e),g(ce.$$.fragment,e),g(G.$$.fragment,e),g(me.$$.fragment,e),g(pe.$$.fragment,e),g(he.$$.fragment,e),g(R.$$.fragment,e),g(ue.$$.fragment,e),g(fe.$$.fragment,e),g(ge.$$.fragment,e),g(H.$$.fragment,e),g(_e.$$.fragment,e),g(we.$$.fragment,e),g(be.$$.fragment,e),g(q.$$.fragment,e),g(E.$$.fragment,e),g(ye.$$.fragment,e),ut=!1},d(e){e&&(n(w),n(c),n(b),n(U),n(P),n(V),n(Re),n(X),n(He),n(Q),n(qe),n(S),n(Ee),n(A),n(Ve),n(Xe),n(Qe),n(Se),n(K),n(Ae),n(ee),n(Ye),n(te),n(De),n(ne),n(Oe),n(oe),n(Ke),n(et),n(ae),n(tt),n(nt),n(ot),n(le),n(st),n(at),n(C),n(rt),n(it),n(k),n(lt),n(dt),n(M),n(ct),n(mt),n(v),n(pt),n(ht),n(Pe)),n(r),_(Y,e),_(D,e),_(O,e),_(se,e),_(re,e),_(ie,e),_(de,e),_(ce),_(G),_(me,e),_(pe),_(he),_(R),_(ue,e),_(fe),_(ge),_(H),_(_e,e),_(we),_(be),_(q),_(E),_(ye,e)}}}const Jn='{"title":"Code World Model (CWM)","local":"code-world-model-cwm","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage examples","local":"usage-examples","sections":[],"depth":2},{"title":"CwmConfig","local":"transformers.CwmConfig","sections":[],"depth":2},{"title":"CwmPreTrainedModel","local":"transformers.CwmPreTrainedModel","sections":[],"depth":2},{"title":"CwmModel","local":"transformers.CwmModel","sections":[],"depth":2},{"title":"CwmForCausalLM","local":"transformers.CwmForCausalLM","sections":[],"depth":2}],"depth":1}';function In(x){return wn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Gn extends bn{constructor(r){super(),yn(this,r,In,jn,_n,{})}}export{Gn as component}; | |
Xet Storage Details
- Size:
- 60.6 kB
- Xet hash:
- 1e50388e7aec3507e0d395b02342958f21661e36f7038b06ad23cf6d62ca6c1e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.