Sakura · GGUF quantization of LiquidAI/LFM3-1.7B
Independent community quantization. Not an official release of the upstream author.
Made with an importance matrix (imatrix). The weights were quantized with importance weights computed from a fixed calibration text; the exact method and the hashes are in section 4.
1. Model Overview
Architecture: lfm3 · source formats: gguf.
Original: 3.5 GB (BF16 GGUF, the source of these quantizations).
| Quant | Size | Compared with the original |
|---|---|---|
| Q2_K | 0.8 GB | 78 % smaller |
| Q3_K_M | 0.9 GB | 74 % smaller |
| Q4_K_M | 1.1 GB | 68 % smaller |
| Q5_K_M | 1.3 GB | 64 % smaller |
2. Original Model / Attribution
- Original model: LiquidAI/LFM3-1.7B, commit
b3f2ae5d73cd3c91bf40e8ba752c648aa05dffdf(model card at that commit) - Submitted repository: LiquidAI/LFM3-1.7B-GGUF
- Declared base models: LiquidAI/LFM3-1.7B (relation:
quantized) - Quantized from:
LiquidAI/LFM3-1.7B-GGUFatb3f2ae5d73cd3c91bf40e8ba752c648aa05dffdf, fileLFM3-1.7B-BF16.gguf(SHA-25639158a79f56edb85e0c4252ce6447b8d7883ef82ffedd02f0cda7c84da5e9f68; provenance verified:True) - Quantized by
webmp3. Upstream authors retain their license and attribution.
3. Files
| File | Bytes | SHA-256 | Quant |
|---|---|---|---|
Sakura-LFM3-1.7B-Q2_K.gguf |
750154816 | a79399445f28e444577081e899ecfe30c5e79971c835f3867ce8346e8bb80a7c |
Q2_K |
Sakura-LFM3-1.7B-Q3_K_M.gguf |
914899776 | f080e790f779c3c79dc0202171b9e3727b33a103676ba56713e9b7006d75223f |
Q3_K_M |
Sakura-LFM3-1.7B-Q4_K_M.gguf |
1099628096 | c797b15d7003b3b6bf8cf009af97f3f590c3e5f4c0bfc37186722829692dde48 |
Q4_K_M |
Sakura-LFM3-1.7B-Q5_K_M.gguf |
1258663488 | e02076d40af37baacd9653816830edb22279df87c49d3378c8057bc8fa36899c |
Q5_K_M |
4. How These Were Made
This route performs existing-GGUF requantization from the pinned BF16 source GGUF named above. This job did not convert the upstream BF16/safetensors checkpoint.
Quantized with the stock llama.cpp tools and an importance matrix (imatrix): the matrix was computed once with llama-imatrix from the fixed calibration text hfqa-original-calibration-v2 (6144 bytes of English, German and Chinese text, code and data formats, public domain; 12 chunks of 128 tokens) and applied with llama-quantize --imatrix. Matrix SHA-256: a0550e2127e21843e6a5dfb4853c754277cf7e9c80c18a9fed1c92278a7e3cc2. Calibration text SHA-256: bc7216ea05c8bd05d6b9e94d813ec9eb651a2375288c08c06135a3f874d886f2. The calibration text is short; no quality improvement is claimed without a benchmark. The llama.cpp tools were built from the source commit 19ff817fb25e9a1b838b1d7f9f4325f7bf9779c4 of ggml-org/llama.cpp, because no official release contained this architecture yet.
The quant label names the llama.cpp preset. Stock llama.cpp keeps some tensors (for example normalization weights) in higher precision, so not every tensor is stored in the named type; the table shows what each file really contains.
| File | Tensors by type |
|---|---|
Sakura-LFM3-1.7B-Q2_K.gguf |
F32: 133, Q2_K: 107, Q3_K: 46, Q6_K: 1 |
Sakura-LFM3-1.7B-Q3_K_M.gguf |
F32: 133, Q3_K: 107, Q4_K: 43, Q5_K: 3, Q6_K: 1 |
Sakura-LFM3-1.7B-Q4_K_M.gguf |
F32: 133, Q4_K: 136, Q6_K: 18 |
Sakura-LFM3-1.7B-Q5_K_M.gguf |
F32: 133, Q5_K: 136, Q6_K: 18 |
5. Verification
- GGUF structure valid:
True - Real inference test (every file loaded by llama.cpp and used to generate text once):
yes
| File | llama.cpp build | Executable SHA-256 |
|---|---|---|
Sakura-LFM3-1.7B-Q2_K.gguf |
commit 19ff817fb25e9a1b838b1d7f9f4325f7bf9779c4 |
88c925d244b83b144df4a3b61445acb0a831cfaff343824cb7ad445ba622bbef |
Sakura-LFM3-1.7B-Q3_K_M.gguf |
commit 19ff817fb25e9a1b838b1d7f9f4325f7bf9779c4 |
88c925d244b83b144df4a3b61445acb0a831cfaff343824cb7ad445ba622bbef |
Sakura-LFM3-1.7B-Q4_K_M.gguf |
commit 19ff817fb25e9a1b838b1d7f9f4325f7bf9779c4 |
88c925d244b83b144df4a3b61445acb0a831cfaff343824cb7ad445ba622bbef |
Sakura-LFM3-1.7B-Q5_K_M.gguf |
commit 19ff817fb25e9a1b838b1d7f9f4325f7bf9779c4 |
88c925d244b83b144df4a3b61445acb0a831cfaff343824cb7ad445ba622bbef |
Measured deviation from the BF16 source
Measured with the stock llama-perplexity on two fixed public-domain texts that were not used for calibration (English: Pride and Prejudice; Chinese: Hongloumeng; 64 windows of 512 tokens). The BF16 source itself has a perplexity of 84.459 on this text.
| Quant | Perplexity | Perplexity ratio to the source | Mean KL divergence | Same top token |
|---|---|---|---|---|
| Q2_K | 134.771 | 1.5957 ± 0.0316 | 1.00500 | 46.16 % |
| Q3_K_M | 92.416 | 1.0942 ± 0.0140 | 0.41925 | 64.11 % |
| Q4_K_M | 87.582 | 1.0370 ± 0.0085 | 0.16863 | 76.63 % |
| Q5_K_M | 85.276 | 1.0097 ± 0.0050 | 0.06080 | 85.03 % |
A ratio close to 1, a small KL divergence and a high share of identical top tokens mean the quantized model predicts like the source. These numbers describe agreement with the source on this text only; they are not task benchmarks and say nothing about other languages or tasks.
6. Download and Usage
llama-cli -m <file>.gguf -p "Hello" -n 32
Needs a llama.cpp build that supports this architecture. If a quantization is split into numbered parts, keep them together and load the first one.
7. Limitations
No coding benchmark, perplexity or quality score is claimed unless a measured value is listed above.
8. License Information
Source license: other. approved by the operator: lfm1.0 (https://huggingface.co/LiquidAI/LFM3-1.7B-GGUF/resolve/main/LICENSE) The license text of the source repository is included in this repository as LICENSE; its conditions (for example notices and attribution) apply to these files as well.
1. 概述
独立的社区量化版本,并非上游作者的官方发布。
使用重要性矩阵(imatrix)量化。 量化时使用了由固定校准文本计算出的重要性权重;具体方法和哈希见第 4 节。
架构:lfm3 · 源格式:gguf。
原始模型:3.5 GB(BF16 GGUF,这些量化版本的来源)。
| 量化 | 大小 | 相比原始模型 |
|---|---|---|
| Q2_K | 0.8 GB | 小 78 % |
| Q3_K_M | 0.9 GB | 小 74 % |
| Q4_K_M | 1.1 GB | 小 68 % |
| Q5_K_M | 1.3 GB | 小 64 % |
2. 原始模型与署名
- 原始模型:LiquidAI/LFM3-1.7B,提交
b3f2ae5d73cd3c91bf40e8ba752c648aa05dffdf(该提交的模型卡) - 声明的基础模型:LiquidAI/LFM3-1.7B(关系:
quantized) - 量化来源:
LiquidAI/LFM3-1.7B-GGUF,提交b3f2ae5d73cd3c91bf40e8ba752c648aa05dffdf,文件LFM3-1.7B-BF16.gguf(SHA-25639158a79f56edb85e0c4252ce6447b8d7883ef82ffedd02f0cda7c84da5e9f68;出处已验证:True) - 量化者:
webmp3。上游作者保留其许可证与署名。
3. 文件
| 文件 | 字节数 | SHA-256 | 量化 |
|---|---|---|---|
Sakura-LFM3-1.7B-Q2_K.gguf |
750154816 | a79399445f28e444577081e899ecfe30c5e79971c835f3867ce8346e8bb80a7c |
Q2_K |
Sakura-LFM3-1.7B-Q3_K_M.gguf |
914899776 | f080e790f779c3c79dc0202171b9e3727b33a103676ba56713e9b7006d75223f |
Q3_K_M |
Sakura-LFM3-1.7B-Q4_K_M.gguf |
1099628096 | c797b15d7003b3b6bf8cf009af97f3f590c3e5f4c0bfc37186722829692dde48 |
Q4_K_M |
Sakura-LFM3-1.7B-Q5_K_M.gguf |
1258663488 | e02076d40af37baacd9653816830edb22279df87c49d3378c8057bc8fa36899c |
Q5_K_M |
4. 制作方式
该路线从上方标明的固定版本 BF16 源 GGUF 进行现有 GGUF 的再量化。本任务没有转换上游的 BF16/safetensors 检查点。
使用 llama.cpp 标准工具和重要性矩阵(imatrix)量化:矩阵由 llama-imatrix 根据固定的校准文本 hfqa-original-calibration-v2(6144 字节,含英文、德文、中文、代码和数据格式,属公有领域;12 个块,每块 128 个词元)计算一次,再由 llama-quantize --imatrix 应用。矩阵 SHA-256:a0550e2127e21843e6a5dfb4853c754277cf7e9c80c18a9fed1c92278a7e3cc2。校准文本 SHA-256:bc7216ea05c8bd05d6b9e94d813ec9eb651a2375288c08c06135a3f874d886f2。校准文本较短,没有基准测试,因此不声称质量提升。 所用的 llama.cpp 工具由 ggml-org/llama.cpp 的源码提交 19ff817fb25e9a1b838b1d7f9f4325f7bf9779c4 编译,因为当时尚无包含该架构的官方发布版本。
量化标签指 llama.cpp 的预设名称。标准 llama.cpp 会把部分张量(例如归一化权重)保留为更高精度,因此并非每个张量都以所标注的类型存储;下表列出每个文件实际包含的内容。
| 文件 | 按类型的张量数 |
|---|---|
Sakura-LFM3-1.7B-Q2_K.gguf |
F32: 133, Q2_K: 107, Q3_K: 46, Q6_K: 1 |
Sakura-LFM3-1.7B-Q3_K_M.gguf |
F32: 133, Q3_K: 107, Q4_K: 43, Q5_K: 3, Q6_K: 1 |
Sakura-LFM3-1.7B-Q4_K_M.gguf |
F32: 133, Q4_K: 136, Q6_K: 18 |
Sakura-LFM3-1.7B-Q5_K_M.gguf |
F32: 133, Q5_K: 136, Q6_K: 18 |
5. 验证
- GGUF 结构有效:
True - 真实推理测试(每个文件都由 llama.cpp 加载并生成一次文本):
yes
| 文件 | llama.cpp 版本 | 可执行文件 SHA-256 |
|---|---|---|
Sakura-LFM3-1.7B-Q2_K.gguf |
commit 19ff817fb25e9a1b838b1d7f9f4325f7bf9779c4 |
88c925d244b83b144df4a3b61445acb0a831cfaff343824cb7ad445ba622bbef |
Sakura-LFM3-1.7B-Q3_K_M.gguf |
commit 19ff817fb25e9a1b838b1d7f9f4325f7bf9779c4 |
88c925d244b83b144df4a3b61445acb0a831cfaff343824cb7ad445ba622bbef |
Sakura-LFM3-1.7B-Q4_K_M.gguf |
commit 19ff817fb25e9a1b838b1d7f9f4325f7bf9779c4 |
88c925d244b83b144df4a3b61445acb0a831cfaff343824cb7ad445ba622bbef |
Sakura-LFM3-1.7B-Q5_K_M.gguf |
commit 19ff817fb25e9a1b838b1d7f9f4325f7bf9779c4 |
88c925d244b83b144df4a3b61445acb0a831cfaff343824cb7ad445ba622bbef |
与 BF16 源的实测偏差
使用 llama.cpp 标准工具 llama-perplexity 在两段固定的公有领域文本上测量,文本未用于校准(英文:《傲慢与偏见》;中文:《红楼梦》;64 个窗口,每个 512 个词元)。BF16 源本身在该文本上的困惑度为 84.459。
| 量化 | 困惑度 | 与源的困惑度之比 | 平均 KL 散度 | 首选词元相同 |
|---|---|---|---|---|
| Q2_K | 134.771 | 1.5957 ± 0.0316 | 1.00500 | 46.16 % |
| Q3_K_M | 92.416 | 1.0942 ± 0.0140 | 0.41925 | 64.11 % |
| Q4_K_M | 87.582 | 1.0370 ± 0.0085 | 0.16863 | 76.63 % |
| Q5_K_M | 85.276 | 1.0097 ± 0.0050 | 0.06080 | 85.03 % |
比值接近 1、KL 散度小、首选词元相同的比例高,说明量化模型的预测更接近源模型。这些数字仅说明在该文本上与源模型的一致程度,不是任务基准测试,也不代表其他语言或任务。
6. 下载与使用
llama-cli -m <file>.gguf -p "Hello" -n 32
需要支持该架构的 llama.cpp 版本。如果某个量化被拆分为带编号的多个部分,请将它们放在一起并加载第一个。
7. 局限
除非上文列出了实测数值,否则不声称任何编程基准、困惑度或质量分数。
8. 许可证信息
源许可证:other。approved by the operator: lfm1.0 (https://huggingface.co/LiquidAI/LFM3-1.7B-GGUF/resolve/main/LICENSE) 源仓库的许可证全文已作为 LICENSE 附在本仓库中;其条件(例如声明与署名)同样适用于这些文件。
完整独立的中文版:README_zh.md