From c550d92100e3bc2806a217dcd85ab94baf6d47cf Mon Sep 17 00:00:00 2001 From: ModelHub XC Date: Fri, 24 Jul 2026 06:45:06 +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: unsloth/Qwen3-4B-Instruct-2507-GGUF Source: Original Platform --- .gitattributes | 47 +++++ Qwen3-4B-Instruct-2507-F16.gguf | 3 + Qwen3-4B-Instruct-2507-IQ4_NL.gguf | 3 + Qwen3-4B-Instruct-2507-IQ4_XS.gguf | 3 + Qwen3-4B-Instruct-2507-Q2_K.gguf | 3 + Qwen3-4B-Instruct-2507-Q2_K_L.gguf | 3 + Qwen3-4B-Instruct-2507-Q3_K_M.gguf | 3 + Qwen3-4B-Instruct-2507-Q3_K_S.gguf | 3 + Qwen3-4B-Instruct-2507-Q4_0.gguf | 3 + Qwen3-4B-Instruct-2507-Q4_1.gguf | 3 + Qwen3-4B-Instruct-2507-Q4_K_M.gguf | 3 + Qwen3-4B-Instruct-2507-Q4_K_S.gguf | 3 + Qwen3-4B-Instruct-2507-Q5_K_M.gguf | 3 + Qwen3-4B-Instruct-2507-Q5_K_S.gguf | 3 + Qwen3-4B-Instruct-2507-Q6_K.gguf | 3 + Qwen3-4B-Instruct-2507-Q8_0.gguf | 3 + Qwen3-4B-Instruct-2507-UD-IQ1_M.gguf | 3 + Qwen3-4B-Instruct-2507-UD-IQ1_S.gguf | 3 + Qwen3-4B-Instruct-2507-UD-IQ2_M.gguf | 3 + Qwen3-4B-Instruct-2507-UD-IQ2_XXS.gguf | 3 + Qwen3-4B-Instruct-2507-UD-IQ3_XXS.gguf | 3 + Qwen3-4B-Instruct-2507-UD-Q2_K_XL.gguf | 3 + Qwen3-4B-Instruct-2507-UD-Q3_K_XL.gguf | 3 + Qwen3-4B-Instruct-2507-UD-Q4_K_XL.gguf | 3 + Qwen3-4B-Instruct-2507-UD-Q5_K_XL.gguf | 3 + Qwen3-4B-Instruct-2507-UD-Q6_K_XL.gguf | 3 + Qwen3-4B-Instruct-2507-UD-Q8_K_XL.gguf | 3 + README.md | 252 +++++++++++++++++++++++++ configuration.json | 1 + imatrix_unsloth.gguf_file | 3 + params | 11 ++ template | 50 +++++ 32 files changed, 442 insertions(+) create mode 100644 .gitattributes create mode 100644 Qwen3-4B-Instruct-2507-F16.gguf create mode 100644 Qwen3-4B-Instruct-2507-IQ4_NL.gguf create mode 100644 Qwen3-4B-Instruct-2507-IQ4_XS.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q2_K.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q2_K_L.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q3_K_M.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q3_K_S.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q4_0.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q4_1.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q4_K_M.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q4_K_S.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q5_K_M.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q5_K_S.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q6_K.gguf create mode 100644 Qwen3-4B-Instruct-2507-Q8_0.gguf create mode 100644 Qwen3-4B-Instruct-2507-UD-IQ1_M.gguf create mode 100644 Qwen3-4B-Instruct-2507-UD-IQ1_S.gguf create mode 100644 Qwen3-4B-Instruct-2507-UD-IQ2_M.gguf create mode 100644 Qwen3-4B-Instruct-2507-UD-IQ2_XXS.gguf create mode 100644 Qwen3-4B-Instruct-2507-UD-IQ3_XXS.gguf create mode 100644 Qwen3-4B-Instruct-2507-UD-Q2_K_XL.gguf create mode 100644 Qwen3-4B-Instruct-2507-UD-Q3_K_XL.gguf create mode 100644 Qwen3-4B-Instruct-2507-UD-Q4_K_XL.gguf create mode 100644 Qwen3-4B-Instruct-2507-UD-Q5_K_XL.gguf create mode 100644 Qwen3-4B-Instruct-2507-UD-Q6_K_XL.gguf create mode 100644 Qwen3-4B-Instruct-2507-UD-Q8_K_XL.gguf create mode 100644 README.md create mode 100644 configuration.json create mode 100644 imatrix_unsloth.gguf_file create mode 100644 params create mode 100644 template diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..53d7257 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,47 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bin.* filter=lfs diff=lfs merge=lfs -text +*.bz2 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 +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack 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 +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +saved_model/**/* 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 +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zstandard filter=lfs diff=lfs merge=lfs -text +*.tfevents* filter=lfs diff=lfs merge=lfs -text +*.db* filter=lfs diff=lfs merge=lfs -text +*.ark* filter=lfs diff=lfs merge=lfs -text +**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text +**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text +**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.gguf* filter=lfs diff=lfs merge=lfs -text +*.ggml filter=lfs diff=lfs merge=lfs -text +*.llamafile* filter=lfs diff=lfs merge=lfs -text +*.pt2 filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/Qwen3-4B-Instruct-2507-F16.gguf b/Qwen3-4B-Instruct-2507-F16.gguf new file mode 100644 index 0000000..6bd0c16 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-F16.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:336228a2810f17724ecd6e9e2e40e8381eee81e886316fee311ade2899c31030 +size 8051285344 diff --git a/Qwen3-4B-Instruct-2507-IQ4_NL.gguf b/Qwen3-4B-Instruct-2507-IQ4_NL.gguf new file mode 100644 index 0000000..054ad65 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-IQ4_NL.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89bf2f9ba70b4a5ee8411244ae89dcd012ed59e386124bb096287feb09f4f25e +size 2381343840 diff --git a/Qwen3-4B-Instruct-2507-IQ4_XS.gguf b/Qwen3-4B-Instruct-2507-IQ4_XS.gguf new file mode 100644 index 0000000..3760dac --- /dev/null +++ b/Qwen3-4B-Instruct-2507-IQ4_XS.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfd15a69e4801abfa16f0263b77ffbf97cbb8af67782a70cc95cf627b3dfa27d +size 2270751840 diff --git a/Qwen3-4B-Instruct-2507-Q2_K.gguf b/Qwen3-4B-Instruct-2507-Q2_K.gguf new file mode 100644 index 0000000..a9dd3ea --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q2_K.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7ed2f57713ad29e1a4ec093be0cdf3d7fd31e137e8fd4fc3edcfd04a5267862 +size 1669500000 diff --git a/Qwen3-4B-Instruct-2507-Q2_K_L.gguf b/Qwen3-4B-Instruct-2507-Q2_K_L.gguf new file mode 100644 index 0000000..a9dd3ea --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q2_K_L.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7ed2f57713ad29e1a4ec093be0cdf3d7fd31e137e8fd4fc3edcfd04a5267862 +size 1669500000 diff --git a/Qwen3-4B-Instruct-2507-Q3_K_M.gguf b/Qwen3-4B-Instruct-2507-Q3_K_M.gguf new file mode 100644 index 0000000..14cab3e --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q3_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c6e0763577125a994a9bea0bbd7a737ac4498b8a6a4e0f788727553af1806c9 +size 2075618400 diff --git a/Qwen3-4B-Instruct-2507-Q3_K_S.gguf b/Qwen3-4B-Instruct-2507-Q3_K_S.gguf new file mode 100644 index 0000000..d509fe4 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q3_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ce20058cc0ed6b6c9213bb383589327e458c12ffce0842fc96867042d669c75 +size 1886997600 diff --git a/Qwen3-4B-Instruct-2507-Q4_0.gguf b/Qwen3-4B-Instruct-2507-Q4_0.gguf new file mode 100644 index 0000000..ef627f3 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q4_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0ba675d86ab277c61701c6793659b2ae801d95e3be791464c321e6fbf613be2 +size 2375773280 diff --git a/Qwen3-4B-Instruct-2507-Q4_1.gguf b/Qwen3-4B-Instruct-2507-Q4_1.gguf new file mode 100644 index 0000000..c4081ec --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q4_1.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e37bc9a4533bae81deefd9081fda514171e8485bbbef86d63ec7407e756eb3f +size 2596629600 diff --git a/Qwen3-4B-Instruct-2507-Q4_K_M.gguf b/Qwen3-4B-Instruct-2507-Q4_K_M.gguf new file mode 100644 index 0000000..681d7d0 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q4_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3605803b982cb64aead44f6c1b2ae36e3acdb41d8e46c8a94c6533bc4c67e597 +size 2497281120 diff --git a/Qwen3-4B-Instruct-2507-Q4_K_S.gguf b/Qwen3-4B-Instruct-2507-Q4_K_S.gguf new file mode 100644 index 0000000..62a8b0d --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q4_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90bc7227557ed8a417696b6ed8a94b2c351ad1d94de39bf2889ad8778366c68a +size 2383309920 diff --git a/Qwen3-4B-Instruct-2507-Q5_K_M.gguf b/Qwen3-4B-Instruct-2507-Q5_K_M.gguf new file mode 100644 index 0000000..4871019 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q5_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bde5e9d883622acb02bf77fe7dcbc56a8b9a9ad4be78a72ca23a532658b4ecb +size 2889514080 diff --git a/Qwen3-4B-Instruct-2507-Q5_K_S.gguf b/Qwen3-4B-Instruct-2507-Q5_K_S.gguf new file mode 100644 index 0000000..2e20e8b --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q5_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e252a2bb39e90c163ba83524ea833ee73d36f9c5e50d157651c82995e7e72e60 +size 2823711840 diff --git a/Qwen3-4B-Instruct-2507-Q6_K.gguf b/Qwen3-4B-Instruct-2507-Q6_K.gguf new file mode 100644 index 0000000..080a2b3 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q6_K.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd7b21b38b3e71400587c184b6a9b04d3beb4d13fdae6464d4075dee4f1bc5ad +size 3306261600 diff --git a/Qwen3-4B-Instruct-2507-Q8_0.gguf b/Qwen3-4B-Instruct-2507-Q8_0.gguf new file mode 100644 index 0000000..d88b2a1 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-Q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:391c1e410fd9f4cf2de2b510273b56a84c19ce18f4fa3bfb3774031dac4ef068 +size 4280405600 diff --git a/Qwen3-4B-Instruct-2507-UD-IQ1_M.gguf b/Qwen3-4B-Instruct-2507-UD-IQ1_M.gguf new file mode 100644 index 0000000..97fd357 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-UD-IQ1_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:415ed538d93b9f00f7d2cacdf8cf427bc1b05f20ae30e5a3f015fd6b04ba09d1 +size 1143484000 diff --git a/Qwen3-4B-Instruct-2507-UD-IQ1_S.gguf b/Qwen3-4B-Instruct-2507-UD-IQ1_S.gguf new file mode 100644 index 0000000..fc3f2e6 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-UD-IQ1_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48e00f29635f0eb1db72d3a3c65ff1a9552676dc15f810b7074be690fbcea59e +size 1083149920 diff --git a/Qwen3-4B-Instruct-2507-UD-IQ2_M.gguf b/Qwen3-4B-Instruct-2507-UD-IQ2_M.gguf new file mode 100644 index 0000000..300e38b --- /dev/null +++ b/Qwen3-4B-Instruct-2507-UD-IQ2_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6711372517e0e2d6dd1c008a22203299d1ba5d44f894a95fdc40a136815d4fe3 +size 1530402400 diff --git a/Qwen3-4B-Instruct-2507-UD-IQ2_XXS.gguf b/Qwen3-4B-Instruct-2507-UD-IQ2_XXS.gguf new file mode 100644 index 0000000..53345c6 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-UD-IQ2_XXS.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4fb089163ef6c0e32f5edb3e6ef5ca860da23e8fc2c7b8fd53da5a3ce25a17d +size 1255345760 diff --git a/Qwen3-4B-Instruct-2507-UD-IQ3_XXS.gguf b/Qwen3-4B-Instruct-2507-UD-IQ3_XXS.gguf new file mode 100644 index 0000000..e342c49 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-UD-IQ3_XXS.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c886effc2f09e63bbf9419a8136fab49dba22a578c24885f63c5f483de75ad3e +size 1674376800 diff --git a/Qwen3-4B-Instruct-2507-UD-Q2_K_XL.gguf b/Qwen3-4B-Instruct-2507-UD-Q2_K_XL.gguf new file mode 100644 index 0000000..91c0eb1 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-UD-Q2_K_XL.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7675a5b61a3e7fec4c2f138ba50504ede76c737c478029ea30510e1ee09976c +size 1695724640 diff --git a/Qwen3-4B-Instruct-2507-UD-Q3_K_XL.gguf b/Qwen3-4B-Instruct-2507-UD-Q3_K_XL.gguf new file mode 100644 index 0000000..13d6cd5 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-UD-Q3_K_XL.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6aa5c26f5624cf8820f6f0207479445da5a33c4db73a2e097cf6f91f9ce0550e +size 2128385120 diff --git a/Qwen3-4B-Instruct-2507-UD-Q4_K_XL.gguf b/Qwen3-4B-Instruct-2507-UD-Q4_K_XL.gguf new file mode 100644 index 0000000..9cbda64 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-UD-Q4_K_XL.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4bbe1f2f8ebe69fad3be8e15d69f220b06448a9dd26f82d7d81cce88ebfc39fd +size 2546340960 diff --git a/Qwen3-4B-Instruct-2507-UD-Q5_K_XL.gguf b/Qwen3-4B-Instruct-2507-UD-Q5_K_XL.gguf new file mode 100644 index 0000000..ee11500 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-UD-Q5_K_XL.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7040e21aa2b43d56735b0e4f9c89210ad21b8282f668d6897f5d1dadf71aa9f2 +size 2899221600 diff --git a/Qwen3-4B-Instruct-2507-UD-Q6_K_XL.gguf b/Qwen3-4B-Instruct-2507-UD-Q6_K_XL.gguf new file mode 100644 index 0000000..4449b11 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-UD-Q6_K_XL.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d5b9304db7e2c419d05f5f3cbb04890b8fa0dd434a72bc3ef448b564ba8b88e +size 3658223200 diff --git a/Qwen3-4B-Instruct-2507-UD-Q8_K_XL.gguf b/Qwen3-4B-Instruct-2507-UD-Q8_K_XL.gguf new file mode 100644 index 0000000..84193f8 --- /dev/null +++ b/Qwen3-4B-Instruct-2507-UD-Q8_K_XL.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0aae4ff27faba8903685f3e3aad97e2004ac6e21f15eeb806e20dec90bb480be +size 5056700000 diff --git a/README.md b/README.md new file mode 100644 index 0000000..d7b1bb2 --- /dev/null +++ b/README.md @@ -0,0 +1,252 @@ +--- +library_name: transformers +license: apache-2.0 +license_link: https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507/blob/main/LICENSE +base_model: +- Qwen/Qwen3-4B-Instruct-2507 +tags: +- qwen +- qwen3 +- unsloth +--- +
+

