---
title: Qwen3.5-4B-KIMI-DeepSeek-Merged-GGUF
canonical_url: "https://www.modelscope.cn/models/hyb0429/Qwen3.5-4B-KIMI-DeepSeek-Merged-GGUF"
md_url: "https://www.modelscope.cn/models/hyb0429/Qwen3.5-4B-KIMI-DeepSeek-Merged-GGUF.md"
repository: hyb0429/Qwen3.5-4B-KIMI-DeepSeek-Merged-GGUF
last_updated: 2026-10-05
license: apache-2.0
pipeline_tag: text-generation
tasks:
  - text-generation
base_model:
  - Kassadin88/Qwen3.5-4B-KIMI-Distill
  - ShenRen1231/Qwen3.5-4B-DeepSeek-v4-Flash
base_model_relation: quantized
library_name:
  - gguf
language:
  - zh
  - en
downloads: 87
stars: 4
tags:
  - gguf
  - llama.cpp
  - ollama
  - qwen3.5
  - model-fusion
  - linear-merge
  - text-generation
  - code
  - chinese
---

# Qwen3.5-4B-KIMI-DeepSeek-Merged-GGUF

> Qwen3.5-4B-KIMI-DeepSeek-Merged-GGUF - hyb0429 在 ModelScope 开源的模型。Qwen3.5-4B-KIMI-DeepSeek-Merged (GGUF)

hyb0429/Qwen3.5-4B-KIMI-DeepSeek-Merged-GGUF 是 ModelScope 魔搭社区上的text-generation模型，采用 apache-2.0 许可，基于 Kassadin88/Qwen3.5-4B-KIMI-Distill、ShenRen1231/Qwen3.5-4B-DeepSeek-v4-Flash 构建。

- **Repository**: hyb0429/Qwen3.5-4B-KIMI-DeepSeek-Merged-GGUF
- **License**: apache-2.0
- **Tasks**: text-generation
- **Base model**: Kassadin88/Qwen3.5-4B-KIMI-Distill, ShenRen1231/Qwen3.5-4B-DeepSeek-v4-Flash
- **Tags**: gguf, llama.cpp, ollama, qwen3.5, model-fusion, linear-merge, text-generation, code, chinese
- **Downloads**: 87
- **Stars**: 4
- **Last updated**: 2026-10-05

Source: https://www.modelscope.cn/models/hyb0429/Qwen3.5-4B-KIMI-DeepSeek-Merged-GGUF

---

# Qwen3.5-4B-KIMI-DeepSeek-Merged (GGUF)

这是一个通过 **模型融合（Model Merging）** 技术，将两个基于 Qwen3.5-4B 架构的蒸馏模型进行 **线性加权平均** 后得到的 4B 参数语言模型，并已转换为 **GGUF Q4_K_M** 格式，适合在 `llama.cpp`、`Ollama` 等推理框架上运行。

## 📖 模型简介

