Upload 15 files
Browse files- 0001-Add-support-for-int2-per-channel-quantization.patch +1033 -0
- LICENSE +77 -0
- LICENSE.txt +77 -0
- License_AngelSlim_model_and_dataset.txt +615 -0
- Notice.txt +160 -0
- README.md +152 -0
- README_convert_gguf.md +92 -0
- config.json +61 -0
- generation_config.json +11 -0
- model-00001-of-00002.safetensors +3 -0
- model-00002-of-00002.safetensors +3 -0
- model.safetensors.index.json +586 -0
- special_tokens_map.json +5 -0
- tokenizer.json +0 -0
- tokenizer_config.json +0 -0
0001-Add-support-for-int2-per-channel-quantization.patch
ADDED
|
@@ -0,0 +1,1033 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
From d2c76fe0f7c323347bfd1c79ba12006228e56f6c Mon Sep 17 00:00:00 2001
|
| 2 |
+
From: Gian Marco Iodice <gianmarco.iodice@arm.com>
|
| 3 |
+
Date: Wed, 28 Jan 2026 12:28:59 +0000
|
| 4 |
+
Subject: [PATCH] Add support for int2 per-channel quantization
|
| 5 |
+
|
| 6 |
+
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
|
| 7 |
+
---
|
| 8 |
+
ggml/include/ggml.h | 3 +-
|
| 9 |
+
ggml/src/ggml-common.h | 7 +
|
| 10 |
+
ggml/src/ggml-cpu/CMakeLists.txt | 36 +++-
|
| 11 |
+
ggml/src/ggml-cpu/ggml-cpu.c | 6 +
|
| 12 |
+
ggml/src/ggml-cpu/kleidiai/kernels.cpp | 118 ++++++++++++
|
| 13 |
+
ggml/src/ggml-cpu/kleidiai/kernels.h | 10 +
|
| 14 |
+
ggml/src/ggml-cpu/kleidiai/kleidiai.cpp | 241 +++++++++++++++++++++++-
|
| 15 |
+
ggml/src/ggml-cpu/ops.cpp | 7 +
|
| 16 |
+
ggml/src/ggml-cpu/quants.c | 6 +
|
| 17 |
+
ggml/src/ggml-cpu/quants.h | 2 +
|
| 18 |
+
ggml/src/ggml-quants.c | 155 +++++++++++++++
|
| 19 |
+
ggml/src/ggml-quants.h | 6 +
|
| 20 |
+
ggml/src/ggml.c | 9 +
|
| 21 |
+
include/llama.h | 1 +
|
| 22 |
+
src/llama-quant.cpp | 1 +
|
| 23 |
+
tools/quantize/quantize.cpp | 1 +
|
| 24 |
+
16 files changed, 595 insertions(+), 14 deletions(-)
|
| 25 |
+
|
| 26 |
+
diff --git a/ggml/include/ggml.h b/ggml/include/ggml.h
|
| 27 |
+
index b69583dd3..1589bc4fd 100644
|
| 28 |
+
--- a/ggml/include/ggml.h
|
| 29 |
+
+++ b/ggml/include/ggml.h
|
| 30 |
+
@@ -427,7 +427,8 @@ extern "C" {
|
| 31 |
+
// GGML_TYPE_IQ4_NL_4_8 = 37,
|
| 32 |
+
// GGML_TYPE_IQ4_NL_8_8 = 38,
|
| 33 |
+
GGML_TYPE_MXFP4 = 39, // MXFP4 (1 block)
|
| 34 |
+
- GGML_TYPE_COUNT = 40,
|
| 35 |
+
+ GGML_TYPE_Q2_0C = 40,
|
| 36 |
+
+ GGML_TYPE_COUNT = 41,
|
| 37 |
+
};
|
| 38 |
+
|
| 39 |
+
// precision
|
| 40 |
+
diff --git a/ggml/src/ggml-common.h b/ggml/src/ggml-common.h
|
| 41 |
+
index 93ab7ea44..deebacc95 100644
|
| 42 |
+
--- a/ggml/src/ggml-common.h
|
| 43 |
+
+++ b/ggml/src/ggml-common.h
|
| 44 |
+
@@ -255,6 +255,13 @@ typedef struct {
|
| 45 |
+
} block_tq2_0;
|
| 46 |
+
static_assert(sizeof(block_tq2_0) == sizeof(ggml_half) + QK_K / 4, "wrong tq2_0 block size/padding");
|
| 47 |
+
|
| 48 |
+
+#define QKQ2_0C 512
|
| 49 |
+
+typedef struct {
|
| 50 |
+
+ ggml_half d;
|
| 51 |
+
+ uint8_t qs[QKQ2_0C / 4];
|
| 52 |
+
+} block_q2_0c;
|
| 53 |
+
+static_assert(sizeof(block_q2_0c) == sizeof(ggml_half) + (QKQ2_0C / 4), "wrong q2_0c block size/padding");
|
| 54 |
+
+
|
| 55 |
+
//
|
| 56 |
+
// Super-block quantization structures
|
| 57 |
+
//
|
| 58 |
+
diff --git a/ggml/src/ggml-cpu/CMakeLists.txt b/ggml/src/ggml-cpu/CMakeLists.txt
|
| 59 |
+
index 7622d0bf4..a26c0b3f6 100644
|
| 60 |
+
--- a/ggml/src/ggml-cpu/CMakeLists.txt
|
| 61 |
+
+++ b/ggml/src/ggml-cpu/CMakeLists.txt
|
| 62 |
+
@@ -561,18 +561,27 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
|
| 63 |
+
|
| 64 |
+
# Fetch KleidiAI sources:
|
| 65 |
+
include(FetchContent)
|
| 66 |
+
- set(KLEIDIAI_COMMIT_TAG "v1.16.0")
|
| 67 |
+
- set(KLEIDIAI_DOWNLOAD_URL "https://github.com/ARM-software/kleidiai/archive/refs/tags/${KLEIDIAI_COMMIT_TAG}.tar.gz")
|
| 68 |
+
- set(KLEIDIAI_ARCHIVE_MD5 "0a9e9008adb6031f9e8cf70dff4a3321")
|
| 69 |
+
|
| 70 |
+
- if (POLICY CMP0135)
|
| 71 |
+
- cmake_policy(SET CMP0135 NEW)
|
| 72 |
+
- endif()
|
| 73 |
+
+ set(KLEIDIAI_GIT_REPOSITORY "https://gitlab.arm.com/kleidi/kleidiai.git")
|
| 74 |
+
+ set(KLEIDIAI_GIT_TAG "9b74a52ca00b1d070d65f3f8b98ef692c03613b3")
|
| 75 |
+
+
|
| 76 |
+
+ #set(KLEIDIAI_COMMIT_TAG "v1.14.0")
|
| 77 |
+
+ #set(KLEIDIAI_DOWNLOAD_URL "https://github.com/ARM-software/kleidiai/archive/refs/tags/${KLEIDIAI_COMMIT_TAG}.tar.gz")
|
| 78 |
+
+ #set(KLEIDIAI_ARCHIVE_MD5 "45e110675d93f99f82c23a1afcca76bc")
|
| 79 |
+
+
|
| 80 |
+
+ #if (POLICY CMP0135)
|
| 81 |
+
+ # cmake_policy(SET CMP0135 NEW)
|
| 82 |
+
+ #endif()
|
| 83 |
+
|
| 84 |
+
FetchContent_Declare(KleidiAI_Download
|
| 85 |
+
- URL ${KLEIDIAI_DOWNLOAD_URL}
|
| 86 |
+
- DOWNLOAD_EXTRACT_TIMESTAMP NEW
|
| 87 |
+
- URL_HASH MD5=${KLEIDIAI_ARCHIVE_MD5})
|
| 88 |
+
+ GIT_REPOSITORY ${KLEIDIAI_GIT_REPOSITORY}
|
| 89 |
+
+ GIT_TAG ${KLEIDIAI_GIT_TAG}
|
| 90 |
+
+ )
|
| 91 |
+
+
|
| 92 |
+
+ #FetchContent_Declare(KleidiAI_Download
|
| 93 |
+
+ # URL ${KLEIDIAI_DOWNLOAD_URL}
|
| 94 |
+
+ # DOWNLOAD_EXTRACT_TIMESTAMP NEW
|
| 95 |
+
+ # URL_HASH MD5=${KLEIDIAI_ARCHIVE_MD5})
|
| 96 |
+
|
| 97 |
+
FetchContent_MakeAvailable(KleidiAI_Download)
|
| 98 |
+
FetchContent_GetProperties(KleidiAI_Download
|
| 99 |
+
@@ -606,6 +615,7 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
|
| 100 |
+
${KLEIDIAI_SRC}/kai/ukernels/matmul/matmul_clamp_f32_qsi8d32p_qsi4c32p/
|
| 101 |
+
${KLEIDIAI_SRC}/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi8cxp/
|
| 102 |
+
${KLEIDIAI_SRC}/kai/ukernels/matmul/matmul_clamp_fp32_bf16p_bf16p/
|
| 103 |
+
+ ${KLEIDIAI_SRC}/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi2cxp/
|
| 104 |
+
${KLEIDIAI_SRC}/kai/ukernels/matmul/pack/)
|
| 105 |
+
|
| 106 |
+
set(ARCH_FLAGS_TEMP "${ARCH_FLAGS}")
|
| 107 |
+
@@ -626,7 +636,8 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
|
| 108 |
+
${KLEIDIAI_SRC}/kai/ukernels/matmul/pack/kai_lhs_quant_pack_qsi8d32p_f32_neon.c
|
| 109 |
+
${KLEIDIAI_SRC}/kai/ukernels/matmul/pack/kai_rhs_pack_nxk_qsi4c32pscalef16_qsu4c32s16s0.c
|
| 110 |
+
${KLEIDIAI_SRC}/kai/ukernels/matmul/pack/kai_lhs_quant_pack_qai8dxp_f32.c
|
| 111 |
+
- ${KLEIDIAI_SRC}/kai/ukernels/matmul/pack/kai_rhs_pack_nxk_qsi8cxp_qsi8cx_neon.c)
|
| 112 |
+
+ ${KLEIDIAI_SRC}/kai/ukernels/matmul/pack/kai_rhs_pack_nxk_qsi8cxp_qsi8cx_neon.c
|
| 113 |
+
+ ${KLEIDIAI_SRC}/kai/ukernels/matmul/pack/kai_rhs_pack_nxk_qsi2cxp_qsu2cx_neon.c)
|
| 114 |
+
|
| 115 |
+
if (NOT DOTPROD_ENABLED MATCHES -1)
|
| 116 |
+
list(APPEND GGML_KLEIDIAI_SOURCES
|
| 117 |
+
@@ -656,7 +667,12 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
|
| 118 |
+
${KLEIDIAI_SRC}/kai/ukernels/matmul/matmul_clamp_fp32_bf16p_bf16p/kai_matmul_clamp_f32_bf16p2vlx2_bf16p2vlx2_2vlx2vl_sme2_mopa_asm.S
|
| 119 |
+
${KLEIDIAI_SRC}/kai/ukernels/matmul/pack/kai_lhs_pack_bf16p2vlx2_f32_sme.c
|
| 120 |
+
${KLEIDIAI_SRC}/kai/ukernels/matmul/pack/kai_rhs_pack_kxn_bf16p2vlx2b_f32_x32_sme.c
|
| 121 |
+
+ ${KLEIDIAI_SRC}/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi2cxp/kai_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot.c
|
| 122 |
+
+ ${KLEIDIAI_SRC}/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi2cxp/kai_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot_asm.S
|
| 123 |
+
+ ${KLEIDIAI_SRC}/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi2cxp/kai_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa.c
|
| 124 |
+
+ ${KLEIDIAI_SRC}/kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi2cxp/kai_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa_asm.S
|
| 125 |
+
${KLEIDIAI_SRC}/kai/kai_common_sme_asm.S)
|
| 126 |
+
+ # TODO: The +sme2 should be removed. It is here because of luti2
|
| 127 |
+
set(PRIVATE_ARCH_FLAGS "-fno-tree-vectorize;${PRIVATE_ARCH_FLAGS}+sve+sve2")
|
| 128 |
+
endif()
|
| 129 |
+
|
| 130 |
+
diff --git a/ggml/src/ggml-cpu/ggml-cpu.c b/ggml/src/ggml-cpu/ggml-cpu.c
|
| 131 |
+
index f7ba1fe31..5d96e4e01 100644
|
| 132 |
+
--- a/ggml/src/ggml-cpu/ggml-cpu.c
|
| 133 |
+
+++ b/ggml/src/ggml-cpu/ggml-cpu.c
|
| 134 |
+
@@ -381,6 +381,12 @@ static const struct ggml_type_traits_cpu type_traits_cpu[GGML_TYPE_COUNT] = {
|
| 135 |
+
.vec_dot_type = GGML_TYPE_Q8_K,
|
| 136 |
+
.nrows = 1,
|
| 137 |
+
},
|
| 138 |
+
+ [GGML_TYPE_Q2_0C] = {
|
| 139 |
+
+ .from_float = quantize_row_q2_0c,
|
| 140 |
+
+ .vec_dot = NULL, // TODO: We should have the fallback kernel when KleidiAI is not used
|
| 141 |
+
+ .vec_dot_type = GGML_TYPE_Q8_K,
|
| 142 |
+
+ .nrows = 1,
|
| 143 |
+
+ },
|
| 144 |
+
[GGML_TYPE_I32] = {
|
| 145 |
+
.from_float = (ggml_from_float_t) ggml_cpu_fp32_to_i32,
|
| 146 |
+
},
|
| 147 |
+
diff --git a/ggml/src/ggml-cpu/kleidiai/kernels.cpp b/ggml/src/ggml-cpu/kleidiai/kernels.cpp
|
| 148 |
+
index d114f2d49..97dd29779 100644
|
| 149 |
+
--- a/ggml/src/ggml-cpu/kleidiai/kernels.cpp
|
| 150 |
+
+++ b/ggml/src/ggml-cpu/kleidiai/kernels.cpp
|
| 151 |
+
@@ -32,6 +32,12 @@
|
| 152 |
+
#include "kai_rhs_pack_nxk_qsi4c32ps1s0scalef16_qsu4c32s16s0_neon.h"
|
| 153 |
+
#include "kai_rhs_pack_nxk_qsi8cxp_qsi8cx_neon.h"
|
| 154 |
+
|
| 155 |
+
+#include "kai_lhs_quant_pack_qai8dxp_f32.h"
|
| 156 |
+
+#include "kai_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot.h"
|
| 157 |
+
+#include "kai_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa.h"
|
| 158 |
+
+#include "kai_matmul_clamp_f32_qai8dxp_qsi2cxp_interface.h"
|
| 159 |
+
+#include "kai_rhs_pack_nxk_qsi2cxp_qsu2cx_neon.h"
|
| 160 |
+
+
|
| 161 |
+
#include "kai_common.h"
|
| 162 |
+
|
| 163 |
+
#include "simd-mappings.h"
|
| 164 |
+
@@ -77,6 +83,15 @@ static inline void kernel_run_float_fn10(size_t m, size_t n, size_t k, size_t /*
|
| 165 |
+
Fn(m, n, k, lhs, rhs, static_cast<float*>(dst), dst_stride_row, dst_stride_col, clamp_min, clamp_max);
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
+template<void(*Fn)(size_t,size_t,size_t,const void*,const void*,float*,size_t,size_t,float,float, const int32_t*)>
|
| 169 |
+
+static inline void kernel_run_float_fn11_int2(size_t m, size_t n, size_t k, size_t /*bl*/,
|
| 170 |
+
+ const void* lhs, const void* rhs, void* dst,
|
| 171 |
+
+ size_t dst_stride_row, size_t dst_stride_col,
|
| 172 |
+
+ float clamp_min, float clamp_max, const int32_t* lut) {
|
| 173 |
+
+
|
| 174 |
+
+ Fn(m, n, k, lhs, rhs, static_cast<float*>(dst), dst_stride_row, dst_stride_col, clamp_min, clamp_max, lut);
|
| 175 |
+
+}
|
| 176 |
+
+
|
| 177 |
+
template<size_t(*Fn)(size_t,size_t,size_t,size_t,size_t,size_t)>
|
| 178 |
+
static inline size_t lhs_ps_fn6(size_t m, size_t k, size_t bl, size_t mr, size_t kr, size_t sr) {
|
| 179 |
+
return Fn(m, k, bl, mr, kr, sr);
|
| 180 |
+
@@ -164,6 +179,18 @@ static inline void rhs_pack_scale_fn12(size_t num_groups, size_t n, size_t k, si
|
| 181 |
+
static_cast<const kai_rhs_pack_qsi8cx_params*>(params));
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
+template<void(*Fn)(size_t,size_t,size_t,size_t,size_t,size_t,const uint8_t*,const float*,const float*,void*,size_t,const struct kai_rhs_pack_nxk_qsi2cxp_qsu2cx_neon_params*,const int32_t*)>
|
| 185 |
+
+static inline void rhs_pack_scale_fn12_int2(size_t num_groups, size_t n, size_t k, size_t nr, size_t kr, size_t sr, size_t /*bl*/,
|
| 186 |
+
+ size_t /*rhs_stride*/, const void* rhs, const void* bias, const void* scale,
|
| 187 |
+
+ void* rhs_packed, size_t extra_bytes, const void* params, const int32_t* lut) {
|
| 188 |
+
+ Fn(num_groups, n, k, nr, kr, sr,
|
| 189 |
+
+ static_cast<const uint8_t*>(rhs),
|
| 190 |
+
+ static_cast<const float*>(bias),
|
| 191 |
+
+ static_cast<const float*>(scale),
|
| 192 |
+
+ rhs_packed, extra_bytes,
|
| 193 |
+
+ static_cast<const kai_rhs_pack_nxk_qsi2cxp_qsu2cx_neon_params*>(params), lut);
|
| 194 |
+
+}
|
| 195 |
+
+
|
| 196 |
+
template<void(*Fn)(size_t,size_t,size_t,size_t,size_t,size_t,size_t,const void*,const void*,const void*,void*,size_t,const void*)>
|
| 197 |
+
static inline void rhs_pack_fn13(size_t num_groups, size_t n, size_t k, size_t nr, size_t kr, size_t sr, size_t /*bl*/,
|
| 198 |
+
size_t rhs_stride, const void* rhs, const void* bias, const void* scale,
|
| 199 |
+
@@ -695,6 +722,68 @@ static ggml_kleidiai_kernels gemm_gemv_kernels[] = {
|
| 200 |
+
{ /* Sentinel */ }
|
| 201 |
+
};
|
| 202 |
+
|
| 203 |
+
+static ggml_kleidiai_kernels gemm_gemv_kernels_q2_0c[] {
|
| 204 |
+
+#if defined(__ARM_FEATURE_SME)
|
| 205 |
+
+ {
|
| 206 |
+
+ /* SME GEMM */
|
| 207 |
+
+ {
|
| 208 |
+
+ /* .get_m_step = */ kai_get_m_step_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa,
|
| 209 |
+
+ /* .get_n_step = */ kai_get_n_step_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa,
|
| 210 |
+
+ /* .get_mr = */ kai_get_mr_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa,
|
| 211 |
+
+ /* .get_nr = */ kai_get_nr_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa,
|
| 212 |
+
+ /* .get_kr = */ kai_get_kr_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa,
|
| 213 |
+
+ /* .get_sr = */ kai_get_sr_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa,
|
| 214 |
+
+ /* .get_dst_offset = */ kai_get_dst_offset_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa,
|
| 215 |
+
+ /* .get_dst_size = */ kai_get_dst_size_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa,
|
| 216 |
+
+ /* .get_lhs_offset_ex = */ &kernel_offs_fn2<kai_get_lhs_packed_offset_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa>,
|
| 217 |
+
+ /* .get_rhs_packed_offset_ex = */ &kernel_offs_fn2<kai_get_rhs_packed_offset_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa>,
|
| 218 |
+
+ /* .run_kernel_ex = */ nullptr,
|
| 219 |
+
+ /* .run_kernel_lut_ex = */ &kernel_run_float_fn11_int2<kai_run_matmul_clamp_f32_qai8dxp1vlx4_qsi2cxp4vlx4_1vlx4vl_sme2_mopa>,
|
| 220 |
+
+ },
|
| 221 |
+
+ /* .gemm_lhs_info = */ {
|
| 222 |
+
+ /* .get_offset = */ kai_get_lhs_offset_lhs_quant_pack_qai8dxp_f32,
|
| 223 |
+
+ /* .get_packed_offset_ex = */ &lhs_offs_fn5<kai_get_lhs_packed_offset_lhs_quant_pack_qai8dxp_f32>,
|
| 224 |
+
+ /* .packed_size_ex = */ &lhs_ps_fn5<kai_get_lhs_packed_size_lhs_quant_pack_qai8dxp_f32>,
|
| 225 |
+
+ /* .pack_func_ex = */ &lhs_pack_float_fn9_no_bl<kai_run_lhs_quant_pack_qai8dxp_f32>,
|
| 226 |
+
+ },
|
| 227 |
+
+ /* SME GEMV */
|
| 228 |
+
+ {
|
| 229 |
+
+ /* .get_m_step = */ kai_get_m_step_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot,
|
| 230 |
+
+ /* .get_n_step = */ kai_get_n_step_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot,
|
| 231 |
+
+ /* .get_mr = */ kai_get_mr_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot,
|
| 232 |
+
+ /* .get_nr = */ kai_get_nr_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot,
|
| 233 |
+
+ /* .get_kr = */ kai_get_kr_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot,
|
| 234 |
+
+ /* .get_sr = */ kai_get_sr_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot,
|
| 235 |
+
+ /* .get_dst_offset = */ kai_get_dst_offset_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot,
|
| 236 |
+
+ /* .get_dst_size = */ kai_get_dst_size_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot,
|
| 237 |
+
+ /* .get_lhs_offset_ex = */ &kernel_offs_fn2<kai_get_lhs_packed_offset_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot>,
|
| 238 |
+
+ /* .get_rhs_packed_offset_ex = */ &kernel_offs_fn2<kai_get_rhs_packed_offset_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot>,
|
| 239 |
+
+ /* .run_kernel_ex = */ nullptr,
|
| 240 |
+
+ /* .run_kernel_lut_ex = */ &kernel_run_float_fn11_int2<kai_run_matmul_clamp_f32_qai8dxp1x4_qsi2cxp4vlx4_1x4vl_sme2_dot>,
|
| 241 |
+
+ },
|
| 242 |
+
+ /* .gemv_lhs_info = */ {
|
| 243 |
+
+ /* .get_offset = */ kai_get_lhs_offset_lhs_quant_pack_qai8dxp_f32,
|
| 244 |
+
+ /* .get_packed_offset_ex = */ &lhs_offs_fn5<kai_get_lhs_packed_offset_lhs_quant_pack_qai8dxp_f32>,
|
| 245 |
+
+ /* .packed_size_ex = */ &lhs_ps_fn5<kai_get_lhs_packed_size_lhs_quant_pack_qai8dxp_f32>,
|
| 246 |
+
+ /* .pack_func_ex = */ &lhs_pack_float_fn9_no_bl<kai_run_lhs_quant_pack_qai8dxp_f32>,
|
| 247 |
+
+ },
|
| 248 |
+
+ /* .rhs_info = */ {
|
| 249 |
+
+ /* .packed_stride = */ kai_get_rhs_packed_stride_rhs_pack_nxk_qsi2cxp_qsu2cx_neon,
|
| 250 |
+
+ /* .to_float = */ nullptr,
|
| 251 |
+
+ /* .packed_size_ex = */ &rhs_ps_fn5<kai_get_rhs_packed_size_rhs_pack_nxk_qsi2cxp_qsu2cx_neon>,
|
| 252 |
+
+ /* .packed_stride_ex = */ nullptr,
|
| 253 |
+
+ /* .pack_func_ex = */ nullptr,
|
| 254 |
+
+ /* .pack_func_lut_ex = */ &rhs_pack_scale_fn12_int2<kai_run_rhs_pack_nxk_qsi2cxp_qsu2cx_neon>,
|
| 255 |
+
+ },
|
| 256 |
+
+ /* .required_cpu = */ CPU_FEATURE_SME,
|
| 257 |
+
+ /* .lhs_type = */ GGML_TYPE_F32,
|
| 258 |
+
+ /* .rhs_type = */ GGML_TYPE_Q2_0C,
|
| 259 |
+
+ /* .op_type = */ GGML_TYPE_F32,
|
| 260 |
+
+ },
|
| 261 |
+
+#endif
|
| 262 |
+
+ { /* Sentinel */ }
|
| 263 |
+
+};
|
| 264 |
+
+
|
| 265 |
+
static ggml_kleidiai_kernels gemm_gemv_kernels_q8[] = {
|
| 266 |
+
#if defined(__ARM_FEATURE_SME)
|
| 267 |
+
{
|
| 268 |
+
@@ -890,9 +979,21 @@ ggml_kleidiai_kernels * ggml_kleidiai_select_kernels(cpu_feature cpu_features, c
|
| 269 |
+
} else {
|
| 270 |
+
try_table(gemm_gemv_kernels);
|
| 271 |
+
}
|
| 272 |
+
+ if (!kernel) {
|
| 273 |
+
+ for (size_t i = 0; i < NELEMS(gemm_gemv_kernels_q2_0c) - 1; ++i) {
|
| 274 |
+
+ if ((cpu_features & gemm_gemv_kernels_q2_0c[i].required_cpu) == gemm_gemv_kernels_q2_0c[i].required_cpu &&
|
| 275 |
+
+ gemm_gemv_kernels_q2_0c[i].lhs_type == tensor->src[1]->type &&
|
| 276 |
+
+ gemm_gemv_kernels_q2_0c[i].rhs_type == tensor->src[0]->type &&
|
| 277 |
+
+ gemm_gemv_kernels_q2_0c[i].op_type == tensor->type) {
|
| 278 |
+
+ kernel = &gemm_gemv_kernels_q2_0c[i];
|
| 279 |
+
+ break;
|
| 280 |
+
+ }
|
| 281 |
+
+ }
|
| 282 |
+
+ }
|
| 283 |
+
#else
|
| 284 |
+
GGML_UNUSED(gemm_gemv_kernels);
|
| 285 |
+
GGML_UNUSED(gemm_gemv_kernels_q8);
|
| 286 |
+
+ GGML_UNUSED(gemm_gemv_kernels_q2_0c);
|
| 287 |
+
GGML_UNUSED(cpu_features);
|
| 288 |
+
#endif
|
| 289 |
+
}
|
| 290 |
+
@@ -936,3 +1037,20 @@ ggml_kleidiai_kernels * ggml_kleidiai_select_kernels_q8_0(cpu_feature features)
|
| 291 |
+
|
| 292 |
+
return kernels;
|
| 293 |
+
}
|
| 294 |
+
+
|
| 295 |
+
+ggml_kleidiai_kernels * ggml_kleidiai_select_kernels_q2_0c(cpu_feature features) {
|
| 296 |
+
+ ggml_kleidiai_kernels * kernels = nullptr;
|
| 297 |
+
+
|
| 298 |
+
+#if defined(__ARM_FEATURE_SME) || defined(__ARM_FEATURE_DOTPROD) || defined(__ARM_FEATURE_MATMUL_INT8)
|
| 299 |
+
+ for (size_t i = 0; i < NELEMS(gemm_gemv_kernels_q2_0c) - 1; ++i) {
|
| 300 |
+
+ if ((features & gemm_gemv_kernels_q2_0c[i].required_cpu) == gemm_gemv_kernels_q2_0c[i].required_cpu) {
|
| 301 |
+
+ kernels = &gemm_gemv_kernels_q2_0c[i];
|
| 302 |
+
+ break;
|
| 303 |
+
+ }
|
| 304 |
+
+ }
|
| 305 |
+
+#else
|
| 306 |
+
+ GGML_UNUSED(features);
|
| 307 |
+
+#endif
|
| 308 |
+
+
|
| 309 |
+
+ return kernels;
|
| 310 |
+
+}
|
| 311 |
+
|
| 312 |
+
diff --git a/ggml/src/ggml-cpu/kleidiai/kernels.h b/ggml/src/ggml-cpu/kleidiai/kernels.h
|
| 313 |
+
index 129245400..35e3c611a 100644
|
| 314 |
+
--- a/ggml/src/ggml-cpu/kleidiai/kernels.h
|
| 315 |
+
+++ b/ggml/src/ggml-cpu/kleidiai/kernels.h
|
| 316 |
+
@@ -42,6 +42,12 @@ struct kernel_info {
|
| 317 |
+
const void* lhs_packed, const void* rhs_packed,
|
| 318 |
+
void* dst, size_t dst_stride_row, size_t dst_stride_col,
|
| 319 |
+
float clamp_min, float clamp_max);
|
| 320 |
+
+
|
| 321 |
+
+ void (*run_kernel_lut_ex)(
|
| 322 |
+
+ size_t m, size_t n, size_t k, size_t bl,
|
| 323 |
+
+ const void* lhs_packed, const void* rhs_packed,
|
| 324 |
+
+ void* dst, size_t dst_stride_row, size_t dst_stride_col,
|
| 325 |
+
+ float clamp_min, float clamp_max, const int32_t* lut);
|
| 326 |
+
};
|
| 327 |
+
|
| 328 |
+
struct lhs_packing_info {
|
| 329 |
+
@@ -68,6 +74,9 @@ struct rhs_packing_info {
|
| 330 |
+
|
| 331 |
+
void (*pack_func_ex)(size_t num_groups, size_t n, size_t k, size_t nr, size_t kr, size_t sr, size_t bl,
|
| 332 |
+
size_t rhs_stride, const void * rhs, const void * bias, const void * scale, void * rhs_packed, size_t extra_bytes, const void * params);
|
| 333 |
+
+
|
| 334 |
+
+ void (*pack_func_lut_ex)(size_t num_groups, size_t n, size_t k, size_t nr, size_t kr, size_t sr, size_t bl,
|
| 335 |
+
+ size_t rhs_stride, const void * rhs, const void * bias, const void * scale, void * rhs_packed, size_t extra_bytes, const void * params, const int32_t* lut);
|
| 336 |
+
};
|
| 337 |
+
|
| 338 |
+
struct ggml_kleidiai_kernels {
|
| 339 |
+
@@ -88,3 +97,4 @@ struct ggml_kleidiai_kernels {
|
| 340 |
+
ggml_kleidiai_kernels * ggml_kleidiai_select_kernels(cpu_feature cpu_features, const ggml_tensor * tensor);
|
| 341 |
+
ggml_kleidiai_kernels * ggml_kleidiai_select_kernels_q4_0(cpu_feature features);
|
| 342 |
+
ggml_kleidiai_kernels * ggml_kleidiai_select_kernels_q8_0(cpu_feature features);
|
| 343 |
+
+ggml_kleidiai_kernels * ggml_kleidiai_select_kernels_q2_0c(cpu_feature features);
|
| 344 |
+
|
| 345 |
+
diff --git a/ggml/src/ggml-cpu/kleidiai/kleidiai.cpp b/ggml/src/ggml-cpu/kleidiai/kleidiai.cpp
|
| 346 |
+
index ad23e7318..bbebc6d26 100644
|
| 347 |
+
--- a/ggml/src/ggml-cpu/kleidiai/kleidiai.cpp
|
| 348 |
+
+++ b/ggml/src/ggml-cpu/kleidiai/kleidiai.cpp
|
| 349 |
+
@@ -43,7 +43,8 @@ struct ggml_kleidiai_context {
|
| 350 |
+
cpu_feature features;
|
| 351 |
+
ggml_kleidiai_kernels * kernels_q4;
|
| 352 |
+
ggml_kleidiai_kernels * kernels_q8;
|
| 353 |
+
-} static ctx = { CPU_FEATURE_NONE, NULL, NULL };
|
| 354 |
+
+ ggml_kleidiai_kernels * kernels_q2c;
|
| 355 |
+
+} static ctx = { CPU_FEATURE_NONE, NULL, NULL, NULL };
|
| 356 |
+
|
| 357 |
+
static const char* cpu_feature_to_string(cpu_feature f) {
|
| 358 |
+
if (f == CPU_FEATURE_NONE) {
|
| 359 |
+
@@ -84,8 +85,9 @@ static void init_kleidiai_context(void) {
|
| 360 |
+
if (sme_enabled != 0) {
|
| 361 |
+
ctx.features |= ggml_cpu_has_sme() ? CPU_FEATURE_SME : CPU_FEATURE_NONE;
|
| 362 |
+
}
|
| 363 |
+
- ctx.kernels_q4 = ggml_kleidiai_select_kernels_q4_0(ctx.features);
|
| 364 |
+
- ctx.kernels_q8 = ggml_kleidiai_select_kernels_q8_0(ctx.features);
|
| 365 |
+
+ ctx.kernels_q4 = ggml_kleidiai_select_kernels_q4_0(ctx.features);
|
| 366 |
+
+ ctx.kernels_q8 = ggml_kleidiai_select_kernels_q8_0(ctx.features);
|
| 367 |
+
+ ctx.kernels_q2c = ggml_kleidiai_select_kernels_q2_0c(ctx.features);
|
| 368 |
+
#ifndef NDEBUG
|
| 369 |
+
if (ctx.kernels_q4) {
|
| 370 |
+
GGML_LOG_DEBUG("kleidiai: using q4 kernel with CPU feature %s\n", cpu_feature_to_string(ctx.kernels_q4->required_cpu));
|
| 371 |
+
@@ -93,6 +95,9 @@ static void init_kleidiai_context(void) {
|
| 372 |
+
if (ctx.kernels_q8) {
|
| 373 |
+
GGML_LOG_DEBUG("kleidiai: using q8 kernel with CPU feature %s\n", cpu_feature_to_string(ctx.kernels_q8->required_cpu));
|
| 374 |
+
}
|
| 375 |
+
+ if (ctx.kernels_q2c) {
|
| 376 |
+
+ GGML_LOG_DEBUG("kleidiai: using q2c kernel with CPU feature %s\n", cpu_feature_to_string(ctx.kernels_q8->required_cpu));
|
| 377 |
+
+ }
|
| 378 |
+
#endif
|
| 379 |
+
}
|
| 380 |
+
ggml_critical_section_end();
|
| 381 |
+
@@ -148,6 +153,9 @@ class tensor_traits : public ggml::cpu::tensor_traits {
|
| 382 |
+
} else if (kernels->rhs_type == GGML_TYPE_Q8_0) {
|
| 383 |
+
if (!lhs_info->packed_size_ex) return false;
|
| 384 |
+
size = lhs_info->packed_size_ex(m, k, QK8_0, mr, kr, sr);
|
| 385 |
+
+ } else if (kernels->rhs_type == GGML_TYPE_Q2_0C) {
|
| 386 |
+
+ if (!lhs_info->packed_size_ex) return false;
|
| 387 |
+
+ size = lhs_info->packed_size_ex(m, k, QKQ2_0C, mr, kr, sr);
|
| 388 |
+
} else if (kernels->rhs_type == GGML_TYPE_F16) {
|
| 389 |
+
if (!lhs_info->packed_size_ex || !kernels->rhs_info.packed_size_ex) return false;
|
| 390 |
+
const int64_t lhs_batch_size0 = op->src[1]->ne[2];
|
| 391 |
+
@@ -171,6 +179,8 @@ class tensor_traits : public ggml::cpu::tensor_traits {
|
| 392 |
+
return compute_forward_q8_0(params, dst);
|
| 393 |
+
} else if (dst->src[0]->type == GGML_TYPE_F16) {
|
| 394 |
+
return compute_forward_fp16(params, dst);
|
| 395 |
+
+ } else if (dst->src[0]->type == GGML_TYPE_Q2_0C && ctx.kernels_q2c != nullptr) {
|
| 396 |
+
+ return compute_forward_q2_0c(params, dst);
|
| 397 |
+
}
|
| 398 |
+
} else if (dst->op == GGML_OP_GET_ROWS) {
|
| 399 |
+
if (dst->src[0]->type == GGML_TYPE_Q4_0 || dst->src[0]->type == GGML_TYPE_Q8_0) {
|
| 400 |
+
@@ -504,6 +514,112 @@ class tensor_traits : public ggml::cpu::tensor_traits {
|
| 401 |
+
return true;
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
+ bool compute_forward_q2_0c(struct ggml_compute_params * params, struct ggml_tensor * dst) {
|
| 405 |
+
+ GGML_ASSERT(dst->src[0]->type == GGML_TYPE_Q2_0C);
|
| 406 |
+
+ GGML_ASSERT(dst->src[1]->type == GGML_TYPE_F32);
|
| 407 |
+
+ GGML_ASSERT(dst->type == GGML_TYPE_F32);
|
| 408 |
+
+
|
| 409 |
+
+ const ggml_tensor * src0 = dst->src[0];
|
| 410 |
+
+ const ggml_tensor * src1 = dst->src[1];
|
| 411 |
+
+
|
| 412 |
+
+ GGML_TENSOR_BINARY_OP_LOCALS
|
| 413 |
+
+
|
| 414 |
+
+ ggml_kleidiai_kernels *kernels = ggml_kleidiai_select_kernels(ctx.features, dst);
|
| 415 |
+
+
|
| 416 |
+
+ // Look-up table used to unpack the int2 values
|
| 417 |
+
+ static const int32_t lut_i8_i2[4] = {-3, -1, 1, 3};
|
| 418 |
+
+
|
| 419 |
+
+ if (!kernels) {
|
| 420 |
+
+ return false;
|
| 421 |
+
+ }
|
| 422 |
+
+
|
| 423 |
+
+ bool is_gemv = src1->ne[1] == 1;
|
| 424 |
+
+ kernel_info * kernel = is_gemv ? &kernels->gemv : &kernels->gemm;
|
| 425 |
+
+ lhs_packing_info * lhs_info = is_gemv ? &kernels->gemv_lhs_info : &kernels->gemm_lhs_info;
|
| 426 |
+
+
|
| 427 |
+
+ GGML_ASSERT(kernel);
|
| 428 |
+
+ if (!lhs_info->get_packed_offset_ex || !lhs_info->pack_func_ex ||
|
| 429 |
+
+ !kernel->get_rhs_packed_offset_ex || !kernel->run_kernel_lut_ex || !kernel->get_dst_offset) {
|
| 430 |
+
+ return false;
|
| 431 |
+
+ }
|
| 432 |
+
+
|
| 433 |
+
+ const int ith = params->ith;
|
| 434 |
+
+ const int nth_raw = params->nth;
|
| 435 |
+
+ const int nth = nth_raw > 0 ? nth_raw : 1;
|
| 436 |
+
+
|
| 437 |
+
+ const size_t k = ne00;
|
| 438 |
+
+ const size_t m = ne11;
|
| 439 |
+
+ const size_t n = ne01;
|
| 440 |
+
+
|
| 441 |
+
+ size_t mr = kernel->get_mr();
|
| 442 |
+
+ size_t kr = kernel->get_kr();
|
| 443 |
+
+ size_t sr = kernel->get_sr();
|
| 444 |
+
+
|
| 445 |
+
+ const uint8_t * lhs = static_cast<const uint8_t *>(src1->data);
|
| 446 |
+
+ uint8_t * lhs_packed = (uint8_t*)params->wdata;
|
| 447 |
+
+ const uint8_t * rhs_packed = static_cast<const uint8_t *>(src0->data);
|
| 448 |
+
+
|
| 449 |
+
+ const size_t n_step = kernel->get_n_step();
|
| 450 |
+
+ const size_t num_n_per_thread = kai_roundup(kai_roundup(n, nth) / nth, n_step);
|
| 451 |
+
+ const size_t n_start = ith * num_n_per_thread;
|
| 452 |
+
+
|
| 453 |
+
+ size_t n_to_process = 0;
|
| 454 |
+
+ if (n_start < n) {
|
| 455 |
+
+ n_to_process = num_n_per_thread;
|
| 456 |
+
+ if ((n_start + n_to_process) > n) {
|
| 457 |
+
+ n_to_process = n - n_start;
|
| 458 |
+
+ }
|
| 459 |
+
+ }
|
| 460 |
+
+
|
| 461 |
+
+ // Calculate number of columns to be processed per thread
|
| 462 |
+
+ const size_t num_m_per_thread = kai_roundup(m, mr * nth) / nth;
|
| 463 |
+
+ const size_t m_start = ith * num_m_per_thread;
|
| 464 |
+
+ size_t m_to_process = num_m_per_thread;
|
| 465 |
+
+ if ((m_start + m_to_process) > m) {
|
| 466 |
+
+ m_to_process = m - m_start;
|
| 467 |
+
+ }
|
| 468 |
+
+
|
| 469 |
+
+ if (m_start < m) {
|
| 470 |
+
+ // Transform LHS
|
| 471 |
+
+
|
| 472 |
+
+ const size_t src_stride = src1->nb[1];
|
| 473 |
+
+ float * src_ptr = (float *)(lhs + lhs_info->get_offset(m_start, dst->src[1]->nb[1]));
|
| 474 |
+
+ const size_t lhs_packed_offset = lhs_info->get_packed_offset_ex(m_start, k, QKQ2_0C, mr, kr, sr);
|
| 475 |
+
+ void * lhs_packed_ptr = static_cast<void *>(lhs_packed + lhs_packed_offset);
|
| 476 |
+
+
|
| 477 |
+
+ // Pack this thread's chunk with m_idx_start = 0 and per-thread output pointer
|
| 478 |
+
+ lhs_info->pack_func_ex(m_to_process, k, QKQ2_0C, mr, kr, sr, 0, src_ptr, src_stride, lhs_packed_ptr);
|
| 479 |
+
+ }
|
| 480 |
+
+
|
| 481 |
+
+ ggml_barrier(params->threadpool);
|
| 482 |
+
+
|
| 483 |
+
+ // Perform the operation
|
| 484 |
+
+ const size_t dst_stride = dst->nb[1];
|
| 485 |
+
+ const size_t lhs_packed_offset = lhs_info->get_packed_offset_ex(0, k, QKQ2_0C, mr, kr, sr);
|
| 486 |
+
+ const size_t rhs_packed_offset = kernel->get_rhs_packed_offset_ex(n_start, k, QKQ2_0C);
|
| 487 |
+
+ const size_t dst_offset = kernel->get_dst_offset(0, n_start, dst_stride);
|
| 488 |
+
+ const void * rhs_ptr = static_cast<const void *>(rhs_packed + rhs_packed_offset);
|
| 489 |
+
+ const void* lhs_ptr = (const void*)((const char *)lhs_packed + lhs_packed_offset);
|
| 490 |
+
+ float *dst_ptr = reinterpret_cast<float *>(static_cast<uint8_t *>(dst->data) + dst_offset);
|
| 491 |
+
+
|
| 492 |
+
+ if (n_to_process > 0) {
|
| 493 |
+
+ const size_t dst_stride = dst->nb[1];
|
| 494 |
+
+ const size_t lhs_packed_offset = lhs_info->get_packed_offset_ex(0, k, 0, mr, kr, sr);
|
| 495 |
+
+ const size_t rhs_packed_offset = kernel->get_rhs_packed_offset_ex(n_start, k, 0);
|
| 496 |
+
+ const size_t dst_offset = kernel->get_dst_offset(0, n_start, dst_stride);
|
| 497 |
+
+ const void * rhs_ptr = static_cast<const void *>(rhs_packed + rhs_packed_offset);
|
| 498 |
+
+ const void * lhs_ptr = static_cast<const void *>(lhs_packed + lhs_packed_offset);
|
| 499 |
+
+ float * dst_ptr = reinterpret_cast<float *>(static_cast<uint8_t *>(dst->data) + dst_offset);
|
| 500 |
+
+
|
| 501 |
+
+ if (n_to_process > 0) {
|
| 502 |
+
+ kernel->run_kernel_lut_ex(m, n_to_process, k, 0, lhs_ptr, rhs_ptr, dst_ptr, dst_stride,
|
| 503 |
+
+ sizeof(float), -FLT_MAX, FLT_MAX, &lut_i8_i2[0]);
|
| 504 |
+
+ }
|
| 505 |
+
+ }
|
| 506 |
+
+
|
| 507 |
+
+ return true;
|
| 508 |
+
+ }
|
| 509 |
+
+
|
| 510 |
+
bool compute_forward_get_rows(struct ggml_compute_params * params, struct ggml_tensor * dst) {
|
| 511 |
+
const ggml_tensor * src0 = dst->src[0];
|
| 512 |
+
const ggml_tensor * src1 = dst->src[1];
|
| 513 |
+
@@ -565,6 +681,34 @@ class tensor_traits : public ggml::cpu::tensor_traits {
|
| 514 |
+
return true;
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
+ void split_values_scales_offsets_per_channel(
|
| 518 |
+
+ const block_q2_0c *data,
|
| 519 |
+
+ size_t n,
|
| 520 |
+
+ size_t k,
|
| 521 |
+
+ uint8_t *values_out,
|
| 522 |
+
+ float *scales_out)
|
| 523 |
+
+ {
|
| 524 |
+
+ const size_t blocks_per_row = k / QKQ2_0C;
|
| 525 |
+
+ const size_t bytes_per_block = QKQ2_0C / 4;
|
| 526 |
+
+
|
| 527 |
+
+ for (size_t row = 0; row < n; ++row) {
|
| 528 |
+
+ for (size_t b = 0; b < blocks_per_row; ++b) {
|
| 529 |
+
+ size_t block_idx = row * blocks_per_row + b;
|
| 530 |
+
+
|
| 531 |
+
+ const block_q2_0c *src_block = &data[block_idx];
|
| 532 |
+
+
|
| 533 |
+
+ // 1. Copy packed values (8 bytes per block)
|
| 534 |
+
+ memcpy(&values_out[block_idx * bytes_per_block], src_block->qs, bytes_per_block);
|
| 535 |
+
+
|
| 536 |
+
+ // 2. Copy scale
|
| 537 |
+
+ // We copy only the first value because it is per-channel
|
| 538 |
+
+ if(b == 0) {
|
| 539 |
+
+ scales_out[row] = GGML_FP16_TO_FP32(src_block->d);
|
| 540 |
+
+ }
|
| 541 |
+
+ }
|
| 542 |
+
+ }
|
| 543 |
+
+ }
|
| 544 |
+
+
|
| 545 |
+
public:
|
| 546 |
+
int repack(struct ggml_tensor * tensor, const void * data, size_t data_size) {
|
| 547 |
+
const size_t n = tensor->ne[1];
|
| 548 |
+
@@ -648,6 +792,68 @@ public:
|
| 549 |
+
tensor->data, 0, ¶ms);
|
| 550 |
+
GGML_UNUSED(data_size);
|
| 551 |
+
return 0;
|
| 552 |
+
+ } else if (tensor->type == GGML_TYPE_Q2_0C) {
|
| 553 |
+
+
|
| 554 |
+
+ if (!ctx.kernels_q2c) {
|
| 555 |
+
+ return -1;
|
| 556 |
+
+ }
|
| 557 |
+
+
|
| 558 |
+
+ // Extract values and scales
|
| 559 |
+
+ // data is n (rows) x k (columns). and it is block_q2_0c
|
| 560 |
+
+
|
| 561 |
+
+ // Look-up table used to unpack the int2 values
|
| 562 |
+
+ static const int32_t lut_i8_i2[4] = {-3, -1, 1, 3};
|
| 563 |
+
+
|
| 564 |
+
+ // split_values_scales_offsets(data, values, scales, offsets);
|
| 565 |
+
+ const size_t bytes_per_block = QKQ2_0C / 4;
|
| 566 |
+
+ const size_t blocks_per_row = k / QKQ2_0C;
|
| 567 |
+
+ const size_t total_blocks = n * blocks_per_row;
|
| 568 |
+
+
|
| 569 |
+
+ const block_q2_0c *src = (const block_q2_0c *) data;
|
| 570 |
+
+
|
| 571 |
+
+ // Allocate / reuse buffers as appropriate for your context:
|
| 572 |
+
+ // - values: 8 bytes per block
|
| 573 |
+
+ // - scales: 1 ggml_half per block
|
| 574 |
+
+ uint8_t *values_buf = (uint8_t *) malloc( total_blocks * bytes_per_block );
|
| 575 |
+
+
|
| 576 |
+
+ // Be careful!! For each n, we have a scale. Not for each block!
|
| 577 |
+
+ float *scales_buf = (float *) malloc( n * sizeof(float) );
|
| 578 |
+
+ float *offsets_buf = (float *) malloc( n * sizeof(float) );
|
| 579 |
+
+
|
| 580 |
+
+ split_values_scales_offsets_per_channel(
|
| 581 |
+
+ src,
|
| 582 |
+
+ n,
|
| 583 |
+
+ k,
|
| 584 |
+
+ values_buf,
|
| 585 |
+
+ scales_buf
|
| 586 |
+
+ );
|
| 587 |
+
+
|
| 588 |
+
+ size_t nr = ctx.kernels_q2c->gemm.get_nr();
|
| 589 |
+
+ size_t kr = ctx.kernels_q2c->gemm.get_kr();
|
| 590 |
+
+ size_t sr = ctx.kernels_q2c->gemm.get_sr();
|
| 591 |
+
+
|
| 592 |
+
+ struct kai_rhs_pack_qs4cxs1s0_param params;
|
| 593 |
+
+ params.lhs_zero_point = 1;
|
| 594 |
+
+ params.rhs_zero_point = 2;
|
| 595 |
+
+
|
| 596 |
+
+ ctx.kernels_q2c->rhs_info.pack_func_lut_ex(
|
| 597 |
+
+ 1, n, k,
|
| 598 |
+
+ nr, kr, sr,
|
| 599 |
+
+ 0, 0,
|
| 600 |
+
+ values_buf,
|
| 601 |
+
+ nullptr,
|
| 602 |
+
+ scales_buf,
|
| 603 |
+
+ tensor->data,
|
| 604 |
+
+ 0, ¶ms,
|
| 605 |
+
+ &lut_i8_i2[0]);
|
| 606 |
+
+
|
| 607 |
+
+
|
| 608 |
+
+ free(values_buf);
|
| 609 |
+
+ free(scales_buf);
|
| 610 |
+
+ free(offsets_buf);
|
| 611 |
+
+
|
| 612 |
+
+ GGML_UNUSED(data_size);
|
| 613 |
+
+ return 0;
|
| 614 |
+
}
|
| 615 |
+
|
| 616 |
+
GGML_UNUSED(data_size);
|
| 617 |
+
@@ -724,6 +930,18 @@ static size_t ggml_backend_cpu_kleidiai_buffer_type_get_alloc_size(ggml_backend_
|
| 618 |
+
GGML_ASSERT(ctx.kernels_q8);
|
| 619 |
+
kernels = ctx.kernels_q8;
|
| 620 |
+
block_len = QK8_0;
|
| 621 |
+
+ } else if (tensor->type == GGML_TYPE_Q2_0C) {
|
| 622 |
+
+ GGML_ASSERT(ctx.kernels_q2c);
|
| 623 |
+
+ kernels = ctx.kernels_q2c;
|
| 624 |
+
+ block_len = QKQ2_0C;
|
| 625 |
+
+ const size_t nr = kernels->gemm.get_nr();
|
| 626 |
+
+ const size_t kr = kernels->gemm.get_kr();
|
| 627 |
+
+ const size_t sr = kernels->gemm.get_sr();
|
| 628 |
+
+ const size_t packed = kernels->rhs_info.packed_size_ex(n, k, nr, kr, sr);
|
| 629 |
+
+ const size_t raw = ggml_nbytes(tensor);
|
| 630 |
+
+
|
| 631 |
+
+ return packed > raw ? packed : raw;
|
| 632 |
+
+
|
| 633 |
+
} else {
|
| 634 |
+
return 0;
|
| 635 |
+
}
|
| 636 |
+
@@ -739,6 +957,23 @@ static size_t ggml_backend_cpu_kleidiai_buffer_type_get_alloc_size(ggml_backend_
|
| 637 |
+
namespace ggml::cpu::kleidiai {
|
| 638 |
+
class extra_buffer_type : ggml::cpu::extra_buffer_type {
|
| 639 |
+
bool supports_op(ggml_backend_dev_t, const struct ggml_tensor * op) override {
|
| 640 |
+
+ if ((op->op == GGML_OP_MUL_MAT ) &&
|
| 641 |
+
+ (op->src[0]->type == GGML_TYPE_Q2_0C) &&
|
| 642 |
+
+ op->src[0]->buffer &&
|
| 643 |
+
+ (ggml_n_dims(op->src[0]) == 2) &&
|
| 644 |
+
+ op->src[0]->buffer->buft == ggml_backend_cpu_kleidiai_buffer_type()) {
|
| 645 |
+
+ if (ctx.kernels_q2c == nullptr) {
|
| 646 |
+
+ return false;
|
| 647 |
+
+ }
|
| 648 |
+
+ if (op->src[1]->buffer && !ggml_backend_buft_is_host(op->src[1]->buffer->buft)) {
|
| 649 |
+
+ return false;
|
| 650 |
+
+ }
|
| 651 |
+
+ if ((op->src[1]->type == GGML_TYPE_F32) &&
|
| 652 |
+
+ ggml_ne(op->src[1], 2) == 1 && ggml_ne(op->src[1], 3) == 1) {
|
| 653 |
+
+ return true;
|
| 654 |
+
+ }
|
| 655 |
+
+ }
|
| 656 |
+
+
|
| 657 |
+
if ((op->op == GGML_OP_MUL_MAT || op->op == GGML_OP_GET_ROWS) &&
|
| 658 |
+
(op->src[0]->type == GGML_TYPE_Q4_0 || op->src[0]->type == GGML_TYPE_Q8_0) &&
|
| 659 |
+
op->src[0]->buffer &&
|
| 660 |
+
diff --git a/ggml/src/ggml-cpu/ops.cpp b/ggml/src/ggml-cpu/ops.cpp
|
| 661 |
+
index 303278397..fdd1d25e5 100644
|
| 662 |
+
--- a/ggml/src/ggml-cpu/ops.cpp
|
| 663 |
+
+++ b/ggml/src/ggml-cpu/ops.cpp
|
| 664 |
+
@@ -677,6 +677,7 @@ void ggml_compute_forward_add(
|
| 665 |
+
case GGML_TYPE_Q6_K:
|
| 666 |
+
case GGML_TYPE_TQ1_0:
|
| 667 |
+
case GGML_TYPE_TQ2_0:
|
| 668 |
+
+ case GGML_TYPE_Q2_0C:
|
| 669 |
+
case GGML_TYPE_IQ2_XXS:
|
| 670 |
+
case GGML_TYPE_IQ2_XS:
|
| 671 |
+
case GGML_TYPE_IQ3_XXS:
|
| 672 |
+
@@ -1126,6 +1127,7 @@ void ggml_compute_forward_add1(
|
| 673 |
+
case GGML_TYPE_Q6_K:
|
| 674 |
+
case GGML_TYPE_TQ1_0:
|
| 675 |
+
case GGML_TYPE_TQ2_0:
|
| 676 |
+
+ case GGML_TYPE_Q2_0C:
|
| 677 |
+
case GGML_TYPE_IQ2_XXS:
|
| 678 |
+
case GGML_TYPE_IQ2_XS:
|
| 679 |
+
case GGML_TYPE_IQ3_XXS:
|
| 680 |
+
@@ -1254,6 +1256,7 @@ void ggml_compute_forward_acc(
|
| 681 |
+
case GGML_TYPE_Q6_K:
|
| 682 |
+
case GGML_TYPE_TQ1_0:
|
| 683 |
+
case GGML_TYPE_TQ2_0:
|
| 684 |
+
+ case GGML_TYPE_Q2_0C:
|
| 685 |
+
case GGML_TYPE_IQ2_XXS:
|
| 686 |
+
case GGML_TYPE_IQ2_XS:
|
| 687 |
+
case GGML_TYPE_IQ3_XXS:
|
| 688 |
+
@@ -4277,6 +4280,7 @@ void ggml_compute_forward_out_prod(
|
| 689 |
+
case GGML_TYPE_Q6_K:
|
| 690 |
+
case GGML_TYPE_TQ1_0:
|
| 691 |
+
case GGML_TYPE_TQ2_0:
|
| 692 |
+
+ case GGML_TYPE_Q2_0C:
|
| 693 |
+
case GGML_TYPE_IQ2_XXS:
|
| 694 |
+
case GGML_TYPE_IQ2_XS:
|
| 695 |
+
case GGML_TYPE_IQ3_XXS:
|
| 696 |
+
@@ -4552,6 +4556,7 @@ void ggml_compute_forward_set(
|
| 697 |
+
case GGML_TYPE_Q6_K:
|
| 698 |
+
case GGML_TYPE_TQ1_0:
|
| 699 |
+
case GGML_TYPE_TQ2_0:
|
| 700 |
+
+ case GGML_TYPE_Q2_0C:
|
| 701 |
+
case GGML_TYPE_IQ2_XXS:
|
| 702 |
+
case GGML_TYPE_IQ2_XS:
|
| 703 |
+
case GGML_TYPE_IQ3_XXS:
|
| 704 |
+
@@ -4774,6 +4779,7 @@ void ggml_compute_forward_get_rows(
|
| 705 |
+
case GGML_TYPE_Q6_K:
|
| 706 |
+
case GGML_TYPE_TQ1_0:
|
| 707 |
+
case GGML_TYPE_TQ2_0:
|
| 708 |
+
+ case GGML_TYPE_Q2_0C:
|
| 709 |
+
case GGML_TYPE_IQ2_XXS:
|
| 710 |
+
case GGML_TYPE_IQ2_XS:
|
| 711 |
+
case GGML_TYPE_IQ3_XXS:
|
| 712 |
+
@@ -5498,6 +5504,7 @@ void ggml_compute_forward_clamp(
|
| 713 |
+
case GGML_TYPE_Q6_K:
|
| 714 |
+
case GGML_TYPE_TQ1_0:
|
| 715 |
+
case GGML_TYPE_TQ2_0:
|
| 716 |
+
+ case GGML_TYPE_Q2_0C:
|
| 717 |
+
case GGML_TYPE_IQ2_XXS:
|
| 718 |
+
case GGML_TYPE_IQ2_XS:
|
| 719 |
+
case GGML_TYPE_IQ3_XXS:
|
| 720 |
+
diff --git a/ggml/src/ggml-cpu/quants.c b/ggml/src/ggml-cpu/quants.c
|
| 721 |
+
index 365cb36d2..091d1f698 100644
|
| 722 |
+
--- a/ggml/src/ggml-cpu/quants.c
|
| 723 |
+
+++ b/ggml/src/ggml-cpu/quants.c
|
| 724 |
+
@@ -104,6 +104,12 @@ void quantize_row_tq2_0(const float * GGML_RESTRICT x, void * GGML_RESTRICT vy,
|
| 725 |
+
quantize_row_tq2_0_ref(x, y, k);
|
| 726 |
+
}
|
| 727 |
+
|
| 728 |
+
+void quantize_row_q2_0c(const float * GGML_RESTRICT x, void * GGML_RESTRICT vy, int64_t k) {
|
| 729 |
+
+ assert(k % QKQ2_0C == 0);
|
| 730 |
+
+ block_q2_0c * GGML_RESTRICT y = vy;
|
| 731 |
+
+ quantize_row_q2_0c_ref(x, y, k);
|
| 732 |
+
+}
|
| 733 |
+
+
|
| 734 |
+
//===================================== Q8_K ==============================================
|
| 735 |
+
|
| 736 |
+
void quantize_row_q8_K_generic(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k) {
|
| 737 |
+
diff --git a/ggml/src/ggml-cpu/quants.h b/ggml/src/ggml-cpu/quants.h
|
| 738 |
+
index d83eb1b14..5bc022f1d 100644
|
| 739 |
+
--- a/ggml/src/ggml-cpu/quants.h
|
| 740 |
+
+++ b/ggml/src/ggml-cpu/quants.h
|
| 741 |
+
@@ -31,6 +31,8 @@ void quantize_row_q8_K(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, in
|
| 742 |
+
void quantize_row_tq1_0(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
|
| 743 |
+
void quantize_row_tq2_0(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
|
| 744 |
+
|
| 745 |
+
+void quantize_row_q2_0c(const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
|
| 746 |
+
+
|
| 747 |
+
void quantize_row_iq4_nl (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
|
| 748 |
+
void quantize_row_iq4_xs (const float * GGML_RESTRICT x, void * GGML_RESTRICT y, int64_t k);
|
| 749 |
+
|
| 750 |
+
diff --git a/ggml/src/ggml-quants.c b/ggml/src/ggml-quants.c
|
| 751 |
+
index de5cbd75e..e1559f87a 100644
|
| 752 |
+
--- a/ggml/src/ggml-quants.c
|
| 753 |
+
+++ b/ggml/src/ggml-quants.c
|
| 754 |
+
@@ -2198,6 +2198,121 @@ void quantize_row_tq2_0_ref(const float * GGML_RESTRICT x, block_tq2_0 * GGML_RE
|
| 755 |
+
}
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
+
+static inline uint8_t map_int8_to_uint2_idx(int32_t v0) {
|
| 759 |
+
+
|
| 760 |
+
+ switch(v0) {
|
| 761 |
+
+ case -3:
|
| 762 |
+
+ return 0;
|
| 763 |
+
+ case -1:
|
| 764 |
+
+ return 1;
|
| 765 |
+
+ case 1:
|
| 766 |
+
+ return 2;
|
| 767 |
+
+ case 3:
|
| 768 |
+
+ return 3;
|
| 769 |
+
+ default:
|
| 770 |
+
+ GGML_ASSERT(false);
|
| 771 |
+
+ }
|
| 772 |
+
+};
|
| 773 |
+
+
|
| 774 |
+
+static inline int32_t map_uint2_idx_to_int8(uint8_t v0) {
|
| 775 |
+
+
|
| 776 |
+
+ switch(v0) {
|
| 777 |
+
+ case 0:
|
| 778 |
+
+ return -3;
|
| 779 |
+
+ case 1:
|
| 780 |
+
+ return -1;
|
| 781 |
+
+ case 2:
|
| 782 |
+
+ return 1;
|
| 783 |
+
+ case 3:
|
| 784 |
+
+ return 3;
|
| 785 |
+
+ default:
|
| 786 |
+
+ GGML_ASSERT(false);
|
| 787 |
+
+ }
|
| 788 |
+
+};
|
| 789 |
+
+
|
| 790 |
+
+void quantize_row_q2_0c_ref(const float * GGML_RESTRICT x, block_q2_0c * GGML_RESTRICT y, int64_t k) {
|
| 791 |
+
+ const int QK = QKQ2_0C; // block size
|
| 792 |
+
+
|
| 793 |
+
+ assert(k % QK == 0);
|
| 794 |
+
+
|
| 795 |
+
+ // ---- Find per-channel min/max ----
|
| 796 |
+
+ float xmin = x[0];
|
| 797 |
+
+ float xmax = x[0];
|
| 798 |
+
+
|
| 799 |
+
+ for (int j = 1; j < k; ++j) {
|
| 800 |
+
+
|
| 801 |
+
+ const float v = x[j];
|
| 802 |
+
+
|
| 803 |
+
+ if (v < xmin) xmin = v;
|
| 804 |
+
+ if (v > xmax) xmax = v;
|
| 805 |
+
+ }
|
| 806 |
+
+
|
| 807 |
+
+ float d = 0.0f; // scale
|
| 808 |
+
+
|
| 809 |
+
+ // The four uint2 values [0, 1, 2, 3] map to the Int8 range:
|
| 810 |
+
+ // [-3, -1, +1, +3], yielding an evenly spaced, zero-centered distribution.
|
| 811 |
+
+ const float qmin = -3.0f;
|
| 812 |
+
+ const float qmax = 3.0f;
|
| 813 |
+
+
|
| 814 |
+
+ if (xmax != xmin) {
|
| 815 |
+
+ d = (xmax - xmin) / (qmax - qmin);
|
| 816 |
+
+ } else {
|
| 817 |
+
+ d = 0.0f;
|
| 818 |
+
+ }
|
| 819 |
+
+
|
| 820 |
+
+ // Number of blocks
|
| 821 |
+
+ const int64_t nb = k / QK;
|
| 822 |
+
+
|
| 823 |
+
+ // All blocks share the same scale.
|
| 824 |
+
+ // This enables an optimized matmul implementation.
|
| 825 |
+
+ for (int64_t i = 0; i < nb; ++i) {
|
| 826 |
+
+ const float *xb = x + i*QK;
|
| 827 |
+
+
|
| 828 |
+
+ y[i].d = GGML_FP32_TO_FP16(d);
|
| 829 |
+
+
|
| 830 |
+
+ // ---- Quantize to uint2 ----
|
| 831 |
+
+ if (d == 0.0f) {
|
| 832 |
+
+ for (int j = 0; j < QK; ++j) {
|
| 833 |
+
+ y[i].qs[j] = 0;
|
| 834 |
+
+ }
|
| 835 |
+
+ } else {
|
| 836 |
+
+ const float inv_d = 1.0f / d;
|
| 837 |
+
+
|
| 838 |
+
+ for (int j = 0; j < QK; j+=4) {
|
| 839 |
+
+ float v0 = xb[j + 0];
|
| 840 |
+
+ float v1 = xb[j + 1];
|
| 841 |
+
+ float v2 = xb[j + 2];
|
| 842 |
+
+ float v3 = xb[j + 3];
|
| 843 |
+
+
|
| 844 |
+
+ // q = round(v / d)
|
| 845 |
+
+ int qi0 = (int) lrintf(v0 * inv_d);
|
| 846 |
+
+ int qi1 = (int) lrintf(v1 * inv_d);
|
| 847 |
+
+ int qi2 = (int) lrintf(v2 * inv_d);
|
| 848 |
+
+ int qi3 = (int) lrintf(v3 * inv_d);
|
| 849 |
+
+
|
| 850 |
+
+ // clamp to int8 range
|
| 851 |
+
+ if (qi0 < qmin) qi0 = qmin;
|
| 852 |
+
+ if (qi0 > qmax) qi0 = qmax;
|
| 853 |
+
+ if (qi1 < qmin) qi1 = qmin;
|
| 854 |
+
+ if (qi1 > qmax) qi1 = qmax;
|
| 855 |
+
+ if (qi2 < qmin) qi2 = qmin;
|
| 856 |
+
+ if (qi2 > qmax) qi2 = qmax;
|
| 857 |
+
+ if (qi3 < qmin) qi3 = qmin;
|
| 858 |
+
+ if (qi3 > qmax) qi3 = qmax;
|
| 859 |
+
+
|
| 860 |
+
+ // TODO: What if we have -2 or +2?
|
| 861 |
+
+ const uint8_t v0_u8 = map_int8_to_uint2_idx(qi0);
|
| 862 |
+
+ const uint8_t v1_u8 = map_int8_to_uint2_idx(qi1);
|
| 863 |
+
+ const uint8_t v2_u8 = map_int8_to_uint2_idx(qi2);
|
| 864 |
+
+ const uint8_t v3_u8 = map_int8_to_uint2_idx(qi3);
|
| 865 |
+
+
|
| 866 |
+
+ uint8_t rhs_v0 = (v0_u8 & 0x3) | ((v1_u8 << 2) & 0x0C) | ((v2_u8 << 4 & 0x30)) | ((v3_u8 << 6 & 0xC0));
|
| 867 |
+
+ y[i].qs[j / 4] = rhs_v0;
|
| 868 |
+
+ }
|
| 869 |
+
+ }
|
| 870 |
+
+ }
|
| 871 |
+
+}
|
| 872 |
+
+
|
| 873 |
+
size_t quantize_tq1_0(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
|
| 874 |
+
(void)quant_weights; // not used
|
| 875 |
+
const size_t row_size = ggml_row_size(GGML_TYPE_TQ1_0, n_per_row);
|
| 876 |
+
@@ -2212,6 +2327,16 @@ size_t quantize_tq2_0(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst,
|
| 877 |
+
return nrow * row_size;
|
| 878 |
+
}
|
| 879 |
+
|
| 880 |
+
+size_t quantize_q2_0c(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrow, int64_t n_per_row, const float * quant_weights) {
|
| 881 |
+
+ (void)quant_weights; // not used
|
| 882 |
+
+ // Number of bytes per row
|
| 883 |
+
+ const size_t row_size = ggml_row_size(GGML_TYPE_Q2_0C, n_per_row);
|
| 884 |
+
+ for(int64_t i = 0; i < nrow; ++i) {
|
| 885 |
+
+ quantize_row_q2_0c_ref(src + i * n_per_row, (int8_t*)dst + i * row_size, (int64_t)n_per_row);
|
| 886 |
+
+ }
|
| 887 |
+
+ return nrow * row_size;
|
| 888 |
+
+}
|
| 889 |
+
+
|
| 890 |
+
void dequantize_row_tq1_0(const block_tq1_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k) {
|
| 891 |
+
assert(k % QK_K == 0);
|
| 892 |
+
const int64_t nb = k / QK_K;
|
| 893 |
+
@@ -2270,6 +2395,32 @@ void dequantize_row_tq2_0(const block_tq2_0 * GGML_RESTRICT x, float * GGML_REST
|
| 894 |
+
}
|
| 895 |
+
}
|
| 896 |
+
|
| 897 |
+
+void dequantize_row_q2_0c(const block_q2_0c * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k) {
|
| 898 |
+
+ assert(k % QKQ2_0C == 0);
|
| 899 |
+
+ const int64_t nb = k / QKQ2_0C;
|
| 900 |
+
+
|
| 901 |
+
+ for (int64_t i = 0; i < nb; ++i) {
|
| 902 |
+
+
|
| 903 |
+
+ const float d = GGML_FP16_TO_FP32(x[i].d);
|
| 904 |
+
+
|
| 905 |
+
+ for (size_t j = 0; j < QKQ2_0C; j += 4) {
|
| 906 |
+
+ const uint8_t rhs_byte = x[i].qs[j/4];
|
| 907 |
+
+ const uint8_t u2_idx0 = ((uint8_t)(rhs_byte & 0x03));
|
| 908 |
+
+ const uint8_t u2_idx1 = (((uint8_t)((rhs_byte >> 2) & 0x03)));
|
| 909 |
+
+ const uint8_t u2_idx2 = (((uint8_t)((rhs_byte >> 4) & 0x03)));
|
| 910 |
+
+ const uint8_t u2_idx3 = (((uint8_t)((rhs_byte >> 6) & 0x03)));
|
| 911 |
+
+ int32_t q0 = map_uint2_idx_to_int8(u2_idx0);
|
| 912 |
+
+ int32_t q1 = map_uint2_idx_to_int8(u2_idx1);
|
| 913 |
+
+ int32_t q2 = map_uint2_idx_to_int8(u2_idx2);
|
| 914 |
+
+ int32_t q3 = map_uint2_idx_to_int8(u2_idx3);
|
| 915 |
+
+ *y++ = (float) (q0) * d;
|
| 916 |
+
+ *y++ = (float) (q1) * d;
|
| 917 |
+
+ *y++ = (float) (q2) * d;
|
| 918 |
+
+ *y++ = (float) (q3) * d;
|
| 919 |
+
+ }
|
| 920 |
+
+ }
|
| 921 |
+
+}
|
| 922 |
+
+
|
| 923 |
+
// ====================== "True" 2-bit (de)-quantization
|
| 924 |
+
|
| 925 |
+
void dequantize_row_iq2_xxs(const block_iq2_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k) {
|
| 926 |
+
@@ -5262,6 +5413,10 @@ bool ggml_validate_row_data(enum ggml_type type, const void * data, size_t nbyte
|
| 927 |
+
{
|
| 928 |
+
VALIDATE_ROW_DATA_D_F16_IMPL(block_tq2_0, data, nb);
|
| 929 |
+
} break;
|
| 930 |
+
+ case GGML_TYPE_Q2_0C:
|
| 931 |
+
+ {
|
| 932 |
+
+ VALIDATE_ROW_DATA_D_F16_IMPL(block_q2_0c, data, nb);
|
| 933 |
+
+ } break;
|
| 934 |
+
case GGML_TYPE_IQ1_S:
|
| 935 |
+
{
|
| 936 |
+
VALIDATE_ROW_DATA_D_F16_IMPL(block_iq1_s, data, nb);
|
| 937 |
+
diff --git a/ggml/src/ggml-quants.h b/ggml/src/ggml-quants.h
|
| 938 |
+
index 3b688f31c..7de186a94 100644
|
| 939 |
+
--- a/ggml/src/ggml-quants.h
|
| 940 |
+
+++ b/ggml/src/ggml-quants.h
|
| 941 |
+
@@ -33,6 +33,8 @@ GGML_API void quantize_row_q8_K_ref(const float * GGML_RESTRICT x, block_q8_K *
|
| 942 |
+
GGML_API void quantize_row_tq1_0_ref(const float * GGML_RESTRICT x, block_tq1_0 * GGML_RESTRICT y, int64_t k);
|
| 943 |
+
GGML_API void quantize_row_tq2_0_ref(const float * GGML_RESTRICT x, block_tq2_0 * GGML_RESTRICT y, int64_t k);
|
| 944 |
+
|
| 945 |
+
+GGML_API void quantize_row_q2_0c_ref(const float * GGML_RESTRICT x, block_q2_0c * GGML_RESTRICT y, int64_t k);
|
| 946 |
+
+
|
| 947 |
+
GGML_API void quantize_row_iq3_xxs_ref(const float * GGML_RESTRICT x, block_iq3_xxs * GGML_RESTRICT y, int64_t k);
|
| 948 |
+
GGML_API void quantize_row_iq4_nl_ref (const float * GGML_RESTRICT x, block_iq4_nl * GGML_RESTRICT y, int64_t k);
|
| 949 |
+
GGML_API void quantize_row_iq4_xs_ref (const float * GGML_RESTRICT x, block_iq4_xs * GGML_RESTRICT y, int64_t k);
|
| 950 |
+
@@ -59,6 +61,8 @@ GGML_API void dequantize_row_q8_K(const block_q8_K * GGML_RESTRICT x, float * GG
|
| 951 |
+
GGML_API void dequantize_row_tq1_0(const block_tq1_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
|
| 952 |
+
GGML_API void dequantize_row_tq2_0(const block_tq2_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
|
| 953 |
+
|
| 954 |
+
+GGML_API void dequantize_row_q2_0c(const block_q2_0c * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
|
| 955 |
+
+
|
| 956 |
+
GGML_API void dequantize_row_iq2_xxs(const block_iq2_xxs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
|
| 957 |
+
GGML_API void dequantize_row_iq2_xs (const block_iq2_xs * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
|
| 958 |
+
GGML_API void dequantize_row_iq2_s (const block_iq2_s * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k);
|
| 959 |
+
@@ -83,6 +87,8 @@ GGML_API size_t quantize_iq3_s (const float * GGML_RESTRICT src, void * GGML_RE
|
| 960 |
+
GGML_API size_t quantize_tq1_0(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
|
| 961 |
+
GGML_API size_t quantize_tq2_0(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
|
| 962 |
+
|
| 963 |
+
+GGML_API size_t quantize_q2_0c(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
|
| 964 |
+
+
|
| 965 |
+
GGML_API size_t quantize_q2_K(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
|
| 966 |
+
GGML_API size_t quantize_q3_K(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
|
| 967 |
+
GGML_API size_t quantize_q4_K(const float * GGML_RESTRICT src, void * GGML_RESTRICT dst, int64_t nrows, int64_t n_per_row, const float * imatrix);
|
| 968 |
+
diff --git a/ggml/src/ggml.c b/ggml/src/ggml.c
|
| 969 |
+
index 09b8eb466..44aaa6575 100644
|
| 970 |
+
--- a/ggml/src/ggml.c
|
| 971 |
+
+++ b/ggml/src/ggml.c
|
| 972 |
+
@@ -896,6 +896,14 @@ static const struct ggml_type_traits type_traits[GGML_TYPE_COUNT] = {
|
| 973 |
+
.type_size = 0,
|
| 974 |
+
.is_quantized = false,
|
| 975 |
+
},
|
| 976 |
+
+ [GGML_TYPE_Q2_0C] = {
|
| 977 |
+
+ .type_name = "q2_0c",
|
| 978 |
+
+ .blck_size = QKQ2_0C,
|
| 979 |
+
+ .type_size = sizeof(block_q2_0c),
|
| 980 |
+
+ .is_quantized = true,
|
| 981 |
+
+ .to_float = (ggml_to_float_t) dequantize_row_q2_0c,
|
| 982 |
+
+ .from_float_ref = (ggml_from_float_t) quantize_row_q2_0c_ref,
|
| 983 |
+
+ },
|
| 984 |
+
};
|
| 985 |
+
|
| 986 |
+
const struct ggml_type_traits * ggml_get_type_traits(enum ggml_type type) {
|
| 987 |
+
@@ -7530,6 +7538,7 @@ size_t ggml_quantize_chunk(
|
| 988 |
+
case GGML_TYPE_Q6_K: result = quantize_q6_K(src + start, (char *) dst + start_row * row_size, nrows, n_per_row, imatrix); break;
|
| 989 |
+
case GGML_TYPE_TQ1_0: result = quantize_tq1_0(src + start, (char *) dst + start_row * row_size, nrows, n_per_row, imatrix); break;
|
| 990 |
+
case GGML_TYPE_TQ2_0: result = quantize_tq2_0(src + start, (char *) dst + start_row * row_size, nrows, n_per_row, imatrix); break;
|
| 991 |
+
+ case GGML_TYPE_Q2_0C: result = quantize_q2_0c(src + start, (char *) dst + start_row * row_size, nrows, n_per_row, imatrix); break;
|
| 992 |
+
case GGML_TYPE_IQ2_XXS: result = quantize_iq2_xxs(src + start, (char *) dst + start_row * row_size, nrows, n_per_row, imatrix); break;
|
| 993 |
+
case GGML_TYPE_IQ2_XS: result = quantize_iq2_xs (src + start, (char *) dst + start_row * row_size, nrows, n_per_row, imatrix); break;
|
| 994 |
+
case GGML_TYPE_IQ3_XXS: result = quantize_iq3_xxs(src + start, (char *) dst + start_row * row_size, nrows, n_per_row, imatrix); break;
|
| 995 |
+
diff --git a/include/llama.h b/include/llama.h
|
| 996 |
+
index 1c17efb9f..947cfec58 100644
|
| 997 |
+
--- a/include/llama.h
|
| 998 |
+
+++ b/include/llama.h
|
| 999 |
+
@@ -152,6 +152,7 @@ extern "C" {
|
| 1000 |
+
LLAMA_FTYPE_MOSTLY_TQ1_0 = 36, // except 1d tensors
|
| 1001 |
+
LLAMA_FTYPE_MOSTLY_TQ2_0 = 37, // except 1d tensors
|
| 1002 |
+
LLAMA_FTYPE_MOSTLY_MXFP4_MOE = 38, // except 1d tensors
|
| 1003 |
+
+ LLAMA_FTYPE_MOSTLY_Q2_0C = 39, // except 1d tensors
|
| 1004 |
+
|
| 1005 |
+
LLAMA_FTYPE_GUESSED = 1024, // not specified in the model file
|
| 1006 |
+
};
|
| 1007 |
+
diff --git a/src/llama-quant.cpp b/src/llama-quant.cpp
|
| 1008 |
+
index 048d65a75..259c9c3db 100644
|
| 1009 |
+
--- a/src/llama-quant.cpp
|
| 1010 |
+
+++ b/src/llama-quant.cpp
|
| 1011 |
+
@@ -560,6 +560,7 @@ static void llama_model_quantize_impl(const std::string & fname_inp, const std::
|
| 1012 |
+
case LLAMA_FTYPE_MOSTLY_Q6_K: default_type = GGML_TYPE_Q6_K; break;
|
| 1013 |
+
case LLAMA_FTYPE_MOSTLY_TQ1_0: default_type = GGML_TYPE_TQ1_0; break;
|
| 1014 |
+
case LLAMA_FTYPE_MOSTLY_TQ2_0: default_type = GGML_TYPE_TQ2_0; break;
|
| 1015 |
+
+ case LLAMA_FTYPE_MOSTLY_Q2_0C: default_type = GGML_TYPE_Q2_0C; break;
|
| 1016 |
+
case LLAMA_FTYPE_MOSTLY_IQ2_XXS: default_type = GGML_TYPE_IQ2_XXS; break;
|
| 1017 |
+
case LLAMA_FTYPE_MOSTLY_IQ2_XS: default_type = GGML_TYPE_IQ2_XS; break;
|
| 1018 |
+
case LLAMA_FTYPE_MOSTLY_IQ2_S: default_type = GGML_TYPE_IQ2_XS; break;
|
| 1019 |
+
diff --git a/tools/quantize/quantize.cpp b/tools/quantize/quantize.cpp
|
| 1020 |
+
index 881f4b3dd..aea34e0e6 100644
|
| 1021 |
+
--- a/tools/quantize/quantize.cpp
|
| 1022 |
+
+++ b/tools/quantize/quantize.cpp
|
| 1023 |
+
@@ -34,6 +34,7 @@ static const std::vector<quant_option> QUANT_OPTIONS = {
|
| 1024 |
+
{ "IQ1_M", LLAMA_FTYPE_MOSTLY_IQ1_M, " 1.75 bpw quantization", },
|
| 1025 |
+
{ "TQ1_0", LLAMA_FTYPE_MOSTLY_TQ1_0, " 1.69 bpw ternarization", },
|
| 1026 |
+
{ "TQ2_0", LLAMA_FTYPE_MOSTLY_TQ2_0, " 2.06 bpw ternarization", },
|
| 1027 |
+
+ { "Q2_0C", LLAMA_FTYPE_MOSTLY_Q2_0C, " 2.06 bpw ternarization", },
|
| 1028 |
+
{ "Q2_K", LLAMA_FTYPE_MOSTLY_Q2_K, " 2.96G, +3.5199 ppl @ Llama-3-8B", },
|
| 1029 |
+
{ "Q2_K_S", LLAMA_FTYPE_MOSTLY_Q2_K_S, " 2.96G, +3.1836 ppl @ Llama-3-8B", },
|
| 1030 |
+
{ "IQ3_XXS", LLAMA_FTYPE_MOSTLY_IQ3_XXS, " 3.06 bpw quantization", },
|
| 1031 |
+
--
|
| 1032 |
+
2.39.5 (Apple Git-154)
|
| 1033 |
+
|
LICENSE
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
TENCENT HUNYUAN COMMUNITY LICENSE AGREEMENT
|
| 2 |
+
Tencent Hunyuan 1.8B Release Date: August 4, 2025
|
| 3 |
+
THIS LICENSE AGREEMENT DOES NOT APPLY IN THE EUROPEAN UNION, UNITED KINGDOM AND SOUTH KOREA AND IS EXPRESSLY LIMITED TO THE TERRITORY, AS DEFINED BELOW.
|
| 4 |
+
By clicking to agree or by using, reproducing, modifying, distributing, performing or displaying any portion or element of the Tencent Hunyuan Works, including via any Hosted Service, You will be deemed to have recognized and accepted the content of this Agreement, which is effective immediately.
|
| 5 |
+
1. DEFINITIONS.
|
| 6 |
+
a. “Acceptable Use Policy” shall mean the policy made available by Tencent as set forth in the Exhibit A.
|
| 7 |
+
b. “Agreement” shall mean the terms and conditions for use, reproduction, distribution, modification, performance and displaying of Tencent Hunyuan Works or any portion or element thereof set forth herein.
|
| 8 |
+
c. “Documentation” shall mean the specifications, manuals and documentation for Tencent Hunyuan made publicly available by Tencent.
|
| 9 |
+
d. “Hosted Service” shall mean a hosted service offered via an application programming interface (API), web access, or any other electronic or remote means.
|
| 10 |
+
e. “Licensee,” “You” or “Your” shall mean a natural person or legal entity exercising the rights granted by this Agreement and/or using the Tencent Hunyuan Works for any purpose and in any field of use.
|
| 11 |
+
f. “Materials” shall mean, collectively, Tencent’s proprietary Tencent Hunyuan and Documentation (and any portion thereof) as made available by Tencent under this Agreement.
|
| 12 |
+
g. “Model Derivatives” shall mean all: (i) modifications to Tencent Hunyuan or any Model Derivative of Tencent Hunyuan; (ii) works based on Tencent Hunyuan or any Model Derivative of Tencent Hunyuan; or (iii) any other machine learning model which is created by transfer of patterns of the weights, parameters, operations, or Output of Tencent Hunyuan or any Model Derivative of Tencent Hunyuan, to that model in order to cause that model to perform similarly to Tencent Hunyuan or a Model Derivative of Tencent Hunyuan, including distillation methods, methods that use intermediate data representations, or methods based on the generation of synthetic data Outputs by Tencent Hunyuan or a Model Derivative of Tencent Hunyuan for training that model. For clarity, Outputs by themselves are not deemed Model Derivatives.
|
| 13 |
+
h. “Output” shall mean the information and/or content output of Tencent Hunyuan or a Model Derivative that results from operating or otherwise using Tencent Hunyuan or a Model Derivative, including via a Hosted Service.
|
| 14 |
+
i. “Tencent,” “We” or “Us” shall mean the applicable entity or entities in the Tencent corporate family that own(s) intellectual property or other rights embodied in or utilized by the Materials.
|
| 15 |
+
j. “Tencent Hunyuan” shall mean the large language models, text/image/video/audio/3D generation models, and multimodal large language models and their software and algorithms, including trained model weights, parameters (including optimizer states), machine-learning model code, inference-enabling code, training-enabling code, fine-tuning enabling code and other elements of the foregoing made publicly available by Us, including, without limitation to, Tencent Hunyuan 1.8B released at [https://github.com/Tencent-Hunyuan/Hunyuan-1.8B].
|
| 16 |
+
k. “Tencent Hunyuan Works” shall mean: (i) the Materials; (ii) Model Derivatives; and (iii) all derivative works thereof.
|
| 17 |
+
l. “Territory” shall mean the worldwide territory, excluding the territory of the European Union, United Kingdom and South Korea.
|
| 18 |
+
m. “Third Party” or “Third Parties” shall mean individuals or legal entities that are not under common control with Us or You.
|
| 19 |
+
n. “including” shall mean including but not limited to.
|
| 20 |
+
2. GRANT OF RIGHTS.
|
| 21 |
+
We grant You, for the Territory only, a non-exclusive, non-transferable and royalty-free limited license under Tencent’s intellectual property or other rights owned by Us embodied in or utilized by the Materials to use, reproduce, distribute, create derivative works of (including Model Derivatives), and make modifications to the Materials, only in accordance with the terms of this Agreement and the Acceptable Use Policy, and You must not violate (or encourage or permit anyone else to violate) any term of this Agreement or the Acceptable Use Policy.
|
| 22 |
+
3. DISTRIBUTION.
|
| 23 |
+
You may, subject to Your compliance with this Agreement, distribute or make available to Third Parties the Tencent Hunyuan Works, exclusively in the Territory, provided that You meet all of the following conditions:
|
| 24 |
+
a. You must provide all such Third Party recipients of the Tencent Hunyuan Works or products or services using them a copy of this Agreement;
|
| 25 |
+
b. You must cause any modified files to carry prominent notices stating that You changed the files;
|
| 26 |
+
c. You are encouraged to: (i) publish at least one technology introduction blogpost or one public statement expressing Your experience of using the Tencent Hunyuan Works; and (ii) mark the products or services developed by using the Tencent Hunyuan Works to indicate that the product/service is “Powered by Tencent Hunyuan”; and
|
| 27 |
+
d. All distributions to Third Parties (other than through a Hosted Service) must be accompanied by a “Notice” text file that contains the following notice: “Tencent Hunyuan is licensed under the Tencent Hunyuan Community License Agreement, Copyright © 2025 Tencent. All Rights Reserved. The trademark rights of “Tencent Hunyuan” are owned by Tencent or its affiliate.”
|
| 28 |
+
You may add Your own copyright statement to Your modifications and, except as set forth in this Section and in Section 5, may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Model Derivatives as a whole, provided Your use, reproduction, modification, distribution, performance and display of the work otherwise complies with the terms and conditions of this Agreement (including as regards the Territory). If You receive Tencent Hunyuan Works from a Licensee as part of an integrated end user product, then this Section 3 of this Agreement will not apply to You.
|
| 29 |
+
4. ADDITIONAL COMMERCIAL TERMS.
|
| 30 |
+
If, on the Tencent Hunyuan version release date, the monthly active users of all products or services made available by or for Licensee is greater than 100 million monthly active users in the preceding calendar month, You must request a license from Tencent, which Tencent may grant to You in its sole discretion, and You are not authorized to exercise any of the rights under this Agreement unless or until Tencent otherwise expressly grants You such rights.
|
| 31 |
+
5. RULES OF USE.
|
| 32 |
+
a. Your use of the Tencent Hunyuan Works must comply with applicable laws and regulations (including trade compliance laws and regulations) and adhere to the Acceptable Use Policy for the Tencent Hunyuan Works, which is hereby incorporated by reference into this Agreement. You must include the use restrictions referenced in these Sections 5(a) and 5(b) as an enforceable provision in any agreement (e.g., license agreement, terms of use, etc.) governing the use and/or distribution of Tencent Hunyuan Works and You must provide notice to subsequent users to whom You distribute that Tencent Hunyuan Works are subject to the use restrictions in these Sections 5(a) and 5(b).
|
| 33 |
+
b. You must not use the Tencent Hunyuan Works or any Output or results of the Tencent Hunyuan Works to improve any other AI model (other than Tencent Hunyuan or Model Derivatives thereof).
|
| 34 |
+
c. You must not use, reproduce, modify, distribute, or display the Tencent Hunyuan Works, Output or results of the Tencent Hunyuan Works outside the Territory. Any such use outside the Territory is unlicensed and unauthorized under this Agreement.
|
| 35 |
+
6. INTELLECTUAL PROPERTY.
|
| 36 |
+
a. Subject to Tencent’s ownership of Tencent Hunyuan Works made by or for Tencent and intellectual property rights therein, conditioned upon Your compliance with the terms and conditions of this Agreement, as between You and Tencent, You will be the owner of any derivative works and modifications of the Materials and any Model Derivatives that are made by or for You.
|
| 37 |
+
b. No trademark licenses are granted under this Agreement, and in connection with the Tencent Hunyuan Works, Licensee may not use any name or mark owned by or associated with Tencent or any of its affiliates, except as required for reasonable and customary use in describing and distributing the Tencent Hunyuan Works. Tencent hereby grants You a license to use “Tencent Hunyuan” (the “Mark”) in the Territory solely as required to comply with the provisions of Section 3(c), provided that You comply with any applicable laws related to trademark protection. All goodwill arising out of Your use of the Mark will inure to the benefit of Tencent.
|
| 38 |
+
c. If You commence a lawsuit or other proceedings (including a cross-claim or counterclaim in a lawsuit) against Us or any person or entity alleging that the Materials or any Output, or any portion of any of the foregoing, infringe any intellectual property or other right owned or licensable by You, then all licenses granted to You under this Agreement shall terminate as of the date such lawsuit or other proceeding is filed. You will defend, indemnify and hold harmless Us from and against any claim by any Third Party arising out of or related to Your or the Third Party’s use or distribution of the Tencent Hunyuan Works.
|
| 39 |
+
d. Tencent claims no rights in Outputs You generate. You and Your users are solely responsible for Outputs and their subsequent uses.
|
| 40 |
+
7. DISCLAIMERS OF WARRANTY AND LIMITATIONS OF LIABILITY.
|
| 41 |
+
a. We are not obligated to support, update, provide training for, or develop any further version of the Tencent Hunyuan Works or to grant any license thereto.
|
| 42 |
+
b. UNLESS AND ONLY TO THE EXTENT REQUIRED BY APPLICABLE LAW, THE TENCENT HUNYUAN WORKS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED “AS IS” WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND INCLUDING ANY WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, COURSE OF DEALING, USAGE OF TRADE, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING, REPRODUCING, MODIFYING, PERFORMING, DISPLAYING OR DISTRIBUTING ANY OF THE TENCENT HUNYUAN WORKS OR OUTPUTS AND ASSUME ANY AND ALL RISKS ASSOCIATED WITH YOUR OR A THIRD PARTY’S USE OR DISTRIBUTION OF ANY OF THE TENCENT HUNYUAN WORKS OR OUTPUTS AND YOUR EXERCISE OF RIGHTS AND PERMISSIONS UNDER THIS AGREEMENT.
|
| 43 |
+
c. TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL TENCENT OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, FOR ANY DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL OR PUNITIVE DAMAGES, OR LOST PROFITS OF ANY KIND ARISING FROM THIS AGREEMENT OR RELATED TO ANY OF THE TENCENT HUNYUAN WORKS OR OUTPUTS, EVEN IF TENCENT OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
|
| 44 |
+
8. SURVIVAL AND TERMINATION.
|
| 45 |
+
a. The term of this Agreement shall commence upon Your acceptance of this Agreement or access to the Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein.
|
| 46 |
+
b. We may terminate this Agreement if You breach any of the terms or conditions of this Agreement. Upon termination of this Agreement, You must promptly delete and cease use of the Tencent Hunyuan Works. Sections 6(a), 6(c), 7 and 9 shall survive the termination of this Agreement.
|
| 47 |
+
9. GOVERNING LAW AND JURISDICTION.
|
| 48 |
+
a. This Agreement and any dispute arising out of or relating to it will be governed by the laws of the Hong Kong Special Administrative Region of the People’s Republic of China, without regard to conflict of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement.
|
| 49 |
+
b. Exclusive jurisdiction and venue for any dispute arising out of or relating to this Agreement will be a court of competent jurisdiction in the Hong Kong Special Administrative Region of the People’s Republic of China, and Tencent and Licensee consent to the exclusive jurisdiction of such court with respect to any such dispute.
|
| 50 |
+
|
| 51 |
+
EXHIBIT A
|
| 52 |
+
ACCEPTABLE USE POLICY
|
| 53 |
+
|
| 54 |
+
Tencent reserves the right to update this Acceptable Use Policy from time to time.
|
| 55 |
+
Last modified: November 5, 2024
|
| 56 |
+
|
| 57 |
+
Tencent endeavors to promote safe and fair use of its tools and features, including Tencent Hunyuan. You agree not to use Tencent Hunyuan or Model Derivatives:
|
| 58 |
+
1. Outside the Territory;
|
| 59 |
+
2. In any way that violates any applicable national, federal, state, local, international or any other law or regulation;
|
| 60 |
+
3. To harm Yourself or others;
|
| 61 |
+
4. To repurpose or distribute output from Tencent Hunyuan or any Model Derivatives to harm Yourself or others;
|
| 62 |
+
5. To override or circumvent the safety guardrails and safeguards We have put in place;
|
| 63 |
+
6. For the purpose of exploiting, harming or attempting to exploit or harm minors in any way;
|
| 64 |
+
7. To generate or disseminate verifiably false information and/or content with the purpose of harming others or influencing elections;
|
| 65 |
+
8. To generate or facilitate false online engagement, including fake reviews and other means of fake online engagement;
|
| 66 |
+
9. To intentionally defame, disparage or otherwise harass others;
|
| 67 |
+
10. To generate and/or disseminate malware (including ransomware) or any other content to be used for the purpose of harming electronic systems;
|
| 68 |
+
11. To generate or disseminate personal identifiable information with the purpose of harming others;
|
| 69 |
+
12. To generate or disseminate information (including images, code, posts, articles), and place the information in any public context (including –through the use of bot generated tweets), without expressly and conspicuously identifying that the information and/or content is machine generated;
|
| 70 |
+
13. To impersonate another individual without consent, authorization, or legal right;
|
| 71 |
+
14. To make high-stakes automated decisions in domains that affect an individual’s safety, rights or wellbeing (e.g., law enforcement, migration, medicine/health, management of critical infrastructure, safety components of products, essential services, credit, employment, housing, education, social scoring, or insurance);
|
| 72 |
+
15. In a manner that violates or disrespects the social ethics and moral standards of other countries or regions;
|
| 73 |
+
16. To perform, facilitate, threaten, incite, plan, promote or encourage violent extremism or terrorism;
|
| 74 |
+
17. For any use intended to discriminate against or harm individuals or groups based on protected characteristics or categories, online or offline social behavior or known or predicted personal or personality characteristics;
|
| 75 |
+
18. To intentionally exploit any of the vulnerabilities of a specific group of persons based on their age, social, physical or mental characteristics, in order to materially distort the behavior of a person pertaining to that group in a manner that causes or is likely to cause that person or another person physical or psychological harm;
|
| 76 |
+
19. For military purposes;
|
| 77 |
+
20. To engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or other professional practices.
|
LICENSE.txt
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
TENCENT HUNYUAN COMMUNITY LICENSE AGREEMENT
|
| 2 |
+
Tencent Hunyuan 7B Release Date: August 4, 2025
|
| 3 |
+
THIS LICENSE AGREEMENT DOES NOT APPLY IN THE EUROPEAN UNION, UNITED KINGDOM AND SOUTH KOREA AND IS EXPRESSLY LIMITED TO THE TERRITORY, AS DEFINED BELOW.
|
| 4 |
+
By clicking to agree or by using, reproducing, modifying, distributing, performing or displaying any portion or element of the Tencent Hunyuan Works, including via any Hosted Service, You will be deemed to have recognized and accepted the content of this Agreement, which is effective immediately.
|
| 5 |
+
1. DEFINITIONS.
|
| 6 |
+
a. “Acceptable Use Policy” shall mean the policy made available by Tencent as set forth in the Exhibit A.
|
| 7 |
+
b. “Agreement” shall mean the terms and conditions for use, reproduction, distribution, modification, performance and displaying of Tencent Hunyuan Works or any portion or element thereof set forth herein.
|
| 8 |
+
c. “Documentation” shall mean the specifications, manuals and documentation for Tencent Hunyuan made publicly available by Tencent.
|
| 9 |
+
d. “Hosted Service” shall mean a hosted service offered via an application programming interface (API), web access, or any other electronic or remote means.
|
| 10 |
+
e. “Licensee,” “You” or “Your” shall mean a natural person or legal entity exercising the rights granted by this Agreement and/or using the Tencent Hunyuan Works for any purpose and in any field of use.
|
| 11 |
+
f. “Materials” shall mean, collectively, Tencent’s proprietary Tencent Hunyuan and Documentation (and any portion thereof) as made available by Tencent under this Agreement.
|
| 12 |
+
g. “Model Derivatives” shall mean all: (i) modifications to Tencent Hunyuan or any Model Derivative of Tencent Hunyuan; (ii) works based on Tencent Hunyuan or any Model Derivative of Tencent Hunyuan; or (iii) any other machine learning model which is created by transfer of patterns of the weights, parameters, operations, or Output of Tencent Hunyuan or any Model Derivative of Tencent Hunyuan, to that model in order to cause that model to perform similarly to Tencent Hunyuan or a Model Derivative of Tencent Hunyuan, including distillation methods, methods that use intermediate data representations, or methods based on the generation of synthetic data Outputs by Tencent Hunyuan or a Model Derivative of Tencent Hunyuan for training that model. For clarity, Outputs by themselves are not deemed Model Derivatives.
|
| 13 |
+
h. “Output” shall mean the information and/or content output of Tencent Hunyuan or a Model Derivative that results from operating or otherwise using Tencent Hunyuan or a Model Derivative, including via a Hosted Service.
|
| 14 |
+
i. “Tencent,” “We” or “Us” shall mean the applicable entity or entities in the Tencent corporate family that own(s) intellectual property or other rights embodied in or utilized by the Materials.
|
| 15 |
+
j. “Tencent Hunyuan” shall mean the large language models, text/image/video/audio/3D generation models, and multimodal large language models and their software and algorithms, including trained model weights, parameters (including optimizer states), machine-learning model code, inference-enabling code, training-enabling code, fine-tuning enabling code and other elements of the foregoing made publicly available by Us, including, without limitation to, Tencent Hunyuan 7B released at [https://github.com/Tencent-Hunyuan/Hunyuan-7B].
|
| 16 |
+
k. “Tencent Hunyuan Works” shall mean: (i) the Materials; (ii) Model Derivatives; and (iii) all derivative works thereof.
|
| 17 |
+
l. “Territory” shall mean the worldwide territory, excluding the territory of the European Union, United Kingdom and South Korea.
|
| 18 |
+
m. “Third Party” or “Third Parties” shall mean individuals or legal entities that are not under common control with Us or You.
|
| 19 |
+
n. “including” shall mean including but not limited to.
|
| 20 |
+
2. GRANT OF RIGHTS.
|
| 21 |
+
We grant You, for the Territory only, a non-exclusive, non-transferable and royalty-free limited license under Tencent’s intellectual property or other rights owned by Us embodied in or utilized by the Materials to use, reproduce, distribute, create derivative works of (including Model Derivatives), and make modifications to the Materials, only in accordance with the terms of this Agreement and the Acceptable Use Policy, and You must not violate (or encourage or permit anyone else to violate) any term of this Agreement or the Acceptable Use Policy.
|
| 22 |
+
3. DISTRIBUTION.
|
| 23 |
+
You may, subject to Your compliance with this Agreement, distribute or make available to Third Parties the Tencent Hunyuan Works, exclusively in the Territory, provided that You meet all of the following conditions:
|
| 24 |
+
a. You must provide all such Third Party recipients of the Tencent Hunyuan Works or products or services using them a copy of this Agreement;
|
| 25 |
+
b. You must cause any modified files to carry prominent notices stating that You changed the files;
|
| 26 |
+
c. You are encouraged to: (i) publish at least one technology introduction blogpost or one public statement expressing Your experience of using the Tencent Hunyuan Works; and (ii) mark the products or services developed by using the Tencent Hunyuan Works to indicate that the product/service is “Powered by Tencent Hunyuan”; and
|
| 27 |
+
d. All distributions to Third Parties (other than through a Hosted Service) must be accompanied by a “Notice” text file that contains the following notice: “Tencent Hunyuan is licensed under the Tencent Hunyuan Community License Agreement, Copyright © 2025 Tencent. All Rights Reserved. The trademark rights of “Tencent Hunyuan” are owned by Tencent or its affiliate.”
|
| 28 |
+
You may add Your own copyright statement to Your modifications and, except as set forth in this Section and in Section 5, may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Model Derivatives as a whole, provided Your use, reproduction, modification, distribution, performance and display of the work otherwise complies with the terms and conditions of this Agreement (including as regards the Territory). If You receive Tencent Hunyuan Works from a Licensee as part of an integrated end user product, then this Section 3 of this Agreement will not apply to You.
|
| 29 |
+
4. ADDITIONAL COMMERCIAL TERMS.
|
| 30 |
+
If, on the Tencent Hunyuan version release date, the monthly active users of all products or services made available by or for Licensee is greater than 100 million monthly active users in the preceding calendar month, You must request a license from Tencent, which Tencent may grant to You in its sole discretion, and You are not authorized to exercise any of the rights under this Agreement unless or until Tencent otherwise expressly grants You such rights.
|
| 31 |
+
5. RULES OF USE.
|
| 32 |
+
a. Your use of the Tencent Hunyuan Works must comply with applicable laws and regulations (including trade compliance laws and regulations) and adhere to the Acceptable Use Policy for the Tencent Hunyuan Works, which is hereby incorporated by reference into this Agreement. You must include the use restrictions referenced in these Sections 5(a) and 5(b) as an enforceable provision in any agreement (e.g., license agreement, terms of use, etc.) governing the use and/or distribution of Tencent Hunyuan Works and You must provide notice to subsequent users to whom You distribute that Tencent Hunyuan Works are subject to the use restrictions in these Sections 5(a) and 5(b).
|
| 33 |
+
b. You must not use the Tencent Hunyuan Works or any Output or results of the Tencent Hunyuan Works to improve any other AI model (other than Tencent Hunyuan or Model Derivatives thereof).
|
| 34 |
+
c. You must not use, reproduce, modify, distribute, or display the Tencent Hunyuan Works, Output or results of the Tencent Hunyuan Works outside the Territory. Any such use outside the Territory is unlicensed and unauthorized under this Agreement.
|
| 35 |
+
6. INTELLECTUAL PROPERTY.
|
| 36 |
+
a. Subject to Tencent’s ownership of Tencent Hunyuan Works made by or for Tencent and intellectual property rights therein, conditioned upon Your compliance with the terms and conditions of this Agreement, as between You and Tencent, You will be the owner of any derivative works and modifications of the Materials and any Model Derivatives that are made by or for You.
|
| 37 |
+
b. No trademark licenses are granted under this Agreement, and in connection with the Tencent Hunyuan Works, Licensee may not use any name or mark owned by or associated with Tencent or any of its affiliates, except as required for reasonable and customary use in describing and distributing the Tencent Hunyuan Works. Tencent hereby grants You a license to use “Tencent Hunyuan” (the “Mark”) in the Territory solely as required to comply with the provisions of Section 3(c), provided that You comply with any applicable laws related to trademark protection. All goodwill arising out of Your use of the Mark will inure to the benefit of Tencent.
|
| 38 |
+
c. If You commence a lawsuit or other proceedings (including a cross-claim or counterclaim in a lawsuit) against Us or any person or entity alleging that the Materials or any Output, or any portion of any of the foregoing, infringe any intellectual property or other right owned or licensable by You, then all licenses granted to You under this Agreement shall terminate as of the date such lawsuit or other proceeding is filed. You will defend, indemnify and hold harmless Us from and against any claim by any Third Party arising out of or related to Your or the Third Party’s use or distribution of the Tencent Hunyuan Works.
|
| 39 |
+
d. Tencent claims no rights in Outputs You generate. You and Your users are solely responsible for Outputs and their subsequent uses.
|
| 40 |
+
7. DISCLAIMERS OF WARRANTY AND LIMITATIONS OF LIABILITY.
|
| 41 |
+
a. We are not obligated to support, update, provide training for, or develop any further version of the Tencent Hunyuan Works or to grant any license thereto.
|
| 42 |
+
b. UNLESS AND ONLY TO THE EXTENT REQUIRED BY APPLICABLE LAW, THE TENCENT HUNYUAN WORKS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED “AS IS” WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OF ANY KIND INCLUDING ANY WARRANTIES OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, COURSE OF DEALING, USAGE OF TRADE, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING, REPRODUCING, MODIFYING, PERFORMING, DISPLAYING OR DISTRIBUTING ANY OF THE TENCENT HUNYUAN WORKS OR OUTPUTS AND ASSUME ANY AND ALL RISKS ASSOCIATED WITH YOUR OR A THIRD PARTY’S USE OR DISTRIBUTION OF ANY OF THE TENCENT HUNYUAN WORKS OR OUTPUTS AND YOUR EXERCISE OF RIGHTS AND PERMISSIONS UNDER THIS AGREEMENT.
|
| 43 |
+
c. TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL TENCENT OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, FOR ANY DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL OR PUNITIVE DAMAGES, OR LOST PROFITS OF ANY KIND ARISING FROM THIS AGREEMENT OR RELATED TO ANY OF THE TENCENT HUNYUAN WORKS OR OUTPUTS, EVEN IF TENCENT OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
|
| 44 |
+
8. SURVIVAL AND TERMINATION.
|
| 45 |
+
a. The term of this Agreement shall commence upon Your acceptance of this Agreement or access to the Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein.
|
| 46 |
+
b. We may terminate this Agreement if You breach any of the terms or conditions of this Agreement. Upon termination of this Agreement, You must promptly delete and cease use of the Tencent Hunyuan Works. Sections 6(a), 6(c), 7 and 9 shall survive the termination of this Agreement.
|
| 47 |
+
9. GOVERNING LAW AND JURISDICTION.
|
| 48 |
+
a. This Agreement and any dispute arising out of or relating to it will be governed by the laws of the Hong Kong Special Administrative Region of the People’s Republic of China, without regard to conflict of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement.
|
| 49 |
+
b. Exclusive jurisdiction and venue for any dispute arising out of or relating to this Agreement will be a court of competent jurisdiction in the Hong Kong Special Administrative Region of the People’s Republic of China, and Tencent and Licensee consent to the exclusive jurisdiction of such court with respect to any such dispute.
|
| 50 |
+
|
| 51 |
+
EXHIBIT A
|
| 52 |
+
ACCEPTABLE USE POLICY
|
| 53 |
+
|
| 54 |
+
Tencent reserves the right to update this Acceptable Use Policy from time to time.
|
| 55 |
+
Last modified: November 5, 2024
|
| 56 |
+
|
| 57 |
+
Tencent endeavors to promote safe and fair use of its tools and features, including Tencent Hunyuan. You agree not to use Tencent Hunyuan or Model Derivatives:
|
| 58 |
+
1. Outside the Territory;
|
| 59 |
+
2. In any way that violates any applicable national, federal, state, local, international or any other law or regulation;
|
| 60 |
+
3. To harm Yourself or others;
|
| 61 |
+
4. To repurpose or distribute output from Tencent Hunyuan or any Model Derivatives to harm Yourself or others;
|
| 62 |
+
5. To override or circumvent the safety guardrails and safeguards We have put in place;
|
| 63 |
+
6. For the purpose of exploiting, harming or attempting to exploit or harm minors in any way;
|
| 64 |
+
7. To generate or disseminate verifiably false information and/or content with the purpose of harming others or influencing elections;
|
| 65 |
+
8. To generate or facilitate false online engagement, including fake reviews and other means of fake online engagement;
|
| 66 |
+
9. To intentionally defame, disparage or otherwise harass others;
|
| 67 |
+
10. To generate and/or disseminate malware (including ransomware) or any other content to be used for the purpose of harming electronic systems;
|
| 68 |
+
11. To generate or disseminate personal identifiable information with the purpose of harming others;
|
| 69 |
+
12. To generate or disseminate information (including images, code, posts, articles), and place the information in any public context (including –through the use of bot generated tweets), without expressly and conspicuously identifying that the information and/or content is machine generated;
|
| 70 |
+
13. To impersonate another individual without consent, authorization, or legal right;
|
| 71 |
+
14. To make high-stakes automated decisions in domains that affect an individual’s safety, rights or wellbeing (e.g., law enforcement, migration, medicine/health, management of critical infrastructure, safety components of products, essential services, credit, employment, housing, education, social scoring, or insurance);
|
| 72 |
+
15. In a manner that violates or disrespects the social ethics and moral standards of other countries or regions;
|
| 73 |
+
16. To perform, facilitate, threaten, incite, plan, promote or encourage violent extremism or terrorism;
|
| 74 |
+
17. For any use intended to discriminate against or harm individuals or groups based on protected characteristics or categories, online or offline social behavior or known or predicted personal or personality characteristics;
|
| 75 |
+
18. To intentionally exploit any of the vulnerabilities of a specific group of persons based on their age, social, physical or mental characteristics, in order to materially distort the behavior of a person pertaining to that group in a manner that causes or is likely to cause that person or another person physical or psychological harm;
|
| 76 |
+
19. For military purposes;
|
| 77 |
+
20. To engage in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or other professional practices.
|
License_AngelSlim_model_and_dataset.txt
ADDED
|
@@ -0,0 +1,615 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Tencent is pleased to support the open source community by making AngelSlim available.
|
| 2 |
+
|
| 3 |
+
Copyright (C) 2025 Tencent. All rights reserved. The below datasets and/or models in this distribution may have been modified by Tencent ("Tencent Modifications"). All Tencent Modifications are Copyright (C) Tencent.
|
| 4 |
+
|
| 5 |
+
AngelSlim is licensed under the Apache 2.0 except for the third-party components listed below, which is licensed under different terms. AngelSlim does not impose any additional limitations beyond what is outlined in the respective licenses of these third-party components. Users must comply with all terms and conditions of original licenses of these third-party components and must ensure that the usage of the third party components adheres to all relevant laws and regulations.
|
| 6 |
+
|
| 7 |
+
For avoidance of doubts, AngelSlim refers to the datasets and models made publicly available by Tencent in accordance with the Apache 2.0 in this repository.
|
| 8 |
+
|
| 9 |
+
Terms of the Apache License Version 2.0:
|
| 10 |
+
--------------------------------------------------------------------
|
| 11 |
+
Apache License
|
| 12 |
+
|
| 13 |
+
Version 2.0, January 2004
|
| 14 |
+
|
| 15 |
+
http://www.apache.org/licenses/
|
| 16 |
+
|
| 17 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 18 |
+
1. Definitions.
|
| 19 |
+
|
| 20 |
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
| 21 |
+
|
| 22 |
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
| 23 |
+
|
| 24 |
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
| 25 |
+
|
| 26 |
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
| 27 |
+
|
| 28 |
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
| 31 |
+
|
| 32 |
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
| 33 |
+
|
| 34 |
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
| 35 |
+
|
| 36 |
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
| 37 |
+
|
| 38 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
| 39 |
+
|
| 40 |
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
| 41 |
+
|
| 42 |
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
| 43 |
+
|
| 44 |
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
| 45 |
+
|
| 46 |
+
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
| 47 |
+
|
| 48 |
+
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
| 49 |
+
|
| 50 |
+
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
| 51 |
+
|
| 52 |
+
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
| 53 |
+
|
| 54 |
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
| 55 |
+
|
| 56 |
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
| 57 |
+
|
| 58 |
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
| 59 |
+
|
| 60 |
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
| 61 |
+
|
| 62 |
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
| 63 |
+
|
| 64 |
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
| 65 |
+
|
| 66 |
+
END OF TERMS AND CONDITIONS
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
Other dependencies and licenses:
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
Open Source Dataset Licensed under the CC BY 4.0:
|
| 74 |
+
The below dataset in this distribution may have been modified by Tencent ("Tencent Modifications"). All Tencent Modifications are Copyright (C) 2025 Tencent.
|
| 75 |
+
--------------------------------------------------------------------
|
| 76 |
+
1. sharegpt_gpt4.jsonl
|
| 77 |
+
Copryight (c) sharegpt_gpt4.jsonl original author and authors
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
Terms of the CC BY 4.0:
|
| 81 |
+
--------------------------------------------------------------------
|
| 82 |
+
Attribution 4.0 International
|
| 83 |
+
|
| 84 |
+
=======================================================================
|
| 85 |
+
|
| 86 |
+
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
| 87 |
+
does not provide legal services or legal advice. Distribution of
|
| 88 |
+
Creative Commons public licenses does not create a lawyer-client or
|
| 89 |
+
other relationship. Creative Commons makes its licenses and related
|
| 90 |
+
information available on an "as-is" basis. Creative Commons gives no
|
| 91 |
+
warranties regarding its licenses, any material licensed under their
|
| 92 |
+
terms and conditions, or any related information. Creative Commons
|
| 93 |
+
disclaims all liability for damages resulting from their use to the
|
| 94 |
+
fullest extent possible.
|
| 95 |
+
|
| 96 |
+
Using Creative Commons Public Licenses
|
| 97 |
+
|
| 98 |
+
Creative Commons public licenses provide a standard set of terms and
|
| 99 |
+
conditions that creators and other rights holders may use to share
|
| 100 |
+
original works of authorship and other material subject to copyright
|
| 101 |
+
and certain other rights specified in the public license below. The
|
| 102 |
+
following considerations are for informational purposes only, are not
|
| 103 |
+
exhaustive, and do not form part of our licenses.
|
| 104 |
+
|
| 105 |
+
Considerations for licensors: Our public licenses are
|
| 106 |
+
intended for use by those authorized to give the public
|
| 107 |
+
permission to use material in ways otherwise restricted by
|
| 108 |
+
copyright and certain other rights. Our licenses are
|
| 109 |
+
irrevocable. Licensors should read and understand the terms
|
| 110 |
+
and conditions of the license they choose before applying it.
|
| 111 |
+
Licensors should also secure all rights necessary before
|
| 112 |
+
applying our licenses so that the public can reuse the
|
| 113 |
+
material as expected. Licensors should clearly mark any
|
| 114 |
+
material not subject to the license. This includes other CC-
|
| 115 |
+
licensed material, or material used under an exception or
|
| 116 |
+
limitation to copyright. More considerations for licensors:
|
| 117 |
+
wiki.creativecommons.org/Considerations_for_licensors
|
| 118 |
+
|
| 119 |
+
Considerations for the public: By using one of our public
|
| 120 |
+
licenses, a licensor grants the public permission to use the
|
| 121 |
+
licensed material under specified terms and conditions. If
|
| 122 |
+
the licensor's permission is not necessary for any reason--for
|
| 123 |
+
example, because of any applicable exception or limitation to
|
| 124 |
+
copyright--then that use is not regulated by the license. Our
|
| 125 |
+
licenses grant only permissions under copyright and certain
|
| 126 |
+
other rights that a licensor has authority to grant. Use of
|
| 127 |
+
the licensed material may still be restricted for other
|
| 128 |
+
reasons, including because others have copyright or other
|
| 129 |
+
rights in the material. A licensor may make special requests,
|
| 130 |
+
such as asking that all changes be marked or described.
|
| 131 |
+
Although not required by our licenses, you are encouraged to
|
| 132 |
+
respect those requests where reasonable. More considerations
|
| 133 |
+
for the public:
|
| 134 |
+
wiki.creativecommons.org/Considerations_for_licensees
|
| 135 |
+
|
| 136 |
+
=======================================================================
|
| 137 |
+
|
| 138 |
+
Creative Commons Attribution 4.0 International Public License
|
| 139 |
+
|
| 140 |
+
By exercising the Licensed Rights (defined below), You accept and agree
|
| 141 |
+
to be bound by the terms and conditions of this Creative Commons
|
| 142 |
+
Attribution 4.0 International Public License ("Public License"). To the
|
| 143 |
+
extent this Public License may be interpreted as a contract, You are
|
| 144 |
+
granted the Licensed Rights in consideration of Your acceptance of
|
| 145 |
+
these terms and conditions, and the Licensor grants You such rights in
|
| 146 |
+
consideration of benefits the Licensor receives from making the
|
| 147 |
+
Licensed Material available under these terms and conditions.
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
Section 1 -- Definitions.
|
| 151 |
+
|
| 152 |
+
a. Adapted Material means material subject to Copyright and Similar
|
| 153 |
+
Rights that is derived from or based upon the Licensed Material
|
| 154 |
+
and in which the Licensed Material is translated, altered,
|
| 155 |
+
arranged, transformed, or otherwise modified in a manner requiring
|
| 156 |
+
permission under the Copyright and Similar Rights held by the
|
| 157 |
+
Licensor. For purposes of this Public License, where the Licensed
|
| 158 |
+
Material is a musical work, performance, or sound recording,
|
| 159 |
+
Adapted Material is always produced where the Licensed Material is
|
| 160 |
+
synched in timed relation with a moving image.
|
| 161 |
+
|
| 162 |
+
b. Adapter's License means the license You apply to Your Copyright
|
| 163 |
+
and Similar Rights in Your contributions to Adapted Material in
|
| 164 |
+
accordance with the terms and conditions of this Public License.
|
| 165 |
+
|
| 166 |
+
c. Copyright and Similar Rights means copyright and/or similar rights
|
| 167 |
+
closely related to copyright including, without limitation,
|
| 168 |
+
performance, broadcast, sound recording, and Sui Generis Database
|
| 169 |
+
Rights, without regard to how the rights are labeled or
|
| 170 |
+
categorized. For purposes of this Public License, the rights
|
| 171 |
+
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
| 172 |
+
Rights.
|
| 173 |
+
|
| 174 |
+
d. Effective Technological Measures means those measures that, in the
|
| 175 |
+
absence of proper authority, may not be circumvented under laws
|
| 176 |
+
fulfilling obligations under Article 11 of the WIPO Copyright
|
| 177 |
+
Treaty adopted on December 20, 1996, and/or similar international
|
| 178 |
+
agreements.
|
| 179 |
+
|
| 180 |
+
e. Exceptions and Limitations means fair use, fair dealing, and/or
|
| 181 |
+
any other exception or limitation to Copyright and Similar Rights
|
| 182 |
+
that applies to Your use of the Licensed Material.
|
| 183 |
+
|
| 184 |
+
f. Licensed Material means the artistic or literary work, database,
|
| 185 |
+
or other material to which the Licensor applied this Public
|
| 186 |
+
License.
|
| 187 |
+
|
| 188 |
+
g. Licensed Rights means the rights granted to You subject to the
|
| 189 |
+
terms and conditions of this Public License, which are limited to
|
| 190 |
+
all Copyright and Similar Rights that apply to Your use of the
|
| 191 |
+
Licensed Material and that the Licensor has authority to license.
|
| 192 |
+
|
| 193 |
+
h. Licensor means the individual(s) or entity(ies) granting rights
|
| 194 |
+
under this Public License.
|
| 195 |
+
|
| 196 |
+
i. Share means to provide material to the public by any means or
|
| 197 |
+
process that requires permission under the Licensed Rights, such
|
| 198 |
+
as reproduction, public display, public performance, distribution,
|
| 199 |
+
dissemination, communication, or importation, and to make material
|
| 200 |
+
available to the public including in ways that members of the
|
| 201 |
+
public may access the material from a place and at a time
|
| 202 |
+
individually chosen by them.
|
| 203 |
+
|
| 204 |
+
j. Sui Generis Database Rights means rights other than copyright
|
| 205 |
+
resulting from Directive 96/9/EC of the European Parliament and of
|
| 206 |
+
the Council of 11 March 1996 on the legal protection of databases,
|
| 207 |
+
as amended and/or succeeded, as well as other essentially
|
| 208 |
+
equivalent rights anywhere in the world.
|
| 209 |
+
|
| 210 |
+
k. You means the individual or entity exercising the Licensed Rights
|
| 211 |
+
under this Public License. Your has a corresponding meaning.
|
| 212 |
+
|
| 213 |
+
|
| 214 |
+
Section 2 -- Scope.
|
| 215 |
+
|
| 216 |
+
a. License grant.
|
| 217 |
+
|
| 218 |
+
1. Subject to the terms and conditions of this Public License,
|
| 219 |
+
the Licensor hereby grants You a worldwide, royalty-free,
|
| 220 |
+
non-sublicensable, non-exclusive, irrevocable license to
|
| 221 |
+
exercise the Licensed Rights in the Licensed Material to:
|
| 222 |
+
|
| 223 |
+
a. reproduce and Share the Licensed Material, in whole or
|
| 224 |
+
in part; and
|
| 225 |
+
|
| 226 |
+
b. produce, reproduce, and Share Adapted Material.
|
| 227 |
+
|
| 228 |
+
2. Exceptions and Limitations. For the avoidance of doubt, where
|
| 229 |
+
Exceptions and Limitations apply to Your use, this Public
|
| 230 |
+
License does not apply, and You do not need to comply with
|
| 231 |
+
its terms and conditions.
|
| 232 |
+
|
| 233 |
+
3. Term. The term of this Public License is specified in Section
|
| 234 |
+
6(a).
|
| 235 |
+
|
| 236 |
+
4. Media and formats; technical modifications allowed. The
|
| 237 |
+
Licensor authorizes You to exercise the Licensed Rights in
|
| 238 |
+
all media and formats whether now known or hereafter created,
|
| 239 |
+
and to make technical modifications necessary to do so. The
|
| 240 |
+
Licensor waives and/or agrees not to assert any right or
|
| 241 |
+
authority to forbid You from making technical modifications
|
| 242 |
+
necessary to exercise the Licensed Rights, including
|
| 243 |
+
technical modifications necessary to circumvent Effective
|
| 244 |
+
Technological Measures. For purposes of this Public License,
|
| 245 |
+
simply making modifications authorized by this Section 2(a)
|
| 246 |
+
(4) never produces Adapted Material.
|
| 247 |
+
|
| 248 |
+
5. Downstream recipients.
|
| 249 |
+
|
| 250 |
+
a. Offer from the Licensor -- Licensed Material. Every
|
| 251 |
+
recipient of the Licensed Material automatically
|
| 252 |
+
receives an offer from the Licensor to exercise the
|
| 253 |
+
Licensed Rights under the terms and conditions of this
|
| 254 |
+
Public License.
|
| 255 |
+
|
| 256 |
+
b. No downstream restrictions. You may not offer or impose
|
| 257 |
+
any additional or different terms or conditions on, or
|
| 258 |
+
apply any Effective Technological Measures to, the
|
| 259 |
+
Licensed Material if doing so restricts exercise of the
|
| 260 |
+
Licensed Rights by any recipient of the Licensed
|
| 261 |
+
Material.
|
| 262 |
+
|
| 263 |
+
6. No endorsement. Nothing in this Public License constitutes or
|
| 264 |
+
may be construed as permission to assert or imply that You
|
| 265 |
+
are, or that Your use of the Licensed Material is, connected
|
| 266 |
+
with, or sponsored, endorsed, or granted official status by,
|
| 267 |
+
the Licensor or others designated to receive attribution as
|
| 268 |
+
provided in Section 3(a)(1)(A)(i).
|
| 269 |
+
|
| 270 |
+
b. Other rights.
|
| 271 |
+
|
| 272 |
+
1. Moral rights, such as the right of integrity, are not
|
| 273 |
+
licensed under this Public License, nor are publicity,
|
| 274 |
+
privacy, and/or other similar personality rights; however, to
|
| 275 |
+
the extent possible, the Licensor waives and/or agrees not to
|
| 276 |
+
assert any such rights held by the Licensor to the limited
|
| 277 |
+
extent necessary to allow You to exercise the Licensed
|
| 278 |
+
Rights, but not otherwise.
|
| 279 |
+
|
| 280 |
+
2. Patent and trademark rights are not licensed under this
|
| 281 |
+
Public License.
|
| 282 |
+
|
| 283 |
+
3. To the extent possible, the Licensor waives any right to
|
| 284 |
+
collect royalties from You for the exercise of the Licensed
|
| 285 |
+
Rights, whether directly or through a collecting society
|
| 286 |
+
under any voluntary or waivable statutory or compulsory
|
| 287 |
+
licensing scheme. In all other cases the Licensor expressly
|
| 288 |
+
reserves any right to collect such royalties.
|
| 289 |
+
|
| 290 |
+
|
| 291 |
+
Section 3 -- License Conditions.
|
| 292 |
+
|
| 293 |
+
Your exercise of the Licensed Rights is expressly made subject to the
|
| 294 |
+
following conditions.
|
| 295 |
+
|
| 296 |
+
a. Attribution.
|
| 297 |
+
|
| 298 |
+
1. If You Share the Licensed Material (including in modified
|
| 299 |
+
form), You must:
|
| 300 |
+
|
| 301 |
+
a. retain the following if it is supplied by the Licensor
|
| 302 |
+
with the Licensed Material:
|
| 303 |
+
|
| 304 |
+
i. identification of the creator(s) of the Licensed
|
| 305 |
+
Material and any others designated to receive
|
| 306 |
+
attribution, in any reasonable manner requested by
|
| 307 |
+
the Licensor (including by pseudonym if
|
| 308 |
+
designated);
|
| 309 |
+
|
| 310 |
+
ii. a copyright notice;
|
| 311 |
+
|
| 312 |
+
iii. a notice that refers to this Public License;
|
| 313 |
+
|
| 314 |
+
iv. a notice that refers to the disclaimer of
|
| 315 |
+
warranties;
|
| 316 |
+
|
| 317 |
+
v. a URI or hyperlink to the Licensed Material to the
|
| 318 |
+
extent reasonably practicable;
|
| 319 |
+
|
| 320 |
+
b. indicate if You modified the Licensed Material and
|
| 321 |
+
retain an indication of any previous modifications; and
|
| 322 |
+
|
| 323 |
+
c. indicate the Licensed Material is licensed under this
|
| 324 |
+
Public License, and include the text of, or the URI or
|
| 325 |
+
hyperlink to, this Public License.
|
| 326 |
+
|
| 327 |
+
2. You may satisfy the conditions in Section 3(a)(1) in any
|
| 328 |
+
reasonable manner based on the medium, means, and context in
|
| 329 |
+
which You Share the Licensed Material. For example, it may be
|
| 330 |
+
reasonable to satisfy the conditions by providing a URI or
|
| 331 |
+
hyperlink to a resource that includes the required
|
| 332 |
+
information.
|
| 333 |
+
|
| 334 |
+
3. If requested by the Licensor, You must remove any of the
|
| 335 |
+
information required by Section 3(a)(1)(A) to the extent
|
| 336 |
+
reasonably practicable.
|
| 337 |
+
|
| 338 |
+
4. If You Share Adapted Material You produce, the Adapter's
|
| 339 |
+
License You apply must not prevent recipients of the Adapted
|
| 340 |
+
Material from complying with this Public License.
|
| 341 |
+
|
| 342 |
+
|
| 343 |
+
Section 4 -- Sui Generis Database Rights.
|
| 344 |
+
|
| 345 |
+
Where the Licensed Rights include Sui Generis Database Rights that
|
| 346 |
+
apply to Your use of the Licensed Material:
|
| 347 |
+
|
| 348 |
+
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
| 349 |
+
to extract, reuse, reproduce, and Share all or a substantial
|
| 350 |
+
portion of the contents of the database;
|
| 351 |
+
|
| 352 |
+
b. if You include all or a substantial portion of the database
|
| 353 |
+
contents in a database in which You have Sui Generis Database
|
| 354 |
+
Rights, then the database in which You have Sui Generis Database
|
| 355 |
+
Rights (but not its individual contents) is Adapted Material; and
|
| 356 |
+
|
| 357 |
+
c. You must comply with the conditions in Section 3(a) if You Share
|
| 358 |
+
all or a substantial portion of the contents of the database.
|
| 359 |
+
|
| 360 |
+
For the avoidance of doubt, this Section 4 supplements and does not
|
| 361 |
+
replace Your obligations under this Public License where the Licensed
|
| 362 |
+
Rights include other Copyright and Similar Rights.
|
| 363 |
+
|
| 364 |
+
|
| 365 |
+
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
| 366 |
+
|
| 367 |
+
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
| 368 |
+
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
| 369 |
+
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
| 370 |
+
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
| 371 |
+
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
| 372 |
+
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
| 373 |
+
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
| 374 |
+
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
| 375 |
+
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
| 376 |
+
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
| 377 |
+
|
| 378 |
+
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
| 379 |
+
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
| 380 |
+
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
| 381 |
+
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
| 382 |
+
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
| 383 |
+
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
| 384 |
+
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
| 385 |
+
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
| 386 |
+
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
| 387 |
+
|
| 388 |
+
c. The disclaimer of warranties and limitation of liability provided
|
| 389 |
+
above shall be interpreted in a manner that, to the extent
|
| 390 |
+
possible, most closely approximates an absolute disclaimer and
|
| 391 |
+
waiver of all liability.
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
Section 6 -- Term and Termination.
|
| 395 |
+
|
| 396 |
+
a. This Public License applies for the term of the Copyright and
|
| 397 |
+
Similar Rights licensed here. However, if You fail to comply with
|
| 398 |
+
this Public License, then Your rights under this Public License
|
| 399 |
+
terminate automatically.
|
| 400 |
+
|
| 401 |
+
b. Where Your right to use the Licensed Material has terminated under
|
| 402 |
+
Section 6(a), it reinstates:
|
| 403 |
+
|
| 404 |
+
1. automatically as of the date the violation is cured, provided
|
| 405 |
+
it is cured within 30 days of Your discovery of the
|
| 406 |
+
violation; or
|
| 407 |
+
|
| 408 |
+
2. upon express reinstatement by the Licensor.
|
| 409 |
+
|
| 410 |
+
For the avoidance of doubt, this Section 6(b) does not affect any
|
| 411 |
+
right the Licensor may have to seek remedies for Your violations
|
| 412 |
+
of this Public License.
|
| 413 |
+
|
| 414 |
+
c. For the avoidance of doubt, the Licensor may also offer the
|
| 415 |
+
Licensed Material under separate terms or conditions or stop
|
| 416 |
+
distributing the Licensed Material at any time; however, doing so
|
| 417 |
+
will not terminate this Public License.
|
| 418 |
+
|
| 419 |
+
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
| 420 |
+
License.
|
| 421 |
+
|
| 422 |
+
|
| 423 |
+
Section 7 -- Other Terms and Conditions.
|
| 424 |
+
|
| 425 |
+
a. The Licensor shall not be bound by any additional or different
|
| 426 |
+
terms or conditions communicated by You unless expressly agreed.
|
| 427 |
+
|
| 428 |
+
b. Any arrangements, understandings, or agreements regarding the
|
| 429 |
+
Licensed Material not stated herein are separate from and
|
| 430 |
+
independent of the terms and conditions of this Public License.
|
| 431 |
+
|
| 432 |
+
|
| 433 |
+
Section 8 -- Interpretation.
|
| 434 |
+
|
| 435 |
+
a. For the avoidance of doubt, this Public License does not, and
|
| 436 |
+
shall not be interpreted to, reduce, limit, restrict, or impose
|
| 437 |
+
conditions on any use of the Licensed Material that could lawfully
|
| 438 |
+
be made without permission under this Public License.
|
| 439 |
+
|
| 440 |
+
b. To the extent possible, if any provision of this Public License is
|
| 441 |
+
deemed unenforceable, it shall be automatically reformed to the
|
| 442 |
+
minimum extent necessary to make it enforceable. If the provision
|
| 443 |
+
cannot be reformed, it shall be severed from this Public License
|
| 444 |
+
without affecting the enforceability of the remaining terms and
|
| 445 |
+
conditions.
|
| 446 |
+
|
| 447 |
+
c. No term or condition of this Public License will be waived and no
|
| 448 |
+
failure to comply consented to unless expressly agreed to by the
|
| 449 |
+
Licensor.
|
| 450 |
+
|
| 451 |
+
d. Nothing in this Public License constitutes or may be interpreted
|
| 452 |
+
as a limitation upon, or waiver of, any privileges and immunities
|
| 453 |
+
that apply to the Licensor or You, including from the legal
|
| 454 |
+
processes of any jurisdiction or authority.
|
| 455 |
+
|
| 456 |
+
|
| 457 |
+
=======================================================================
|
| 458 |
+
|
| 459 |
+
Creative Commons is not a party to its public
|
| 460 |
+
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
| 461 |
+
its public licenses to material it publishes and in those instances
|
| 462 |
+
will be considered the “Licensor.” The text of the Creative Commons
|
| 463 |
+
public licenses is dedicated to the public domain under the CC0 Public
|
| 464 |
+
Domain Dedication. Except for the limited purpose of indicating that
|
| 465 |
+
material is shared under a Creative Commons public license or as
|
| 466 |
+
otherwise permitted by the Creative Commons policies published at
|
| 467 |
+
creativecommons.org/policies, Creative Commons does not authorize the
|
| 468 |
+
use of the trademark "Creative Commons" or any other trademark or logo
|
| 469 |
+
of Creative Commons without its prior written consent including,
|
| 470 |
+
without limitation, in connection with any unauthorized modifications
|
| 471 |
+
to any of its public licenses or any other arrangements,
|
| 472 |
+
understandings, or agreements concerning use of licensed material. For
|
| 473 |
+
the avoidance of doubt, this paragraph does not form part of the
|
| 474 |
+
public licenses.
|
| 475 |
+
|
| 476 |
+
Creative Commons may be contacted at creativecommons.org.
|
| 477 |
+
|
| 478 |
+
|
| 479 |
+
|
| 480 |
+
Open Source Models Licensed under the Apache License Version 2.0:
|
| 481 |
+
The below models in this distribution may have been modified by Tencent.
|
| 482 |
+
--------------------------------------------------------------------
|
| 483 |
+
1. Qwen2.5-1.5B-Instruct
|
| 484 |
+
Copyright 2024 Alibaba Cloud
|
| 485 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 486 |
+
|
| 487 |
+
2. Qwen2.5-7B-Instruct
|
| 488 |
+
Copyright 2024 Alibaba Cloud
|
| 489 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 490 |
+
|
| 491 |
+
3. Qwen2.5-32B-Instruct
|
| 492 |
+
Copyright 2024 Alibaba Cloud
|
| 493 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 494 |
+
|
| 495 |
+
4. Qwen3-8B
|
| 496 |
+
Copyright (c) Qwen3-8B original author and authors
|
| 497 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 498 |
+
|
| 499 |
+
5. Qwen3-4B
|
| 500 |
+
Copyright (c) Qwen3-4B original author and authors
|
| 501 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 502 |
+
|
| 503 |
+
6. Qwen3-32B
|
| 504 |
+
Copyright (c) Qwen3-32B original author and authors
|
| 505 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 506 |
+
|
| 507 |
+
7. Qwen3-0.6B
|
| 508 |
+
Copyright (c) Qwen3-0.6B original author and authors
|
| 509 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 510 |
+
|
| 511 |
+
8. Qwen3-1.7B
|
| 512 |
+
Copyright (c) Qwen3-1.7B original author and authors
|
| 513 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 514 |
+
|
| 515 |
+
9. Qwen3-14B
|
| 516 |
+
Copyright (c) Qwen3-14B original author and authors
|
| 517 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 518 |
+
|
| 519 |
+
10. Qwen3-30B-A3B
|
| 520 |
+
Copyright (c) Qwen3-30B-A3B original author and authors
|
| 521 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 522 |
+
|
| 523 |
+
11. Qwen3-235B-A22B
|
| 524 |
+
Copyright (c) Qwen3-235B-A22B original author and authors
|
| 525 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 526 |
+
|
| 527 |
+
12. QwQ-32B
|
| 528 |
+
Copyright 2024 Alibaba Cloud
|
| 529 |
+
Please note this model has been modified by Tencent in this distribution.
|
| 530 |
+
|
| 531 |
+
|
| 532 |
+
Terms of the Apache License Version 2.0:
|
| 533 |
+
--------------------------------------------------------------------
|
| 534 |
+
Apache License
|
| 535 |
+
|
| 536 |
+
Version 2.0, January 2004
|
| 537 |
+
|
| 538 |
+
http://www.apache.org/licenses/
|
| 539 |
+
|
| 540 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 541 |
+
1. Definitions.
|
| 542 |
+
|
| 543 |
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
| 544 |
+
|
| 545 |
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
| 546 |
+
|
| 547 |
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
| 548 |
+
|
| 549 |
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
| 550 |
+
|
| 551 |
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
| 552 |
+
|
| 553 |
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
| 554 |
+
|
| 555 |
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
| 556 |
+
|
| 557 |
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
| 558 |
+
|
| 559 |
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
| 560 |
+
|
| 561 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
| 562 |
+
|
| 563 |
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
| 564 |
+
|
| 565 |
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
| 566 |
+
|
| 567 |
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
| 568 |
+
|
| 569 |
+
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
| 570 |
+
|
| 571 |
+
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
| 572 |
+
|
| 573 |
+
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
| 574 |
+
|
| 575 |
+
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
| 576 |
+
|
| 577 |
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
| 578 |
+
|
| 579 |
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
| 580 |
+
|
| 581 |
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
| 582 |
+
|
| 583 |
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
| 584 |
+
|
| 585 |
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
| 586 |
+
|
| 587 |
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
| 588 |
+
|
| 589 |
+
END OF TERMS AND CONDITIONS
|
| 590 |
+
|
| 591 |
+
|
| 592 |
+
|
| 593 |
+
Open Source Models Licensed under the MIT License:
|
| 594 |
+
The below models in this distribution may have been modified by Tencent.
|
| 595 |
+
--------------------------------------------------------------------
|
| 596 |
+
1. DeepSeek-R1-Distill-Qwen-1.5B
|
| 597 |
+
Copyright (c) 2023 DeepSeek
|
| 598 |
+
|
| 599 |
+
2. DeepSeek-R1-Distill-Qwen-7B
|
| 600 |
+
Copyright (c) 2023 DeepSeek
|
| 601 |
+
|
| 602 |
+
3. DeepSeek-R1-Distill-Qwen-14B
|
| 603 |
+
Copyright (c) 2023 DeepSeek
|
| 604 |
+
|
| 605 |
+
4. DeepSeek-R1-Distill-Qwen-32B
|
| 606 |
+
Copyright (c) 2023 DeepSeek
|
| 607 |
+
|
| 608 |
+
|
| 609 |
+
Terms of the MIT License:
|
| 610 |
+
--------------------------------------------------------------------
|
| 611 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
| 612 |
+
|
| 613 |
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
| 614 |
+
|
| 615 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
Notice.txt
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Usage and Legal Notices:
|
| 2 |
+
|
| 3 |
+
Tencent is pleased to support the open source community by making Tencent Hunyuan 7B available.
|
| 4 |
+
|
| 5 |
+
Copyright (C) Tencent. All rights reserved. The below software and/or models in this distribution may have been modified by Tencent ("Tencent Modifications"). All Tencent Modifications are Copyright (C) Tencent.
|
| 6 |
+
|
| 7 |
+
Tencent Hunyuan 7B is licensed under TENCENT HUNYUAN COMMUNITY LICENSE AGREEMENT, which can be found in this repository called "LICENSE", except for the third-party components listed below. Tencent Hunyuan 7B does not impose any additional limitations beyond what is outlined in the respective licenses of these third-party components. Users must comply with all terms and conditions of original licenses of these third-party components and must ensure that the usage of the third party components adheres to all relevant laws and regulations.
|
| 8 |
+
|
| 9 |
+
For avoidance of doubts, Tencent Hunyuan 7B refers to the inference code, training code, parameters and the weights of Tencent Hunyuan 7B only, which are made publicly available by Tencent in accordance with the TENCENT HUNYUAN COMMUNITY LICENSE AGREEMENT.
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
Other dependencies and licenses:
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
Open Source Software Licensed under the Apache License Version 2.0:
|
| 16 |
+
The below software in this distribution may have been modified by Tencent ("Tencent Modifications"). All Tencent Modifications are Copyright (C) 2025 Tencent.
|
| 17 |
+
--------------------------------------------------------------------
|
| 18 |
+
1. pytorch
|
| 19 |
+
Copyright 2016-2017 TorchAPI
|
| 20 |
+
Copyright 2016-2017 Contributors
|
| 21 |
+
|
| 22 |
+
2. VLLM
|
| 23 |
+
Copyright (c) vllm original author and authors
|
| 24 |
+
Please note this software has been modified by Tencent in this distribution.
|
| 25 |
+
|
| 26 |
+
3. transformers
|
| 27 |
+
Copyright 2018- The Hugging Face team. All rights reserved.
|
| 28 |
+
|
| 29 |
+
4. accelerate
|
| 30 |
+
Copyright (c) accelerate original author and authors
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
Terms of the Apache License Version 2.0:
|
| 34 |
+
--------------------------------------------------------------------
|
| 35 |
+
Apache License
|
| 36 |
+
|
| 37 |
+
Version 2.0, January 2004
|
| 38 |
+
|
| 39 |
+
http://www.apache.org/licenses/
|
| 40 |
+
|
| 41 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 42 |
+
1. Definitions.
|
| 43 |
+
|
| 44 |
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
| 45 |
+
|
| 46 |
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
| 47 |
+
|
| 48 |
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
| 49 |
+
|
| 50 |
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
| 51 |
+
|
| 52 |
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
| 53 |
+
|
| 54 |
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
| 55 |
+
|
| 56 |
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
| 57 |
+
|
| 58 |
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
| 59 |
+
|
| 60 |
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
| 63 |
+
|
| 64 |
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
| 65 |
+
|
| 66 |
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
| 67 |
+
|
| 68 |
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
| 69 |
+
|
| 70 |
+
You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
| 71 |
+
|
| 72 |
+
You must cause any modified files to carry prominent notices stating that You changed the files; and
|
| 73 |
+
|
| 74 |
+
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
| 75 |
+
|
| 76 |
+
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
| 77 |
+
|
| 78 |
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
| 79 |
+
|
| 80 |
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
| 81 |
+
|
| 82 |
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
| 83 |
+
|
| 84 |
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
| 85 |
+
|
| 86 |
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
| 87 |
+
|
| 88 |
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
| 89 |
+
|
| 90 |
+
END OF TERMS AND CONDITIONS
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
Open Source Software Licensed under the BSD 3-Clause License and Other Licenses of the Third-Party Components therein:
|
| 95 |
+
--------------------------------------------------------------------
|
| 96 |
+
1. pytorch
|
| 97 |
+
Copyright (c) 2016- Facebook, Inc (Adam Paszke)
|
| 98 |
+
Copyright (c) 2014- Facebook, Inc (Soumith Chintala)
|
| 99 |
+
Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
|
| 100 |
+
Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
|
| 101 |
+
Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
|
| 102 |
+
Copyright (c) 2011-2013 NYU (Clement Farabet)
|
| 103 |
+
Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston)
|
| 104 |
+
Copyright (c) 2006 Idiap Research Institute (Samy Bengio)
|
| 105 |
+
Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz)
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
Terms of the BSD 3-Clause:
|
| 109 |
+
--------------------------------------------------------------------
|
| 110 |
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
| 111 |
+
|
| 112 |
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
| 113 |
+
|
| 114 |
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
| 115 |
+
|
| 116 |
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
| 117 |
+
|
| 118 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 119 |
+
|
| 120 |
+
For the license of other third party components, please refer to the following URL:
|
| 121 |
+
https://github.com/pytorch/pytorch/blob/v2.1.1/NOTICE
|
| 122 |
+
https://github.com/pytorch/pytorch/tree/v2.1.1/third_party
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
Open Source Software Licensed under the BSD 3-Clause License:
|
| 126 |
+
--------------------------------------------------------------------
|
| 127 |
+
1. flash_attn
|
| 128 |
+
Copyright (c) 2022, the respective contributors, as shown by the AUTHORS file.
|
| 129 |
+
All rights reserved.
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
A copy of the BSD 3-Clause is included in this file.
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
Open Source Software Licensed under the Apache License Version 2.0 and Other Licenses of the Third-Party Components therein:
|
| 137 |
+
The below software in this distribution is modified by Tencent ("Tencent Modifications"). All Tencent Modifications are Copyright (C) 2025 Tencent.
|
| 138 |
+
--------------------------------------------------------------------
|
| 139 |
+
1. sglang
|
| 140 |
+
Copyright 2023-2024 SGLang Team
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
A copy of the Apache 2.0 is included in this file.
|
| 144 |
+
|
| 145 |
+
For the license of other third party components, please refer to the following URL:
|
| 146 |
+
https://github.com/sgl-project/sglang/tree/v0.4.7/3rdparty/amd
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
Open Source Software Licensed under the Apache License Version 2.0 and Other Licenses of the Third-Party Components therein:
|
| 151 |
+
The below software in this distribution is modified by Tencent ("Tencent Modifications"). All Tencent Modifications are Copyright (C) 2025 Tencent.
|
| 152 |
+
--------------------------------------------------------------------
|
| 153 |
+
1. TensorRT-LLM
|
| 154 |
+
Copyright (c) TensorRT-LLM original author and authors
|
| 155 |
+
|
| 156 |
+
|
| 157 |
+
A copy of the Apache 2.0 is included in this file.
|
| 158 |
+
|
| 159 |
+
For the license of other third party components, please refer to the following URL:
|
| 160 |
+
https://github.com/NVIDIA/TensorRT-LLM/tree/v0.20.0/3rdparty
|
README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- hy
|
| 4 |
+
- quant
|
| 5 |
+
- 2bit
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
<p align="center">
|
| 9 |
+
<picture>
|
| 10 |
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/Tencent/AngelSlim/blob/main/docs/source/assets/logos/angelslim_logo_light.png?raw=true">
|
| 11 |
+
<img alt="AngelSlim" src="https://github.com/Tencent/AngelSlim/blob/main/docs/source/assets/logos/angelslim_logo.png?raw=true" width=55%>
|
| 12 |
+
</picture>
|
| 13 |
+
</p>
|
| 14 |
+
|
| 15 |
+
<h3 align="center">
|
| 16 |
+
Dedicated to building a more intuitive, comprehensive, and efficient LLMs compression toolkit.
|
| 17 |
+
</h3>
|
| 18 |
+
|
| 19 |
+
<p align="center">
|
| 20 |
+
📖 <a href="https://angelslim.readthedocs.io/">Documentation</a>   |   🤗 <a href="https://huggingface.co/AngelSlim">Hugging Face</a>   |   🤖 <a href="https://modelscope.cn/organization/AngelSlim">ModelScope</a>   |   💬 <a href="./docs/source/assets/angel_slim_wechat.png">WeChat</a>
|
| 21 |
+
<br>
|
| 22 |
+
</p>
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
## 📣Latest News
|
| 26 |
+
- [26/02/09] We have released HY-Nano, 2bit on-device large language model.
|
| 27 |
+
- [26/01/13] We have released v0.3. We support the training and deployment of Eagle3 for all-scale LLMs/VLMs/Audio models, as detailed in the [guidance documentation](https://angelslim.readthedocs.io/zh-cn/latest/features/speculative_decoding/eagle/index.html). And We released **Sherry**, the hardware-efficient 1.25 bit quantization algorithm [Paper Comming soon] | [[Code]](https://github.com/Tencent/AngelSlim/tree/sherry/Sherry)🔥🔥🔥
|
| 28 |
+
- [25/11/05] We have released v0.2. Quantization support for new models, such as `GLM-4.6`, `Qwen3-VL` and `Qwen3-Omni`, open-sources the Eagle3 speculative decoding training framework, and updates the Diffusion model quantization tools.
|
| 29 |
+
- [25/09/30] We have released **SpecExit**, the reasoning early-exit algorithm: [[Paper]](http://arxiv.org/abs/2509.24248) | [[Docs]](https://angelslim.readthedocs.io/zh-cn/latest/features/speculative_decoding/spec_exit.html) | [[vLLM Code]](https://github.com/vllm-project/vllm/pull/27192)
|
| 30 |
+
- [25/09/26] We have released **TEQUILA**, the ternary quantization algorithm [[Paper]](https://arxiv.org/abs/2509.23809) | [[Code]](https://github.com/Tencent/AngelSlim/tree/tequila/TernaryQuant)
|
| 31 |
+
- [25/09/24] We now support the PTQ quantization of NVFP4 for the Qwen3 series models. We also opensource [Qwen3-32B-NVFP4](https://huggingface.co/AngelSlim/Qwen3-32B_nvfp4) and [Qwen3-235B-A22B-NVFP4](https://huggingface.co/AngelSlim/Qwen3-235B-A22B_nvfp4) weights.
|
| 32 |
+
|
| 33 |
+
<details>
|
| 34 |
+
<summary>Previous News</summary>
|
| 35 |
+
|
| 36 |
+
- [25/09/01] We now support FP8 quantization of the [Hunyuan-MT-7B](https://huggingface.co/tencent/Hunyuan-MT-7B-fp8) translation model. And enabled Torch inference and Benchmark evaluation for Eagle3. And implemented support for quantization and Cache for [FLUX](https://github.com/Tencent/AngelSlim/tree/main/configs/flux). And support quantization for the [Seed-OSS](https://github.com/Tencent/AngelSlim/tree/main/configs/seed_oss).
|
| 37 |
+
- [25/08/06] We now support quantization for `Hunyuan 0.5B/1.8B/4B/7B` and multimodal model `Qwen2.5VL 3B/7B/32B/72B`, including `FP8/INT4` algorithms, and quantization for `DeepSeek-R1/V3` and `Kimi-K2`, including `FP8-Static` and `W4A8-FP8` algorithms. We also opensource `Hunyuan 1.8B/4B/7B` series Eagle3 model weight.
|
| 38 |
+
- [25/07/04] We now support quantization for `Hunyuan/Qwen2.5/Qwen3/DeepSeek-R1-Distill-Qwen` and other models, including `INT8/FP8/INT4` algorithms. We also opensource `Qwen3` series Eagle3 model weight.
|
| 39 |
+
|
| 40 |
+
</details>
|
| 41 |
+
|
| 42 |
+
## 🌟Key Features
|
| 43 |
+
|
| 44 |
+
- **Superior Model Capability** HY-NANO is developed via Quantization-Aware Training (QAT) based on the Hunyuan-1.8B-Instruct backbone. By aggressively compressing the model to a 2-bit weight precision, we achieve a performance profile that remains highly competitive with PTQ-INT4 benchmarks. Across a multi-dimensional evaluation suite—encompassing mathematics, humanities, and programming—HY-NANO exhibits a marginal performance degradation of only 4\% compared to its full-precision counterpart, demonstrating exceptional information retention despite the radical reduction in bit-width.
|
| 45 |
+
|
| 46 |
+
- **Unmatched Scale-to-Performance Efficiency** When compared to dense models of equivalent size (e.g., 0.5B parameters), HY-NANO demonstrates a substantial competitive advantage, outperforming benchmarks by an average of 16\% across core competencies. As a state-of-the-art (SOTA) solution for its parameter class, HY-NANO provides an extensible and highly efficient alternative for edge computing, delivering high-tier reasoning capabilities within a compact footprint.
|
| 47 |
+
|
| 48 |
+
- **Comprehensive Reasoning Proficiency** HY-NANO inherits the complete "full-thinking" capabilities of the Hunyuan-1.8B-Instruct model, marking it as the industry's most compact model to support sophisticated reasoning pathways. By integrating a Dual Chain-of-Thought (Dual-CoT) strategy, the model empowers users to navigate the trade-off between latency and depth: utilizing concise short-CoT for intuitive queries and detailed long-CoT for computationally intensive tasks. This flexibility ensures that HY-NANO can be seamlessly deployed in real-time, resource-constrained environments that demand both rapid response and high-fidelity logical synthesis.
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
## 📈 Benchmark
|
| 52 |
+
|
| 53 |
+
Benchmark results for HY-Nano equivalent weights on vLLM across **cmmlu**,**ceval**,**arc**,**bbh**,**gsm8k**,**humaneval**,**livecodebench** and **gpqa_diamond**.
|
| 54 |
+
|
| 55 |
+
xxx
|
| 56 |
+
|
| 57 |
+
| Model | cmmlu | ceval | arc | bbh | gsm8k | humaneval<br/>(pass@3) | livecodebench | gpqa_diamond<br/>(pass@3) |
|
| 58 |
+
|------------------|--------|--------|--------|--------|--------|-------------------|---------------|----------------------|
|
| 59 |
+
| HY-1.8B | 55.07% | 54.27% | 70.50% | 79.08% | 84.08% | 94.51% | 31.50% | 68.18% |
|
| 60 |
+
| HY-0.5B | 37.08% | 35.98% | 49.89% | 58.10% | 55.04% | 67.07% | 12.11% | 46.97% |
|
| 61 |
+
| HY-1.8B-int4gptq | 50.80% | 48.67% | 68.83% | 74.80% | 78.70% | 89.02% | 30.08% | 65.56% |
|
| 62 |
+
| **HY-Nano** | 49.32% | 47.60% | 64.45% | 75.54% | 77.33% | 93.29% | 32.73% | 65.15% |
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
## 💻Deployment
|
| 67 |
+
|
| 68 |
+
### Running Hunyuan model on MacBook M4
|
| 69 |
+
|
| 70 |
+
Clone llama.cpp
|
| 71 |
+
|
| 72 |
+
```bash
|
| 73 |
+
git clone https://github.com/ggml-org/llama.cpp.git
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
Enter the llama.cpp folder
|
| 77 |
+
|
| 78 |
+
```bash
|
| 79 |
+
cd llama.cpp
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
Checkout 3cea17ca51da3bb5ca6748c3f781fac8d0ff20fb
|
| 83 |
+
|
| 84 |
+
```bash
|
| 85 |
+
git checkout 3cea17ca51da3bb5ca6748c3f781fac8d0ff20fb
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
Apply the patch to enable the Int2 KleidiAI optimizations for SME2
|
| 89 |
+
|
| 90 |
+
```bash
|
| 91 |
+
git apply 0001-Add-support-for-int2-per-channel-quantization.patch
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
Build llama.cpp with KleidiAI enabled
|
| 95 |
+
|
| 96 |
+
```bash
|
| 97 |
+
mkdir build && cd build
|
| 98 |
+
|
| 99 |
+
cmake -DGGML_CPU_KLEIDIAI=ON -DGGML_METAL=OFF -DGGML_BLAS=OFF ..
|
| 100 |
+
|
| 101 |
+
make -j8
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
Quantize the Hunyuan fp16 model to int2 per-channel (q2_0c)
|
| 105 |
+
|
| 106 |
+
```bash
|
| 107 |
+
./bin/llama-quantize hunyuan-fp16-qdq.gguf hunyuan-q2_0.gguf q2_0c
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
#### Run the CLI llama.cpp example
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
```bash
|
| 114 |
+
export GGML_KLEIDIAI_SME=1
|
| 115 |
+
|
| 116 |
+
# thinking
|
| 117 |
+
./bin/llama-cli -m hunyuan-q2_0.gguf -p "写一副春联" -t 1 --seed 4568 -n 32
|
| 118 |
+
# no thinking
|
| 119 |
+
./bin/llama-cli -m hunyuan-q2_0.gguf -p "/no_think写一副春联" -t 1 --seed 4568 -n 32
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
#### Run the llama.cpp benchmark
|
| 125 |
+
|
| 126 |
+
The general command is:
|
| 127 |
+
|
| 128 |
+
```bash
|
| 129 |
+
./bin/llama-bench -m hunyuan-q2_0.gguf -p <prompt-length> -t <number-of-threads> -n <gen-length>
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
## 📝 License
|
| 135 |
+
|
| 136 |
+
The code for this project is open-sourced under the [License for AngelSlim](LICENSE).
|
| 137 |
+
|
| 138 |
+
## 🔗 Citation
|
| 139 |
+
|
| 140 |
+
```
|
| 141 |
+
@software{AngelSlim2025,
|
| 142 |
+
title={{AngelSlim}},
|
| 143 |
+
author={Tencent AngelSlim Project Contributors},
|
| 144 |
+
year={2025},
|
| 145 |
+
month={6},
|
| 146 |
+
url={https://github.com/Tencent/AngelSlim},
|
| 147 |
+
}
|
| 148 |
+
```
|
| 149 |
+
|
| 150 |
+
## 💬 Technical Discussion
|
| 151 |
+
|
| 152 |
+
* AngelSlim is continuously iterating and new features will be released soon. If you have any questions or suggestions, please open an issue on [GitHub Issues](https://github.com/Tencent/AngelSlim/issues) or join our [WeChat discussion group](https://github.com/Tencent/AngelSlim/blob/main/docs/source/assets/angel_slim_wechat.png?raw=true).
|
README_convert_gguf.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- hy
|
| 4 |
+
- quant
|
| 5 |
+
- 2bit
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
<p align="center">
|
| 9 |
+
<picture>
|
| 10 |
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/Tencent/AngelSlim/blob/main/docs/source/assets/logos/angelslim_logo_light.png?raw=true">
|
| 11 |
+
<img alt="AngelSlim" src="https://github.com/Tencent/AngelSlim/blob/main/docs/source/assets/logos/angelslim_logo.png?raw=true" width=55%>
|
| 12 |
+
</picture>
|
| 13 |
+
</p>
|
| 14 |
+
|
| 15 |
+
<h3 align="center">
|
| 16 |
+
Dedicated to building a more intuitive, comprehensive, and efficient LLMs compression toolkit.
|
| 17 |
+
</h3>
|
| 18 |
+
|
| 19 |
+
<p align="center">
|
| 20 |
+
📖 <a href="https://angelslim.readthedocs.io/">Documentation</a>   |   🤗 <a href="https://huggingface.co/AngelSlim">Hugging Face</a>   |   🤖 <a href="https://modelscope.cn/organization/AngelSlim">ModelScope</a>   |   💬 <a href="./docs/source/assets/angel_slim_wechat.png">WeChat</a>
|
| 21 |
+
<br>
|
| 22 |
+
</p>
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
## 📣Latest News
|
| 26 |
+
- [26/02/09] We have released HY-Nano, 2bit on-device large language model.
|
| 27 |
+
- [26/01/13] We have released v0.3. We support the training and deployment of Eagle3 for all-scale LLMs/VLMs/Audio models, as detailed in the [guidance documentation](https://angelslim.readthedocs.io/zh-cn/latest/features/speculative_decoding/eagle/index.html). And We released **Sherry**, the hardware-efficient 1.25 bit quantization algorithm [Paper Comming soon] | [[Code]](https://github.com/Tencent/AngelSlim/tree/sherry/Sherry)🔥🔥🔥
|
| 28 |
+
- [25/11/05] We have released v0.2. Quantization support for new models, such as `GLM-4.6`, `Qwen3-VL` and `Qwen3-Omni`, open-sources the Eagle3 speculative decoding training framework, and updates the Diffusion model quantization tools.
|
| 29 |
+
- [25/09/30] We have released **SpecExit**, the reasoning early-exit algorithm: [[Paper]](http://arxiv.org/abs/2509.24248) | [[Docs]](https://angelslim.readthedocs.io/zh-cn/latest/features/speculative_decoding/spec_exit.html) | [[vLLM Code]](https://github.com/vllm-project/vllm/pull/27192)
|
| 30 |
+
- [25/09/26] We have released **TEQUILA**, the ternary quantization algorithm [[Paper]](https://arxiv.org/abs/2509.23809) | [[Code]](https://github.com/Tencent/AngelSlim/tree/tequila/TernaryQuant)
|
| 31 |
+
- [25/09/24] We now support the PTQ quantization of NVFP4 for the Qwen3 series models. We also opensource [Qwen3-32B-NVFP4](https://huggingface.co/AngelSlim/Qwen3-32B_nvfp4) and [Qwen3-235B-A22B-NVFP4](https://huggingface.co/AngelSlim/Qwen3-235B-A22B_nvfp4) weights.
|
| 32 |
+
|
| 33 |
+
<details>
|
| 34 |
+
<summary>Previous News</summary>
|
| 35 |
+
|
| 36 |
+
- [25/09/01] We now support FP8 quantization of the [Hunyuan-MT-7B](https://huggingface.co/tencent/Hunyuan-MT-7B-fp8) translation model. And enabled Torch inference and Benchmark evaluation for Eagle3. And implemented support for quantization and Cache for [FLUX](https://github.com/Tencent/AngelSlim/tree/main/configs/flux). And support quantization for the [Seed-OSS](https://github.com/Tencent/AngelSlim/tree/main/configs/seed_oss).
|
| 37 |
+
- [25/08/06] We now support quantization for `Hunyuan 0.5B/1.8B/4B/7B` and multimodal model `Qwen2.5VL 3B/7B/32B/72B`, including `FP8/INT4` algorithms, and quantization for `DeepSeek-R1/V3` and `Kimi-K2`, including `FP8-Static` and `W4A8-FP8` algorithms. We also opensource `Hunyuan 1.8B/4B/7B` series Eagle3 model weight.
|
| 38 |
+
- [25/07/04] We now support quantization for `Hunyuan/Qwen2.5/Qwen3/DeepSeek-R1-Distill-Qwen` and other models, including `INT8/FP8/INT4` algorithms. We also opensource `Qwen3` series Eagle3 model weight.
|
| 39 |
+
|
| 40 |
+
</details>
|
| 41 |
+
|
| 42 |
+
## 🌟Convert hf to gguf-q2_0
|
| 43 |
+
|
| 44 |
+
**Step1**: Clone llama.cpp
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
git clone https://github.com/ggml-org/llama.cpp.git
|
| 48 |
+
cd llama.cpp
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
**Step2**: use `convert_hf_to_gguf.py` in llama.cpp, Export the model to GGUF FP16 format (Make sure to run pip install -r requirements.txt in llama.cpp).
|
| 52 |
+
|
| 53 |
+
```bash
|
| 54 |
+
python convert_hf_to_gguf.py ../qdq_model_path/ --outfile ./model-fp16.gguf --outtype f16
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
**Step3**: Build llama.cpp with `0001-Add-support-for-int2-per-channel-quantization.patch`
|
| 58 |
+
|
| 59 |
+
```bash
|
| 60 |
+
git clone https://github.com/ggml-org/llama.cpp.git
|
| 61 |
+
cd llama.cpp
|
| 62 |
+
git checkout 960e5e3b46f211b3c4446ce8380e88404274dbce
|
| 63 |
+
git apply 0001-Add-support-for-int2-per-channel-quantization.patch
|
| 64 |
+
mkdir build && cd build
|
| 65 |
+
cmake -DGGML_CPU_KLEIDIAI=ON -DGGML_METAL=OFF -DGGML_BLAS=OFF ..
|
| 66 |
+
make -j8
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
**Step4**: Quantize the Hunyuan fp16 model to int2 per-channel (q2_0c)
|
| 70 |
+
```bash
|
| 71 |
+
./bin/llama-quantize hunyuan-fp16-qdq.gguf hunyuan-q2_0.gguf q2_0c
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
## 📝 License
|
| 75 |
+
|
| 76 |
+
The code for this project is open-sourced under the [License for AngelSlim](LICENSE).
|
| 77 |
+
|
| 78 |
+
## 🔗 Citation
|
| 79 |
+
|
| 80 |
+
```
|
| 81 |
+
@software{AngelSlim2025,
|
| 82 |
+
title={{AngelSlim}},
|
| 83 |
+
author={Tencent AngelSlim Project Contributors},
|
| 84 |
+
year={2025},
|
| 85 |
+
month={6},
|
| 86 |
+
url={https://github.com/Tencent/AngelSlim},
|
| 87 |
+
}
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
## 💬 Technical Discussion
|
| 91 |
+
|
| 92 |
+
* AngelSlim is continuously iterating and new features will be released soon. If you have any questions or suggestions, please open an issue on [GitHub Issues](https://github.com/Tencent/AngelSlim/issues) or join our [WeChat discussion group](https://github.com/Tencent/AngelSlim/blob/main/docs/source/assets/angel_slim_wechat.png?raw=true).
|
config.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_classification_head": false,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"HunYuanDenseV1ForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"attention_head_dim": 128,
|
| 9 |
+
"bos_token_id": 120000,
|
| 10 |
+
"cla_share_factor": 2,
|
| 11 |
+
"class_num": 0,
|
| 12 |
+
"dense_list": [
|
| 13 |
+
2048,
|
| 14 |
+
0
|
| 15 |
+
],
|
| 16 |
+
"eod_token_id": 120026,
|
| 17 |
+
"eos_token_id": 120025,
|
| 18 |
+
"head_dim": 128,
|
| 19 |
+
"hidden_act": "silu",
|
| 20 |
+
"hidden_size": 2048,
|
| 21 |
+
"im_end_id": 5,
|
| 22 |
+
"im_newline_id": 11,
|
| 23 |
+
"im_start_id": 4,
|
| 24 |
+
"initializer_range": 0.02,
|
| 25 |
+
"intermediate_size": 6144,
|
| 26 |
+
"mask_init_id": 12,
|
| 27 |
+
"max_position_embeddings": 262144,
|
| 28 |
+
"mlp_bias": false,
|
| 29 |
+
"model_type": "hunyuan_v1_dense",
|
| 30 |
+
"norm_type": "rms",
|
| 31 |
+
"num_attention_heads": 16,
|
| 32 |
+
"num_hidden_layers": 32,
|
| 33 |
+
"num_key_value_heads": 4,
|
| 34 |
+
"org_vocab_size": 120818,
|
| 35 |
+
"pad_id": 120002,
|
| 36 |
+
"pad_token_id": 120002,
|
| 37 |
+
"pool_type": "last",
|
| 38 |
+
"pretraining_tp": 1,
|
| 39 |
+
"rms_norm_eps": 1e-05,
|
| 40 |
+
"rope_scaling": {
|
| 41 |
+
"alpha": 1000.0,
|
| 42 |
+
"beta_fast": 32,
|
| 43 |
+
"beta_slow": 1,
|
| 44 |
+
"factor": 1.0,
|
| 45 |
+
"mscale": 1.0,
|
| 46 |
+
"mscale_all_dim": 1.0,
|
| 47 |
+
"type": "dynamic"
|
| 48 |
+
},
|
| 49 |
+
"rope_theta": 10000.0,
|
| 50 |
+
"sep_token_id": 120007,
|
| 51 |
+
"text_end_id": 7,
|
| 52 |
+
"text_start_id": 6,
|
| 53 |
+
"tie_word_embeddings": true,
|
| 54 |
+
"torch_dtype": "bfloat16",
|
| 55 |
+
"transformers_version": "4.41.2",
|
| 56 |
+
"use_cache": true,
|
| 57 |
+
"use_cla": false,
|
| 58 |
+
"use_qk_norm": true,
|
| 59 |
+
"use_rotary_pos_emb": true,
|
| 60 |
+
"vocab_size": 120818
|
| 61 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 120000,
|
| 3 |
+
"eos_token_id": 120025,
|
| 4 |
+
"pad_token_id": 120002,
|
| 5 |
+
"do_sample": true,
|
| 6 |
+
"top_k": 20,
|
| 7 |
+
"top_p": 0.8,
|
| 8 |
+
"repetition_penalty": 1.05,
|
| 9 |
+
"temperature": 0.7,
|
| 10 |
+
"transformers_version": "4.52.4"
|
| 11 |
+
}
|
model-00001-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7519fc18a1560a37e308668596697521da8a2f8528eba5c5bcd8acd22aa39cf5
|
| 3 |
+
size 5361787856
|
model-00002-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d8dd8caaea249e1a614ae8bb11f2619f6b25a34f45fdaaae728377503f05df1f
|
| 3 |
+
size 2794833200
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,586 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_size": 8156553216
|
| 4 |
+
},
|
| 5 |
+
"weight_map": {
|
| 6 |
+
"lm_head.weight": "model-00001-of-00002.safetensors",
|
| 7 |
+
"model.embed_tokens.weight": "model-00001-of-00002.safetensors",
|
| 8 |
+
"model.layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 9 |
+
"model.layers.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 10 |
+
"model.layers.0.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 11 |
+
"model.layers.0.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 12 |
+
"model.layers.0.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 13 |
+
"model.layers.0.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 14 |
+
"model.layers.0.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 15 |
+
"model.layers.0.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 16 |
+
"model.layers.0.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 17 |
+
"model.layers.0.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 18 |
+
"model.layers.0.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 19 |
+
"model.layers.0.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 20 |
+
"model.layers.0.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 21 |
+
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 22 |
+
"model.layers.0.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 23 |
+
"model.layers.0.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 24 |
+
"model.layers.0.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 25 |
+
"model.layers.0.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 26 |
+
"model.layers.1.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 27 |
+
"model.layers.1.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 28 |
+
"model.layers.1.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 29 |
+
"model.layers.1.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 30 |
+
"model.layers.1.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 31 |
+
"model.layers.1.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 32 |
+
"model.layers.1.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 33 |
+
"model.layers.1.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 34 |
+
"model.layers.1.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 35 |
+
"model.layers.1.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 36 |
+
"model.layers.1.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 37 |
+
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 38 |
+
"model.layers.1.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 39 |
+
"model.layers.1.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 40 |
+
"model.layers.1.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 41 |
+
"model.layers.1.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 42 |
+
"model.layers.1.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 43 |
+
"model.layers.1.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 44 |
+
"model.layers.10.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 45 |
+
"model.layers.10.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 46 |
+
"model.layers.10.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 47 |
+
"model.layers.10.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 48 |
+
"model.layers.10.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 49 |
+
"model.layers.10.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 50 |
+
"model.layers.10.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 51 |
+
"model.layers.10.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 52 |
+
"model.layers.10.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 53 |
+
"model.layers.10.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 54 |
+
"model.layers.10.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 55 |
+
"model.layers.10.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 56 |
+
"model.layers.10.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 57 |
+
"model.layers.10.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 58 |
+
"model.layers.10.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 59 |
+
"model.layers.10.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 60 |
+
"model.layers.10.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 61 |
+
"model.layers.10.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 62 |
+
"model.layers.11.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 63 |
+
"model.layers.11.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 64 |
+
"model.layers.11.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 65 |
+
"model.layers.11.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 66 |
+
"model.layers.11.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 67 |
+
"model.layers.11.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 68 |
+
"model.layers.11.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 69 |
+
"model.layers.11.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 70 |
+
"model.layers.11.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 71 |
+
"model.layers.11.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 72 |
+
"model.layers.11.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 73 |
+
"model.layers.11.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 74 |
+
"model.layers.11.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 75 |
+
"model.layers.11.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 76 |
+
"model.layers.11.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 77 |
+
"model.layers.11.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 78 |
+
"model.layers.11.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 79 |
+
"model.layers.11.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 80 |
+
"model.layers.12.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 81 |
+
"model.layers.12.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 82 |
+
"model.layers.12.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 83 |
+
"model.layers.12.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 84 |
+
"model.layers.12.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 85 |
+
"model.layers.12.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 86 |
+
"model.layers.12.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 87 |
+
"model.layers.12.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 88 |
+
"model.layers.12.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 89 |
+
"model.layers.12.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 90 |
+
"model.layers.12.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 91 |
+
"model.layers.12.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 92 |
+
"model.layers.12.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 93 |
+
"model.layers.12.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 94 |
+
"model.layers.12.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 95 |
+
"model.layers.12.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 96 |
+
"model.layers.12.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 97 |
+
"model.layers.12.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 98 |
+
"model.layers.13.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 99 |
+
"model.layers.13.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 100 |
+
"model.layers.13.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 101 |
+
"model.layers.13.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 102 |
+
"model.layers.13.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 103 |
+
"model.layers.13.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 104 |
+
"model.layers.13.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 105 |
+
"model.layers.13.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 106 |
+
"model.layers.13.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 107 |
+
"model.layers.13.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 108 |
+
"model.layers.13.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 109 |
+
"model.layers.13.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 110 |
+
"model.layers.13.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 111 |
+
"model.layers.13.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 112 |
+
"model.layers.13.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 113 |
+
"model.layers.13.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 114 |
+
"model.layers.13.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 115 |
+
"model.layers.13.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 116 |
+
"model.layers.14.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 117 |
+
"model.layers.14.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 118 |
+
"model.layers.14.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 119 |
+
"model.layers.14.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 120 |
+
"model.layers.14.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 121 |
+
"model.layers.14.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 122 |
+
"model.layers.14.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 123 |
+
"model.layers.14.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 124 |
+
"model.layers.14.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 125 |
+
"model.layers.14.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 126 |
+
"model.layers.14.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 127 |
+
"model.layers.14.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 128 |
+
"model.layers.14.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 129 |
+
"model.layers.14.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 130 |
+
"model.layers.14.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 131 |
+
"model.layers.14.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 132 |
+
"model.layers.14.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 133 |
+
"model.layers.14.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 134 |
+
"model.layers.15.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 135 |
+
"model.layers.15.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 136 |
+
"model.layers.15.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 137 |
+
"model.layers.15.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 138 |
+
"model.layers.15.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 139 |
+
"model.layers.15.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 140 |
+
"model.layers.15.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 141 |
+
"model.layers.15.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 142 |
+
"model.layers.15.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 143 |
+
"model.layers.15.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 144 |
+
"model.layers.15.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 145 |
+
"model.layers.15.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 146 |
+
"model.layers.15.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 147 |
+
"model.layers.15.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 148 |
+
"model.layers.15.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 149 |
+
"model.layers.15.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 150 |
+
"model.layers.15.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 151 |
+
"model.layers.15.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 152 |
+
"model.layers.16.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 153 |
+
"model.layers.16.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 154 |
+
"model.layers.16.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 155 |
+
"model.layers.16.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 156 |
+
"model.layers.16.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 157 |
+
"model.layers.16.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 158 |
+
"model.layers.16.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 159 |
+
"model.layers.16.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 160 |
+
"model.layers.16.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 161 |
+
"model.layers.16.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 162 |
+
"model.layers.16.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 163 |
+
"model.layers.16.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 164 |
+
"model.layers.16.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 165 |
+
"model.layers.16.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 166 |
+
"model.layers.16.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 167 |
+
"model.layers.16.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 168 |
+
"model.layers.16.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 169 |
+
"model.layers.16.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 170 |
+
"model.layers.17.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 171 |
+
"model.layers.17.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 172 |
+
"model.layers.17.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 173 |
+
"model.layers.17.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 174 |
+
"model.layers.17.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 175 |
+
"model.layers.17.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 176 |
+
"model.layers.17.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 177 |
+
"model.layers.17.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 178 |
+
"model.layers.17.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 179 |
+
"model.layers.17.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 180 |
+
"model.layers.17.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 181 |
+
"model.layers.17.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 182 |
+
"model.layers.17.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 183 |
+
"model.layers.17.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 184 |
+
"model.layers.17.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 185 |
+
"model.layers.17.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 186 |
+
"model.layers.17.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 187 |
+
"model.layers.17.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 188 |
+
"model.layers.18.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 189 |
+
"model.layers.18.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 190 |
+
"model.layers.18.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 191 |
+
"model.layers.18.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 192 |
+
"model.layers.18.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 193 |
+
"model.layers.18.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 194 |
+
"model.layers.18.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 195 |
+
"model.layers.18.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 196 |
+
"model.layers.18.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 197 |
+
"model.layers.18.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 198 |
+
"model.layers.18.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 199 |
+
"model.layers.18.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 200 |
+
"model.layers.18.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 201 |
+
"model.layers.18.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 202 |
+
"model.layers.18.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 203 |
+
"model.layers.18.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 204 |
+
"model.layers.18.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 205 |
+
"model.layers.18.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 206 |
+
"model.layers.19.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 207 |
+
"model.layers.19.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 208 |
+
"model.layers.19.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 209 |
+
"model.layers.19.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 210 |
+
"model.layers.19.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 211 |
+
"model.layers.19.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 212 |
+
"model.layers.19.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 213 |
+
"model.layers.19.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 214 |
+
"model.layers.19.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 215 |
+
"model.layers.19.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 216 |
+
"model.layers.19.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 217 |
+
"model.layers.19.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 218 |
+
"model.layers.19.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 219 |
+
"model.layers.19.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 220 |
+
"model.layers.19.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 221 |
+
"model.layers.19.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 222 |
+
"model.layers.19.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 223 |
+
"model.layers.19.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 224 |
+
"model.layers.2.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 225 |
+
"model.layers.2.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 226 |
+
"model.layers.2.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 227 |
+
"model.layers.2.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 228 |
+
"model.layers.2.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 229 |
+
"model.layers.2.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 230 |
+
"model.layers.2.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 231 |
+
"model.layers.2.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 232 |
+
"model.layers.2.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 233 |
+
"model.layers.2.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 234 |
+
"model.layers.2.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 235 |
+
"model.layers.2.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 236 |
+
"model.layers.2.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 237 |
+
"model.layers.2.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 238 |
+
"model.layers.2.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 239 |
+
"model.layers.2.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 240 |
+
"model.layers.2.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 241 |
+
"model.layers.2.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 242 |
+
"model.layers.20.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 243 |
+
"model.layers.20.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 244 |
+
"model.layers.20.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 245 |
+
"model.layers.20.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 246 |
+
"model.layers.20.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 247 |
+
"model.layers.20.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 248 |
+
"model.layers.20.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 249 |
+
"model.layers.20.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 250 |
+
"model.layers.20.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 251 |
+
"model.layers.20.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 252 |
+
"model.layers.20.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 253 |
+
"model.layers.20.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 254 |
+
"model.layers.20.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 255 |
+
"model.layers.20.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 256 |
+
"model.layers.20.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 257 |
+
"model.layers.20.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 258 |
+
"model.layers.20.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 259 |
+
"model.layers.20.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 260 |
+
"model.layers.21.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 261 |
+
"model.layers.21.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 262 |
+
"model.layers.21.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 263 |
+
"model.layers.21.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 264 |
+
"model.layers.21.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 265 |
+
"model.layers.21.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 266 |
+
"model.layers.21.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 267 |
+
"model.layers.21.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 268 |
+
"model.layers.21.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 269 |
+
"model.layers.21.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 270 |
+
"model.layers.21.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 271 |
+
"model.layers.21.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 272 |
+
"model.layers.21.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 273 |
+
"model.layers.21.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 274 |
+
"model.layers.21.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 275 |
+
"model.layers.21.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 276 |
+
"model.layers.21.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 277 |
+
"model.layers.21.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 278 |
+
"model.layers.22.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 279 |
+
"model.layers.22.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 280 |
+
"model.layers.22.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 281 |
+
"model.layers.22.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 282 |
+
"model.layers.22.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 283 |
+
"model.layers.22.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 284 |
+
"model.layers.22.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 285 |
+
"model.layers.22.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 286 |
+
"model.layers.22.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 287 |
+
"model.layers.22.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 288 |
+
"model.layers.22.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 289 |
+
"model.layers.22.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 290 |
+
"model.layers.22.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 291 |
+
"model.layers.22.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 292 |
+
"model.layers.22.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 293 |
+
"model.layers.22.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 294 |
+
"model.layers.22.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 295 |
+
"model.layers.22.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 296 |
+
"model.layers.23.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 297 |
+
"model.layers.23.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 298 |
+
"model.layers.23.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 299 |
+
"model.layers.23.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 300 |
+
"model.layers.23.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 301 |
+
"model.layers.23.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 302 |
+
"model.layers.23.mlp.up_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 303 |
+
"model.layers.23.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 304 |
+
"model.layers.23.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 305 |
+
"model.layers.23.self_attn.k_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 306 |
+
"model.layers.23.self_attn.key_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 307 |
+
"model.layers.23.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 308 |
+
"model.layers.23.self_attn.o_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 309 |
+
"model.layers.23.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 310 |
+
"model.layers.23.self_attn.q_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 311 |
+
"model.layers.23.self_attn.query_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 312 |
+
"model.layers.23.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 313 |
+
"model.layers.23.self_attn.v_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 314 |
+
"model.layers.24.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 315 |
+
"model.layers.24.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 316 |
+
"model.layers.24.mlp.down_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 317 |
+
"model.layers.24.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 318 |
+
"model.layers.24.mlp.gate_proj.weight_clip_val": "model-00001-of-00002.safetensors",
|
| 319 |
+
"model.layers.24.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 320 |
+
"model.layers.24.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 321 |
+
"model.layers.24.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 322 |
+
"model.layers.24.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 323 |
+
"model.layers.24.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 324 |
+
"model.layers.24.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 325 |
+
"model.layers.24.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 326 |
+
"model.layers.24.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 327 |
+
"model.layers.24.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 328 |
+
"model.layers.24.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 329 |
+
"model.layers.24.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 330 |
+
"model.layers.24.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 331 |
+
"model.layers.24.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 332 |
+
"model.layers.25.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 333 |
+
"model.layers.25.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 334 |
+
"model.layers.25.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 335 |
+
"model.layers.25.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 336 |
+
"model.layers.25.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 337 |
+
"model.layers.25.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 338 |
+
"model.layers.25.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 339 |
+
"model.layers.25.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 340 |
+
"model.layers.25.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 341 |
+
"model.layers.25.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 342 |
+
"model.layers.25.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 343 |
+
"model.layers.25.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 344 |
+
"model.layers.25.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 345 |
+
"model.layers.25.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 346 |
+
"model.layers.25.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 347 |
+
"model.layers.25.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 348 |
+
"model.layers.25.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 349 |
+
"model.layers.25.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 350 |
+
"model.layers.26.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 351 |
+
"model.layers.26.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 352 |
+
"model.layers.26.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 353 |
+
"model.layers.26.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 354 |
+
"model.layers.26.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 355 |
+
"model.layers.26.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 356 |
+
"model.layers.26.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 357 |
+
"model.layers.26.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 358 |
+
"model.layers.26.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 359 |
+
"model.layers.26.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 360 |
+
"model.layers.26.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 361 |
+
"model.layers.26.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 362 |
+
"model.layers.26.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 363 |
+
"model.layers.26.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 364 |
+
"model.layers.26.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 365 |
+
"model.layers.26.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 366 |
+
"model.layers.26.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 367 |
+
"model.layers.26.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 368 |
+
"model.layers.27.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 369 |
+
"model.layers.27.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 370 |
+
"model.layers.27.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 371 |
+
"model.layers.27.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 372 |
+
"model.layers.27.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 373 |
+
"model.layers.27.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 374 |
+
"model.layers.27.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 375 |
+
"model.layers.27.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 376 |
+
"model.layers.27.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 377 |
+
"model.layers.27.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 378 |
+
"model.layers.27.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 379 |
+
"model.layers.27.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 380 |
+
"model.layers.27.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 381 |
+
"model.layers.27.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 382 |
+
"model.layers.27.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 383 |
+
"model.layers.27.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 384 |
+
"model.layers.27.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 385 |
+
"model.layers.27.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 386 |
+
"model.layers.28.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 387 |
+
"model.layers.28.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 388 |
+
"model.layers.28.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 389 |
+
"model.layers.28.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 390 |
+
"model.layers.28.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 391 |
+
"model.layers.28.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 392 |
+
"model.layers.28.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 393 |
+
"model.layers.28.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 394 |
+
"model.layers.28.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 395 |
+
"model.layers.28.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 396 |
+
"model.layers.28.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 397 |
+
"model.layers.28.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 398 |
+
"model.layers.28.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 399 |
+
"model.layers.28.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 400 |
+
"model.layers.28.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 401 |
+
"model.layers.28.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 402 |
+
"model.layers.28.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 403 |
+
"model.layers.28.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 404 |
+
"model.layers.29.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 405 |
+
"model.layers.29.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 406 |
+
"model.layers.29.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 407 |
+
"model.layers.29.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 408 |
+
"model.layers.29.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 409 |
+
"model.layers.29.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 410 |
+
"model.layers.29.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 411 |
+
"model.layers.29.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 412 |
+
"model.layers.29.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 413 |
+
"model.layers.29.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 414 |
+
"model.layers.29.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 415 |
+
"model.layers.29.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 416 |
+
"model.layers.29.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 417 |
+
"model.layers.29.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 418 |
+
"model.layers.29.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 419 |
+
"model.layers.29.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 420 |
+
"model.layers.29.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 421 |
+
"model.layers.29.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 422 |
+
"model.layers.3.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 423 |
+
"model.layers.3.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 424 |
+
"model.layers.3.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 425 |
+
"model.layers.3.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 426 |
+
"model.layers.3.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 427 |
+
"model.layers.3.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 428 |
+
"model.layers.3.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 429 |
+
"model.layers.3.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 430 |
+
"model.layers.3.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 431 |
+
"model.layers.3.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 432 |
+
"model.layers.3.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 433 |
+
"model.layers.3.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 434 |
+
"model.layers.3.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 435 |
+
"model.layers.3.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 436 |
+
"model.layers.3.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 437 |
+
"model.layers.3.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 438 |
+
"model.layers.3.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 439 |
+
"model.layers.3.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 440 |
+
"model.layers.30.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 441 |
+
"model.layers.30.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 442 |
+
"model.layers.30.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 443 |
+
"model.layers.30.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 444 |
+
"model.layers.30.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 445 |
+
"model.layers.30.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 446 |
+
"model.layers.30.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 447 |
+
"model.layers.30.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 448 |
+
"model.layers.30.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 449 |
+
"model.layers.30.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 450 |
+
"model.layers.30.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 451 |
+
"model.layers.30.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 452 |
+
"model.layers.30.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 453 |
+
"model.layers.30.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 454 |
+
"model.layers.30.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 455 |
+
"model.layers.30.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 456 |
+
"model.layers.30.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 457 |
+
"model.layers.30.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 458 |
+
"model.layers.31.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 459 |
+
"model.layers.31.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 460 |
+
"model.layers.31.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 461 |
+
"model.layers.31.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 462 |
+
"model.layers.31.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 463 |
+
"model.layers.31.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 464 |
+
"model.layers.31.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 465 |
+
"model.layers.31.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 466 |
+
"model.layers.31.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 467 |
+
"model.layers.31.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 468 |
+
"model.layers.31.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 469 |
+
"model.layers.31.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 470 |
+
"model.layers.31.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 471 |
+
"model.layers.31.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 472 |
+
"model.layers.31.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 473 |
+
"model.layers.31.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 474 |
+
"model.layers.31.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 475 |
+
"model.layers.31.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 476 |
+
"model.layers.4.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 477 |
+
"model.layers.4.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 478 |
+
"model.layers.4.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 479 |
+
"model.layers.4.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 480 |
+
"model.layers.4.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 481 |
+
"model.layers.4.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 482 |
+
"model.layers.4.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 483 |
+
"model.layers.4.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 484 |
+
"model.layers.4.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 485 |
+
"model.layers.4.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 486 |
+
"model.layers.4.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 487 |
+
"model.layers.4.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 488 |
+
"model.layers.4.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 489 |
+
"model.layers.4.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 490 |
+
"model.layers.4.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 491 |
+
"model.layers.4.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 492 |
+
"model.layers.4.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 493 |
+
"model.layers.4.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 494 |
+
"model.layers.5.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 495 |
+
"model.layers.5.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 496 |
+
"model.layers.5.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 497 |
+
"model.layers.5.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 498 |
+
"model.layers.5.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 499 |
+
"model.layers.5.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 500 |
+
"model.layers.5.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 501 |
+
"model.layers.5.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 502 |
+
"model.layers.5.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 503 |
+
"model.layers.5.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 504 |
+
"model.layers.5.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 505 |
+
"model.layers.5.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 506 |
+
"model.layers.5.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 507 |
+
"model.layers.5.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 508 |
+
"model.layers.5.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 509 |
+
"model.layers.5.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 510 |
+
"model.layers.5.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 511 |
+
"model.layers.5.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 512 |
+
"model.layers.6.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 513 |
+
"model.layers.6.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 514 |
+
"model.layers.6.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 515 |
+
"model.layers.6.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 516 |
+
"model.layers.6.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 517 |
+
"model.layers.6.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 518 |
+
"model.layers.6.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 519 |
+
"model.layers.6.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 520 |
+
"model.layers.6.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 521 |
+
"model.layers.6.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 522 |
+
"model.layers.6.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 523 |
+
"model.layers.6.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 524 |
+
"model.layers.6.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 525 |
+
"model.layers.6.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 526 |
+
"model.layers.6.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 527 |
+
"model.layers.6.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 528 |
+
"model.layers.6.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 529 |
+
"model.layers.6.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 530 |
+
"model.layers.7.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 531 |
+
"model.layers.7.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 532 |
+
"model.layers.7.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 533 |
+
"model.layers.7.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 534 |
+
"model.layers.7.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 535 |
+
"model.layers.7.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 536 |
+
"model.layers.7.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 537 |
+
"model.layers.7.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 538 |
+
"model.layers.7.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 539 |
+
"model.layers.7.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 540 |
+
"model.layers.7.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 541 |
+
"model.layers.7.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 542 |
+
"model.layers.7.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 543 |
+
"model.layers.7.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 544 |
+
"model.layers.7.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 545 |
+
"model.layers.7.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 546 |
+
"model.layers.7.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 547 |
+
"model.layers.7.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 548 |
+
"model.layers.8.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 549 |
+
"model.layers.8.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 550 |
+
"model.layers.8.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 551 |
+
"model.layers.8.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 552 |
+
"model.layers.8.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 553 |
+
"model.layers.8.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 554 |
+
"model.layers.8.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 555 |
+
"model.layers.8.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 556 |
+
"model.layers.8.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 557 |
+
"model.layers.8.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 558 |
+
"model.layers.8.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 559 |
+
"model.layers.8.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 560 |
+
"model.layers.8.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 561 |
+
"model.layers.8.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 562 |
+
"model.layers.8.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 563 |
+
"model.layers.8.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 564 |
+
"model.layers.8.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 565 |
+
"model.layers.8.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 566 |
+
"model.layers.9.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 567 |
+
"model.layers.9.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 568 |
+
"model.layers.9.mlp.down_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 569 |
+
"model.layers.9.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 570 |
+
"model.layers.9.mlp.gate_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 571 |
+
"model.layers.9.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 572 |
+
"model.layers.9.mlp.up_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 573 |
+
"model.layers.9.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 574 |
+
"model.layers.9.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 575 |
+
"model.layers.9.self_attn.k_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 576 |
+
"model.layers.9.self_attn.key_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 577 |
+
"model.layers.9.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 578 |
+
"model.layers.9.self_attn.o_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 579 |
+
"model.layers.9.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 580 |
+
"model.layers.9.self_attn.q_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 581 |
+
"model.layers.9.self_attn.query_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 582 |
+
"model.layers.9.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 583 |
+
"model.layers.9.self_attn.v_proj.weight_clip_val": "model-00002-of-00002.safetensors",
|
| 584 |
+
"model.norm.weight": "model-00002-of-00002.safetensors"
|
| 585 |
+
}
|
| 586 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<|hy_begin▁of▁sentence|>",
|
| 3 |
+
"eos_token": "<|hy_place▁holder▁no▁7|>",
|
| 4 |
+
"pad_token": "<|hy_▁pad▁|>"
|
| 5 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|