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,p;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,h){g(t,a,h),p=!0},p:we,i(a){p||(_(t.$$.fragment,a),p=!0)},o(a){b(t.$$.fragment,a),p=!1},d(a){y(t,a)}}}function ro(x){let t,p=`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=p},l(a){t=c(a,"P",{"data-svelte-h":!0}),k(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(a,h){i(a,t,h)},p:we,d(a){a&&n(t)}}}function io(x){let t,p=`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=p},l(a){t=c(a,"P",{"data-svelte-h":!0}),k(t)!=="svelte-fincs2"&&(t.innerHTML=p)},m(a,h){i(a,t,h)},p:we,d(a){a&&n(t)}}}function lo(x){let t,p="Example:",a,h,w;return h=new Qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBPbG1vRm9yQ2F1c2FsTE0lMEElMEFtb2RlbCUyMCUzRCUyME9sbW9Gb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyYWxsZW5haSUyRk9MTW8tMUItaGYlMjIpJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYWxsZW5haSUyRk9MTW8tMUItaGYlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySGV5JTJDJTIwYXJlJTIweW91JTIwY29uc2Npb3VzJTNGJTIwQ2FuJTIweW91JTIwdGFsayUyMHRvJTIwbWUlM0YlMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocHJvbXB0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEElMjMlMjBHZW5lcmF0ZSUwQWdlbmVyYXRlX2lkcyUyMCUzRCUyMG1vZGVsLmdlbmVyYXRlKGlucHV0cy5pbnB1dF9pZHMlMkMlMjBtYXhfbGVuZ3RoJTNEMzApJTBBdG9rZW5pemVyLmJhdGNoX2RlY29kZShnZW5lcmF0ZV9pZHMlMkMlMjBza2lwX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSUyQyUyMGNsZWFuX3VwX3Rva2VuaXphdGlvbl9zcGFjZXMlM0RGYWxzZSklNUIwJTVE",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;allenai/OLMo-1B-hf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;allenai/OLMo-1B-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">&#x27;Hey, are you conscious? Can you talk to me?\\nI’m not sure if you’re conscious of this, but I’m&#x27;</span>`,wrap:!1}}),{c(){t=d("p"),t.textContent=p,a=s(),u(h.$$.fragment)},l(m){t=c(m,"P",{"data-svelte-h":!0}),k(t)!=="svelte-11lpom8"&&(t.textContent=p),a=r(m),f(h.$$.fragment,m)},m(m,O){i(m,t,O),i(m,a,O),g(h,m,O),w=!0},p:we,i(m){w||(_(h.$$.fragment,m),w=!0)},o(m){b(h.$$.fragment,m),w=!1},d(m){m&&(n(t),n(a)),y(h,m)}}}function co(x){let t,p,a,h,w,m,O,ce,N,Ue='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,U,Je="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.",pe,J,He="The abstract from the paper is the following:",he,H,Ee="<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,E,Be=`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,B,ge,M,S,$e,ee,Se=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_31098/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,Ae=`Configuration objects inherit from <a href="/docs/transformers/pr_31098/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_31098/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Ce,W,_e,A,be,v,Z,xe,te,Ze=`The bare Olmo Model outputting raw hidden-states without any specific head on top.
This model inherits from <a href="/docs/transformers/pr_31098/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.)`,ze,ne,Ge=`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.`,Le,ae,Re="Transformer decoder consisting of <em>config.num_hidden_layers</em> layers. Each layer is a <code>OlmoDecoderLayer</code>",Ie,z,G,We,se,De='The <a href="/docs/transformers/pr_31098/en/model_doc/olmo#transformers.OlmoModel">OlmoModel</a> forward method, overrides the <code>__call__</code> special method.',Pe,P,ye,R,ve,L,D,je,$,V,Fe,re,Ve='The <a href="/docs/transformers/pr_31098/en/model_doc/olmo#transformers.OlmoForCausalLM">OlmoForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',qe,j,Ne,F,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"}}),B=new de({props:{title:"OlmoConfig",local:"transformers.OlmoConfig",headingTag:"h2"}}),S=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/pr_31098/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/vr_31098/src/transformers/models/olmo/configuration_olmo.py#L29"}}),W=new Ye({props:{anchor:"transformers.OlmoConfig.example",$$slots:{default:[so]},$$scope:{ctx:x}}}),A=new de({props:{title:"OlmoModel",local:"transformers.OlmoModel",headingTag:"h2"}}),Z=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/pr_31098/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/pr_31098/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.
config &#x2014; OlmoConfig`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/models/olmo/modeling_olmo.py#L800"}}),G=new le({props:{name:"forward",anchor:"transformers.OlmoModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Union = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"}],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/pr_31098/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31098/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31098/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/pr_31098/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31098/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31098/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/pr_31098/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/pr_31098/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/vr_31098/src/transformers/models/olmo/modeling_olmo.py#L833"}}),P=new Xe({props:{$$slots:{default:[ro]},$$scope:{ctx:x}}}),R=new de({props:{title:"OlmoForCausalLM",local:"transformers.OlmoForCausalLM",headingTag:"h2"}}),D=new le({props:{name:"class transformers.OlmoForCausalLM",anchor:"transformers.OlmoForCausalLM",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/models/olmo/modeling_olmo.py#L1026"}}),V=new le({props:{name:"forward",anchor:"transformers.OlmoForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = None"},{name:"cache_position",val:": Optional = None"},{name:"num_logits_to_keep",val:": int = 0"}],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/pr_31098/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31098/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31098/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/pr_31098/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31098/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31098/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/pr_31098/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/pr_31098/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.</p>
<p>Args &#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>num_logits_to_keep (<code>int</code>, <em>optional</em>):
Calculate logits for the last <code>num_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.`,name:"cache_position"}],source:"https://github.com/huggingface/transformers/blob/vr_31098/src/transformers/models/olmo/modeling_olmo.py#L1056",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31098/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/pr_31098/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/pr_31098/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithPast"
>transformers.modeling_outputs.CausalLMOutputWithPast</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),j=new Xe({props:{$$slots:{default:[io]},$$scope:{ctx:x}}}),F=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"),p=s(),a=d("p"),h=s(),u(w.$$.fragment),m=s(),u(O.$$.fragment),ce=s(),N=d("p"),N.innerHTML=Ue,me=s(),U=d("p"),U.innerHTML=Je,pe=s(),J=d("p"),J.textContent=He,he=s(),H=d("p"),H.innerHTML=Ee,ue=s(),E=d("p"),E.innerHTML=Be,fe=s(),u(B.$$.fragment),ge=s(),M=d("div"),u(S.$$.fragment),$e=s(),ee=d("p"),ee.innerHTML=Se,Oe=s(),oe=d("p"),oe.innerHTML=Ae,Ce=s(),u(W.$$.fragment),_e=s(),u(A.$$.fragment),be=s(),v=d("div"),u(Z.$$.fragment),xe=s(),te=d("p"),te.innerHTML=Ze,ze=s(),ne=d("p"),ne.innerHTML=Ge,Le=s(),ae=d("p"),ae.innerHTML=Re,Ie=s(),z=d("div"),u(G.$$.fragment),We=s(),se=d("p"),se.innerHTML=De,Pe=s(),u(P.$$.fragment),ye=s(),u(R.$$.fragment),ve=s(),L=d("div"),u(D.$$.fragment),je=s(),$=d("div"),u(V.$$.fragment),Fe=s(),re=d("p"),re.innerHTML=Ve,qe=s(),u(j.$$.fragment),Ne=s(),u(F.$$.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),p=r(e),a=c(e,"P",{}),Q(a).forEach(n),h=r(e),f(w.$$.fragment,e),m=r(e),f(O.$$.fragment,e),ce=r(e),N=c(e,"P",{"data-svelte-h":!0}),k(N)!=="svelte-13dg1hr"&&(N.innerHTML=Ue),me=r(e),U=c(e,"P",{"data-svelte-h":!0}),k(U)!=="svelte-1lo0q0e"&&(U.innerHTML=Je),pe=r(e),J=c(e,"P",{"data-svelte-h":!0}),k(J)!=="svelte-vfdo9a"&&(J.textContent=He),he=r(e),H=c(e,"P",{"data-svelte-h":!0}),k(H)!=="svelte-djcbve"&&(H.innerHTML=Ee),ue=r(e),E=c(e,"P",{"data-svelte-h":!0}),k(E)!=="svelte-1kmdpvx"&&(E.innerHTML=Be),fe=r(e),f(B.$$.fragment,e),ge=r(e),M=c(e,"DIV",{class:!0});var C=Q(M);f(S.$$.fragment,C),$e=r(C),ee=c(C,"P",{"data-svelte-h":!0}),k(ee)!=="svelte-dib55l"&&(ee.innerHTML=Se),Oe=r(C),oe=c(C,"P",{"data-svelte-h":!0}),k(oe)!=="svelte-1eopo2z"&&(oe.innerHTML=Ae),Ce=r(C),f(W.$$.fragment,C),C.forEach(n),_e=r(e),f(A.$$.fragment,e),be=r(e),v=c(e,"DIV",{class:!0});var T=Q(v);f(Z.$$.fragment,T),xe=r(T),te=c(T,"P",{"data-svelte-h":!0}),k(te)!=="svelte-bdacz2"&&(te.innerHTML=Ze),ze=r(T),ne=c(T,"P",{"data-svelte-h":!0}),k(ne)!=="svelte-hswkmf"&&(ne.innerHTML=Ge),Le=r(T),ae=c(T,"P",{"data-svelte-h":!0}),k(ae)!=="svelte-120ei4e"&&(ae.innerHTML=Re),Ie=r(T),z=c(T,"DIV",{class:!0});var I=Q(z);f(G.$$.fragment,I),We=r(I),se=c(I,"P",{"data-svelte-h":!0}),k(se)!=="svelte-fyir3l"&&(se.innerHTML=De),Pe=r(I),f(P.$$.fragment,I),I.forEach(n),T.forEach(n),ye=r(e),f(R.$$.fragment,e),ve=r(e),L=c(e,"DIV",{class:!0});var Y=Q(L);f(D.$$.fragment,Y),je=r(Y),$=c(Y,"DIV",{class:!0});var q=Q($);f(V.$$.fragment,q),Fe=r(q),re=c(q,"P",{"data-svelte-h":!0}),k(re)!=="svelte-1d9vnl5"&&(re.innerHTML=Ve),qe=r(q),f(j.$$.fragment,q),Ne=r(q),f(F.$$.fragment,q),q.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(z,"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(L,"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,p,o),i(e,a,o),i(e,h,o),g(w,e,o),i(e,m,o),g(O,e,o),i(e,ce,o),i(e,N,o),i(e,me,o),i(e,U,o),i(e,pe,o),i(e,J,o),i(e,he,o),i(e,H,o),i(e,ue,o),i(e,E,o),i(e,fe,o),g(B,e,o),i(e,ge,o),i(e,M,o),g(S,M,null),l(M,$e),l(M,ee),l(M,Oe),l(M,oe),l(M,Ce),g(W,M,null),i(e,_e,o),g(A,e,o),i(e,be,o),i(e,v,o),g(Z,v,null),l(v,xe),l(v,te),l(v,ze),l(v,ne),l(v,Le),l(v,ae),l(v,Ie),l(v,z),g(G,z,null),l(z,We),l(z,se),l(z,Pe),g(P,z,null),i(e,ye,o),g(R,e,o),i(e,ve,o),i(e,L,o),g(D,L,null),l(L,je),l(L,$),g(V,$,null),l($,Fe),l($,re),l($,qe),g(j,$,null),l($,Ne),g(F,$,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}),W.$set(C);const T={};o&2&&(T.$$scope={dirty:o,ctx:e}),P.$set(T);const I={};o&2&&(I.$$scope={dirty:o,ctx:e}),j.$set(I);const Y={};o&2&&(Y.$$scope={dirty:o,ctx:e}),F.$set(Y)},i(e){Te||(_(w.$$.fragment,e),_(O.$$.fragment,e),_(B.$$.fragment,e),_(S.$$.fragment,e),_(W.$$.fragment,e),_(A.$$.fragment,e),_(Z.$$.fragment,e),_(G.$$.fragment,e),_(P.$$.fragment,e),_(R.$$.fragment,e),_(D.$$.fragment,e),_(V.$$.fragment,e),_(j.$$.fragment,e),_(F.$$.fragment,e),_(X.$$.fragment,e),Te=!0)},o(e){b(w.$$.fragment,e),b(O.$$.fragment,e),b(B.$$.fragment,e),b(S.$$.fragment,e),b(W.$$.fragment,e),b(A.$$.fragment,e),b(Z.$$.fragment,e),b(G.$$.fragment,e),b(P.$$.fragment,e),b(R.$$.fragment,e),b(D.$$.fragment,e),b(V.$$.fragment,e),b(j.$$.fragment,e),b(F.$$.fragment,e),b(X.$$.fragment,e),Te=!1},d(e){e&&(n(p),n(a),n(h),n(m),n(ce),n(N),n(me),n(U),n(pe),n(J),n(he),n(H),n(ue),n(E),n(fe),n(ge),n(M),n(_e),n(be),n(v),n(ye),n(ve),n(L),n(ke),n(Me),n(ie)),n(t),y(w,e),y(O,e),y(B,e),y(S),y(W),y(A,e),y(Z),y(G),y(P),y(R,e),y(D),y(V),y(j),y(F),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 po(x){return eo(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class vo extends oo{constructor(t){super(),to(this,t,po,co,Ke,{})}}export{vo as component};
