poisson-fish commited on
Commit
93fe631
1 Parent(s): 2e26370

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +220 -0
README.md ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama3.1
3
+ language:
4
+ - en
5
+ inference: false
6
+ fine-tuning: false
7
+ tags:
8
+ - nvidia
9
+ - llama3.1
10
+ datasets:
11
+ - nvidia/HelpSteer2
12
+ base_model: meta-llama/Llama-3.1-70B-Instruct
13
+ library_name: nemo
14
+ ---
15
+ # GGUF Notes
16
+ Some files may be split. Cat them together to form the final GGUF.
17
+
18
+ # Model Overview
19
+
20
+ ## Description:
21
+
22
+ Llama-3.1-Nemotron-70B-Instruct is a large language model customized by NVIDIA to improve the helpfulness of LLM generated responses to user queries.
23
+
24
+
25
+ This model reaches [Arena Hard](https://github.com/lmarena/arena-hard-auto) of 85.0, [AlpacaEval 2 LC](https://tatsu-lab.github.io/alpaca_eval/) of 57.6 and [GPT-4-Turbo MT-Bench](https://github.com/lm-sys/FastChat/pull/3158) of 8.98, which are known to be predictive of [LMSys Chatbot Arena Elo](https://huggingface.co/spaces/lmsys/chatbot-arena-leaderboard)
26
+
27
+ As of 1 Oct 2024, this model is #1 on all three automatic alignment benchmarks (verified tab for AlpacaEval 2 LC), edging out strong frontier models such as GPT-4o and Claude 3.5 Sonnet.
28
+
29
+ This model was trained using RLHF (specifically, REINFORCE), [Llama-3.1-Nemotron-70B-Reward](https://huggingface.co/nvidia/Llama-3.1-Nemotron-70B-Reward) and [HelpSteer2-Preference prompts](https://huggingface.co/datasets/nvidia/HelpSteer2) on a Llama-3.1-70B-Instruct model as the initial policy.
30
+
31
+ If you prefer to use the model in the HuggingFace Transformers codebase, we have done a model conversion format into [Llama-3.1-Nemotron-70B-Instruct-HF](https://huggingface.co/nvidia/Llama-3.1-Nemotron-70B-Instruct-HF) .
32
+
33
+ Try hosted inference for free at [build.nvidia.com](https://build.nvidia.com/nvidia/llama-3_1-nemotron-70b-instruct) - it comes with an OpenAI-compatible API interface.
34
+
35
+
36
+ See details on our paper at [https://arxiv.org/abs/2410.01257](https://arxiv.org/abs/2410.01257) - as a preview, this model can correctly the question ```How many r in strawberry?``` without specialized prompting or additional reasoning tokens:
37
+
38
+ ```
39
+ A sweet question!
40
+ Let’s count the “R”s in “strawberry”:
41
+ 1. S
42
+ 2. T
43
+ 3. R
44
+ 4. A
45
+ 5. W
46
+ 6. B
47
+ 7. E
48
+ 8. R
49
+ 9. R
50
+ 10. Y
51
+ There are **3 “R”s** in the word “strawberry”.
52
+ ```
53
+
54
+ Note: This model is a demonstration of our techniques for improving helpfulness in general-domain instruction following. It has not been tuned for performance in specialized domains such as math.
55
+
56
+ ## Terms of use
57
+
58
+ 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/)
59
+
60
+
61
+ ## Evaluation Metrics
62
+
63
+ As of 1 Oct 2024, Llama-3.1-Nemotron-70B-Instruct performs best on Arena Hard, AlpacaEval 2 LC (verified tab) and MT Bench (GPT-4-Turbo)
64
+
65
+ | Model | Arena Hard | AlpacaEval | MT-Bench | Mean Response Length |
66
+ |:-----------------------------|:----------------|:-----|:----------|:-------|
67
+ |Details | (95% CI) | 2 LC (SE) | (GPT-4-Turbo) | (# of Characters for MT-Bench)|
68
+ | _**Llama-3.1-Nemotron-70B-Instruct**_ | **85.0** (-1.5, 1.5) | **57.6** (1.65) | **8.98** | 2199.8 |
69
+ | Llama-3.1-70B-Instruct | 55.7 (-2.9, 2.7) | 38.1 (0.90) | 8.22 | 1728.6 |
70
+ | Llama-3.1-405B-Instruct | 69.3 (-2.4, 2.2) | 39.3 (1.43) | 8.49 | 1664.7 |
71
+ | Claude-3-5-Sonnet-20240620 | 79.2 (-1.9, 1.7) | 52.4 (1.47) | 8.81 | 1619.9 |
72
+ | GPT-4o-2024-05-13 | 79.3 (-2.1, 2.0) | 57.5 (1.47) | 8.74 | 1752.2 |
73
+
74
+ ## Usage:
75
+
76
+ We demonstrate inference using NVIDIA NeMo Framework, which allows hassle-free model deployment based on [NVIDIA TRT-LLM](https://github.com/NVIDIA/TensorRT-LLM), a highly optimized inference solution focussing on high throughput and low latency.
77
+
78
+ Pre-requisite: You would need at least a machine with 4 40GB or 2 80GB NVIDIA GPUs, and 150GB of free disk space.
79
+
80
+ 1. Please sign up to get **free and immediate** access to [NVIDIA NeMo Framework container](https://developer.nvidia.com/nemo-framework). If you don’t have an NVIDIA NGC account, you will be prompted to sign up for an account before proceeding.
81
+ 2. If you don’t have an NVIDIA NGC API key, sign into [NVIDIA NGC](https://ngc.nvidia.com/setup), selecting organization/team: ea-bignlp/ga-participants and click Generate API key. Save this key for the next step. Else, skip this step.
82
+ 3. On your machine, docker login to nvcr.io using
83
+ ```
84
+ docker login nvcr.io
85
+ Username: $oauthtoken
86
+ Password: <Your Saved NGC API Key>
87
+ ```
88
+ 4. Download the required container
89
+ ```
90
+ docker pull nvcr.io/nvidia/nemo:24.05.llama3.1
91
+ ```
92
+
93
+ 5. Download the checkpoint
94
+ ```
95
+ git lfs install
96
+ git clone https://huggingface.co/nvidia/Llama-3.1-Nemotron-70B-Instruct
97
+ ```
98
+
99
+ 6. Run Docker container
100
+ (In addition, to use Llama3.1 tokenizer, you need to ```export HF_HOME=<YOUR_HF_HOME_CONTAINING_TOKEN_WITH_LLAMA3.1_70B_ACCESS>```)
101
+ ```
102
+ docker run --gpus all -it --rm --shm-size=150g -p 8000:8000 -v ${PWD}/Llama-3.1-Nemotron-70B-Instruct:/opt/checkpoints/Llama-3.1-Nemotron-70B-Instruct,${HF_HOME}:/hf_home -w /opt/NeMo nvcr.io/nvidia/nemo:24.05.llama3.1
103
+ ```
104
+
105
+ 7. Within the container, start the server in the background. This step does both conversion of the nemo checkpoint to TRT-LLM and then deployment using TRT-LLM. For an explanation of each argument and advanced usage, please refer to [NeMo FW Deployment Guide](https://docs.nvidia.com/nemo-framework/user-guide/latest/deployment/llm/in_framework.html)
106
+
107
+ ```
108
+ HF_HOME=/hf_home python scripts/deploy/nlp/deploy_inframework_triton.py --nemo_checkpoint /opt/checkpoints/Llama-3.1-Nemotron-70B-Instruct --model_type="llama" --triton_model_name nemotron --triton_http_address 0.0.0.0 --triton_port 8000 --num_gpus 2 --max_input_len 3072 --max_output_len 1024 --max_batch_size 1 &
109
+ ```
110
+
111
+ 8. Once the server is ready (i.e. when you see this messages below), you are ready to launch your client code
112
+
113
+ ```
114
+ Started HTTPService at 0.0.0.0:8000
115
+ Started GRPCInferenceService at 0.0.0.0:8001
116
+ Started Metrics Service at 0.0.0.0:8002
117
+ ```
118
+
119
+ ```
120
+ python scripts/deploy/nlp/query_inframework.py -mn nemotron -p "How many r in strawberry?" -mol 1024
121
+ ```
122
+
123
+
124
+
125
+
126
+
127
+ ## Contact
128
+
129
+ E-Mail: [Zhilin Wang](mailto:zhilinw@nvidia.com)
130
+
131
+
132
+ ## Citation
133
+
134
+ If you find this model useful, please cite the following works
135
+
136
+ ```bibtex
137
+ @misc{wang2024helpsteer2preferencecomplementingratingspreferences,
138
+ title={HelpSteer2-Preference: Complementing Ratings with Preferences},
139
+ author={Zhilin Wang and Alexander Bukharin and Olivier Delalleau and Daniel Egert and Gerald Shen and Jiaqi Zeng and Oleksii Kuchaiev and Yi Dong},
140
+ year={2024},
141
+ eprint={2410.01257},
142
+ archivePrefix={arXiv},
143
+ primaryClass={cs.LG},
144
+ url={https://arxiv.org/abs/2410.01257},
145
+ }
146
+ @misc{wang2024helpsteer2,
147
+ title={HelpSteer2: Open-source dataset for training top-performing reward models},
148
+ author={Zhilin Wang and Yi Dong and Olivier Delalleau and Jiaqi Zeng and Gerald Shen and Daniel Egert and Jimmy J. Zhang and Makesh Narsimhan Sreedhar and Oleksii Kuchaiev},
149
+ year={2024},
150
+ eprint={2406.08673},
151
+ archivePrefix={arXiv},
152
+ primaryClass={id='cs.CL' full_name='Computation and Language' is_active=True alt_name='cmp-lg' in_archive='cs' is_general=False description='Covers natural language processing. Roughly includes material in ACM Subject Class I.2.7. Note that work on artificial languages (programming languages, logics, formal systems) that does not explicitly address natural-language issues broadly construed (natural-language processing, computational linguistics, speech, text retrieval, etc.) is not appropriate for this area.'}
153
+ }
154
+ ```
155
+
156
+ ## References(s):
157
+
158
+ * [HelpSteer2-Preference](https://arxiv.org/abs/2410.01257)
159
+ * [SteerLM method](https://arxiv.org/abs/2310.05344)
160
+ * [HelpSteer](https://arxiv.org/abs/2311.09528)
161
+ * [HelpSteer2](https://arxiv.org/abs/2406.08673)
162
+ * [Introducing Llama 3.1: Our most capable models to date](https://ai.meta.com/blog/meta-llama-3-1/)
163
+ * [Meta's Llama 3.1 Webpage](https://www.llama.com/docs/model-cards-and-prompt-formats/llama3_1)
164
+ * [Meta's Llama 3.1 Model Card](https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/MODEL_CARD.md)
165
+
166
+
167
+ ## Model Architecture:
168
+ **Architecture Type:** Transformer <br>
169
+ **Network Architecture:** Llama 3.1 <br>
170
+
171
+ ## Input:
172
+ **Input Type(s):** Text <br>
173
+ **Input Format:** String <br>
174
+ **Input Parameters:** One Dimensional (1D) <br>
175
+ **Other Properties Related to Input:** Max of 128k tokens<br>
176
+
177
+ ## Output:
178
+ **Output Type(s):** Text <br>
179
+ **Output Format:** String <br>
180
+ **Output Parameters:** One Dimensional (1D) <br>
181
+ **Other Properties Related to Output:** Max of 4k tokens <br>
182
+
183
+
184
+ ## Software Integration:
185
+ **Supported Hardware Microarchitecture Compatibility:** <br>
186
+ * NVIDIA Ampere <br>
187
+ * NVIDIA Hopper <br>
188
+ * NVIDIA Turing <br>
189
+ **Supported Operating System(s):** Linux <br>
190
+
191
+ ## Model Version:
192
+ v1.0
193
+
194
+ # Training & Evaluation:
195
+
196
+ ## Datasets:
197
+
198
+ **Data Collection Method by dataset** <br>
199
+ * [Hybrid: Human, Synthetic] <br>
200
+
201
+ **Labeling Method by dataset** <br>
202
+ * [Human] <br>
203
+
204
+ **Link:**
205
+ * [HelpSteer2](https://huggingface.co/datasets/nvidia/HelpSteer2)
206
+
207
+ **Properties (Quantity, Dataset Descriptions, Sensor(s)):** <br>
208
+ * 21, 362 prompt-responses built to make more models more aligned with human preference - specifically more helpful, factually-correct, coherent, and customizable based on complexity and verbosity.
209
+ * 20, 324 prompt-responses used for training and 1, 038 used for validation.
210
+
211
+
212
+ # Inference:
213
+ **Engine:** [Triton](https://developer.nvidia.com/triton-inference-server) <br>
214
+ **Test Hardware:** H100, A100 80GB, A100 40GB <br>
215
+
216
+
217
+ ## Ethical Considerations:
218
+ NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their supporting model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. For more detailed information on ethical considerations for this model, please see the Model Card++ Explainability, Bias, Safety & Security, and Privacy Subcards. Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
219
+
220
+ Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).