Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +1 -0
- README.md +328 -0
- config.json +28 -0
- generation_config.json +6 -0
- model-00001-of-00097.safetensors +3 -0
- model-00002-of-00097.safetensors +3 -0
- model-00003-of-00097.safetensors +3 -0
- model-00004-of-00097.safetensors +3 -0
- model-00005-of-00097.safetensors +3 -0
- model-00006-of-00097.safetensors +3 -0
- model-00007-of-00097.safetensors +3 -0
- model-00008-of-00097.safetensors +3 -0
- model-00009-of-00097.safetensors +3 -0
- model-00010-of-00097.safetensors +3 -0
- model-00011-of-00097.safetensors +3 -0
- model-00012-of-00097.safetensors +3 -0
- model-00013-of-00097.safetensors +3 -0
- model-00014-of-00097.safetensors +3 -0
- model-00015-of-00097.safetensors +3 -0
- model-00016-of-00097.safetensors +3 -0
- model-00017-of-00097.safetensors +3 -0
- model-00018-of-00097.safetensors +3 -0
- model-00019-of-00097.safetensors +3 -0
- model-00020-of-00097.safetensors +3 -0
- model-00021-of-00097.safetensors +3 -0
- model-00022-of-00097.safetensors +3 -0
- model-00023-of-00097.safetensors +3 -0
- model-00024-of-00097.safetensors +3 -0
- model-00025-of-00097.safetensors +3 -0
- model-00026-of-00097.safetensors +3 -0
- model-00027-of-00097.safetensors +3 -0
- model-00028-of-00097.safetensors +3 -0
- model-00029-of-00097.safetensors +3 -0
- model-00030-of-00097.safetensors +3 -0
- model-00031-of-00097.safetensors +3 -0
- model-00032-of-00097.safetensors +3 -0
- model-00033-of-00097.safetensors +3 -0
- model-00034-of-00097.safetensors +3 -0
- model-00035-of-00097.safetensors +3 -0
- model-00036-of-00097.safetensors +3 -0
- model-00037-of-00097.safetensors +3 -0
- model-00038-of-00097.safetensors +3 -0
- model-00039-of-00097.safetensors +3 -0
- model-00040-of-00097.safetensors +3 -0
- model-00041-of-00097.safetensors +3 -0
- model-00042-of-00097.safetensors +3 -0
- model-00043-of-00097.safetensors +3 -0
- model-00044-of-00097.safetensors +3 -0
- model-00045-of-00097.safetensors +3 -0
- model-00046-of-00097.safetensors +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 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,328 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
license_name: nvidia-open-model-license
|
4 |
+
license_link: >-
|
5 |
+
https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf
|
6 |
+
---
|
7 |
+
|
8 |
+
# NOTICE; PLEASE READ. NO INFERENCE. (YET)
|
9 |
+
|
10 |
+
**This has no support for inference, yet.** All I've done is move the weights out of NVIDIAs NeMo architecture so people smarter than me can get a headstart on making it work with other backends.
|
11 |
+
|
12 |
+
## Nemotron-4-340B-Instruct
|
13 |
+
|
14 |
+
[![Model architecture](https://img.shields.io/badge/Model%20Arch-Transformer%20Decoder-green)](#model-architecture)[![Model size](https://img.shields.io/badge/Params-340B-green)](#model-architecture)[![Language](https://img.shields.io/badge/Language-Multilingual-green)](#datasets)
|
15 |
+
|
16 |
+
### Model Overview
|
17 |
+
|
18 |
+
Nemotron-4-340B-Instruct is a large language model (LLM) that can be used as part of a synthetic data generation pipeline to create training data that helps researchers and developers build their own LLMs. It is a fine-tuned version of the Nemotron-4-340B-Base model, optimized for English-based single and multi-turn chat use-cases. It supports a context length of 4,096 tokens.
|
19 |
+
|
20 |
+
The base model was pre-trained on a corpus of 9 trillion tokens consisting of a diverse assortment of English based texts, 50+ natural languages, and 40+ coding languages. Subsequently the Nemotron-4-340B-Instruct model went through additional alignment steps including:
|
21 |
+
|
22 |
+
- Supervised Fine-tuning (SFT)
|
23 |
+
- Direct Preference Optimization (DPO)
|
24 |
+
- Reward-aware Preference Optimization (RPO) ([Additional in-house alignment technique](https://research.nvidia.com/publication/2024-06_nemotron-4-340b))
|
25 |
+
|
26 |
+
Throughout the alignment process, we relied on only approximately 20K human-annotated data while our data generation pipeline synthesized over 98% of the data used for supervised fine-tuning and preference fine-tuning (DPO & RPO). We provide comprehensive details about our synthetic data generation pipeline in the [technical report](https://research.nvidia.com/publication/2024-06_nemotron-4-340b).
|
27 |
+
|
28 |
+
This results in a model that is aligned for human chat preferences, improvements in mathematical reasoning, coding and instruction-following, and is capable of generating high quality synthetic data for a variety of use cases.
|
29 |
+
|
30 |
+
Under the NVIDIA Open Model License, NVIDIA confirms:
|
31 |
+
- Models are commercially usable.
|
32 |
+
- You are free to create and distribute Derivative Models.
|
33 |
+
- NVIDIA does not claim ownership to any outputs generated using the Models or Derivative Models.
|
34 |
+
|
35 |
+
### License:
|
36 |
+
|
37 |
+
[NVIDIA Open Model License](https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf)
|
38 |
+
|
39 |
+
### Intended use
|
40 |
+
|
41 |
+
Nemotron-4-340B-Instruct is a chat model intended for use for the English language.
|
42 |
+
|
43 |
+
Nemotron-4-340B-Instruct is designed for Synthetic Data Generation to enable developers and enterprises for building and customizing their own large language models and LLM applications.
|
44 |
+
|
45 |
+
The instruct model itself can be further customized using the [NeMo Framework](https://docs.nvidia.com/nemo-framework/index.html) suite of customization tools including Parameter-Efficient Fine-Tuning (P-tuning, Adapters, LoRA, and more), and Model Alignment (SFT, SteerLM, RLHF, and more) using [NeMo-Aligner](https://github.com/NVIDIA/NeMo-Aligner).
|
46 |
+
|
47 |
+
**Model Developer:** NVIDIA
|
48 |
+
|
49 |
+
**Model Dates:** Nemotron-4-340B-Instruct was trained between December 2023 and May 2024.
|
50 |
+
|
51 |
+
**Data Freshness:** The pretraining data has a cutoff of June 2023.
|
52 |
+
|
53 |
+
### Required Hardware
|
54 |
+
|
55 |
+
BF16 Inference:
|
56 |
+
- 8x H200 (1x H200 node)
|
57 |
+
- 16x H100 (2x H100 nodes)
|
58 |
+
- 16x A100 80GB (2x A100 80GB nodes)
|
59 |
+
|
60 |
+
|
61 |
+
### Model Architecture:
|
62 |
+
|
63 |
+
Nemotron-4-340B-Instruct is standard decoder-only Transformer, trained with a sequence length of 4096 tokens, uses Grouped-Query Attention (GQA), and Rotary Position Embeddings (RoPE).
|
64 |
+
|
65 |
+
**Architecture Type:** Transformer Decoder (auto-regressive language model)
|
66 |
+
|
67 |
+
**Network Architecture:**
|
68 |
+
Nemotron-4
|
69 |
+
|
70 |
+
### Prompt Format
|
71 |
+
|
72 |
+
Note: For Nemotron-4-340B-Instruct we recommend keeping the system prompt empty.
|
73 |
+
|
74 |
+
#### Single Turn
|
75 |
+
|
76 |
+
```text
|
77 |
+
<extra_id_0>System
|
78 |
+
|
79 |
+
<extra_id_1>User
|
80 |
+
{prompt}
|
81 |
+
<extra_id_1>Assistant
|
82 |
+
```
|
83 |
+
|
84 |
+
#### Multi-Turn or Few-shot
|
85 |
+
|
86 |
+
```text
|
87 |
+
<extra_id_0>System
|
88 |
+
|
89 |
+
<extra_id_1>User
|
90 |
+
{prompt 1}
|
91 |
+
<extra_id_1>Assistant
|
92 |
+
{response 1}
|
93 |
+
<extra_id_1>User
|
94 |
+
{prompt 2}
|
95 |
+
<extra_id_1>Assistant
|
96 |
+
{response 2}
|
97 |
+
...
|
98 |
+
<extra_id_1>User
|
99 |
+
{prompt N}
|
100 |
+
<extra_id_1>Assistant
|
101 |
+
```
|
102 |
+
|
103 |
+
An example of a formattable prompt template is available in the following section.
|
104 |
+
|
105 |
+
### Usage
|
106 |
+
|
107 |
+
Deployment and inference with Nemotron-4-340B-Instruct can be done in three steps using NeMo Framework:
|
108 |
+
|
109 |
+
Create a Python script to interact with the deployed model.
|
110 |
+
Create a Bash script to start the inference server
|
111 |
+
Schedule a Slurm job to distribute the model across 2 nodes and associate them with the inference server.
|
112 |
+
|
113 |
+
1. Define the Python script ``call_server.py``
|
114 |
+
|
115 |
+
```python
|
116 |
+
import json
|
117 |
+
import requests
|
118 |
+
|
119 |
+
headers = {"Content-Type": "application/json"}
|
120 |
+
|
121 |
+
def text_generation(data, ip='localhost', port=None):
|
122 |
+
resp = requests.put(f'http://{ip}:{port}/generate', data=json.dumps(data), headers=headers)
|
123 |
+
return resp.json()
|
124 |
+
|
125 |
+
|
126 |
+
def get_generation(prompt, greedy, add_BOS, token_to_gen, min_tokens, temp, top_p, top_k, repetition, batch=False):
|
127 |
+
data = {
|
128 |
+
"sentences": [prompt] if not batch else prompt,
|
129 |
+
"tokens_to_generate": int(token_to_gen),
|
130 |
+
"temperature": temp,
|
131 |
+
"add_BOS": add_BOS,
|
132 |
+
"top_k": top_k,
|
133 |
+
"top_p": top_p,
|
134 |
+
"greedy": greedy,
|
135 |
+
"all_probs": False,
|
136 |
+
"repetition_penalty": repetition,
|
137 |
+
"min_tokens_to_generate": int(min_tokens),
|
138 |
+
"end_strings": ["<|endoftext|>", "<extra_id_1>", "\x11", "<extra_id_1>User"],
|
139 |
+
}
|
140 |
+
sentences = text_generation(data, port=1424)['sentences']
|
141 |
+
return sentences[0] if not batch else sentences
|
142 |
+
|
143 |
+
PROMPT_TEMPLATE = """<extra_id_0>System
|
144 |
+
|
145 |
+
<extra_id_1>User
|
146 |
+
{prompt}
|
147 |
+
<extra_id_1>Assistant
|
148 |
+
"""
|
149 |
+
|
150 |
+
question = "Write a poem on NVIDIA in the style of Shakespeare"
|
151 |
+
prompt = PROMPT_TEMPLATE.format(prompt=question)
|
152 |
+
print(prompt)
|
153 |
+
|
154 |
+
response = get_generation(prompt, greedy=True, add_BOS=False, token_to_gen=1024, min_tokens=1, temp=1.0, top_p=1.0, top_k=0, repetition=1.0, batch=False)
|
155 |
+
response = response[len(prompt):]
|
156 |
+
if response.endswith("<extra_id_1>"):
|
157 |
+
response = response[:-len("<extra_id_1>")]
|
158 |
+
print(response)
|
159 |
+
```
|
160 |
+
|
161 |
+
2. Given this Python script, create a Bash script which spins up the inference server within the [NeMo container](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/nemo) (```docker pull nvcr.io/nvidia/nemo:24.01.framework```) and calls the Python script ``call_server.py``. The Bash script ``nemo_inference.sh`` is as follows,
|
162 |
+
|
163 |
+
```bash
|
164 |
+
NEMO_FILE=$1
|
165 |
+
WEB_PORT=1424
|
166 |
+
|
167 |
+
depends_on () {
|
168 |
+
HOST=$1
|
169 |
+
PORT=$2
|
170 |
+
STATUS=$(curl -X PUT http://$HOST:$PORT >/dev/null 2>/dev/null; echo $?)
|
171 |
+
while [ $STATUS -ne 0 ]
|
172 |
+
do
|
173 |
+
echo "waiting for server ($HOST:$PORT) to be up"
|
174 |
+
sleep 10
|
175 |
+
STATUS=$(curl -X PUT http://$HOST:$PORT >/dev/null 2>/dev/null; echo $?)
|
176 |
+
done
|
177 |
+
echo "server ($HOST:$PORT) is up running"
|
178 |
+
}
|
179 |
+
|
180 |
+
|
181 |
+
/usr/bin/python3 /opt/NeMo/examples/nlp/language_modeling/megatron_gpt_eval.py \
|
182 |
+
gpt_model_file=$NEMO_FILE \
|
183 |
+
pipeline_model_parallel_split_rank=0 \
|
184 |
+
server=True tensor_model_parallel_size=8 \
|
185 |
+
trainer.precision=bf16 pipeline_model_parallel_size=2 \
|
186 |
+
trainer.devices=8 \
|
187 |
+
trainer.num_nodes=2 \
|
188 |
+
web_server=False \
|
189 |
+
port=${WEB_PORT} &
|
190 |
+
SERVER_PID=$!
|
191 |
+
|
192 |
+
readonly local_rank="${LOCAL_RANK:=${SLURM_LOCALID:=${OMPI_COMM_WORLD_LOCAL_RANK:-}}}"
|
193 |
+
if [ $SLURM_NODEID -eq 0 ] && [ $local_rank -eq 0 ]; then
|
194 |
+
depends_on "0.0.0.0" ${WEB_PORT}
|
195 |
+
|
196 |
+
echo "start get json"
|
197 |
+
sleep 5
|
198 |
+
|
199 |
+
echo "SLURM_NODEID: $SLURM_NODEID"
|
200 |
+
echo "local_rank: $local_rank"
|
201 |
+
/usr/bin/python3 /scripts/call_server.py
|
202 |
+
echo "clean up dameons: $$"
|
203 |
+
kill -9 $SERVER_PID
|
204 |
+
pkill python
|
205 |
+
fi
|
206 |
+
wait
|
207 |
+
```
|
208 |
+
|
209 |
+
|
210 |
+
3. Launch ``nemo_inference.sh`` with a Slurm script defined like below, which starts a 2-node job for model inference.
|
211 |
+
|
212 |
+
```
|
213 |
+
#!/bin/bash
|
214 |
+
#SBATCH -A SLURM-ACCOUNT
|
215 |
+
#SBATCH -p SLURM-PARITION
|
216 |
+
#SBATCH -N 2
|
217 |
+
#SBATCH -J generation
|
218 |
+
#SBATCH --ntasks-per-node=8
|
219 |
+
#SBATCH --gpus-per-node=8
|
220 |
+
set -x
|
221 |
+
|
222 |
+
RESULTS=<PATH_TO_YOUR_SCRIPTS_FOLDER>
|
223 |
+
OUTFILE="${RESULTS}/slurm-%j-%n.out"
|
224 |
+
ERRFILE="${RESULTS}/error-%j-%n.out"
|
225 |
+
MODEL=<PATH_TO>/Nemotron-4-340B-Instruct
|
226 |
+
CONTAINER="nvcr.io/nvidia/nemo:24.01.framework"
|
227 |
+
MOUNTS="--container-mounts=<PATH_TO_YOUR_SCRIPTS_FOLDER>:/scripts,MODEL:/model"
|
228 |
+
|
229 |
+
read -r -d '' cmd <<EOF
|
230 |
+
bash /scripts/nemo_inference.sh /model
|
231 |
+
EOF
|
232 |
+
|
233 |
+
srun -o $OUTFILE -e $ERRFILE --container-image="$CONTAINER" $MOUNTS bash -c "${cmd}"
|
234 |
+
```
|
235 |
+
|
236 |
+
### Evaluation Results
|
237 |
+
|
238 |
+
#### MT-Bench (GPT-4-Turbo)
|
239 |
+
|
240 |
+
Evaluated using MT-Bench judging by GPT-4-0125-Preview as described in Appendix H in the [HelpSteer2 Dataset Paper](https://arxiv.org/abs/2406.08673)
|
241 |
+
|
242 |
+
| total | writing | roleplay | extraction | stem | humanities | reasoning | math | coding | turn 1 | turn 2 |
|
243 |
+
| :----- | :------- | :-------- | :---------- | :---- | :---------- | :--------- | :---- | ------ | :------ | :------ |
|
244 |
+
| 8.22 | 8.70 | 8.70 | 9.20 | 8.75 | 8.95 | 6.40 | 8.40 | 6.70 | 8.61 | 7.84 |
|
245 |
+
|
246 |
+
#### IFEval
|
247 |
+
|
248 |
+
Evaluated using the Instruction Following Eval (IFEval) introduced in Instruction-Following Evaluation for Large Language Models.
|
249 |
+
|
250 |
+
| Prompt-Strict Acc | Instruction-Strict Acc |
|
251 |
+
| :----------------------- | :---------------------------- |
|
252 |
+
| 79.9 | 86.1 |
|
253 |
+
|
254 |
+
#### MMLU
|
255 |
+
|
256 |
+
Evaluated using the Multi-task Language Understanding benchmarks as introduced in Measuring Massive Multitask Language Understanding.
|
257 |
+
|
258 |
+
|MMLU 0-shot |
|
259 |
+
| :----------------- |
|
260 |
+
| 78.7 |
|
261 |
+
|
262 |
+
#### GSM8K
|
263 |
+
|
264 |
+
Evaluated using the Grade School Math 8K (GSM8K) benchmark as introduced in Training Verifiers to Solve Math Word Problems.
|
265 |
+
|
266 |
+
| GSM8K 0-shot |
|
267 |
+
| :----------------- |
|
268 |
+
| 92.3 |
|
269 |
+
|
270 |
+
#### HumanEval
|
271 |
+
|
272 |
+
Evaluated using the HumanEval benchmark as introduced in Evaluating Large Language Models Trained on Code.
|
273 |
+
|
274 |
+
|
275 |
+
| HumanEval 0-shot |
|
276 |
+
| :----- |
|
277 |
+
| 73.2 |
|
278 |
+
|
279 |
+
#### MBPP
|
280 |
+
|
281 |
+
Evaluated using the MBPP Dataset as introduced in the Program Synthesis with Large Language Models.
|
282 |
+
|
283 |
+
| MBPP 0-shot|
|
284 |
+
| :----------------- |
|
285 |
+
| 75.4 |
|
286 |
+
|
287 |
+
|
288 |
+
#### Arena Hard
|
289 |
+
|
290 |
+
Evaluated using the Arena-Hard Pipeline from the LMSys Org.
|
291 |
+
|
292 |
+
| Arena Hard |
|
293 |
+
| :----------------- |
|
294 |
+
| 54.2 |
|
295 |
+
|
296 |
+
#### AlpacaEval 2.0 LC
|
297 |
+
|
298 |
+
Evaluated using the AlpacaEval 2.0 LC (Length Controlled) as introduced in the paper: Length-Controlled AlpacaEval: A Simple Way to Debias Automatic Evaluators
|
299 |
+
|
300 |
+
| AlpacaEval 2.0 LC|
|
301 |
+
| :----------------- |
|
302 |
+
| 41.5 |
|
303 |
+
|
304 |
+
|
305 |
+
#### TFEval
|
306 |
+
|
307 |
+
Evaluated using the CantTalkAboutThis Dataset as introduced in the CantTalkAboutThis: Aligning Language Models to Stay on Topic in Dialogues.
|
308 |
+
|
309 |
+
| Distractor F1 | On-topic F1 |
|
310 |
+
| :----------------------- | :---------------------------- |
|
311 |
+
| 81.7 | 97.7 |
|
312 |
+
|
313 |
+
|
314 |
+
### Adversarial Testing and Red Teaming Efforts
|
315 |
+
|
316 |
+
The Nemotron-4 340B-Instruct model underwent safety evaluation including adversarial testing via three distinct methods:
|
317 |
+
- [Garak](https://docs.garak.ai/garak), is an automated LLM vulnerability scanner that probes for common weaknesses, including prompt injection and data leakage.
|
318 |
+
- AEGIS, is a content safety evaluation dataset and LLM based content safety classifier model, that adheres to a broad taxonomy of 13 categories of critical risks in human-LLM interactions.
|
319 |
+
- Human Content Red Teaming leveraging human interaction and evaluation of the models' responses.
|
320 |
+
|
321 |
+
### Limitations
|
322 |
+
|
323 |
+
The model was trained on data that contains toxic language, unsafe content, and societal biases originally crawled from the internet. Therefore, the model may amplify those biases and return toxic responses especially when prompted with toxic prompts. The model may generate answers that may be inaccurate, omit key information, or include irrelevant or redundant text producing socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive.
|
324 |
+
|
325 |
+
|
326 |
+
### Ethical Considerations
|
327 |
+
|
328 |
+
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 internal 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 [here](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/nemo/models/nemotron-4-340b-instruct). Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
|
config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"NemotronForCausalLM"
|
4 |
+
],
|
5 |
+
"attention_bias": false,
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"bos_token_id": 2,
|
8 |
+
"eos_token_id": 3,
|
9 |
+
"hidden_act": "relu2",
|
10 |
+
"hidden_size": 18432,
|
11 |
+
"initializer_range": 0.0063,
|
12 |
+
"intermediate_size": 73728,
|
13 |
+
"max_position_embeddings": 4096,
|
14 |
+
"model_type": "nemotron",
|
15 |
+
"num_attention_heads": 96,
|
16 |
+
"num_hidden_layers": 96,
|
17 |
+
"num_key_value_heads": 8,
|
18 |
+
"pretraining_tp": 1,
|
19 |
+
"norm_eps": 1e-05,
|
20 |
+
"rope_scaling": null,
|
21 |
+
"rope_percentage": 0.5,
|
22 |
+
"rope_theta": 10000.0,
|
23 |
+
"tie_word_embeddings": false,
|
24 |
+
"torch_dtype": "bfloat16",
|
25 |
+
"transformers_version": "4.40.0.dev0",
|
26 |
+
"use_cache": true,
|
27 |
+
"vocab_size": 256000
|
28 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 2,
|
4 |
+
"eos_token_id": 3,
|
5 |
+
"transformers_version": "4.40.0.dev0"
|
6 |
+
}
|
model-00001-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e9b64503884a37aae17ecc0e155d33ef201481b67c42ac962898ee8d6b05b252
|
3 |
+
size 16345351200
|
model-00002-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6b46c529e662f46d438735b2bd30698aff8b90e464d18f1d39c445bfc8140df7
|
3 |
+
size 6908167056
|
model-00003-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:baf29159ea20f8230a7df081d0f24fcf5fa3d99b127d30eb12fa213a093f3960
|
3 |
+
size 6908167056
|
model-00004-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:29dfe85191f95c15aeeae04ebfd072b63f2f95f5f52ec87ab39058f82b3d56b1
|
3 |
+
size 6908167056
|
model-00005-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c8eb00fda9c57bdde1a5399d167028f651c92de73d0a1f1a4c8e9cc2d378aa98
|
3 |
+
size 6908167056
|
model-00006-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b16e65ea4cbb31a94403ffe9461c46e276ea584dc1ebb72a13bfcd6476a3b893
|
3 |
+
size 6908167056
|
model-00007-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0cf1d50345474f49c80940a2d8f676ff4936a1a8d0217acc29533c88a427daff
|
3 |
+
size 6908167056
|
model-00008-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7ec9df1c41a98d332e5c5fdcdc3dcac8d4e4aed1e82289b05d117abef493848c
|
3 |
+
size 6908167056
|
model-00009-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7c6057f114d572e856fc9885a7e8f394ce2181aef310c72055a59205d9e1cc15
|
3 |
+
size 6908167056
|
model-00010-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6028dd1a483a0079a4f6cb1b50a7f958e4506a4d84d1b8cf000b1c5eda0621aa
|
3 |
+
size 6908167056
|
model-00011-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2ea4a758a7165446df5e324b8a67c240e0c47fdc1c3b396e8788ab8575becbae
|
3 |
+
size 6908167064
|
model-00012-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d884ff179f3e741e46a9630d3b0a1bf9c46292bfc61a3ed3c8eda49b64681cdb
|
3 |
+
size 6908167064
|
model-00013-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dcb3a7d9d949c7c1d0d64f73bb8f428485f7b2896c9229514d456785b486b4bc
|
3 |
+
size 6908167064
|
model-00014-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:78ad24cac2acf125662badebe691edf1baded42c0cafaa144b187cfe4944e192
|
3 |
+
size 6908167064
|
model-00015-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:398aecdefa6707306b6e61fe22501ce5586e696659f9afb4550973a94d109b6f
|
3 |
+
size 6908167064
|
model-00016-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:47cbafd4c50945b5c6ea5e605c13b15ebe27209ddf933e90419b0bf9c9792d77
|
3 |
+
size 6908167064
|
model-00017-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e50e3cddd38e26e170eaf8415a10951373cf106304e42e03dff9cbe8fc53224f
|
3 |
+
size 6908167064
|
model-00018-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5c8be15be62d780521e93bbc7dfa56ba998070c8979b6217c122fe87f68739a2
|
3 |
+
size 6908167064
|
model-00019-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f6582916d1cd2f25386e8eff720d56efb33abd65a94a74aee476a18a08b201c8
|
3 |
+
size 6908167064
|
model-00020-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4ccdfd333d999cbdcb60f01871b283c3a1987e6ababb5486aa8681484819dabe
|
3 |
+
size 6908167064
|
model-00021-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8d52b037782ad838c2abb0693b201616daa0e8a8edb79ac6bcf104c628700abb
|
3 |
+
size 6908167064
|
model-00022-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2642bdeee2166e693363b87a2b8f9fa3d249aa1649791328e058b629fee0ff06
|
3 |
+
size 6908167064
|
model-00023-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d966452836010569aec25c70c855faf559bc10a0aa0d40587ec74b44ddd0e768
|
3 |
+
size 6908167064
|
model-00024-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b4f4b5a1350b9e9c79dec96e120cf8df960a89d06100c0a7c61fc06c0f1e634b
|
3 |
+
size 6908167064
|
model-00025-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:01be3ab3d0b903d16db4aa46613643f8340d55cd4f6704371c367dc025964d3c
|
3 |
+
size 6908167064
|
model-00026-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a50b81a0c025b696bf94d1bda619fc4f9f382618c50139f573eba4b2f7d446af
|
3 |
+
size 6908167064
|
model-00027-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:454187eaf45d9ec317fc350eb5b85e1b7a2670dee68a47a6560f8c777d7e481c
|
3 |
+
size 6908167064
|
model-00028-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8cff460f21a13abdfcf9bd0762405c1348d03ef9c7b6062a68fc9fc8bea39e08
|
3 |
+
size 6908167064
|
model-00029-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3949606ba74c01a279645cd28c8f789856b6ac48356284fc3352587dae15db5a
|
3 |
+
size 6908167064
|
model-00030-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6b0e7145ae836515b575dfea19b4bf672f02c8a2380a92535369ae04719b1f4a
|
3 |
+
size 6908167064
|
model-00031-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5fc2ce326b27ed250c710571c0dde721b8dc4dabc65e3de60098e18777af4426
|
3 |
+
size 6908167064
|
model-00032-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1dbdd3f1ba3e98fb5153d43a5ef7761ab373b11e1709de5a72b336c96fd0a463
|
3 |
+
size 6908167064
|
model-00033-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8abcd8a7caa8c6f812e730e176ec15cc600375cfd3e4a35439db3bbc4166dd61
|
3 |
+
size 6908167064
|
model-00034-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:76c23777450e0ffbfc3efe5ad176b72f4b3eb7eb5f39da4a355a1de5cf8d682f
|
3 |
+
size 6908167064
|
model-00035-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a05b942e7aba178b497b6682fa946f9fea5532800874a76d0e8762ffa6846f2c
|
3 |
+
size 6908167064
|
model-00036-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e733766a34152d31709f43ea7cea24a72954304f8b691d9695ded5217b887f30
|
3 |
+
size 6908167064
|
model-00037-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4feaf49faf5c526e41ce661799afae9f35fbf9442a9bf46dcb9dc4b3fe282c6e
|
3 |
+
size 6908167064
|
model-00038-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e5770224cf1cb267f40755edb6a693acca05ccbd4289113521985639bd06a30b
|
3 |
+
size 6908167064
|
model-00039-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cae5725b9b1c9e88a8da1280573349cf6657c9e8b5e4752433cabe85458fbcff
|
3 |
+
size 6908167064
|
model-00040-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:62e5cb6d9843365e6c14d11f51bbf4a86a046615fe1c9b96a85f41f39e42e89f
|
3 |
+
size 6908167064
|
model-00041-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4fd2e95c6dab64af17eb2434efcb99c93334538cd81f0b48dabb78123d062847
|
3 |
+
size 6908167064
|
model-00042-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4b3e605c7b227603e521505cf33b16e9de15c40c6df8a1f0bfb39cdbb415ada7
|
3 |
+
size 6908167064
|
model-00043-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d474355049526f53a238b7dff5295eeeb974ac4975dc851916f5cda5570e305e
|
3 |
+
size 6908167064
|
model-00044-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1b579c8693a0d15144e6588f87611e0b739cf0d7cde21948cb786e3fefc20101
|
3 |
+
size 6908167064
|
model-00045-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:283dd1f264a0110025d05778e7aefbf7c41ba10bda0a999ba6f8c4400139ccb2
|
3 |
+
size 6908167064
|
model-00046-of-00097.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5044ee4fedce51dd647b965754967a563e58b1563633da98fb299c6dc4bc90b8
|
3 |
+
size 6908167064
|