Mungert commited on
Commit
e6a1118
·
verified ·
0 Parent(s):

Super-squash history to reclaim storage

Browse files
.gitattributes ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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
+ Nemotron-Mini-4B-Instruct-f16.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Nemotron-Mini-4B-Instruct-f16_q8_0.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Nemotron-Mini-4B-Instruct-bf16_q8_0.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Nemotron-Mini-4B-Instruct-f16_q6_k.gguf filter=lfs diff=lfs merge=lfs -text
40
+ Nemotron-Mini-4B-Instruct-bf16_q6_k.gguf filter=lfs diff=lfs merge=lfs -text
41
+ Nemotron-Mini-4B-Instruct-f16_q4_k.gguf filter=lfs diff=lfs merge=lfs -text
42
+ Nemotron-Mini-4B-Instruct-bf16_q4_k.gguf filter=lfs diff=lfs merge=lfs -text
43
+ Nemotron-Mini-4B-Instruct-q2_k_l.gguf filter=lfs diff=lfs merge=lfs -text
44
+ Nemotron-Mini-4B-Instruct-q3_k_l.gguf filter=lfs diff=lfs merge=lfs -text
45
+ Nemotron-Mini-4B-Instruct-q4_k_l.gguf filter=lfs diff=lfs merge=lfs -text
46
+ Nemotron-Mini-4B-Instruct-q5_k_l.gguf filter=lfs diff=lfs merge=lfs -text
47
+ Nemotron-Mini-4B-Instruct-q6_k_l.gguf filter=lfs diff=lfs merge=lfs -text
48
+ Nemotron-Mini-4B-Instruct-q2_k_m.gguf filter=lfs diff=lfs merge=lfs -text
49
+ Nemotron-Mini-4B-Instruct-q2_k_s.gguf filter=lfs diff=lfs merge=lfs -text
50
+ Nemotron-Mini-4B-Instruct-q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
51
+ Nemotron-Mini-4B-Instruct-q3_k_s.gguf filter=lfs diff=lfs merge=lfs -text
52
+ Nemotron-Mini-4B-Instruct-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
53
+ Nemotron-Mini-4B-Instruct-q4_k_s.gguf filter=lfs diff=lfs merge=lfs -text
54
+ Nemotron-Mini-4B-Instruct-q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
55
+ Nemotron-Mini-4B-Instruct-q5_k_s.gguf filter=lfs diff=lfs merge=lfs -text
56
+ Nemotron-Mini-4B-Instruct-q6_k_m.gguf filter=lfs diff=lfs merge=lfs -text
57
+ Nemotron-Mini-4B-Instruct-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
58
+ Nemotron-Mini-4B-Instruct-q4_0.gguf filter=lfs diff=lfs merge=lfs -text
59
+ Nemotron-Mini-4B-Instruct-q4_1.gguf filter=lfs diff=lfs merge=lfs -text
60
+ Nemotron-Mini-4B-Instruct-q4_0_l.gguf filter=lfs diff=lfs merge=lfs -text
61
+ Nemotron-Mini-4B-Instruct-q4_1_l.gguf filter=lfs diff=lfs merge=lfs -text
62
+ Nemotron-Mini-4B-Instruct-q5_0.gguf filter=lfs diff=lfs merge=lfs -text
63
+ Nemotron-Mini-4B-Instruct-q5_1.gguf filter=lfs diff=lfs merge=lfs -text
64
+ Nemotron-Mini-4B-Instruct-q5_0_l.gguf filter=lfs diff=lfs merge=lfs -text
65
+ Nemotron-Mini-4B-Instruct-q5_1_l.gguf filter=lfs diff=lfs merge=lfs -text
66
+ Nemotron-Mini-4B-Instruct-iq2_xs.gguf filter=lfs diff=lfs merge=lfs -text
67
+ Nemotron-Mini-4B-Instruct-iq2_xxs.gguf filter=lfs diff=lfs merge=lfs -text
68
+ Nemotron-Mini-4B-Instruct-iq2_s.gguf filter=lfs diff=lfs merge=lfs -text
69
+ Nemotron-Mini-4B-Instruct-iq2_m.gguf filter=lfs diff=lfs merge=lfs -text
70
+ Nemotron-Mini-4B-Instruct-iq3_xs.gguf filter=lfs diff=lfs merge=lfs -text
71
+ Nemotron-Mini-4B-Instruct-iq3_xxs.gguf filter=lfs diff=lfs merge=lfs -text
72
+ Nemotron-Mini-4B-Instruct-iq3_s.gguf filter=lfs diff=lfs merge=lfs -text
73
+ Nemotron-Mini-4B-Instruct-iq3_m.gguf filter=lfs diff=lfs merge=lfs -text
74
+ Nemotron-Mini-4B-Instruct-iq4_xs.gguf filter=lfs diff=lfs merge=lfs -text
75
+ Nemotron-Mini-4B-Instruct-iq4_nl.gguf filter=lfs diff=lfs merge=lfs -text
76
+ Nemotron-Mini-4B-Instruct.imatrix filter=lfs diff=lfs merge=lfs -text
77
+ Nemotron-Mini-4B-Instruct-bf16.gguf filter=lfs diff=lfs merge=lfs -text
Nemotron-Mini-4B-Instruct-bf16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5311fb9286605b5e074d6d8347021ba124f92abe7f0fc1c2eadb158fde9bf6aa
3
+ size 8388156352
Nemotron-Mini-4B-Instruct-bf16_q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60a7b9c6844732114b7b3c745263faaad609baae1705986f1341ca1a0156b338
3
+ size 7161322432
Nemotron-Mini-4B-Instruct-f16_q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b58ab2f783e99ec924578dd61b39d35cca0ccd8a6206633fcea719ea94b8442c
3
+ size 7161322432
Nemotron-Mini-4B-Instruct-iq2_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a05987ef0d9ef1b42931cec6bdee8f3574c5fea7a0fbc7913f4966bb3153ba34
3
+ size 2037619936
Nemotron-Mini-4B-Instruct-iq2_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e356d78ee47e6925ccfac4b8799cf12810c8f485db2b1559fe7a01662262a3c
3
+ size 2002230496
Nemotron-Mini-4B-Instruct-iq2_xs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf8cd9f2a4a2a083de2aeb74fdd80b15a96b94c3f590a36ae6ddef36a99d8f12
3
+ size 1960598752
Nemotron-Mini-4B-Instruct-iq2_xxs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16d88f763a16983959fbeb324f27d04f7858e9441ff4cc841f805e0deeebfd89
3
+ size 1887116512
Nemotron-Mini-4B-Instruct-iq3_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0e9b5a8e8448f6b12e6c142f78595607d616b68de87eaef831fadce53bcf6c5
3
+ size 2331647200
Nemotron-Mini-4B-Instruct-iq3_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6a683ffff2062d6e0cfce3d260b37aed00dffb8111272c32f173f0a316fb8d5
3
+ size 2331647200
Nemotron-Mini-4B-Instruct-iq3_xs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a4bb512348af6361957cede4283cdfbedade857e10d48b17ff00e19a348be88
3
+ size 2188713184
Nemotron-Mini-4B-Instruct-iq3_xxs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff3d90b6f3484808be59907b3751a8ace34e015144d12390e1cd11802caf7c4e
3
+ size 2152930528
Nemotron-Mini-4B-Instruct-iq4_nl.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d8207cb94adfa07650edcb5e2bc78047519981c85466933312cafe2726daf49
3
+ size 2567625952
Nemotron-Mini-4B-Instruct-iq4_xs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d709d27a57af7d54ec9b1de193074b4564c44ed924707dec224f8afe6cfcd29f
3
+ size 2461261024
Nemotron-Mini-4B-Instruct-q2_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98e789e76be82f307b6c9f2816ca4fb457ca39207ea72cfafa8439282a6d7a9f
3
+ size 2279251168
Nemotron-Mini-4B-Instruct-q2_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcfc78af009fd1849fba6e9deca9b5a54da3cd859bb42065b863a299b54e3d01
3
+ size 2070355168
Nemotron-Mini-4B-Instruct-q3_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:844741e21e40a81bb496e5bc62644572ac0f815704d4188a02756518743533a5
3
+ size 2589498592
Nemotron-Mini-4B-Instruct-q3_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18500487111c64711156271dd45f7d14b05761aff6862da6671367a8cd5a8306
3
+ size 2380602592
Nemotron-Mini-4B-Instruct-q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a2b59c40d53ef1292f92f1976e40bbc7bb3369f5366de3abfc886b3f506aaea
3
+ size 2364873952
Nemotron-Mini-4B-Instruct-q4_1.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d9d40faef4017dde0292a7229f6d1be12d4888afe533232c6103739070e9a5b
3
+ size 2626755808
Nemotron-Mini-4B-Instruct-q4_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e99ecdaa6646eb304a7570627d0c5035960e9fb530373fe9e74d8142563c26a
3
+ size 2876153056
Nemotron-Mini-4B-Instruct-q4_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89a5c799a5eb8ebab7ebc258b28c968b485781700e92817445a9a6e31009838e
3
+ size 2811272416
Nemotron-Mini-4B-Instruct-q5_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97736c52393da0cd5a43189cf1c3da183deeb594d416d29ad7eb4a47045127c4
3
+ size 2888637664
Nemotron-Mini-4B-Instruct-q5_1.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79d796488d982740a96fd7d0ada47a4b7a19c15137c2142248ea335b501b6275
3
+ size 3150519520
Nemotron-Mini-4B-Instruct-q5_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea72c7900d5b0cb2431294319b9b20c428b548ad6dc6ef0c0c58da96285319a3
3
+ size 3174407392
Nemotron-Mini-4B-Instruct-q5_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82c06ed09cc3aa819167f7ec15b859229826c41c573a6bb8717418f16581c112
3
+ size 3140984032
Nemotron-Mini-4B-Instruct-q6_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f812d5be844eb65179ebe45a9ac92c9a2c12528841459b8fef92e9c85bbf8dc9
3
+ size 3445136608
Nemotron-Mini-4B-Instruct-q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f21857b4c0e712ae2b705f68a6aa527b719b01f3c70e15e3c86314a8cf59bb95
3
+ size 4459928512
Nemotron-Mini-4B-Instruct.imatrix ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38f3594e99beb4bb6516a2e8efed23111a9e170ac872f183129d93730dd0cd5d
3
+ size 3152084
README.md ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ library_name: transformers
7
+ pipeline_tag: text-generation
8
+ language:
9
+ - en
10
+ tags:
11
+ - nvidia
12
+ - llama-3
13
+ - pytorch
14
+ ---
15
+
16
+ # <span style="color: #7FFF7F;">Nemotron-Mini-4B-Instruct GGUF Models</span>
17
+
18
+
19
+ ## <span style="color: #7F7FFF;">Model Generation Details</span>
20
+
21
+ This model was generated using [llama.cpp](https://github.com/ggerganov/llama.cpp) at commit [`b9c3eefd`](https://github.com/ggerganov/llama.cpp/commit/b9c3eefde1b67104bd993485ff38dd62abe9d70c).
22
+
23
+
24
+
25
+
26
+
27
+ ---
28
+
29
+ ## <span style="color: #7FFF7F;">Quantization Beyond the IMatrix</span>
30
+
31
+ I've been experimenting with a new quantization approach that selectively elevates the precision of key layers beyond what the default IMatrix configuration provides.
32
+
33
+ In my testing, standard IMatrix quantization underperforms at lower bit depths, especially with Mixture of Experts (MoE) models. To address this, I'm using the `--tensor-type` option in `llama.cpp` to manually "bump" important layers to higher precision. You can see the implementation here:
34
+ 👉 [Layer bumping with llama.cpp](https://github.com/Mungert69/GGUFModelBuilder/blob/main/model-converter/tensor_list_builder.py)
35
+
36
+ While this does increase model file size, it significantly improves precision for a given quantization level.
37
+
38
+ ### **I'd love your feedback—have you tried this? How does it perform for you?**
39
+
40
+
41
+
42
+
43
+ ---
44
+
45
+ <a href="https://readyforquantum.com/huggingface_gguf_selection_guide.html" style="color: #7FFF7F;">
46
+ Click here to get info on choosing the right GGUF model format
47
+ </a>
48
+
49
+ ---
50
+
51
+
52
+
53
+ <!--Begin Original Model Card-->
54
+
55
+ # Nemotron-Mini-4B-Instruct
56
+
57
+ ## Model Overview
58
+
59
+ Nemotron-Mini-4B-Instruct is a model for generating responses for roleplaying, retrieval augmented generation, and function calling. It is a small language model (SLM) optimized through distillation, pruning and quantization for speed and on-device deployment. It is a fine-tuned version of [nvidia/Minitron-4B-Base](https://huggingface.co/nvidia/Minitron-4B-Base), which was pruned and distilled from [Nemotron-4 15B](https://arxiv.org/abs/2402.16819) using [our LLM compression technique](https://arxiv.org/abs/2407.14679). This instruct model is optimized for roleplay, RAG QA, and function calling in English. It supports a context length of 4,096 tokens. This model is ready for commercial use.
60
+
61
+ Try this model on [build.nvidia.com](https://build.nvidia.com/nvidia/nemotron-mini-4b-instruct).
62
+
63
+ For more details about how this model is used for [NVIDIA ACE](https://developer.nvidia.com/ace), please refer to [this blog post](https://developer.nvidia.com/blog/deploy-the-first-on-device-small-language-model-for-improved-game-character-roleplay/) and [this demo video](https://www.youtube.com/watch?v=d5z7oIXhVqg), which showcases how the model can be integrated into a video game. You can download the model checkpoint for NVIDIA AI Inference Manager (AIM) SDK from [here](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/ucs-ms/resources/nemotron-mini-4b-instruct).
64
+
65
+ **Model Developer:** NVIDIA
66
+
67
+ **Model Dates:** Nemotron-Mini-4B-Instruct was trained between February 2024 and Aug 2024.
68
+
69
+ ## License
70
+
71
+ [NVIDIA Community Model License](https://huggingface.co/nvidia/Nemotron-Mini-4B-Instruct/blob/main/nvidia-community-model-license-aug2024.pdf)
72
+
73
+ ## Model Architecture
74
+
75
+ Nemotron-Mini-4B-Instruct uses a model embedding size of 3072, 32 attention heads, and an MLP intermediate dimension of 9216. It also uses Grouped-Query Attention (GQA) and Rotary Position Embeddings (RoPE).
76
+
77
+ **Architecture Type:** Transformer Decoder (auto-regressive language model)
78
+
79
+ **Network Architecture:** Nemotron-4
80
+
81
+
82
+ ## Prompt Format:
83
+
84
+ We recommend using the following prompt template, which was used to fine-tune the model. The model may not perform optimally without it.
85
+
86
+ **Single Turn**
87
+
88
+ ```
89
+ <extra_id_0>System
90
+ {system prompt}
91
+
92
+ <extra_id_1>User
93
+ {prompt}
94
+ <extra_id_1>Assistant\n
95
+ ```
96
+
97
+ **Tool use**
98
+
99
+ ```
100
+ <extra_id_0>System
101
+ {system prompt}
102
+
103
+ <tool> ... </tool>
104
+ <context> ... </context>
105
+
106
+ <extra_id_1>User
107
+ {prompt}
108
+ <extra_id_1>Assistant
109
+ <toolcall> ... </toolcall>
110
+ <extra_id_1>Tool
111
+ {tool response}
112
+ <extra_id_1>Assistant\n
113
+ ```
114
+
115
+
116
+ ## Usage
117
+
118
+ ```
119
+ from transformers import AutoTokenizer, AutoModelForCausalLM
120
+
121
+ # Load the tokenizer and model
122
+ tokenizer = AutoTokenizer.from_pretrained("nvidia/Nemotron-Mini-4B-Instruct")
123
+ model = AutoModelForCausalLM.from_pretrained("nvidia/Nemotron-Mini-4B-Instruct")
124
+
125
+ # Use the prompt template
126
+ messages = [
127
+ {
128
+ "role": "system",
129
+ "content": "You are a friendly chatbot who always responds in the style of a pirate",
130
+ },
131
+ {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
132
+ ]
133
+ tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
134
+
135
+ outputs = model.generate(tokenized_chat, max_new_tokens=128)
136
+ print(tokenizer.decode(outputs[0]))
137
+ ```
138
+
139
+ You can also use `pipeline` but you need to create a tokenizer object and assign it to the pipeline manually.
140
+
141
+ ```
142
+ from transformers import AutoTokenizer
143
+ from transformers import pipeline
144
+
145
+ tokenizer = AutoTokenizer.from_pretrained("nvidia/Nemotron-Mini-4B-Instruct")
146
+
147
+ messages = [
148
+ {"role": "user", "content": "Who are you?"},
149
+ ]
150
+ pipe = pipeline("text-generation", model="nvidia/Nemotron-Mini-4B-Instruct")
151
+ pipe.tokenizer = tokenizer # You need to assign tokenizer manually
152
+ pipe(messages)
153
+ ```
154
+
155
+ ## AI Safety Efforts
156
+
157
+ The Nemotron-Mini-4B-Instruct model underwent AI safety evaluation including adversarial testing via three distinct methods:
158
+ - [Garak](https://github.com/leondz/garak), is an automated LLM vulnerability scanner that probes for common weaknesses, including prompt injection and data leakage.
159
+ - [AEGIS](https://huggingface.co/datasets/nvidia/Aegis-AI-Content-Safety-Dataset-1.0), 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.
160
+ - Human Content Red Teaming leveraging human interaction and evaluation of the models' responses.
161
+
162
+
163
+ ## Limitations
164
+
165
+ The model was trained on data that contains toxic language 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. This issue could be exacerbated without the use of the recommended prompt template. This issue could be exacerbated without the use of the recommended prompt template.
166
+
167
+
168
+ ## Ethical Considerations
169
+
170
+ 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++](https://build.nvidia.com/nvidia/nemotron-mini-4b-instruct/modelcard). Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
171
+
172
+ <!--End Original Model Card-->
173
+
174
+ ---
175
+
176
+ # <span id="testllm" style="color: #7F7FFF;">🚀 If you find these models useful</span>
177
+
178
+ Help me test my **AI-Powered Quantum Network Monitor Assistant** with **quantum-ready security checks**:
179
+
180
+ 👉 [Quantum Network Monitor](https://readyforquantum.com/?assistant=open&utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme)
181
+
182
+
183
+ The full Open Source Code for the Quantum Network Monitor Service available at my github repos ( repos with NetworkMonitor in the name) : [Source Code Quantum Network Monitor](https://github.com/Mungert69). You will also find the code I use to quantize the models if you want to do it yourself [GGUFModelBuilder](https://github.com/Mungert69/GGUFModelBuilder)
184
+
185
+ 💬 **How to test**:
186
+ Choose an **AI assistant type**:
187
+ - `TurboLLM` (GPT-4.1-mini)
188
+ - `HugLLM` (Hugginface Open-source models)
189
+ - `TestLLM` (Experimental CPU-only)
190
+
191
+ ### **What I’m Testing**
192
+ I’m pushing the limits of **small open-source models for AI network monitoring**, specifically:
193
+ - **Function calling** against live network services
194
+ - **How small can a model go** while still handling:
195
+ - Automated **Nmap security scans**
196
+ - **Quantum-readiness checks**
197
+ - **Network Monitoring tasks**
198
+
199
+ 🟡 **TestLLM** – Current experimental model (llama.cpp on 2 CPU threads on huggingface docker space):
200
+ - ✅ **Zero-configuration setup**
201
+ - ⏳ 30s load time (slow inference but **no API costs**) . No token limited as the cost is low.
202
+ - 🔧 **Help wanted!** If you’re into **edge-device AI**, let’s collaborate!
203
+
204
+ ### **Other Assistants**
205
+ 🟢 **TurboLLM** – Uses **gpt-4.1-mini** :
206
+ - **It performs very well but unfortunatly OpenAI charges per token. For this reason tokens usage is limited.
207
+ - **Create custom cmd processors to run .net code on Quantum Network Monitor Agents**
208
+ - **Real-time network diagnostics and monitoring**
209
+ - **Security Audits**
210
+ - **Penetration testing** (Nmap/Metasploit)
211
+
212
+ 🔵 **HugLLM** – Latest Open-source models:
213
+ - 🌐 Runs on Hugging Face Inference API. Performs pretty well using the lastest models hosted on Novita.
214
+
215
+ ### 💡 **Example commands you could test**:
216
+ 1. `"Give me info on my websites SSL certificate"`
217
+ 2. `"Check if my server is using quantum safe encyption for communication"`
218
+ 3. `"Run a comprehensive security audit on my server"`
219
+ 4. '"Create a cmd processor to .. (what ever you want)" Note you need to install a [Quantum Network Monitor Agent](https://readyforquantum.com/Download/?utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme) to run the .net code on. This is a very flexible and powerful feature. Use with caution!
220
+
221
+ ### Final Word
222
+
223
+ I fund the servers used to create these model files, run the Quantum Network Monitor service, and pay for inference from Novita and OpenAI—all out of my own pocket. All the code behind the model creation and the Quantum Network Monitor project is [open source](https://github.com/Mungert69). Feel free to use whatever you find helpful.
224
+
225
+ If you appreciate the work, please consider [buying me a coffee](https://www.buymeacoffee.com/mahadeva) ☕. Your support helps cover service costs and allows me to raise token limits for everyone.
226
+
227
+ I'm also open to job opportunities or sponsorship.
228
+
229
+ Thank you! 😊