Update README.md
Browse files
README.md
CHANGED
@@ -35,9 +35,9 @@ The model outperforms [Llama3.1-8B-Instruct](https://huggingface.co/meta-llama/L
|
|
35 |
</style>
|
36 |
|
37 |
<div class="image-container">
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
|
42 |
| Model | GSM8K | MATH | AMC 2023 | AIME 2024 | Omni-MATH |
|
43 |
|:---|:---:|:---:|:---:|:---:|:---:|
|
@@ -54,13 +54,42 @@ The pipeline we used to produce the data and models is fully open-sourced!
|
|
54 |
- [Models](https://huggingface.co/collections/nvidia/openmath-2-66fb142317d86400783d2c7b)
|
55 |
- [Dataset](https://huggingface.co/datasets/nvidia/OpenMathInstruct-2)
|
56 |
|
|
|
57 |
|
58 |
# How to use the models?
|
59 |
|
60 |
-
Our models are
|
61 |
-
Please note that these models have not been instruction tuned and might not provide good answers outside of math domain.
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
|
65 |
# Reproducing our results
|
66 |
|
|
|
35 |
</style>
|
36 |
|
37 |
<div class="image-container">
|
38 |
+
<img src="scaling_plot.jpg" title="Performance of Llama-3.1-8B-Instruct as it is trained on increasing proportions of OpenMathInstruct-2">
|
39 |
+
<img src="math_level_comp.jpg" title="Comparison of OpenMath2-Llama3.1-8B vs. Llama-3.1-8B-Instruct across MATH levels">
|
40 |
+
</div>
|
41 |
|
42 |
| Model | GSM8K | MATH | AMC 2023 | AIME 2024 | Omni-MATH |
|
43 |
|:---|:---:|:---:|:---:|:---:|:---:|
|
|
|
54 |
- [Models](https://huggingface.co/collections/nvidia/openmath-2-66fb142317d86400783d2c7b)
|
55 |
- [Dataset](https://huggingface.co/datasets/nvidia/OpenMathInstruct-2)
|
56 |
|
57 |
+
See our paper to learn more details!
|
58 |
|
59 |
# How to use the models?
|
60 |
|
61 |
+
Our models are trained with the same "chat format" as Llama3.1-instruct models (same system/user/assistant tokens).
|
62 |
+
Please note that these models have not been instruction tuned on general data and thus might not provide good answers outside of math domain.
|
63 |
+
|
64 |
+
We recommend using [instructions in our repo](https://github.com/Kipok/NeMo-Skills/blob/main/docs/inference.md) to run inference with these models, but here is
|
65 |
+
an example of how to do it through transformers api:
|
66 |
+
|
67 |
+
```python
|
68 |
+
import transformers
|
69 |
+
import torch
|
70 |
+
|
71 |
+
model_id = "nvidia/OpenMath2-Llama3.1-8B"
|
72 |
+
|
73 |
+
pipeline = transformers.pipeline(
|
74 |
+
"text-generation",
|
75 |
+
model=model_id,
|
76 |
+
model_kwargs={"torch_dtype": torch.bfloat16},
|
77 |
+
device_map="auto",
|
78 |
+
)
|
79 |
+
|
80 |
+
messages = [
|
81 |
+
{
|
82 |
+
"role": "user",
|
83 |
+
"content": "Solve the following math problem. Make sure to put the answer (and only answer) inside \\boxed{}.\n\n" +
|
84 |
+
"What is the minimum value of $a^2+6a-7$?"},
|
85 |
+
]
|
86 |
+
|
87 |
+
outputs = pipeline(
|
88 |
+
messages,
|
89 |
+
max_new_tokens=4096,
|
90 |
+
)
|
91 |
+
print(outputs[0]["generated_text"][-1]['content'])
|
92 |
+
```
|
93 |
|
94 |
# Reproducing our results
|
95 |
|