import{s as Ke,o as eo,n as we}from"../chunks/scheduler.25b97de1.js";import{S as oo,i as to,g as d,s,r as u,A as no,h as c,f as n,c as r,j as Q,u as f,x as k,k as K,y as l,a as i,v as g,d as _,t as b,w as y}from"../chunks/index.d9030fc9.js";import{T as Xe}from"../chunks/Tip.baa67368.js";import{D as le}from"../chunks/Docstring.ffac8efa.js";import{C as Qe}from"../chunks/CodeBlock.e6cd0d95.js";import{E as Ye}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as de,E as ao}from"../chunks/EditOnGithub.91d95064.js";function so(x){let t,h;return t=new Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyME9sbW9Nb2RlbCUyQyUyME9sbW9Db25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwT0xNbyUyMDdCJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyME9sbW9Db25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMGZyb20lMjB0aGUlMjBPTE1vJTIwN0IlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyME9sbW9Nb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> OlmoModel, OlmoConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a OLMo 7B style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = OlmoConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the OLMo 7B style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = OlmoModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`,wrap:!1}}),{c(){u(t.$$.fragment)},l(a){f(t.$$.fragment,a)},m(a,p){g(t,a,p),h=!0},p:we,i(a){h||(_(t.$$.fragment,a),h=!0)},o(a){b(t.$$.fragment,a),h=!1},d(a){y(t,a)}}}function ro(x){let t,h=`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=d("p"),t.innerHTML=h},l(a){t=c(a,"P",{"data-svelte-h":!0}),k(t)!=="svelte-fincs2"&&(t.innerHTML=h)},m(a,p){i(a,t,p)},p:we,d(a){a&&n(t)}}}function io(x){let t,h=`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=d("p"),t.innerHTML=h},l(a){t=c(a,"P",{"data-svelte-h":!0}),k(t)!=="svelte-fincs2"&&(t.innerHTML=h)},m(a,p){i(a,t,p)},p:we,d(a){a&&n(t)}}}function lo(x){let t,h="Example:",a,p,w;return p=new Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBPbG1vRm9yQ2F1c2FsTE0lMEElMEFtb2RlbCUyMCUzRCUyME9sbW9Gb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIybWV0YS1vbG1vJTJGT2xtby0yLTdiLWhmJTIyKSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMm1ldGEtb2xtbyUyRk9sbW8tMi03Yi1oZiUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJIZXklMkMlMjBhcmUlMjB5b3UlMjBjb25zY2lvdXMlM0YlMjBDYW4lMjB5b3UlMjB0YWxrJTIwdG8lMjBtZSUzRiUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihwcm9tcHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMEdlbmVyYXRlJTBBZ2VuZXJhdGVfaWRzJTIwJTNEJTIwbW9kZWwuZ2VuZXJhdGUoaW5wdXRzLmlucHV0X2lkcyUyQyUyMG1heF9sZW5ndGglM0QzMCklMEF0b2tlbml6ZXIuYmF0Y2hfZGVjb2RlKGdlbmVyYXRlX2lkcyUyQyUyMHNraXBfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwY2xlYW5fdXBfdG9rZW5pemF0aW9uX3NwYWNlcyUzREZhbHNlKSU1QjAlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, OlmoForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>model = OlmoForCausalLM.from_pretrained(<span class="hljs-string">&quot;meta-olmo/Olmo-2-7b-hf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;meta-olmo/Olmo-2-7b-hf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;Hey, are you conscious? Can you talk to me?&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(prompt, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Generate</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>generate_ids = model.generate(inputs.input_ids, max_length=<span class="hljs-number">30</span>)
<span class="hljs-meta">&gt;&gt;&gt; </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">&quot;Hey, are you conscious? Can you talk to me?\\nI&#x27;m not conscious, but I can talk to you.&quot;</span>`,wrap:!1}}),{c(){t=d("p"),t.textContent=h,a=s(),u(p.$$.fragment)},l(m){t=c(m,"P",{"data-svelte-h":!0}),k(t)!=="svelte-11lpom8"&&(t.textContent=h),a=r(m),f(p.$$.fragment,m)},m(m,O){i(m,t,O),i(m,a,O),g(p,m,O),w=!0},p:we,i(m){w||(_(p.$$.fragment,m),w=!0)},o(m){b(p.$$.fragment,m),w=!1},d(m){m&&(n(t),n(a)),y(p,m)}}}function co(x){let t,h,a,p,w,m,O,ce,q,Ee='The OLMo model was proposed in <a href="https://arxiv.org/abs/2402.00838" rel="nofollow">OLMo: Accelerating the Science of Language Models</a> by Dirk Groeneveld, Iz Beltagy, Pete Walsh, Akshita Bhagia, Rodney Kinney, Oyvind Tafjord, Ananya Harsh Jha, Hamish Ivison, Ian Magnusson, Yizhong Wang, Shane Arora, David Atkinson, Russell Authur, Khyathi Raghavi Chandu, Arman Cohan, Jennifer Dumas, Yanai Elazar, Yuling Gu, Jack Hessel, Tushar Khot, William Merrill, Jacob Morrison, Niklas Muennighoff, Aakanksha Naik, Crystal Nam, Matthew E. Peters, Valentina Pyatkin, Abhilasha Ravichander, Dustin Schwenk, Saurabh Shah, Will Smith, Emma Strubell, Nishant Subramani, Mitchell Wortsman, Pradeep Dasigi, Nathan Lambert, Kyle Richardson, Luke Zettlemoyer, Jesse Dodge, Kyle Lo, Luca Soldaini, Noah A. Smith, Hannaneh Hajishirzi.',me,E,He="OLMo is a series of <strong>O</strong>pen <strong>L</strong>anguage <strong>Mo</strong>dels designed to enable the science of language models. The OLMo models are trained on the Dolma dataset. We release all code, checkpoints, logs (coming soon), and details involved in training these models.",he,H,Ne="The abstract from the paper is the following:",pe,N,Ae="<em>Language models (LMs) have become ubiquitous in both NLP research and in commercial product offerings. As their commercial importance has surged, the most powerful models have become closed off, gated behind proprietary interfaces, with important details of their training data, architectures, and development undisclosed. Given the importance of these details in scientifically studying these models, including their biases and potential risks, we believe it is essential for the research community to have access to powerful, truly open LMs. To this end, this technical report details the first release of OLMo, a state-of-the-art, truly Open Language Model and its framework to build and study the science of language modeling. Unlike most prior efforts that have only released model weights and inference code, we release OLMo and the whole framework, including training data and training and evaluation code. We hope this release will empower and strengthen the open research community and inspire a new wave of innovation.</em>",ue,A,Se=`This model was contributed by <a href="https://huggingface.co/shanearora" rel="nofollow">shanearora</a>.
The original code can be found <a href="https://github.com/allenai/OLMo/tree/main/olmo" rel="nofollow">here</a>.`,fe,S,ge,M,B,$e,ee,Be=`This is the configuration class to store the configuration of a <a href="/docs/transformers/main/en/model_doc/olmo#transformers.OlmoModel">OlmoModel</a>. It is used to instantiate an OLMo
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/allenai/OLMo-7B-hf" rel="nofollow">allenai/OLMo-7B-hf</a>.`,Oe,oe,Re=`Configuration objects inherit from <a href="/docs/transformers/main/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/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ce,F,_e,R,be,v,G,xe,te,Ge=`The bare Olmo Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/main/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.)`,Le,ne,De=`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.`,ze,ae,Ze="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>OlmoDecoderLayer</code>",Ue,L,D,Fe,se,Je='The <a href="/docs/transformers/main/en/model_doc/olmo#transformers.OlmoModel">OlmoModel</a> forward method, overrides the <code>__call__</code> special method.',je,j,ye,Z,ve,z,J,Pe,$,V,Ie,re,Ve='The <a href="/docs/transformers/main/en/model_doc/olmo#transformers.OlmoForCausalLM">OlmoForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',We,P,qe,I,ke,X,Me,ie,Te;return w=new de({props:{title:"OLMo",local:"olmo",headingTag:"h1"}}),O=new de({props:{title:"Overview",local:"overview",headingTag:"h2"}}),S=new de({props:{title:"OlmoConfig",local:"transformers.OlmoConfig",headingTag:"h2"}}),B=new le({props:{name:"class transformers.OlmoConfig",anchor:"transformers.OlmoConfig",parameters:[{name:"vocab_size",val:" = 50304"},{name:"hidden_size",val:" = 4096"},{name:"intermediate_size",val:" = 11008"},{name:"num_hidden_layers",val:" = 32"},{name:"num_attention_heads",val:" = 32"},{name:"num_key_value_heads",val:" = None"},{name:"hidden_act",val:" = 'silu'"},{name:"max_position_embeddings",val:" = 2048"},{name:"initializer_range",val:" = 0.02"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = None"},{name:"eos_token_id",val:" = 50279"},{name:"tie_word_embeddings",val:" = False"},{name:"rope_theta",val:" = 10000.0"},{name:"rope_scaling",val:" = None"},{name:"attention_bias",val:" = False"},{name:"attention_dropout",val:" = 0.0"},{name:"clip_qkv",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.OlmoConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50304) &#x2014;
Vocabulary size of the OLMo model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/olmo#transformers.OlmoModel">OlmoModel</a>`,name:"vocab_size"},{anchor:"transformers.OlmoConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.OlmoConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 11008) &#x2014;
Dimension of the MLP representations.`,name:"intermediate_size"},{anchor:"transformers.OlmoConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of hidden layers in the Transformer decoder.`,name:"num_hidden_layers"},{anchor:"transformers.OlmoConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"num_attention_heads"},{anchor:"transformers.OlmoConfig.num_key_value_heads",description:`<strong>num_key_value_heads</strong> (<code>int</code>, <em>optional</em>) &#x2014;
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 checkout <a href="https://arxiv.org/pdf/2305.13245.pdf" 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.OlmoConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;silu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the decoder.`,name:"hidden_act"},{anchor:"transformers.OlmoConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
The maximum sequence length that this model might ever be used with.`,name:"max_position_embeddings"},{anchor:"transformers.OlmoConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.OlmoConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
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>.`,name:"use_cache"},{anchor:"transformers.OlmoConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Padding token id.`,name:"pad_token_id"},{anchor:"transformers.OlmoConfig.bos_token_id",description:`<strong>bos_token_id</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Beginning of stream token id.`,name:"bos_token_id"},{anchor:"transformers.OlmoConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 50279) &#x2014;
End of stream token id.`,name:"eos_token_id"},{anchor:"transformers.OlmoConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to tie weight embeddings`,name:"tie_word_embeddings"},{anchor:"transformers.OlmoConfig.rope_theta",description:`<strong>rope_theta</strong> (<code>float</code>, <em>optional</em>, defaults to 10000.0) &#x2014;
The base period of the RoPE embeddings.`,name:"rope_theta"},{anchor:"transformers.OlmoConfig.rope_scaling",description:`<strong>rope_scaling</strong> (<code>Dict</code>, <em>optional</em>) &#x2014;
Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling
strategies: linear and dynamic. Their scaling factor must be a float greater than 1. The expected format is
<code>{&quot;type&quot;: strategy name, &quot;factor&quot;: scaling factor}</code>. When using this flag, don&#x2019;t update
<code>max_position_embeddings</code> to the expected new maximum. See the following thread for more information on how
these scaling strategies behave:
<a href="https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/" rel="nofollow">https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/</a>. This is an
experimental feature, subject to breaking API changes in future versions.`,name:"rope_scaling"},{anchor:"transformers.OlmoConfig.attention_bias",description:`<strong>attention_bias</strong> (<code>bool</code>, defaults to <code>False</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use a bias in the query, key, value and output projection layers during self-attention.`,name:"attention_bias"},{anchor:"transformers.OlmoConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.OlmoConfig.clip_qkv",description:`<strong>clip_qkv</strong> (<code>float</code>, <em>optional</em>) &#x2014;
If not <code>None</code>, elements of query, key and value attention states are clipped so that their
absolute value does not exceed this value.`,name:"clip_qkv"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/olmo/configuration_olmo.py#L29"}}),F=new Ye({props:{anchor:"transformers.OlmoConfig.example",$$slots:{default:[so]},$$scope:{ctx:x}}}),R=new de({props:{title:"OlmoModel",local:"transformers.OlmoModel",headingTag:"h2"}}),G=new le({props:{name:"class transformers.OlmoModel",anchor:"transformers.OlmoModel",parameters:[{name:"config",val:": OlmoConfig"}],parametersDescription:[{anchor:"transformers.OlmoModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/olmo#transformers.OlmoConfig">OlmoConfig</a>) &#x2014;
Model configuration class with all the parameters of the model. Initializing with a config file does not
load the weights associated with the model, only the configuration. Check out the
<a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.OlmoModel.config",description:"<strong>config</strong> &#x2014; OlmoConfig",name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/olmo/modeling_olmo.py#L460"}}),D=new le({props:{name:"forward",anchor:"transformers.OlmoModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Optional[transformers.cache_utils.Cache] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"},{name:"**flash_attn_kwargs",val:": typing_extensions.Unpack[transformers.modeling_flash_attention_utils.FlashAttentionKwargs]"}],parametersDescription:[{anchor:"transformers.OlmoModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.OlmoModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.OlmoModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
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.OlmoModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/main/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.OlmoModel.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>) &#x2014;
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&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.OlmoModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.OlmoModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.OlmoModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.OlmoModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.OlmoModel.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/olmo/modeling_olmo.py#L494"}}),j=new Xe({props:{$$slots:{default:[ro]},$$scope:{ctx:x}}}),Z=new de({props:{title:"OlmoForCausalLM",local:"transformers.OlmoForCausalLM",headingTag:"h2"}}),J=new le({props:{name:"class transformers.OlmoForCausalLM",anchor:"transformers.OlmoForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/olmo/modeling_olmo.py#L728"}}),V=new le({props:{name:"forward",anchor:"transformers.OlmoForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Union[transformers.cache_utils.Cache, typing.List[torch.FloatTensor], NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"cache_position",val:": typing.Optional[torch.LongTensor] = None"},{name:"logits_to_keep",val:": typing.Union[int, torch.Tensor] = 0"},{name:"**kwargs",val:": typing_extensions.Unpack[transformers.models.olmo.modeling_olmo.KwargsForCausalLM]"}],parametersDescription:[{anchor:"transformers.OlmoForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary. Padding will be ignored by default should you provide
it.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.OlmoForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a></p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p>If <code>past_key_values</code> is used, optionally only the last <code>input_ids</code> have to be input (see
<code>past_key_values</code>).</p>
<p>If you want to change padding behavior, you should read <code>modeling_opt._prepare_decoder_attention_mask</code>
and modify to your needs. See diagram 1 in <a href="https://arxiv.org/abs/1910.13461" rel="nofollow">the paper</a> for more
information on the default strategy.</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"attention_mask"},{anchor:"transformers.OlmoForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
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.OlmoForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>Cache</code> or <code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>) &#x2014;
Pre-computed hidden-states (key and values in the self-attention blocks and in the cross-attention
blocks) that can be used to speed up sequential decoding. This typically consists in the <code>past_key_values</code>
returned by the model at a previous stage of decoding, when <code>use_cache=True</code> or <code>config.use_cache=True</code>.</p>
<p>Two formats are allowed:</p>
<ul>
<li>a <a href="/docs/transformers/main/en/internal/generation_utils#transformers.Cache">Cache</a> instance, see our
<a href="https://huggingface.co/docs/transformers/en/kv_cache" rel="nofollow">kv cache guide</a>;</li>
<li>Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of
shape <code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>). This is also known as the legacy
cache format.</li>
</ul>
<p>The model will output the same cache format that is fed as input. If no <code>past_key_values</code> are passed, the
legacy cache format will be returned.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>input_ids</code> (those that don&#x2019;t
have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all <code>input_ids</code>
of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.OlmoForCausalLM.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>) &#x2014;
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&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.OlmoForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.OlmoForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.OlmoForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.OlmoForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.OlmoForCausalLM.forward.cache_position",description:`<strong>cache_position</strong> (<code>torch.LongTensor</code> of shape <code>(sequence_length)</code>, <em>optional</em>) &#x2014;
Indices depicting the position of the input sequence tokens in the sequence. Contrarily to <code>position_ids</code>,
this tensor is not affected by padding. It is used to update the cache in the correct position and to infer
the complete sequence length.`,name:"cache_position"},{anchor:"transformers.OlmoForCausalLM.forward.Args",description:`<strong>Args</strong> &#x2014;
labels (<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>.</p>
<p>logits_to_keep (<code>int</code> or <code>torch.Tensor</code>, <em>optional</em>):
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:"Args"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/olmo/modeling_olmo.py#L760",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/olmo#transformers.OlmoConfig"
>OlmoConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>)</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),P=new Xe({props:{$$slots:{default:[io]},$$scope:{ctx:x}}}),I=new Ye({props:{anchor:"transformers.OlmoForCausalLM.forward.example",$$slots:{default:[lo]},$$scope:{ctx:x}}}),X=new ao({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/olmo.md"}}),{c(){t=d("meta"),h=s(),a=d("p"),p=s(),u(w.$$.fragment),m=s(),u(O.$$.fragment),ce=s(),q=d("p"),q.innerHTML=Ee,me=s(),E=d("p"),E.innerHTML=He,he=s(),H=d("p"),H.textContent=Ne,pe=s(),N=d("p"),N.innerHTML=Ae,ue=s(),A=d("p"),A.innerHTML=Se,fe=s(),u(S.$$.fragment),ge=s(),M=d("div"),u(B.$$.fragment),$e=s(),ee=d("p"),ee.innerHTML=Be,Oe=s(),oe=d("p"),oe.innerHTML=Re,Ce=s(),u(F.$$.fragment),_e=s(),u(R.$$.fragment),be=s(),v=d("div"),u(G.$$.fragment),xe=s(),te=d("p"),te.innerHTML=Ge,Le=s(),ne=d("p"),ne.innerHTML=De,ze=s(),ae=d("p"),ae.innerHTML=Ze,Ue=s(),L=d("div"),u(D.$$.fragment),Fe=s(),se=d("p"),se.innerHTML=Je,je=s(),u(j.$$.fragment),ye=s(),u(Z.$$.fragment),ve=s(),z=d("div"),u(J.$$.fragment),Pe=s(),$=d("div"),u(V.$$.fragment),Ie=s(),re=d("p"),re.innerHTML=Ve,We=s(),u(P.$$.fragment),qe=s(),u(I.$$.fragment),ke=s(),u(X.$$.fragment),Me=s(),ie=d("p"),this.h()},l(e){const o=no("svelte-u9bgzb",document.head);t=c(o,"META",{name:!0,content:!0}),o.forEach(n),h=r(e),a=c(e,"P",{}),Q(a).forEach(n),p=r(e),f(w.$$.fragment,e),m=r(e),f(O.$$.fragment,e),ce=r(e),q=c(e,"P",{"data-svelte-h":!0}),k(q)!=="svelte-13dg1hr"&&(q.innerHTML=Ee),me=r(e),E=c(e,"P",{"data-svelte-h":!0}),k(E)!=="svelte-1lo0q0e"&&(E.innerHTML=He),he=r(e),H=c(e,"P",{"data-svelte-h":!0}),k(H)!=="svelte-vfdo9a"&&(H.textContent=Ne),pe=r(e),N=c(e,"P",{"data-svelte-h":!0}),k(N)!=="svelte-djcbve"&&(N.innerHTML=Ae),ue=r(e),A=c(e,"P",{"data-svelte-h":!0}),k(A)!=="svelte-1kmdpvx"&&(A.innerHTML=Se),fe=r(e),f(S.$$.fragment,e),ge=r(e),M=c(e,"DIV",{class:!0});var C=Q(M);f(B.$$.fragment,C),$e=r(C),ee=c(C,"P",{"data-svelte-h":!0}),k(ee)!=="svelte-ijsige"&&(ee.innerHTML=Be),Oe=r(C),oe=c(C,"P",{"data-svelte-h":!0}),k(oe)!=="svelte-o55m63"&&(oe.innerHTML=Re),Ce=r(C),f(F.$$.fragment,C),C.forEach(n),_e=r(e),f(R.$$.fragment,e),be=r(e),v=c(e,"DIV",{class:!0});var T=Q(v);f(G.$$.fragment,T),xe=r(T),te=c(T,"P",{"data-svelte-h":!0}),k(te)!=="svelte-41rq15"&&(te.innerHTML=Ge),Le=r(T),ne=c(T,"P",{"data-svelte-h":!0}),k(ne)!=="svelte-hswkmf"&&(ne.innerHTML=De),ze=r(T),ae=c(T,"P",{"data-svelte-h":!0}),k(ae)!=="svelte-120ei4e"&&(ae.innerHTML=Ze),Ue=r(T),L=c(T,"DIV",{class:!0});var U=Q(L);f(D.$$.fragment,U),Fe=r(U),se=c(U,"P",{"data-svelte-h":!0}),k(se)!=="svelte-1ug7upq"&&(se.innerHTML=Je),je=r(U),f(j.$$.fragment,U),U.forEach(n),T.forEach(n),ye=r(e),f(Z.$$.fragment,e),ve=r(e),z=c(e,"DIV",{class:!0});var Y=Q(z);f(J.$$.fragment,Y),Pe=r(Y),$=c(Y,"DIV",{class:!0});var W=Q($);f(V.$$.fragment,W),Ie=r(W),re=c(W,"P",{"data-svelte-h":!0}),k(re)!=="svelte-17he1h2"&&(re.innerHTML=Ve),We=r(W),f(P.$$.fragment,W),qe=r(W),f(I.$$.fragment,W),W.forEach(n),Y.forEach(n),ke=r(e),f(X.$$.fragment,e),Me=r(e),ie=c(e,"P",{}),Q(ie).forEach(n),this.h()},h(){K(t,"name","hf:doc:metadata"),K(t,"content",mo),K(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),K(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),K(v,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),K($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),K(z,"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){l(document.head,t),i(e,h,o),i(e,a,o),i(e,p,o),g(w,e,o),i(e,m,o),g(O,e,o),i(e,ce,o),i(e,q,o),i(e,me,o),i(e,E,o),i(e,he,o),i(e,H,o),i(e,pe,o),i(e,N,o),i(e,ue,o),i(e,A,o),i(e,fe,o),g(S,e,o),i(e,ge,o),i(e,M,o),g(B,M,null),l(M,$e),l(M,ee),l(M,Oe),l(M,oe),l(M,Ce),g(F,M,null),i(e,_e,o),g(R,e,o),i(e,be,o),i(e,v,o),g(G,v,null),l(v,xe),l(v,te),l(v,Le),l(v,ne),l(v,ze),l(v,ae),l(v,Ue),l(v,L),g(D,L,null),l(L,Fe),l(L,se),l(L,je),g(j,L,null),i(e,ye,o),g(Z,e,o),i(e,ve,o),i(e,z,o),g(J,z,null),l(z,Pe),l(z,$),g(V,$,null),l($,Ie),l($,re),l($,We),g(P,$,null),l($,qe),g(I,$,null),i(e,ke,o),g(X,e,o),i(e,Me,o),i(e,ie,o),Te=!0},p(e,[o]){const C={};o&2&&(C.$$scope={dirty:o,ctx:e}),F.$set(C);const T={};o&2&&(T.$$scope={dirty:o,ctx:e}),j.$set(T);const U={};o&2&&(U.$$scope={dirty:o,ctx:e}),P.$set(U);const Y={};o&2&&(Y.$$scope={dirty:o,ctx:e}),I.$set(Y)},i(e){Te||(_(w.$$.fragment,e),_(O.$$.fragment,e),_(S.$$.fragment,e),_(B.$$.fragment,e),_(F.$$.fragment,e),_(R.$$.fragment,e),_(G.$$.fragment,e),_(D.$$.fragment,e),_(j.$$.fragment,e),_(Z.$$.fragment,e),_(J.$$.fragment,e),_(V.$$.fragment,e),_(P.$$.fragment,e),_(I.$$.fragment,e),_(X.$$.fragment,e),Te=!0)},o(e){b(w.$$.fragment,e),b(O.$$.fragment,e),b(S.$$.fragment,e),b(B.$$.fragment,e),b(F.$$.fragment,e),b(R.$$.fragment,e),b(G.$$.fragment,e),b(D.$$.fragment,e),b(j.$$.fragment,e),b(Z.$$.fragment,e),b(J.$$.fragment,e),b(V.$$.fragment,e),b(P.$$.fragment,e),b(I.$$.fragment,e),b(X.$$.fragment,e),Te=!1},d(e){e&&(n(h),n(a),n(p),n(m),n(ce),n(q),n(me),n(E),n(he),n(H),n(pe),n(N),n(ue),n(A),n(fe),n(ge),n(M),n(_e),n(be),n(v),n(ye),n(ve),n(z),n(ke),n(Me),n(ie)),n(t),y(w,e),y(O,e),y(S,e),y(B),y(F),y(R,e),y(G),y(D),y(j),y(Z,e),y(J),y(V),y(P),y(I),y(X,e)}}}const mo='{"title":"OLMo","local":"olmo","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"OlmoConfig","local":"transformers.OlmoConfig","sections":[],"depth":2},{"title":"OlmoModel","local":"transformers.OlmoModel","sections":[],"depth":2},{"title":"OlmoForCausalLM","local":"transformers.OlmoForCausalLM","sections":[],"depth":2}],"depth":1}';function ho(x){return eo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class vo extends oo{constructor(t){super(),to(this,t,ho,co,Ke,{})}}export{vo as component};
