mav23 commited on
Commit
7f66e31
1 Parent(s): 4dd5a61

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +94 -0
  3. openmath2-llama3.1-70b.Q4_0.gguf +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ openmath2-llama3.1-70b.Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama3.1
3
+ base_model:
4
+ - meta-llama/Llama-3.1-70B
5
+ datasets:
6
+ - nvidia/OpenMathInstruct-2
7
+ language:
8
+ - en
9
+ tags:
10
+ - nvidia
11
+ - math
12
+ library_name: transformers
13
+ ---
14
+
15
+ # OpenMath2-Llama3.1-70B
16
+
17
+ OpenMath2-Llama3.1-70B is obtained by finetuning [Llama3.1-70B-Base](https://huggingface.co/meta-llama/Llama-3.1-70B) with [OpenMathInstruct-2](https://huggingface.co/datasets/nvidia/OpenMathInstruct-2).
18
+
19
+ The model outperforms [Llama3.1-70B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-70B-Instruct) on [MATH](https://github.com/hendrycks/math) by 3.9%.
20
+
21
+
22
+
23
+ | Model | GSM8K | MATH | AMC 2023 | AIME 2024 | Omni-MATH |
24
+ |:---|:---:|:---:|:---:|:---:|:---:|
25
+ | Llama3.1-8B-Instruct | 84.5 | 51.9 | 9/40 | 2/30 | 12.7 |
26
+ | OpenMath2-Llama3.1-8B ([nemo](https://huggingface.co/nvidia/OpenMath2-Llama3.1-8B-nemo) \| [HF](https://huggingface.co/nvidia/OpenMath2-Llama3.1-8B)) | 91.7 | 67.8 | 16/40 | 3/30 | 22.0 |
27
+ | + majority@256 | 94.1 | 76.1 | 23/40 | 3/30 | 24.6 |
28
+ | Llama3.1-70B-Instruct | 95.8 | 67.9 | 19/40 | 6/30 | 19.0 |
29
+ | **OpenMath2-Llama3.1-70B** ([nemo](https://huggingface.co/nvidia/OpenMath2-Llama3.1-70B-nemo) \| [HF](https://huggingface.co/nvidia/OpenMath2-Llama3.1-70B)) | 94.9 | 71.9 | 20/40 | 4/30 | 23.1 |
30
+ | + majority@256 | 96.0 | 79.6 | 24/40 | 6/30 | 27.6 |
31
+
32
+ The pipeline we used to produce the data and models is fully open-sourced!
33
+
34
+ - [Code](https://github.com/Kipok/NeMo-Skills)
35
+ - [Models](https://huggingface.co/collections/nvidia/openmath-2-66fb142317d86400783d2c7b)
36
+ - [Dataset](https://huggingface.co/datasets/nvidia/OpenMathInstruct-2)
37
+
38
+ See our [paper](https://arxiv.org/abs/2410.01560) to learn more details!
39
+
40
+ # How to use the models?
41
+
42
+ Our models are trained with the same "chat format" as Llama3.1-instruct models (same system/user/assistant tokens).
43
+ Please note that these models have not been instruction tuned on general data and thus might not provide good answers outside of math domain.
44
+
45
+ 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
46
+ an example of how to do it through transformers api:
47
+
48
+ ```python
49
+ import transformers
50
+ import torch
51
+
52
+ model_id = "nvidia/OpenMath2-Llama3.1-70B"
53
+
54
+ pipeline = transformers.pipeline(
55
+ "text-generation",
56
+ model=model_id,
57
+ model_kwargs={"torch_dtype": torch.bfloat16},
58
+ device_map="auto",
59
+ )
60
+
61
+ messages = [
62
+ {
63
+ "role": "user",
64
+ "content": "Solve the following math problem. Make sure to put the answer (and only answer) inside \\boxed{}.\n\n" +
65
+ "What is the minimum value of $a^2+6a-7$?"},
66
+ ]
67
+
68
+ outputs = pipeline(
69
+ messages,
70
+ max_new_tokens=4096,
71
+ )
72
+ print(outputs[0]["generated_text"][-1]['content'])
73
+ ```
74
+
75
+ # Reproducing our results
76
+
77
+ We provide [all instructions](https://github.com/Kipok/NeMo-Skills/blob/main/docs/reproducing-results.md) to fully reproduce our results.
78
+
79
+ ## Citation
80
+
81
+ If you find our work useful, please consider citing us!
82
+
83
+ ```bibtex
84
+ @article{toshniwal2024openmath2,
85
+ title = {OpenMathInstruct-2: Accelerating AI for Math with Massive Open-Source Instruction Data},
86
+ author = {Shubham Toshniwal and Wei Du and Ivan Moshkov and Branislav Kisacanin and Alexan Ayrapetyan and Igor Gitman},
87
+ year = {2024},
88
+ journal = {arXiv preprint arXiv:2410.01560}
89
+ }
90
+ ```
91
+
92
+ ## Terms of use
93
+
94
+ By accessing this model, you are agreeing to the LLama 3.1 terms and conditions of the [license](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE), [acceptable use policy](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/USE_POLICY.md) and [Meta’s privacy policy](https://www.facebook.com/privacy/policy/)
openmath2-llama3.1-70b.Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1eaa7c8805aa752dbef2b8836a177c011c3165beb59c27b666ea5b44b7543401
3
+ size 39969737152