From 17c3635e79df4400d8622f3843c13e7d69e89cae Mon Sep 17 00:00:00 2001 From: ModelHub XC Date: Sat, 29 Aug 2026 16:58:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=EF=BC=8C=E7=94=B1ModelHub=20XC=E7=A4=BE=E5=8C=BA=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Model: Mungert/Llama-3.1-Nemotron-Nano-4B-v1.1-GGUF Source: Original Platform --- .gitattributes | 77 ++ Llama-3.1-Nemotron-Nano-4B-v1.1-bf16.gguf | 3 + ...a-3.1-Nemotron-Nano-4B-v1.1-bf16_q8_0.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-f16_q8_0.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_m.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_s.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xs.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xxs.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_m.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_s.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xs.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xxs.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_nl.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_xs.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_m.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_s.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_m.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_s.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q4_0.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q4_1.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_m.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_s.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q5_0.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q5_1.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_m.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_s.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q6_k_m.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1-q8_0.gguf | 3 + Llama-3.1-Nemotron-Nano-4B-v1.1.imatrix | 3 + README.md | 682 ++++++++++++++++++ 30 files changed, 843 insertions(+) create mode 100644 .gitattributes create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-bf16.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-bf16_q8_0.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-f16_q8_0.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_m.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_s.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xs.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xxs.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_m.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_s.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xs.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xxs.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_nl.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_xs.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_m.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_s.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_m.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_s.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q4_0.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q4_1.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_m.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_s.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q5_0.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q5_1.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_m.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_s.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q6_k_m.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1-q8_0.gguf create mode 100644 Llama-3.1-Nemotron-Nano-4B-v1.1.imatrix create mode 100644 README.md diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f95976a --- /dev/null +++ b/.gitattributes @@ -0,0 +1,77 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-f16.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-f16_q8_0.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-bf16_q8_0.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-f16_q6_k.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-bf16_q6_k.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-f16_q4_k.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-bf16_q4_k.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_l.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_l.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_l.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_l.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q6_k_l.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_m.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_s.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_s.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_s.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_s.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q6_k_m.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q8_0.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q4_0.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q4_1.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q4_0_l.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q4_1_l.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q5_0.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q5_1.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q5_0_l.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-q5_1_l.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xs.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xxs.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_s.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_m.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xs.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xxs.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_s.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_m.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_xs.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_nl.gguf filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1.imatrix filter=lfs diff=lfs merge=lfs -text +Llama-3.1-Nemotron-Nano-4B-v1.1-bf16.gguf filter=lfs diff=lfs merge=lfs -text diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-bf16.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-bf16.gguf new file mode 100644 index 0000000..5f88271 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-bf16.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bfdd53cf872202b2c026ffb13234a9789d468522375fd0b8b267965b6c7c6928 +size 9033731584 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-bf16_q8_0.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-bf16_q8_0.gguf new file mode 100644 index 0000000..5d06b54 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-bf16_q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a34780aa75365b01d21c7d761e8f1d29de538292e68a83c3184510b025ee8370 +size 5541973504 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-f16_q8_0.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-f16_q8_0.gguf new file mode 100644 index 0000000..45917f6 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-f16_q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:47c926fae3e802179693f1108eeb95e4e8452a8c18e2a7aff0d46b628b107ea6 +size 6863179264 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_m.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_m.gguf new file mode 100644 index 0000000..16788ba --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_m.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19f4ca84c3ca5c3c7e52e3315b10f07cee73eab28f1905366c143e9897ad7e84 +size 1862111040 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_s.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_s.gguf new file mode 100644 index 0000000..74b59e9 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_s.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc9a17a3faa2e9d88e198937d744f6c35b9651bc93ab9334763ea604a226b7bb +size 1796640576 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xs.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xs.gguf new file mode 100644 index 0000000..68f5728 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xs.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:895149b8ed0c8ce05a424e97dbe696a900017a7311d25d35a22d17bfbd4fafa7 +size 1751568192 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xxs.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xxs.gguf new file mode 100644 index 0000000..75b5b60 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq2_xxs.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb061d024a0eb5ea995c60431120718fccc89df5fcd8f909e8b2ce9fc3f0cc6b +size 1644121920 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_m.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_m.gguf new file mode 100644 index 0000000..c575f10 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_m.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7e15d95551b58162baeb4408f693ec5502acacce5269196e6bc84f3f211db14 +size 2200915776 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_s.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_s.gguf new file mode 100644 index 0000000..a652675 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_s.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d5c05cafdde932df79ebcdfb0b489b61e7eb728eb35f1cd54e45ddfbd7b64a9 +size 2160807744 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xs.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xs.gguf new file mode 100644 index 0000000..e6f948c --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xs.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fbd792d4baef113912622939375f65d33b5efda1cf6fe56e7bd2833a11bda63 +size 2073513792 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xxs.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xxs.gguf new file mode 100644 index 0000000..2c8b290 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xxs.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd2e3cbed7f8613ed43b09ff844627576684b4b08ef0b546543fc6b553734ab9 +size 1988972352 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_nl.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_nl.gguf new file mode 100644 index 0000000..6078d90 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_nl.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a207b671596c565c89720c46d06e30989b12b5eb2d134bd078876acc2e2c34d +size 2661107520 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_xs.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_xs.gguf new file mode 100644 index 0000000..8e45321 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-iq4_xs.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4eb375e31b29fadc7dd7ab08a965c688de441afc05ca9473b58a1b22710e54b +size 2535548736 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_m.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_m.gguf new file mode 100644 index 0000000..8641bf0 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_m.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56da01af4520d712a8cc1e76145c869f0b5beb7fc2c91899710a5e7d0c4798a0 +size 2013806400 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_s.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_s.gguf new file mode 100644 index 0000000..163f1a1 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q2_k_s.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ce44bb4e5417784a10386fdcf7b29b5b01a2e36830ce79a710a4e9268e525754 +size 1809469248 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_m.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_m.gguf new file mode 100644 index 0000000..4d07a02 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_m.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a792090bd29ad98d51fa53874e15ca80da7acd76226f63b45fffee641eddb83 +size 2431598400 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_s.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_s.gguf new file mode 100644 index 0000000..9411ef2 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q3_k_s.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9cd44da47c64418ecaf3d05affc6cd15aa0905330f8dbcf5de6d2b22bdeb226 +size 2186563392 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_0.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_0.gguf new file mode 100644 index 0000000..3d69ee5 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b356de572613c14ce0f90b84cb4e8ded6f052e97afaeccf291526ce2d106f1a8 +size 2546945856 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_1.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_1.gguf new file mode 100644 index 0000000..35b0b05 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_1.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1792745f26a35c076fb4a51233850c3a01f39c2bf3f034f65c585662ae3d2a29 +size 2828980032 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_m.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_m.gguf new file mode 100644 index 0000000..63dbdc2 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_m.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f09c17d476aff65dd3c9915cc8328e25eef1aff0a657a260d2be9744fd7e8b9 +size 2859024192 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_s.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_s.gguf new file mode 100644 index 0000000..63236bd --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_s.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a65f6cdce36974ebde0fa31063b3abd01e0b717247801f13ff21b507127ed123 +size 2794143552 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_0.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_0.gguf new file mode 100644 index 0000000..cbc03bb --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f6a9ebf663a99fe70851477c8e113e629ae78492bb939d08bfee97e9cb41f8e +size 3111014208 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_1.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_1.gguf new file mode 100644 index 0000000..8385089 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_1.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5802cd1cc07fff9abacbcf7e4c3deb99267a8833ad41d9c9767832f4cf5898df +size 3393048384 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_m.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_m.gguf new file mode 100644 index 0000000..f7964b8 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_m.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:975f39a3f49e282e4e94ab10ae2a9a332e47eca4f6239280089cccc0964ecb82 +size 3295887168 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_s.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_s.gguf new file mode 100644 index 0000000..7c127b6 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q5_k_s.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0420593c0e0938ed2149092c2be1d5fba85d0036ae10aec0bfbf3f62687d39d5 +size 3262463808 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q6_k_m.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q6_k_m.gguf new file mode 100644 index 0000000..b42ffa8 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q6_k_m.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf560d89b905a84b728267554be95d80f85e596b38abec56b35bb8951bcc4d79 +size 3710336832 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1-q8_0.gguf b/Llama-3.1-Nemotron-Nano-4B-v1.1-q8_0.gguf new file mode 100644 index 0000000..4228a95 --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1-q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ebac8cce62e9c30a74efc2f1f9c35d7d6ca8c27704e686e7e3868befaf72ce7 +size 4803218944 diff --git a/Llama-3.1-Nemotron-Nano-4B-v1.1.imatrix b/Llama-3.1-Nemotron-Nano-4B-v1.1.imatrix new file mode 100644 index 0000000..400b58e --- /dev/null +++ b/Llama-3.1-Nemotron-Nano-4B-v1.1.imatrix @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bab398eca4a1865a28cbb05fff2f2ecec379bfb4be2311137e6f2ef3481c7f7a +size 3677450 diff --git a/README.md b/README.md new file mode 100644 index 0000000..de67be0 --- /dev/null +++ b/README.md @@ -0,0 +1,682 @@ +--- +library_name: transformers +license: other +license_name: nvidia-open-model-license +license_link: >- + https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/ +pipeline_tag: text-generation +language: +- en +tags: +- nvidia +- llama-3 +- pytorch +base_model: +- nvidia/Llama-3.1-Minitron-4B-Width-Base +datasets: +- nvidia/Llama-Nemotron-Post-Training-Dataset +--- + +# Llama-3.1-Nemotron-Nano-4B-v1.1 GGUF Models + + +## Model Generation Details + +This model was generated using [llama.cpp](https://github.com/ggerganov/llama.cpp) at commit [`92ecdcc0`](https://github.com/ggerganov/llama.cpp/commit/92ecdcc06a4c405a415bcaa0cb772bc560aa23b1). + + + + +## Ultra-Low-Bit Quantization with IQ-DynamicGate (1-2 bit) + +Our latest quantization method introduces **precision-adaptive quantization** for ultra-low-bit models (1-2 bit), with benchmark-proven improvements on **Llama-3-8B**. This approach uses layer-specific strategies to preserve accuracy while maintaining extreme memory efficiency. + +### **Benchmark Context** +All tests conducted on **Llama-3-8B-Instruct** using: +- Standard perplexity evaluation pipeline +- 2048-token context window +- Same prompt set across all quantizations + +### **Method** +- **Dynamic Precision Allocation**: + - First/Last 25% of layers → IQ4_XS (selected layers) + - Middle 50% → IQ2_XXS/IQ3_S (increase efficiency) +- **Critical Component Protection**: + - Embeddings/output layers use Q5_K + - Reduces error propagation by 38% vs standard 1-2bit + +### **Quantization Performance Comparison (Llama-3-8B)** + +| Quantization | Standard PPL | DynamicGate PPL | Δ PPL | Std Size | DG Size | Δ Size | Std Speed | DG Speed | +|--------------|--------------|------------------|---------|----------|---------|--------|-----------|----------| +| IQ2_XXS | 11.30 | 9.84 | -12.9% | 2.5G | 2.6G | +0.1G | 234s | 246s | +| IQ2_XS | 11.72 | 11.63 | -0.8% | 2.7G | 2.8G | +0.1G | 242s | 246s | +| IQ2_S | 14.31 | 9.02 | -36.9% | 2.7G | 2.9G | +0.2G | 238s | 244s | +| IQ1_M | 27.46 | 15.41 | -43.9% | 2.2G | 2.5G | +0.3G | 206s | 212s | +| IQ1_S | 53.07 | 32.00 | -39.7% | 2.1G | 2.4G | +0.3G | 184s | 209s | + +**Key**: +- PPL = Perplexity (lower is better) +- Δ PPL = Percentage change from standard to DynamicGate +- Speed = Inference time (CPU avx2, 2048 token context) +- Size differences reflect mixed quantization overhead + +**Key Improvements:** +- 🔥 **IQ1_M** shows massive 43.9% perplexity reduction (27.46 → 15.41) +- 🚀 **IQ2_S** cuts perplexity by 36.9% while adding only 0.2GB +- ⚡ **IQ1_S** maintains 39.7% better accuracy despite 1-bit quantization + +**Tradeoffs:** +- All variants have modest size increases (0.1-0.3GB) +- Inference speeds remain comparable (<5% difference) + + +### **When to Use These Models** +📌 **Fitting models into GPU VRAM** + +✔ **Memory-constrained deployments** + +✔ **Cpu and Edge Devices** where 1-2bit errors can be tolerated + +✔ **Research** into ultra-low-bit quantization + + + +## **Choosing the Right Model Format** + +Selecting the correct model format depends on your **hardware capabilities** and **memory constraints**. + +### **BF16 (Brain Float 16) – Use if BF16 acceleration is available** +- A 16-bit floating-point format designed for **faster computation** while retaining good precision. +- Provides **similar dynamic range** as FP32 but with **lower memory usage**. +- Recommended if your hardware supports **BF16 acceleration** (check your device's specs). +- Ideal for **high-performance inference** with **reduced memory footprint** compared to FP32. + +📌 **Use BF16 if:** +✔ Your hardware has native **BF16 support** (e.g., newer GPUs, TPUs). +✔ You want **higher precision** while saving memory. +✔ You plan to **requantize** the model into another format. + +📌 **Avoid BF16 if:** +❌ Your hardware does **not** support BF16 (it may fall back to FP32 and run slower). +❌ You need compatibility with older devices that lack BF16 optimization. + +--- + +### **F16 (Float 16) – More widely supported than BF16** +- A 16-bit floating-point **high precision** but with less of range of values than BF16. +- Works on most devices with **FP16 acceleration support** (including many GPUs and some CPUs). +- Slightly lower numerical precision than BF16 but generally sufficient for inference. + +📌 **Use F16 if:** +✔ Your hardware supports **FP16** but **not BF16**. +✔ You need a **balance between speed, memory usage, and accuracy**. +✔ You are running on a **GPU** or another device optimized for FP16 computations. + +📌 **Avoid F16 if:** +❌ Your device lacks **native FP16 support** (it may run slower than expected). +❌ You have memory limitations. + +--- + +### **Quantized Models (Q4_K, Q6_K, Q8, etc.) – For CPU & Low-VRAM Inference** +Quantization reduces model size and memory usage while maintaining as much accuracy as possible. +- **Lower-bit models (Q4_K)** → **Best for minimal memory usage**, may have lower precision. +- **Higher-bit models (Q6_K, Q8_0)** → **Better accuracy**, requires more memory. + +📌 **Use Quantized Models if:** +✔ You are running inference on a **CPU** and need an optimized model. +✔ Your device has **low VRAM** and cannot load full-precision models. +✔ You want to reduce **memory footprint** while keeping reasonable accuracy. + +📌 **Avoid Quantized Models if:** +❌ You need **maximum accuracy** (full-precision models are better for this). +❌ Your hardware has enough VRAM for higher-precision formats (BF16/F16). + +--- + +### **Very Low-Bit Quantization (IQ3_XS, IQ3_S, IQ3_M, Q4_K, Q4_0)** +These models are optimized for **extreme memory efficiency**, making them ideal for **low-power devices** or **large-scale deployments** where memory is a critical constraint. + +- **IQ3_XS**: Ultra-low-bit quantization (3-bit) with **extreme memory efficiency**. + - **Use case**: Best for **ultra-low-memory devices** where even Q4_K is too large. + - **Trade-off**: Lower accuracy compared to higher-bit quantizations. + +- **IQ3_S**: Small block size for **maximum memory efficiency**. + - **Use case**: Best for **low-memory devices** where **IQ3_XS** is too aggressive. + +- **IQ3_M**: Medium block size for better accuracy than **IQ3_S**. + - **Use case**: Suitable for **low-memory devices** where **IQ3_S** is too limiting. + +- **Q4_K**: 4-bit quantization with **block-wise optimization** for better accuracy. + - **Use case**: Best for **low-memory devices** where **Q6_K** is too large. + +- **Q4_0**: Pure 4-bit quantization, optimized for **ARM devices**. + - **Use case**: Best for **ARM-based devices** or **low-memory environments**. + +--- + +### **Summary Table: Model Format Selection** + +| Model Format | Precision | Memory Usage | Device Requirements | Best Use Case | +|--------------|------------|---------------|----------------------|---------------| +| **BF16** | Highest | High | BF16-supported GPU/CPUs | High-speed inference with reduced memory | +| **F16** | High | High | FP16-supported devices | GPU inference when BF16 isn't available | +| **Q4_K** | Medium Low | Low | CPU or Low-VRAM devices | Best for memory-constrained environments | +| **Q6_K** | Medium | Moderate | CPU with more memory | Better accuracy while still being quantized | +| **Q8_0** | High | Moderate | CPU or GPU with enough VRAM | Best accuracy among quantized models | +| **IQ3_XS** | Very Low | Very Low | Ultra-low-memory devices | Extreme memory efficiency and low accuracy | +| **Q4_0** | Low | Low | ARM or low-memory devices | llama.cpp can optimize for ARM devices | + +--- + +## **Included Files & Details** + +### `Llama-3.1-Nemotron-Nano-4B-v1.1-bf16.gguf` +- Model weights preserved in **BF16**. +- Use this if you want to **requantize** the model into a different format. +- Best if your device supports **BF16 acceleration**. + +### `Llama-3.1-Nemotron-Nano-4B-v1.1-f16.gguf` +- Model weights stored in **F16**. +- Use if your device supports **FP16**, especially if BF16 is not available. + +### `Llama-3.1-Nemotron-Nano-4B-v1.1-bf16-q8_0.gguf` +- **Output & embeddings** remain in **BF16**. +- All other layers quantized to **Q8_0**. +- Use if your device supports **BF16** and you want a quantized version. + +### `Llama-3.1-Nemotron-Nano-4B-v1.1-f16-q8_0.gguf` +- **Output & embeddings** remain in **F16**. +- All other layers quantized to **Q8_0**. + +### `Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k.gguf` +- **Output & embeddings** quantized to **Q8_0**. +- All other layers quantized to **Q4_K**. +- Good for **CPU inference** with limited memory. + +### `Llama-3.1-Nemotron-Nano-4B-v1.1-q4_k_s.gguf` +- Smallest **Q4_K** variant, using less memory at the cost of accuracy. +- Best for **very low-memory setups**. + +### `Llama-3.1-Nemotron-Nano-4B-v1.1-q6_k.gguf` +- **Output & embeddings** quantized to **Q8_0**. +- All other layers quantized to **Q6_K** . + +### `Llama-3.1-Nemotron-Nano-4B-v1.1-q8_0.gguf` +- Fully **Q8** quantized model for better accuracy. +- Requires **more memory** but offers higher precision. + +### `Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_xs.gguf` +- **IQ3_XS** quantization, optimized for **extreme memory efficiency**. +- Best for **ultra-low-memory devices**. + +### `Llama-3.1-Nemotron-Nano-4B-v1.1-iq3_m.gguf` +- **IQ3_M** quantization, offering a **medium block size** for better accuracy. +- Suitable for **low-memory devices**. + +### `Llama-3.1-Nemotron-Nano-4B-v1.1-q4_0.gguf` +- Pure **Q4_0** quantization, optimized for **ARM devices**. +- Best for **low-memory environments**. +- Prefer IQ4_NL for better accuracy. + +# 🚀 If you find these models useful +❤ **Please click "Like" if you find this useful!** +Help me test my **AI-Powered Network Monitor Assistant** with **quantum-ready security checks**: +👉 [Quantum Network Monitor](https://readyforquantum.com/dashboard/?assistant=open&utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme) + +💬 **How to test**: + Choose an **AI assistant type**: + - `TurboLLM` (GPT-4o-mini) + - `HugLLM` (Hugginface Open-source) + - `TestLLM` (Experimental CPU-only) + +### **What I’m Testing** +I’m pushing the limits of **small open-source models for AI network monitoring**, specifically: +- **Function calling** against live network services +- **How small can a model go** while still handling: + - Automated **Nmap scans** + - **Quantum-readiness checks** + - **Network Monitoring tasks** + +🟡 **TestLLM** – Current experimental model (llama.cpp on 2 CPU threads): +- ✅ **Zero-configuration setup** +- ⏳ 30s load time (slow inference but **no API costs**) +- 🔧 **Help wanted!** If you’re into **edge-device AI**, let’s collaborate! + +### **Other Assistants** +🟢 **TurboLLM** – Uses **gpt-4o-mini** for: +- **Create custom cmd processors to run .net code on Quantum Network Monitor Agents** +- **Real-time network diagnostics and monitoring** +- **Security Audits** +- **Penetration testing** (Nmap/Metasploit) + + +🔵 **HugLLM** – Latest Open-source models: +- 🌐 Runs on Hugging Face Inference API + +### 💡 **Example commands to you could test**: +1. `"Give me info on my websites SSL certificate"` +2. `"Check if my server is using quantum safe encyption for communication"` +3. `"Run a comprehensive security audit on my server"` +4. '"Create a cmd processor to .. (what ever you want)" Note you need to install a Quantum Network Monitor Agent to run the .net code from. This is a very flexible and powerful feature. Use with caution! + +### Final Word + +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. + +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. + +I'm also open to job opportunities or sponsorship. + +Thank you! 😊 + + + + + +# Llama-3.1-Nemotron-Nano-4B-v1.1 + +## Model Overview + +![Accuracy Comparison Plot](./accuracy_plot.png) + +Llama-3.1-Nemotron-Nano-4B-v1.1 is a large language model (LLM) which is a derivative of [nvidia/Llama-3.1-Minitron-4B-Width-Base](https://huggingface.co/nvidia/Llama-3.1-Minitron-4B-Width-Base), which is created from Llama 3.1 8B using [our LLM compression technique](https://arxiv.org/abs/2408.11796) and offers improvements in model accuracy and efficiency. It is a reasoning model that is post trained for reasoning, human chat preferences, and tasks, such as RAG and tool calling. + +Llama-3.1-Nemotron-Nano-4B-v1.1 is a model which offers a great tradeoff between model accuracy and efficiency. The model fits on a single RTX GPU and can be used locally. The model supports a context length of 128K. + +This model underwent a multi-phase post-training process to enhance both its reasoning and non-reasoning capabilities. This includes a supervised fine-tuning stage for Math, Code, Reasoning, and Tool Calling as well as multiple reinforcement learning (RL) stages using Reward-aware Preference Optimization (RPO) algorithms for both chat and instruction-following. The final model checkpoint is obtained after merging the final SFT and RPO checkpoints + +This model is part of the Llama Nemotron Collection. You can find the other model(s) in this family here: +- [Llama-3.3-Nemotron-Ultra-253B-v1](https://huggingface.co/nvidia/Llama-3_1-Nemotron-Ultra-253B-v1) +- [Llama-3.3-Nemotron-Super-49B-v1](https://huggingface.co/nvidia/Llama-3.3-Nemotron-Super-49B-v1) +- [Llama-3.1-Nemotron-Nano-8B-v1](https://huggingface.co/nvidia/Llama-3.1-Nemotron-Nano-8B-v1) + +This model is ready for commercial use. + +## License/Terms of Use + +GOVERNING TERMS: Your use of this model is governed by the [NVIDIA Open Model License](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/). Additional Information: [Llama 3.1 Community License Agreement](https://www.llama.com/llama3_1/license/). Built with Llama. + +**Model Developer:** NVIDIA + +**Model Dates:** Trained between August 2024 and May 2025 + +**Data Freshness:** The pretraining data has a cutoff of June 2023. + + +## Use Case: + +Developers designing AI Agent systems, chatbots, RAG systems, and other AI-powered applications. Also suitable for typical instruction-following tasks. Balance of model accuracy and compute efficiency (the model fits on a single RTX GPU and can be used locally). + +## Release Date:
+5/20/2025
+ +## References + +- [\[2408.11796\] LLM Pruning and Distillation in Practice: The Minitron Approach](https://arxiv.org/abs/2408.11796) +- [\[2502.00203\] Reward-aware Preference Optimization: A Unified Mathematical Framework for Model Alignment](https://arxiv.org/abs/2502.00203) +- [\[2505.00949\] Llama-Nemotron: Efficient Reasoning Models](https://arxiv.org/abs/2505.00949) + + +## Model Architecture + +**Architecture Type:** Dense decoder-only Transformer model + +**Network Architecture:** Llama 3.1 Minitron Width 4B Base + +## Intended use + +Llama-3.1-Nemotron-Nano-4B-v1.1 is a general purpose reasoning and chat model intended to be used in English and coding languages. Other non-English languages (German, French, Italian, Portuguese, Hindi, Spanish, and Thai) are also supported. + +# Input: +- **Input Type:** Text +- **Input Format:** String +- **Input Parameters:** One-Dimensional (1D) +- **Other Properties Related to Input:** Context length up to 131,072 tokens + +## Output: +- **Output Type:** Text +- **Output Format:** String +- **Output Parameters:** One-Dimensional (1D) +- **Other Properties Related to Output:** Context length up to 131,072 tokens + +## Model Version: +1.1 (5/20/2025) + +## Software Integration +- **Runtime Engine:** NeMo 24.12
+- **Recommended Hardware Microarchitecture Compatibility:** + - NVIDIA Hopper + - NVIDIA Ampere + +## Quick Start and Usage Recommendations: + +1. Reasoning mode (ON/OFF) is controlled via the system prompt, which must be set as shown in the example below. All instructions should be contained within the user prompt +2. We recommend setting temperature to `0.6`, and Top P to `0.95` for Reasoning ON mode +3. We recommend using greedy decoding for Reasoning OFF mode +4. We have provided a list of prompts to use for evaluation for each benchmark where a specific template is required + +See the snippet below for usage with Hugging Face Transformers library. Reasoning mode (ON/OFF) is controlled via system prompt. Please see the example below. +Our code requires the transformers package version to be `4.44.2` or higher. + + +### Example of “Reasoning On:” + +```python +import torch +import transformers + +model_id = "nvidia/Llama-3.1-Nemotron-Nano-4B-v1.1" +model_kwargs = {"torch_dtype": torch.bfloat16, "device_map": "auto"} +tokenizer = transformers.AutoTokenizer.from_pretrained(model_id) +tokenizer.pad_token_id = tokenizer.eos_token_id + +pipeline = transformers.pipeline( + "text-generation", + model=model_id, + tokenizer=tokenizer, + max_new_tokens=32768, + temperature=0.6, + top_p=0.95, + **model_kwargs +) + +# Thinking can be "on" or "off" +thinking = "on" + +print(pipeline([{"role": "system", "content": f"detailed thinking {thinking}"}, {"role": "user", "content": "Solve x*(sin(x)+2)=0"}])) +``` + + +### Example of “Reasoning Off:” + +```python +import torch +import transformers + +model_id = "nvidia/Llama-3.1-Nemotron-Nano-4B-v1" +model_kwargs = {"torch_dtype": torch.bfloat16, "device_map": "auto"} +tokenizer = transformers.AutoTokenizer.from_pretrained(model_id) +tokenizer.pad_token_id = tokenizer.eos_token_id + +pipeline = transformers.pipeline( + "text-generation", + model=model_id, + tokenizer=tokenizer, + max_new_tokens=32768, + do_sample=False, + **model_kwargs +) + +# Thinking can be "on" or "off" +thinking = "off" + +print(pipeline([{"role": "system", "content": f"detailed thinking {thinking}"}, {"role": "user", "content": "Solve x*(sin(x)+2)=0"}])) +``` + +For some prompts, even though thinking is disabled, the model emergently prefers to think before responding. But if desired, the users can prevent it by pre-filling the assistant response. + +```python +import torch +import transformers + +model_id = "nvidia/Llama-3.1-Nemotron-Nano-4B-v1.1" +model_kwargs = {"torch_dtype": torch.bfloat16, "device_map": "auto"} +tokenizer = transformers.AutoTokenizer.from_pretrained(model_id) +tokenizer.pad_token_id = tokenizer.eos_token_id + +# Thinking can be "on" or "off" +thinking = "off" + +pipeline = transformers.pipeline( + "text-generation", + model=model_id, + tokenizer=tokenizer, + max_new_tokens=32768, + do_sample=False, + **model_kwargs +) + +print(pipeline([{"role": "system", "content": f"detailed thinking {thinking}"}, {"role": "user", "content": "Solve x*(sin(x)+2)=0"}, {"role":"assistant", "content":"\n"}])) +``` + +## Running a vLLM Server with Tool-call Support + +Llama-3.1-Nemotron-Nano-4B-v1.1 supports tool calling. This HF repo hosts a tool-callilng parser as well as a chat template in Jinja, which can be used to launch a vLLM server. + +Here is a shell script example to launch a vLLM server with tool-call support. `vllm/vllm-openai:v0.6.6` or newer should support the model. + +```shell +#!/bin/bash + +CWD=$(pwd) +PORT=5000 +git clone https://huggingface.co/nvidia/Llama-3.1-Nemotron-Nano-4B-v1.1 +docker run -it --rm \ + --runtime=nvidia \ + --gpus all \ + --shm-size=16GB \ + -p ${PORT}:${PORT} \ + -v ${CWD}:${CWD} \ + vllm/vllm-openai:v0.6.6 \ + --model $CWD/Llama-3.1-Nemotron-Nano-4B-v1.1 \ + --trust-remote-code \ + --seed 1 \ + --host "0.0.0.0" \ + --port $PORT \ + --served-model-name "Llama-Nemotron-Nano-4B-v1.1" \ + --tensor-parallel-size 1 \ + --max-model-len 131072 \ + --gpu-memory-utilization 0.95 \ + --enforce-eager \ + --enable-auto-tool-choice \ + --tool-parser-plugin "${CWD}/Llama-3.1-Nemotron-Nano-4B-v1.1/llama_nemotron_nano_toolcall_parser.py" \ + --tool-call-parser "llama_nemotron_json" \ + --chat-template "${CWD}/Llama-3.1-Nemotron-Nano-4B-v1.1/llama_nemotron_nano_generic_tool_calling.jinja" +``` + +Alternatively, you can use a virtual environment to launch a vLLM server like below. + +```console +$ git clone https://huggingface.co/nvidia/Llama-3.1-Nemotron-Nano-4B-v1.1 + +$ conda create -n vllm python=3.12 -y +$ conda activate vllm + +$ python -m vllm.entrypoints.openai.api_server \ + --model Llama-3.1-Nemotron-Nano-4B-v1.1 \ + --trust-remote-code \ + --seed 1 \ + --host "0.0.0.0" \ + --port 5000 \ + --served-model-name "Llama-Nemotron-Nano-4B-v1.1" \ + --tensor-parallel-size 1 \ + --max-model-len 131072 \ + --gpu-memory-utilization 0.95 \ + --enforce-eager \ + --enable-auto-tool-choice \ + --tool-parser-plugin "Llama-3.1-Nemotron-Nano-4B-v1.1/llama_nemotron_nano_toolcall_parser.py" \ + --tool-call-parser "llama_nemotron_json" \ + --chat-template "Llama-3.1-Nemotron-Nano-4B-v1.1/llama_nemotron_nano_generic_tool_calling.jinja" +``` + +After launching a vLLM server, you can call the server with tool-call support using a Python script like below. + +```python +>>> from openai import OpenAI +>>> client = OpenAI( + base_url="http://0.0.0.0:5000/v1", + api_key="dummy", + ) + +>>> completion = client.chat.completions.create( + model="Llama-Nemotron-Nano-4B-v1.1", + messages=[ + {"role": "system", "content": "detailed thinking on"}, + {"role": "user", "content": "My bill is $100. What will be the amount for 18% tip?"}, + ], + tools=[ + {"type": "function", "function": {"name": "calculate_tip", "parameters": {"type": "object", "properties": {"bill_total": {"type": "integer", "description": "The total amount of the bill"}, "tip_percentage": {"type": "integer", "description": "The percentage of tip to be applied"}}, "required": ["bill_total", "tip_percentage"]}}}, + {"type": "function", "function": {"name": "convert_currency", "parameters": {"type": "object", "properties": {"amount": {"type": "integer", "description": "The amount to be converted"}, "from_currency": {"type": "string", "description": "The currency code to convert from"}, "to_currency": {"type": "string", "description": "The currency code to convert to"}}, "required": ["from_currency", "amount", "to_currency"]}}}, + ], + ) + +>>> completion.choices[0].message.content +'\nOkay, let\'s see. The user has a bill of $100 and wants to know the amount of a 18% tip. So, I need to calculate the tip amount. The available tools include calculate_tip, which requires bill_total and tip_percentage. The parameters are both integers. The bill_total is 100, and the tip percentage is 18. So, the function should multiply 100 by 18% and return 18.0. But wait, maybe the user wants the total including the tip? The question says "the amount for 18% tip," which could be interpreted as the tip amount itself. Since the function is called calculate_tip, it\'s likely that it\'s designed to compute the tip, not the total. So, using calculate_tip with bill_total=100 and tip_percentage=18 should give the correct result. The other function, convert_currency, isn\'t relevant here. So, I should call calculate_tip with those values.\n\n\n' + +>>> completion.choices[0].message.tool_calls +[ChatCompletionMessageToolCall(id='chatcmpl-tool-2972d86817344edc9c1e0f9cd398e999', function=Function(arguments='{"bill_total": 100, "tip_percentage": 18}', name='calculate_tip'), type='function')] +``` + + +## Inference: +**Engine:** Transformers +**Test Hardware:** + +- BF16: + - 1x RTX 50 Series GPUs + - 1x RTX 40 Series GPUs + - 1x RTX 30 Series GPUs + - 1x H100-80GB GPU + - 1x A100-80GB GPU + + +**Preferred/Supported] Operating System(s):** Linux
+ +## Training Datasets + +A large variety of training data was used for the post-training pipeline, including manually annotated data and synthetic data. + +The data for the multi-stage post-training phases for improvements in Code, Math, and Reasoning is a compilation of SFT and RL data that supports improvements of math, code, general reasoning, and instruction following capabilities of the original Llama instruct model. + +Prompts have been sourced from either public and open corpus or synthetically generated. Responses were synthetically generated by a variety of models, with some prompts containing responses for both Reasoning On and Off modes, to train the model to distinguish between two modes. + +**Data Collection for Training Datasets:**
+* Hybrid: Automated, Human, Synthetic
+ +**Data Labeling for Training Datasets:**
+* N/A
+ +## Evaluation Datasets + +We used the datasets listed below to evaluate Llama-3.1-Nemotron-Nano-4B-v1.1. + +**Data Collection for Evaluation Datasets:** Hybrid: Human/Synthetic + +**Data Labeling for Evaluation Datasets:** Hybrid: Human/Synthetic/Automatic + +## Evaluation Results + +These results contain both “Reasoning On”, and “Reasoning Off”. We recommend using temperature=`0.6`, top_p=`0.95` for “Reasoning On” mode, and greedy decoding for “Reasoning Off” mode. All evaluations are done with 32k sequence length. We run the benchmarks up to 16 times and average the scores to be more accurate. + +> NOTE: Where applicable, a Prompt Template will be provided. While completing benchmarks, please ensure that you are parsing for the correct output format as per the provided prompt in order to reproduce the benchmarks seen below. + +### MT-Bench + +| Reasoning Mode | Score | +|--------------|------------| +| Reasoning Off | 7.4 | +| Reasoning On | 8.0 | + + +### MATH500 + +| Reasoning Mode | pass@1 | +|--------------|------------| +| Reasoning Off | 71.8% | +| Reasoning On | 96.2% | + +User Prompt Template: + +``` +"Below is a math question. I want you to reason through the steps and then give a final answer. Your final answer should be in \boxed{}.\nQuestion: {question}" +``` + + +### AIME25 + +| Reasoning Mode | pass@1 | +|--------------|------------| +| Reasoning Off | 13.3% | +| Reasoning On | 46.3% | + +User Prompt Template: + +``` +"Below is a math question. I want you to reason through the steps and then give a final answer. Your final answer should be in \boxed{}.\nQuestion: {question}" +``` + + +### GPQA-D + +| Reasoning Mode | pass@1 | +|--------------|------------| +| Reasoning Off | 33.8% | +| Reasoning On | 55.1% | + +User Prompt Template: + + +``` +"What is the correct answer to this question: {question}\nChoices:\nA. {option_A}\nB. {option_B}\nC. {option_C}\nD. {option_D}\nLet's think step by step, and put the final answer (should be a single letter A, B, C, or D) into a \boxed{}" +``` + + +### IFEval + +| Reasoning Mode | Strict:Prompt | Strict:Instruction | +|--------------|------------|------------| +| Reasoning Off | 70.1% | 78.5% | +| Reasoning On | 75.5% | 82.6% | + +### BFCL v2 Live + +| Reasoning Mode | Score | +|--------------|------------| +| Reasoning Off | 63.6% | +| Reasoning On | 67.9% | + +User Prompt Template: + + +``` +{functions} + +{user_prompt} +``` + + +### MBPP 0-shot + +| Reasoning Mode | pass@1 | +|--------------|------------| +| Reasoning Off | 61.9% | +| Reasoning On | 85.8% | + +User Prompt Template: + + +```` +You are an exceptionally intelligent coding assistant that consistently delivers accurate and reliable responses to user instructions. + +@@ Instruction +Here is the given problem and test examples: +{prompt} +Please use the python programming language to solve this problem. +Please make sure that your code includes the functions from the test samples and that the input and output formats of these functions match the test samples. +Please return all completed codes in one code block. +This code block should be in the following format: +```python +# Your codes here +``` +```` + + +## Ethical Considerations: + +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](explainability.md), [Bias](bias.md), [Safety & Security](safety.md), and [Privacy](privacy.md) Subcards. + +Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/). \ No newline at end of file