- **基础架构**：Qwen3.5-4B（混合注意力架构，支持长上下文）
- **融合来源**：
  - [Kassadin88/Qwen3.5-4B-KIMI-Distill](https://modelscope.cn/models/Kassadin88/Qwen3.5-4B-KIMI-Distill) —— 以中文对话和长文本见长
  - [ShenRen1231/Qwen3.5-4B-DeepSeek-v4-Flash](https://modelscope.cn/models/ShenRen1231/Qwen3.5-4B-DeepSeek-v4-Flash) —— 以代码生成和数学推理见长
- **融合方法**：对两个模型的语言层权重进行 **0.5 : 0.5 线性加权平均**，视觉塔等非语言部分被舍弃
- **量化格式**：Q4_K_M，文件约 **2.5GB**
- **支持语言**：中文、英文
- **适用任务**：文本生成、代码补全、问答、推理、中文对话

## 🧪 融合细节

- 仅合并了 **426 个共有语言层张量**（`model.language_model.*`）
- KIMI 原模型中的 297 个视觉塔张量（`model.visual.*`）被丢弃
- 融合时保持 FP16 精度，随后转换为 GGUF F16 并量化为 Q4_K_M
- 转换脚本基于 `llama.cpp` 的 `convert_hf_to_gguf.py`，并使用了 `--no-mtp` 跳过 MTP 层

## 🚀 快速开始

本仓库包含以下文件：
- `merged-Q4_K_M.gguf`：模型权重
- `Modelfile`：Ollama 加载配置

### 方式一：使用 Ollama（推荐）

1. 安装 Ollama：https://ollama.com/download

2. 下载本仓库的 `merged-Q4_K_M.gguf` 和 `Modelfile`，放在同一个目录下。

3. 在终端进入该目录，执行：

   ```bash
   ollama create kimi-deepseek-merged -f Modelfile
   ollama run kimi-deepseek-merged
   ```

4. 之后即可直接对话。也可以作为 API 调用：

   ```bash
   curl http://localhost:11434/api/chat -d '{"model": "kimi-deepseek-merged", "messages": [{"role": "user", "content": "你好"}], "stream": false}'
   ```

### 方式二：使用 llama.cpp

1. 克隆并编译 `llama.cpp`：

   ```bash
   git clone https://github.com/ggerganov/llama.cpp
   cd llama.cpp
   cmake -B build -DGGML_CUDA=OFF
   cmake --build build --config Release -j8
   ```

2. 用 `llama-cli` 直接推理：

   ```bash
   ./build/bin/llama-cli -m /path/to/merged-Q4_K_M.gguf -p "你好，请介绍一下你自己。" -n 256 -t 8
   ```

3. 对话模式（多轮）：

   ```bash
   ./build/bin/llama-cli -m /path/to/merged-Q4_K_M.gguf -t 8 -cnv
   ```

### 方式三：使用 llama-server（OpenAI 兼容 API）

1. 启动服务：

   ```bash
   ./build/bin/llama-server -m /path/to/merged-Q4_K_M.gguf -t 8 -c 4096 --host 0.0.0.0 --port 8080
   ```

2. 用 curl 调用：

   ```bash
   curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{"messages": [{"role": "user", "content": "写一个Python回文函数"}], "max_tokens": 256, "temperature": 0.7, "chat_template_kwargs": {"enable_thinking": false}}'
   ```

3. 也可以配合任意 OpenAI 兼容客户端（Chatbox、NextChat 等）使用，API Base 填 `http://localhost:8080/v1`。

## 📊 初步测试表现

在纯 CPU（8 核）环境下，使用 `llama-cli` 进行测试，结果如下：

| 任务 | 表现 |
|------|------|
| Python 回文判断函数 | ✅ 正确生成，逻辑清晰 |
| 括号匹配函数 | ✅ 正确使用栈实现，边界处理完整 |
| 鸡兔同笼问题 | ✅ 正确列出方程并求解 |
| 中文闭包解释 | ✅ 语言通俗，举例恰当 |
| JSON 格式输出 | ✅ 严格遵循格式要求 |

生成速度约为 **16 tokens/s**（Q4_K_M，8 核 CPU），Prompt 处理速度约 **58 tokens/s**。

## ⚠️ 局限性

- **视觉能力缺失**：原 KIMI 模型的多模态能力在融合过程中被移除，本模型仅支持纯文本。
- **性能波动**：线性融合可能导致在某些任务上不如单一原版模型，建议在实际使用中评估。
- **推理速度**：纯 CPU 推理速度有限，建议在 GPU 或高性能 CPU 上使用。
- **上下文长度**：受限于量化格式，建议上下文不超过 4096 tokens。
- **Ollama 兼容性**：需要 Ollama 版本支持 `qwen3.5` 架构，建议使用最新版。如果加载失败，请升级 Ollama。
- **thinking 模式**：该模型带思考链，使用时建议在请求中关闭 thinking，否则容易耗尽 max_tokens：`"chat_template_kwargs": {"enable_thinking": false}`

## 📜 许可证

本项目遵循 **Apache 2.0** 许可证。使用前请确保遵守原模型的许可条款。

## 🙏 致谢

- 感谢 [Kassadin88](https://modelscope.cn/profile/Kassadin88) 和 [ShenRen1231](https://modelscope.cn/profile/ShenRen1231) 提供的优秀蒸馏模型
- 感谢 `llama.cpp` 社区提供的 GGUF 转换与量化工具

## 📚 引用

```bibtex
@misc{qwen3.5-kimi-deepseek-merged,
  title = "Qwen3.5-4B-KIMI-DeepSeek-Merged (GGUF)",
  author = "hyb0429",
  year = "2026",
  publisher = "ModelScope",
  howpublished = "https://modelscope.cn/models/hyb0429/Qwen3.5-4B-KIMI-DeepSeek-Merged-GGUF"
}
```