+ See our collection for all versions of Qwen3 including GGUF, 4-bit & 16-bit formats. +

+

+ Learn to run Qwen3-2507 correctly - Read our Guide. +

+

+ Unsloth Dynamic 2.0 achieves superior accuracy & outperforms other leading quants. +

+
+ + + + + + + + + +
+

✨ Read our Qwen3-2507 Guide here!

+
+ +- Fine-tune Qwen3 (14B) for free using our Google [Colab notebook here](https://docs.unsloth.ai/get-started/unsloth-notebooks)! +- Read our Blog about Qwen3 support: [unsloth.ai/blog/qwen3](https://unsloth.ai/blog/qwen3) +- View the rest of our notebooks in our [docs here](https://docs.unsloth.ai/get-started/unsloth-notebooks). +- Run & export your fine-tuned model to Ollama, llama.cpp or HF. + +| Unsloth supports | Free Notebooks | Performance | Memory use | +|-----------------|--------------------------------------------------------------------------------------------------------------------------|-------------|----------| +| **Qwen3 (14B)** | [▶️ Start on Colab](https://docs.unsloth.ai/get-started/unsloth-notebooks) | 3x faster | 70% less | +| **GRPO with Qwen3 (8B)** | [▶️ Start on Colab](https://docs.unsloth.ai/get-started/unsloth-notebooks) | 3x faster | 80% less | +| **Llama-3.2 (3B)** | [▶️ Start on Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Llama3.2_(1B_and_3B)-Conversational.ipynb) | 2.4x faster | 58% less | +| **Llama-3.2 (11B vision)** | [▶️ Start on Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Llama3.2_(11B)-Vision.ipynb) | 2x faster | 60% less | +| **Qwen2.5 (7B)** | [▶️ Start on Colab](https://colab.research.google.com/github/unslothai/notebooks/blob/main/nb/Qwen2.5_(7B)-Alpaca.ipynb) | 2x faster | 60% less | + +# Qwen3-4B-Instruct-2507 + + Chat + + +## Highlights + +We introduce the updated version of the **Qwen3-4B non-thinking mode**, named **Qwen3-4B-Instruct-2507**, featuring the following key enhancements: + +- **Significant improvements** in general capabilities, including **instruction following, logical reasoning, text comprehension, mathematics, science, coding and tool usage**. +- **Substantial gains** in long-tail knowledge coverage across **multiple languages**. +- **Markedly better alignment** with user preferences in **subjective and open-ended tasks**, enabling more helpful responses and higher-quality text generation. +- **Enhanced capabilities** in **256K long-context understanding**. + +![image/jpeg](https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3-2507/Qwen3-4B-Instruct.001.jpeg) + +## Model Overview + +**Qwen3-4B-Instruct-2507** has the following features: +- Type: Causal Language Models +- Training Stage: Pretraining & Post-training +- Number of Parameters: 4.0B +- Number of Paramaters (Non-Embedding): 3.6B +- Number of Layers: 36 +- Number of Attention Heads (GQA): 32 for Q and 8 for KV +- Context Length: **262,144 natively**. + +**NOTE: This model supports only non-thinking mode and does not generate ```` blocks in its output. Meanwhile, specifying `enable_thinking=False` is no longer required.** + +For more details, including benchmark evaluation, hardware requirements, and inference performance, please refer to our [blog](https://qwenlm.github.io/blog/qwen3/), [GitHub](https://github.com/QwenLM/Qwen3), and [Documentation](https://qwen.readthedocs.io/en/latest/). + + +## Performance + +| | GPT-4.1-nano-2025-04-14 | Qwen3-30B-A3B Non-Thinking | Qwen3-4B Non-Thinking | Qwen3-4B-Instruct-2507 | +|--- | --- | --- | --- | --- | +| **Knowledge** | | | | +| MMLU-Pro | 62.8 | 69.1 | 58.0 | **69.6** | +| MMLU-Redux | 80.2 | 84.1 | 77.3 | **84.2** | +| GPQA | 50.3 | 54.8 | 41.7 | **62.0** | +| SuperGPQA | 32.2 | 42.2 | 32.0 | **42.8** | +| **Reasoning** | | | | +| AIME25 | 22.7 | 21.6 | 19.1 | **47.4** | +| HMMT25 | 9.7 | 12.0 | 12.1 | **31.0** | +| ZebraLogic | 14.8 | 33.2 | 35.2 | **80.2** | +| LiveBench 20241125 | 41.5 | 59.4 | 48.4 | **63.0** | +| **Coding** | | | | +| LiveCodeBench v6 (25.02-25.05) | 31.5 | 29.0 | 26.4 | **35.1** | +| MultiPL-E | 76.3 | 74.6 | 66.6 | **76.8** | +| Aider-Polyglot | 9.8 | **24.4** | 13.8 | 12.9 | +| **Alignment** | | | | +| IFEval | 74.5 | **83.7** | 81.2 | 83.4 | +| Arena-Hard v2* | 15.9 | 24.8 | 9.5 | **43.4** | +| Creative Writing v3 | 72.7 | 68.1 | 53.6 | **83.5** | +| WritingBench | 66.9 | 72.2 | 68.5 | **83.4** | +| **Agent** | | | | +| BFCL-v3 | 53.0 | 58.6 | 57.6 | **61.9** | +| TAU1-Retail | 23.5 | 38.3 | 24.3 | **48.7** | +| TAU1-Airline | 14.0 | 18.0 | 16.0 | **32.0** | +| TAU2-Retail | - | 31.6 | 28.1 | **40.4** | +| TAU2-Airline | - | 18.0 | 12.0 | **24.0** | +| TAU2-Telecom | - | **18.4** | 17.5 | 13.2 | +| **Multilingualism** | | | | +| MultiIF | 60.7 | **70.8** | 61.3 | 69.0 | +| MMLU-ProX | 56.2 | **65.1** | 49.6 | 61.6 | +| INCLUDE | 58.6 | **67.8** | 53.8 | 60.1 | +| PolyMATH | 15.6 | 23.3 | 16.6 | **31.1** | + +*: For reproducibility, we report the win rates evaluated by GPT-4.1. + + +## Quickstart + +The code of Qwen3 has been in the latest Hugging Face `transformers` and we advise you to use the latest version of `transformers`. + +With `transformers<4.51.0`, you will encounter the following error: +``` +KeyError: 'qwen3' +``` + +The following contains a code snippet illustrating how to use the model generate content based on given inputs. +```python +from transformers import AutoModelForCausalLM, AutoTokenizer + +model_name = "Qwen/Qwen3-4B-Instruct-2507" + +# load the tokenizer and the model +tokenizer = AutoTokenizer.from_pretrained(model_name) +model = AutoModelForCausalLM.from_pretrained( + model_name, + torch_dtype="auto", + device_map="auto" +) + +# prepare the model input +prompt = "Give me a short introduction to large language model." +messages = [ + {"role": "user", "content": prompt} +] +text = tokenizer.apply_chat_template( + messages, + tokenize=False, + add_generation_prompt=True, +) +model_inputs = tokenizer([text], return_tensors="pt").to(model.device) + +# conduct text completion +generated_ids = model.generate( + **model_inputs, + max_new_tokens=16384 +) +output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist() + +content = tokenizer.decode(output_ids, skip_special_tokens=True) + +print("content:", content) +``` + +For deployment, you can use `sglang>=0.4.6.post1` or `vllm>=0.8.5` or to create an OpenAI-compatible API endpoint: +- SGLang: + ```shell + python -m sglang.launch_server --model-path Qwen/Qwen3-4B-Instruct-2507 --context-length 262144 + ``` +- vLLM: + ```shell + vllm serve Qwen/Qwen3-4B-Instruct-2507 --max-model-len 262144 + ``` + +**Note: If you encounter out-of-memory (OOM) issues, consider reducing the context length to a shorter value, such as `32,768`.** + +For local use, applications such as Ollama, LMStudio, MLX-LM, llama.cpp, and KTransformers have also supported Qwen3. + +## Agentic Use + +Qwen3 excels in tool calling capabilities. We recommend using [Qwen-Agent](https://github.com/QwenLM/Qwen-Agent) to make the best use of agentic ability of Qwen3. Qwen-Agent encapsulates tool-calling templates and tool-calling parsers internally, greatly reducing coding complexity. + +To define the available tools, you can use the MCP configuration file, use the integrated tool of Qwen-Agent, or integrate other tools by yourself. +```python +from qwen_agent.agents import Assistant + +# Define LLM +llm_cfg = { + 'model': 'Qwen3-4B-Instruct-2507', + + # Use a custom endpoint compatible with OpenAI API: + 'model_server': 'http://localhost:8000/v1', # api_base + 'api_key': 'EMPTY', +} + +# Define Tools +tools = [ + {'mcpServers': { # You can specify the MCP configuration file + 'time': { + 'command': 'uvx', + 'args': ['mcp-server-time', '--local-timezone=Asia/Shanghai'] + }, + "fetch": { + "command": "uvx", + "args": ["mcp-server-fetch"] + } + } + }, + 'code_interpreter', # Built-in tools +] + +# Define Agent +bot = Assistant(llm=llm_cfg, function_list=tools) + +# Streaming generation +messages = [{'role': 'user', 'content': 'https://qwenlm.github.io/blog/ Introduce the latest developments of Qwen'}] +for responses in bot.run(messages=messages): + pass +print(responses) +``` + +## Best Practices + +To achieve optimal performance, we recommend the following settings: + +1. **Sampling Parameters**: + - We suggest using `Temperature=0.7`, `TopP=0.8`, `TopK=20`, and `MinP=0`. + - For supported frameworks, you can adjust the `presence_penalty` parameter between 0 and 2 to reduce endless repetitions. However, using a higher value may occasionally result in language mixing and a slight decrease in model performance. + +2. **Adequate Output Length**: We recommend using an output length of 16,384 tokens for most queries, which is adequate for instruct models. + +3. **Standardize Output Format**: We recommend using prompts to standardize model outputs when benchmarking. + - **Math Problems**: Include "Please reason step by step, and put your final answer within \boxed{}." in the prompt. + - **Multiple-Choice Questions**: Add the following JSON structure to the prompt to standardize responses: "Please show your choice in the `answer` field with only the choice letter, e.g., `"answer": "C"`." + +### Citation + +If you find our work helpful, feel free to give us a cite. + +``` +@misc{qwen3technicalreport, + title={Qwen3 Technical Report}, + author={Qwen Team}, + year={2025}, + eprint={2505.09388}, + archivePrefix={arXiv}, + primaryClass={cs.CL}, + url={https://arxiv.org/abs/2505.09388}, +} +``` \ No newline at end of file diff --git a/configuration.json b/configuration.json new file mode 100644 index 0000000..159097f --- /dev/null +++ b/configuration.json @@ -0,0 +1 @@ +{"framework": "pytorch", "task": "others", "allow_remote": true} \ No newline at end of file diff --git a/imatrix_unsloth.gguf_file b/imatrix_unsloth.gguf_file new file mode 100644 index 0000000..b2ff519 --- /dev/null +++ b/imatrix_unsloth.gguf_file @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9908ff45cd363230b05588f22150f62f1091459aa67ab4bd1376d23ef2d4781f +size 3872672 diff --git a/params b/params new file mode 100644 index 0000000..a0e2098 --- /dev/null +++ b/params @@ -0,0 +1,11 @@ +{ + "stop": [ + "<|im_start|>", + "<|im_end|>" + ], + "temperature": 0.6, + "min_p" : 0.00, + "repeat_penalty" : 1.0, + "top_k" : 20, + "top_p" : 0.95 +} \ No newline at end of file diff --git a/template b/template new file mode 100644 index 0000000..0bc0cb1 --- /dev/null +++ b/template @@ -0,0 +1,50 @@ +{{- $lastUserIdx := -1 -}} +{{- range $idx, $msg := .Messages -}} +{{- if eq $msg.Role "user" }}{{ $lastUserIdx = $idx }}{{ end -}} +{{- end }} +{{- if or .System .Tools }}<|im_start|>system +{{ if .System }} +{{ .System }} +{{- end }} +{{- if .Tools }} + +# Tools + +You may call one or more functions to assist with the user query. + +You are provided with function signatures within XML tags: + +{{- range .Tools }} +{"type": "function", "function": {{ .Function }}} +{{- end }} + + +For each function call, return a json object with function name and arguments within XML tags: + +{"name": , "arguments": } + +{{- end -}} +<|im_end|> +{{ end }} +{{- range $i, $_ := .Messages }} +{{- $last := eq (len (slice $.Messages $i)) 1 -}} +{{- if eq .Role "user" }}<|im_start|>user +{{ .Content }}<|im_end|> +{{ else if eq .Role "assistant" }}<|im_start|>assistant +{{ if (and $.IsThinkSet (and .Thinking (or $last (gt $i $lastUserIdx)))) -}} +{{ .Thinking }} +{{ end -}} +{{ if .Content }}{{ .Content }} +{{- else if .ToolCalls }} +{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}} +{{ end }} +{{- end }}{{ if not $last }}<|im_end|> +{{ end }} +{{- else if eq .Role "tool" }}<|im_start|>user + +{{ .Content }} +<|im_end|> +{{ end }} +{{- if and (ne .Role "assistant") $last }}<|im_start|>assistant +{{ end }} +{{- end }} \ No newline at end of file