mnoukhov commited on
Commit
ea72f8e
·
verified ·
1 Parent(s): f04bc4b

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +144 -0
README.md ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model:
4
+ - allenai/Olmo-3-1025-7B
5
+ language:
6
+ - en
7
+ datasets:
8
+ - allenai/Dolci-RLZero-Code-7B
9
+ ---
10
+
11
+ ## Model Details
12
+ <img alt="OLMo Logo" src="https://cdn-uploads.huggingface.co/production/uploads/65316953791d5a2611426c20/nC44-uxMD6J6H3OHxRtVU.png" width="242px" style="margin-left:'auto' margin-right:'auto' display:'block'">
13
+
14
+
15
+ # Model Card for Olmo 3 RL-Zero Code
16
+
17
+ We introduce Olmo 3, a new family of 7B and 32B models both Instruct and Think variants. Long chain-of-thought thinking improves reasoning tasks like math and coding.
18
+
19
+ Olmo is a series of **O**pen **l**anguage **mo**dels designed to enable the science of language models.
20
+ These models are pre-trained on the Dolma 3 dataset and post-trained on the Dolci datasets. We are releasing all code, checkpoints, logs (coming soon), and associated training details.
21
+
22
+ The RL-Zero family of models is an experimental set of model for the scientific exploration of RLVR training.
23
+
24
+ For the other Olmo 3 RL-Zero models see:
25
+
26
+ | **Domain** | **Model** | **RLVR Dataset**
27
+ |--------------------------|---------------|---------------|
28
+ | **Base Model** | [Olmo-3-7B](https://huggingface.co/allenai/Olmo-3-1025-7B) |
29
+ | **Math** | [Olmo-3-RL-Zero-Math-7B](https://huggingface.co/allenai/Olmo-3-7B-RLZero-Math/) | [Dolci-RLZero-Math-7B](https://huggingface.co/datasets/allenai/Dolci-RLZero-Math-7B)
30
+ | **Code** | [Olmo-3-RL-Zero-Code-7B](https://huggingface.co/allenai/Olmo-3-7B-RLZero-Code/) | [Dolci-RLZero-Code-7B](https://huggingface.co/datasets/allenai/Dolci-RLZero-Code-7B)
31
+ | **IF** | [Olmo-3-RL-Zero-IF-7B](https://huggingface.co/allenai/Olmo-3-7B-RLZero-IF/) | [Dolci-RLZero-IF-7B](https://huggingface.co/datasets/allenai/Dolci-RLZero-IF-7B)
32
+ | **Mix** | [Olmo-3-RL-Zero-Mix-7B](https://huggingface.co/allenai/Olmo-3-7B-RLZero-Mix/) | [Dolci-RLZero-Mix-7B](https://huggingface.co/datasets/allenai/Dolci-RLZero-Mix-7B)
33
+
34
+ For the core Olmo 3 models see:
35
+
36
+ | **Stage** | **[Olmo 3 7B Think]** | **[Olmo 3 32B Think]** | **[Olmo 3 7B Instruct]** | **[Olmo 3 32B Instruct]** |
37
+ |--------------------------|---------------|---------------|---------------|---------------|
38
+ | **Base Model** | [Olmo-3-7B](https://huggingface.co/allenai/Olmo-3-1025-7B) | [Olmo-3-32B](https://huggingface.co/allenai/Olmo-3-1125-32B) | | |
39
+ | **SFT** | [Olmo-3-7B-Think-SFT](https://huggingface.co/allenai/Olmo-3-7B-Think-SFT) | [Olmo-3-32B-Think-SFT](https://huggingface.co/allenai/Olmo-3-32B-Think-SFT) | [Olmo-3-7B-Instruct-SFT](https://huggingface.co/allenai/Olmo-3-7B-Instruct-SFT) | [Olmo-3-32B-Instruct-SFT](https://huggingface.co/allenai/Olmo-3-32B-Instruct-SFT) |
40
+ | **DPO** | [Olmo-3-7B-Think-DPO](https://huggingface.co/allenai/Olmo-3-7B-Think-DPO) | [Olmo-3-32B-Think-DPO](https://huggingface.co/allenai/Olmo-3-32B-Think-DPO) | [Olmo-3-7B-Instruct-DPO](https://huggingface.co/allenai/Olmo-3-7B-Instruct-DPO) | [Olmo-3-32B-Instruct-DPO](https://huggingface.co/allenai/Olmo-3-32B-Instruct-DPO) |
41
+ | **Final Models (RLVR)** | [Olmo-3-7B-Think](https://huggingface.co/allenai/Olmo-3-7B-Think) | [Olmo-3-32B-Think](https://huggingface.co/allenai/Olmo-3-32B-Think) | [Olmo-3-7B-Instruct](https://huggingface.co/allenai/Olmo-3-7B-Instruct) | [Olmo-3-32B-Instruct](https://huggingface.co/allenai/Olmo-3-32B-Instruct) |
42
+
43
+
44
+ ## Installation
45
+
46
+ Olmo 3 is supported in transformers 4.57.0 or higher:
47
+ ```bash
48
+ pip install transformers>=4.57.0
49
+ ```
50
+
51
+ ## Inference
52
+
53
+ You can use OLMo with the standard HuggingFace transformers library:
54
+ ```python
55
+ from transformers import AutoModelForCausalLM, AutoTokenizer
56
+ olmo = AutoModelForCausalLM.from_pretrained("allenai/Olmo-3-7B-Think")
57
+ tokenizer = AutoTokenizer.from_pretrained("allenai/Olmo-3-7B-Think")
58
+ message = ["Language modeling is "]
59
+ inputs = tokenizer(message, return_tensors='pt', return_token_type_ids=False)
60
+ # optional verifying cuda
61
+ # inputs = {k: v.to('cuda') for k,v in inputs.items()}
62
+ # olmo = olmo.to('cuda')
63
+ response = olmo.generate(**inputs, max_new_tokens=100, do_sample=True, top_k=50, top_p=0.95)
64
+ print(tokenizer.batch_decode(response, skip_special_tokens=True)[0])
65
+ >> 'Language modeling is a key component of any text-based application, but its effectiveness...'
66
+ ```
67
+
68
+ For faster performance, you can quantize the model using the following method:
69
+ ```python
70
+ AutoModelForCausalLM.from_pretrained("allenai/Olmo-3-7B-Think",
71
+ torch_dtype=torch.float16,
72
+ load_in_8bit=True) # Requires bitsandbytes
73
+ ```
74
+ The quantized model is more sensitive to data types and CUDA operations. To avoid potential issues, it's recommended to pass the inputs directly to CUDA using:
75
+ ```python
76
+ inputs.input_ids.to('cuda')
77
+ ```
78
+
79
+ We have released checkpoints for these models. For post-training, the naming convention is `step_XXXX`.
80
+
81
+
82
+ To load a specific model revision with HuggingFace, simply add the argument `revision`:
83
+ ```bash
84
+ olmo = AutoModelForCausalLM.from_pretrained("allenai/Olmo-3-7B-Think", revision="step_1375")
85
+ ```
86
+
87
+ Or, you can access all the revisions for the models via the following code snippet:
88
+ ```python
89
+ from huggingface_hub import list_repo_refs
90
+ out = list_repo_refs("allenai/Olmo-3-7B-Think")
91
+ branches = [b.name for b in out.branches]
92
+ ```
93
+
94
+ ### Fine-tuning
95
+ Model fine-tuning can be done from the final checkpoint (the `main` revision of this model) or the base model.
96
+
97
+ We recommend fine-tuning with the open-instruct repository:
98
+ ```bash
99
+ bash ./scripts/train/olmo3/rlvr_script.sh
100
+ ```
101
+ You can override most configuration options from the command-line. For example, to override the learning rate you could launch the script like this:
102
+
103
+ ```bash
104
+ bash ./scripts/train/olmo3/rlvr_script.sh --learning_rate=1e-3
105
+ ```
106
+ For more documentation, see the [GitHub readme](https://github.com/allenai/open-instruct).
107
+
108
+ ### Model Description
109
+
110
+ - **Developed by:** Allen Institute for AI (Ai2)
111
+ - **Model type:** a Transformer style autoregressive language model.
112
+ - **Language(s) (NLP):** English
113
+ - **License:** This model is licensed under Apache 2.0. It is intended for research and educational use in accordance with Ai2's [Responsible Use Guidelines](https://allenai.org/responsible-use).
114
+ - **Contact:** Technical inquiries: `olmo@allenai.org`. Press: `press@allenai.org`
115
+ - **Date cutoff:** Dec. 2023.
116
+
117
+
118
+ ### Model Sources
119
+
120
+ - **Project Page:** https://allenai.org/olmo
121
+ - **Repositories:**
122
+ - Open-Instruct for DPO and RLVR: https://github.com/allenai/open-instruct
123
+ - OLMo-Core for pre-training and SFT: https://github.com/allenai/OLMo-core
124
+ - OLMo-Eval for evaluation: https://github.com/allenai/OLMo-Eval
125
+ - **Paper:** [TBD]
126
+ <!-- - **Technical blog post:** (URL) -->
127
+ <!-- - **W&B Logs:** [SFT](()), [DPO](()), [RLVR](()) -->
128
+
129
+ ## Model Details
130
+
131
+ #### RLVR
132
+ - reinforcement learning from verifiable rewards on the Dolci-RL-Zero-Math-7B dataset which consists of math queries.
133
+ - Datasets: [Dolci-RLZero-Code-7B](https://huggingface.co/datasets/allenai/Dolci-RLZero-Code-7B)
134
+
135
+
136
+ ## Bias, Risks, and Limitations
137
+ Like any base language model or fine-tuned model without safety filtering, these models can easily be prompted by users to generate harmful and sensitive content. Such content may also be produced unintentionally, especially in cases involving bias, so we recommend that users consider the risks when applying this technology. Additionally, many statements from OLMo or any LLM are often inaccurate, so facts should be verified.
138
+
139
+
140
+ ## Citation
141
+ A technical manuscript is forthcoming!
142
+
143
+ ## Model Card Contact
144
+ For errors in this model card, contact `olmo@allenai.org`.