shanearora commited on
Commit
ca0c062
1 Parent(s): b3d2019

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -28
README.md CHANGED
@@ -9,9 +9,9 @@ language:
9
 
10
  <img src="https://allenai.org/olmo/olmo-7b-animation.gif" alt="OLMo Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
11
 
12
- # Model Card for OLMo 1.7-7B
13
 
14
- **For transformers versions v4.40.0 or newer, please use [OLMo 1.7-7B HF](https://huggingface.co/allenai/OLMo-1.7-7B-hf) instead.**
15
 
16
  OLMo 1.7 7B is the latest version of the original [OLMo 7B](https://huggingface.co/allenai/OLMo-7B) model rocking a 24 point increase in MMLU, among other evaluations improvements, from an improved version of the Dolma dataset and staged training.
17
 
@@ -24,12 +24,12 @@ We release all code, checkpoints, logs, and details involved in training these m
24
  The core models released in this batch are the following:
25
  | Size | Training Tokens | Layers | Hidden Size | Attention Heads | Context Length |
26
  |------|--------|---------|-------------|-----------------|----------------|
27
- | [OLMo 1B](https://huggingface.co/allenai/OLMo-1B) | 3 Trillion |16 | 2048 | 16 | 2048 |
28
- | [OLMo 7B](https://huggingface.co/allenai/OLMo-7B) | 2.5 Trillion | 32 | 4096 | 32 | 2048 |
29
- | [OLMo 7B Twin 2T](https://huggingface.co/allenai/OLMo-7B-Twin-2T) | 2 Trillion | 32 | 4096 | 32 | 2048 |
30
- | [OLMo 1.7-7B](https://huggingface.co/allenai/OLMo-1.7-7B) | 2.05 Trillion | 32 | 4096 | 32 | 4096 |
31
 
32
- *Note: OLMo 1.7-7B also includes QKV clipping.*
33
 
34
 
35
  [Coming soon] We are releasing many checkpoints for these models, for every 1000 training steps.
@@ -38,14 +38,14 @@ The naming convention is `step1000-tokens4B`.
38
  To load a specific model revision with HuggingFace, simply add the argument `revision`:
39
  ```bash
40
  import hf_olmo # pip install ai2-olmo
41
- olmo = AutoModelForCausalLM.from_pretrained("allenai/OLMo-1.7-7B", revision="step1000-tokens4B")
42
  ```
43
 
44
  All revisions/branches are listed in the file `revisions.txt`.
45
  Or, you can access all the revisions for the models via the following code snippet:
46
  ```python
47
  from huggingface_hub import list_repo_refs
48
- out = list_repo_refs("allenai/OLMo-1.7-7B")
49
  branches = [b.name for b in out.branches]
50
  ```
51
  A few revisions were lost due to an error, but the vast majority are present.
@@ -90,8 +90,8 @@ Now, proceed as usual with HuggingFace:
90
  import hf_olmo
91
 
92
  from transformers import AutoModelForCausalLM, AutoTokenizer
93
- olmo = AutoModelForCausalLM.from_pretrained("allenai/OLMo-1.7-7B")
94
- tokenizer = AutoTokenizer.from_pretrained("allenai/OLMo-1.7-7B")
95
  message = ["Language modeling is"]
96
  inputs = tokenizer(message, return_tensors='pt', return_token_type_ids=False)
97
  # optional verifying cuda
@@ -106,12 +106,12 @@ Alternatively, with the pipeline abstraction:
106
  import hf_olmo
107
 
108
  from transformers import pipeline
109
- olmo_pipe = pipeline("text-generation", model="allenai/OLMo-1.7-7B")
110
  print(olmo_pipe("Language modeling is "))
111
  >> 'Language modeling is a branch of natural language processing that aims to...'
112
  ```
113
 
114
- Or, you can make this slightly faster by quantizing the model, e.g. `AutoModelForCausalLM.from_pretrained("allenai/OLMo-1.7-7B", torch_dtype=torch.float16, load_in_8bit=True)` (requires `bitsandbytes`).
115
  The quantized model is more sensitive to typing / cuda, so it is recommended to pass the inputs as `inputs.input_ids.to('cuda')` to avoid potential issues.
116
 
117
  Note, you may see the following error if `ai2-olmo` is not installed correctly, which is caused by internal Python check naming. We'll update the code soon to make this error clearer.
@@ -140,7 +140,7 @@ For more documentation, see the [GitHub readme](https://github.com/allenai/OLMo?
140
 
141
  Core model results for the new and original 7B model are found below.
142
 
143
- | Task | Llama-7b | Llama2-7b | Falcon-7b | Mpt-7b | OLMo-7B | Llama2-13b | **OLMo 1.7-7B** |
144
  |-------------------|----------|-----------|-----------|--------|---------|------------|-------------|
145
  | arc_c | 44.5 | 48.5 | 47.5 | 46.5 | 48.5 | 52.8 | 42.5 |
146
  | arc_e | 67.9 | 69.5 | 70.4 | 70.5 | 65.4 | 73.7 | 67.2 |
@@ -177,12 +177,12 @@ And for the 1B model:
177
 
178
  ### Data
179
  For training data details, please see the [Dolma](https://huggingface.co/datasets/allenai/dolma) documentation.
180
- **This model uses the new 1.7 version with more data sources, better deduplication, and quality filtering**.
181
  During the annealing phase we use a higher quality subset of Dolma with a linearly decaying learning rate to 0.
182
 
183
  ### Staged training / annealing
184
 
185
- In contrast to OLMo 1.0, we trained OLMo 1.7 with a two-stage curriculum:
186
  * In the first stage, we trained the model from scratch on the Dolma 1.7 dataset. We set a cosine learning rate schedule with a warmup of 2500 steps, a peak learning rate of 3e-4, and a cosine decay to 3e-5 after 3T tokens. We cut off this stage after 2T tokens, when the learning rate is still high.
187
  * At this point we switch to the second stage, in which we train on a higher-quality subset of Dolma 1.7 (see below) for another 50B tokens, while linearly decaying the learning rate to 0. Our high-quality subset includes (1) using all available Wikipedia, OpenWebMath and Flan data, (2) removing Dolma CC, CC News, and Megawika, and (3) rebalancing remaining sources to achieve approximately equal proportions of each. See exact token counts and relative proportions of this second stage mix below.
188
  Both stages contribute equally to the final performance of the OLMo model. After the first stage, OLMo 1.7 already outperforms OLMo 1.0. The second stage consistently adds 2 to 3 points of performance on top.
@@ -235,18 +235,6 @@ Optimizer settings comparison with peer models.
235
  | gradient reduce dtype | FP32 | FP32 | FP32 | BF16 |
236
  | optimizer state dtype | FP32 | most likely FP32 | FP32 | FP32 |
237
 
238
-
239
-
240
- ## Environmental Impact
241
-
242
- OLMo 7B variants were either trained on MI250X GPUs at the LUMI supercomputer, or A100-40GB GPUs provided by MosaicML.
243
- A summary of the environmental impact. Further details are available in the paper.
244
-
245
- | | GPU Type | Power Consumption From GPUs | Carbon Intensity (kg CO₂e/KWh) | Carbon Emissions (tCO₂eq) |
246
- |-----------|------------|-----------------------------|--------------------------------|---------------------------|
247
- | OLMo 7B Twin | MI250X ([LUMI supercomputer](https://www.lumi-supercomputer.eu)) | 135 MWh | 0* | 0* |
248
- | OLMo 7B | A100-40GB ([MosaicML](https://www.mosaicml.com)) | 104 MWh | 0.656 | 75.05 |
249
-
250
  ## Bias, Risks, and Limitations
251
 
252
  Like any base language model or fine-tuned model without safety filtering, it is relatively easy for a user to prompt these models to generate harmful and generally sensitive content.
 
9
 
10
  <img src="https://allenai.org/olmo/olmo-7b-animation.gif" alt="OLMo Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
11
 
12
+ # Model Card for OLMo 7B April 2024
13
 
14
+ **For transformers versions v4.40.0 or newer, please use [OLMo 7B April 2024 HF](https://huggingface.co/allenai/OLMo-7B-0424-hf) instead.**
15
 
16
  OLMo 1.7 7B is the latest version of the original [OLMo 7B](https://huggingface.co/allenai/OLMo-7B) model rocking a 24 point increase in MMLU, among other evaluations improvements, from an improved version of the Dolma dataset and staged training.
17
 
 
24
  The core models released in this batch are the following:
25
  | Size | Training Tokens | Layers | Hidden Size | Attention Heads | Context Length |
26
  |------|--------|---------|-------------|-----------------|----------------|
27
+ | [OLMo 1B](https://huggingface.co/allenai/OLMo-1B-hf) | 3 Trillion |16 | 2048 | 16 | 2048 |
28
+ | [OLMo 7B](https://huggingface.co/allenai/OLMo-7B-hf) | 2.5 Trillion | 32 | 4096 | 32 | 2048 |
29
+ | [OLMo 7B Twin 2T](https://huggingface.co/allenai/OLMo-7B-Twin-2T-hf) | 2 Trillion | 32 | 4096 | 32 | 2048 |
30
+ | [OLMo 7B April 2024](https://huggingface.co/allenai/OLMo-7B-0424-hf) | 2.05 Trillion | 32 | 4096 | 32 | 4096 |
31
 
32
+ *Note: OLMo 7B April 2024 also includes QKV clipping.*
33
 
34
 
35
  [Coming soon] We are releasing many checkpoints for these models, for every 1000 training steps.
 
38
  To load a specific model revision with HuggingFace, simply add the argument `revision`:
39
  ```bash
40
  import hf_olmo # pip install ai2-olmo
41
+ olmo = AutoModelForCausalLM.from_pretrained("allenai/OLMo-7B-0424", revision="step1000-tokens4B")
42
  ```
43
 
44
  All revisions/branches are listed in the file `revisions.txt`.
45
  Or, you can access all the revisions for the models via the following code snippet:
46
  ```python
47
  from huggingface_hub import list_repo_refs
48
+ out = list_repo_refs("allenai/OLMo-7B-0424")
49
  branches = [b.name for b in out.branches]
50
  ```
51
  A few revisions were lost due to an error, but the vast majority are present.
 
90
  import hf_olmo
91
 
92
  from transformers import AutoModelForCausalLM, AutoTokenizer
93
+ olmo = AutoModelForCausalLM.from_pretrained("allenai/OLMo-7B-0424")
94
+ tokenizer = AutoTokenizer.from_pretrained("allenai/OLMo-7B-0424")
95
  message = ["Language modeling is"]
96
  inputs = tokenizer(message, return_tensors='pt', return_token_type_ids=False)
97
  # optional verifying cuda
 
106
  import hf_olmo
107
 
108
  from transformers import pipeline
109
+ olmo_pipe = pipeline("text-generation", model="allenai/OLMo-7B-0424")
110
  print(olmo_pipe("Language modeling is "))
111
  >> 'Language modeling is a branch of natural language processing that aims to...'
112
  ```
113
 
114
+ Or, you can make this slightly faster by quantizing the model, e.g. `AutoModelForCausalLM.from_pretrained("allenai/OLMo-7B-0424", torch_dtype=torch.float16, load_in_8bit=True)` (requires `bitsandbytes`).
115
  The quantized model is more sensitive to typing / cuda, so it is recommended to pass the inputs as `inputs.input_ids.to('cuda')` to avoid potential issues.
116
 
117
  Note, you may see the following error if `ai2-olmo` is not installed correctly, which is caused by internal Python check naming. We'll update the code soon to make this error clearer.
 
140
 
141
  Core model results for the new and original 7B model are found below.
142
 
143
+ | Task | Llama-7b | Llama2-7b | Falcon-7b | Mpt-7b | OLMo-7B | Llama2-13b | **OLMo 7B April 2024** |
144
  |-------------------|----------|-----------|-----------|--------|---------|------------|-------------|
145
  | arc_c | 44.5 | 48.5 | 47.5 | 46.5 | 48.5 | 52.8 | 42.5 |
146
  | arc_e | 67.9 | 69.5 | 70.4 | 70.5 | 65.4 | 73.7 | 67.2 |
 
177
 
178
  ### Data
179
  For training data details, please see the [Dolma](https://huggingface.co/datasets/allenai/dolma) documentation.
180
+ **This model uses the new April 2024 version with more data sources, better deduplication, and quality filtering**.
181
  During the annealing phase we use a higher quality subset of Dolma with a linearly decaying learning rate to 0.
182
 
183
  ### Staged training / annealing
184
 
185
+ In contrast to OLMo 1.0, we trained OLMo April 2024 with a two-stage curriculum:
186
  * In the first stage, we trained the model from scratch on the Dolma 1.7 dataset. We set a cosine learning rate schedule with a warmup of 2500 steps, a peak learning rate of 3e-4, and a cosine decay to 3e-5 after 3T tokens. We cut off this stage after 2T tokens, when the learning rate is still high.
187
  * At this point we switch to the second stage, in which we train on a higher-quality subset of Dolma 1.7 (see below) for another 50B tokens, while linearly decaying the learning rate to 0. Our high-quality subset includes (1) using all available Wikipedia, OpenWebMath and Flan data, (2) removing Dolma CC, CC News, and Megawika, and (3) rebalancing remaining sources to achieve approximately equal proportions of each. See exact token counts and relative proportions of this second stage mix below.
188
  Both stages contribute equally to the final performance of the OLMo model. After the first stage, OLMo 1.7 already outperforms OLMo 1.0. The second stage consistently adds 2 to 3 points of performance on top.
 
235
  | gradient reduce dtype | FP32 | FP32 | FP32 | BF16 |
236
  | optimizer state dtype | FP32 | most likely FP32 | FP32 | FP32 |
237
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  ## Bias, Risks, and Limitations
239
 
240
  Like any base language model or fine-tuned model without safety filtering, it is relatively easy for a user to prompt these models to generate harmful and generally sensitive content.