Skip to content

Commit 91b44eb

Browse files
committed
Add support for Olmo3
1 parent 8f50b04 commit 91b44eb

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ You can refine your search by selecting the task you're interested in (e.g., [te
379379
1. **[Nougat](https://huggingface.co/docs/transformers/model_doc/nougat)** (from Meta AI) released with the paper [Nougat: Neural Optical Understanding for Academic Documents](https://huggingface.co/papers/2308.13418) by Lukas Blecher, Guillem Cucurull, Thomas Scialom, Robert Stojnic.
380380
1. **[OLMo](https://huggingface.co/docs/transformers/master/model_doc/olmo)** (from Ai2) released with the paper [OLMo: Accelerating the Science of Language Models](https://huggingface.co/papers/2402.00838) 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.
381381
1. **[OLMo2](https://huggingface.co/docs/transformers/master/model_doc/olmo2)** (from Ai2) released with the blog [OLMo 2: The best fully open language model to date](https://allenai.org/blog/olmo2) by the Ai2 OLMo team.
382+
1. **[OLMo3](https://huggingface.co/docs/transformers/master/model_doc/olmo3)** (from Ai2) released with the blog [Olmo 3: Charting a path through the model flow to lead open-source AI](https://allenai.org/blog/olmo3) by the Ai2 OLMo team.
382383
1. **OpenELM** (from Apple) released with the paper [OpenELM: An Efficient Language Model Family with Open-source Training and Inference Framework](https://huggingface.co/papers/2404.14619) by Sachin Mehta, Mohammad Hossein Sekhavat, Qingqing Cao, Maxwell Horton, Yanzi Jin, Chenfan Sun, Iman Mirzadeh, Mahyar Najibi, Dmitry Belenko, Peter Zatloukal, Mohammad Rastegari.
383384
1. **[OPT](https://huggingface.co/docs/transformers/master/model_doc/opt)** (from Meta AI) released with the paper [OPT: Open Pre-trained Transformer Language Models](https://huggingface.co/papers/2205.01068) by Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al.
384385
1. **[OWL-ViT](https://huggingface.co/docs/transformers/model_doc/owlvit)** (from Google AI) released with the paper [Simple Open-Vocabulary Object Detection with Vision Transformers](https://huggingface.co/papers/2205.06230) by Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby.

docs/snippets/5_supported-models.snippet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
1. **[Nougat](https://huggingface.co/docs/transformers/model_doc/nougat)** (from Meta AI) released with the paper [Nougat: Neural Optical Understanding for Academic Documents](https://huggingface.co/papers/2308.13418) by Lukas Blecher, Guillem Cucurull, Thomas Scialom, Robert Stojnic.
115115
1. **[OLMo](https://huggingface.co/docs/transformers/master/model_doc/olmo)** (from Ai2) released with the paper [OLMo: Accelerating the Science of Language Models](https://huggingface.co/papers/2402.00838) 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.
116116
1. **[OLMo2](https://huggingface.co/docs/transformers/master/model_doc/olmo2)** (from Ai2) released with the blog [OLMo 2: The best fully open language model to date](https://allenai.org/blog/olmo2) by the Ai2 OLMo team.
117+
1. **[OLMo3](https://huggingface.co/docs/transformers/master/model_doc/olmo3)** (from Ai2) released with the blog [Olmo 3: Charting a path through the model flow to lead open-source AI](https://allenai.org/blog/olmo3) by the Ai2 OLMo team.
117118
1. **OpenELM** (from Apple) released with the paper [OpenELM: An Efficient Language Model Family with Open-source Training and Inference Framework](https://huggingface.co/papers/2404.14619) by Sachin Mehta, Mohammad Hossein Sekhavat, Qingqing Cao, Maxwell Horton, Yanzi Jin, Chenfan Sun, Iman Mirzadeh, Mahyar Najibi, Dmitry Belenko, Peter Zatloukal, Mohammad Rastegari.
118119
1. **[OPT](https://huggingface.co/docs/transformers/master/model_doc/opt)** (from Meta AI) released with the paper [OPT: Open Pre-trained Transformer Language Models](https://huggingface.co/papers/2205.01068) by Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen et al.
119120
1. **[OWL-ViT](https://huggingface.co/docs/transformers/model_doc/owlvit)** (from Google AI) released with the paper [Simple Open-Vocabulary Object Detection with Vision Transformers](https://huggingface.co/papers/2205.06230) by Matthias Minderer, Alexey Gritsenko, Austin Stone, Maxim Neumann, Dirk Weissenborn, Alexey Dosovitskiy, Aravindh Mahendran, Anurag Arnab, Mostafa Dehghani, Zhuoran Shen, Xiao Wang, Xiaohua Zhai, Thomas Kipf, and Neil Houlsby.

src/configs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ function getNormalizedConfig(config) {
117117
case 'smollm3':
118118
case 'olmo':
119119
case 'olmo2':
120+
case 'olmo3':
120121
case 'mobilellm':
121122
case 'granite':
122123
case 'granitemoehybrid':

src/models.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4823,19 +4823,26 @@ export class MobileLLMForCausalLM extends MobileLLMPreTrainedModel {}
48234823
//////////////////////////////////////////////////
48244824

48254825
//////////////////////////////////////////////////
4826-
// OLMo models
4826+
// Olmo models
48274827
export class OlmoPreTrainedModel extends PreTrainedModel {}
48284828
export class OlmoModel extends OlmoPreTrainedModel {}
48294829
export class OlmoForCausalLM extends OlmoPreTrainedModel {}
48304830
//////////////////////////////////////////////////
48314831

48324832
//////////////////////////////////////////////////
4833-
// OLMo2 models
4833+
// Olmo2 models
48344834
export class Olmo2PreTrainedModel extends PreTrainedModel {}
48354835
export class Olmo2Model extends Olmo2PreTrainedModel {}
48364836
export class Olmo2ForCausalLM extends Olmo2PreTrainedModel {}
48374837
//////////////////////////////////////////////////
48384838

4839+
//////////////////////////////////////////////////
4840+
// Olmo3 models
4841+
export class Olmo3PreTrainedModel extends PreTrainedModel {}
4842+
export class Olmo3Model extends Olmo3PreTrainedModel {}
4843+
export class Olmo3ForCausalLM extends Olmo3PreTrainedModel {}
4844+
//////////////////////////////////////////////////
4845+
48394846
//////////////////////////////////////////////////
48404847
// Granite models
48414848
export class GranitePreTrainedModel extends PreTrainedModel {}
@@ -8274,6 +8281,7 @@ const MODEL_MAPPING_NAMES_DECODER_ONLY = new Map([
82748281
['exaone', ['ExaoneModel', ExaoneModel]],
82758282
['olmo', ['OlmoModel', OlmoModel]],
82768283
['olmo2', ['Olmo2Model', Olmo2Model]],
8284+
['olmo3', ['Olmo3Model', Olmo3Model]],
82778285
['mobilellm', ['MobileLLMModel', MobileLLMModel]],
82788286
['granite', ['GraniteModel', GraniteModel]],
82798287
['granitemoehybrid', ['GraniteMoeHybridModel', GraniteMoeHybridModel]],
@@ -8388,6 +8396,7 @@ const MODEL_FOR_CAUSAL_LM_MAPPING_NAMES = new Map([
83888396
['exaone', ['ExaoneForCausalLM', ExaoneForCausalLM]],
83898397
['olmo', ['OlmoForCausalLM', OlmoForCausalLM]],
83908398
['olmo2', ['Olmo2ForCausalLM', Olmo2ForCausalLM]],
8399+
['olmo3', ['Olmo3ForCausalLM', Olmo3ForCausalLM]],
83918400
['mobilellm', ['MobileLLMForCausalLM', MobileLLMForCausalLM]],
83928401
['granite', ['GraniteForCausalLM', GraniteForCausalLM]],
83938402
['granitemoehybrid', ['GraniteMoeHybridForCausalLM', GraniteMoeHybridForCausalLM]],

0 commit comments

Comments
 (0)