Deepseek V4 Flash 2位、3位和4位 GGUFs

Reddit r/LocalLLaMA 模型

摘要

DeepSeek V4 Flash 的 2位、3位和4位精度 GGUF 量化版本,已在 Hugging Face 上发布,可用于 llama.cpp 和 Ollama 等工具的本地推理。

暂无内容
查看原文
查看缓存全文

缓存时间: 2026/07/01 14:12

tarruda/DeepSeek-V4-Flash-GGUF · Hugging Face

来源:https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF 库llama-cpp-python (https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF?library=llama-cpp-python)如何使用 tarruda/DeepSeek-V4-Flash-GGUF 配合 llama-cpp-python:

``

!pip install llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained( repo_id=“tarruda/DeepSeek-V4-Flash-GGUF”, filename=“IQ3_XXS/DeepSeek-V4-Flash-IQ3_XXS-00001-of-00004.gguf”, ) ``

llm.create_chat_completion( messages = [ { "role": "user", "content": "法国的首都是哪里?" } ] )

笔记本Google Colab (https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF/colab)Kaggle (https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF/kaggle)本地应用设置 (https://huggingface.co/settings/local-apps)llama.cpp (https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF?local-app=llama.cpp)如何使用 tarruda/DeepSeek-V4-Flash-GGUF 配合 llama.cpp:

安装(macOS、Linux)

`` curl -LsSf https://llama.app/install.sh | sh

启动本地 OpenAI 兼容服务器,附带网页界面:

llama serve -hf tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS

在终端中直接运行推理:

llama cli -hf tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS ``

通过 WinGet 安装(Windows)

`` winget install llama.cpp

启动本地 OpenAI 兼容服务器,附带网页界面:

llama serve -hf tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS

在终端中直接运行推理:

llama cli -hf tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS ``

使用预编译二进制文件

``

从以下地址下载预编译二进制文件:

https://github.com/ggerganov/llama.cpp/releases

启动本地 OpenAI 兼容服务器,附带网页界面:

./llama-server -hf tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS

在终端中直接运行推理:

./llama-cli -hf tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS ``

从源码编译

`` git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake –build build -j –target llama-server llama-cli

启动本地 OpenAI 兼容服务器,附带网页界面:

./build/bin/llama-server -hf tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS

在终端中直接运行推理:

./build/bin/llama-cli -hf tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS ``

使用 Docker

docker model run hf.co/tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS

LM StudioJanvLLM (https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF?local-app=vllm)如何使用 tarruda/DeepSeek-V4-Flash-GGUF 配合 vLLM:

通过 pip 安装并启动模型服务

``

通过 pip 安装 vLLM:

pip install vllm

启动 vLLM 服务器:

vllm serve “tarruda/DeepSeek-V4-Flash-GGUF”

使用 curl 调用服务器(OpenAI 兼容 API):

curl -X POST “http://localhost:8000/v1/chat/completions”
-H “Content-Type: application/json”
–data ‘{ “model”: “tarruda/DeepSeek-V4-Flash-GGUF”, “messages”: [ { “role”: “user”, “content”: “法国的首都是哪里?” } ] }’ ``

使用 Docker

docker model run hf.co/tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS

Ollama (https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF?local-app=ollama)如何使用 tarruda/DeepSeek-V4-Flash-GGUF 配合 Ollama:

ollama run hf.co/tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS

Unsloth Studio (https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF?local-app=unsloth)如何使用 tarruda/DeepSeek-V4-Flash-GGUF 配合 Unsloth Studio:

安装 Unsloth Studio(macOS、Linux、WSL)

`` curl -fsSL https://unsloth.ai/install.sh | sh

运行 unsloth studio

unsloth studio -H 0.0.0.0 -p 8888

然后在浏览器中打开 http://localhost:8888

搜索 tarruda/DeepSeek-V4-Flash-GGUF 开始聊天

``

安装 Unsloth Studio(Windows)

`` irm https://unsloth.ai/install.ps1 | iex

运行 unsloth studio

unsloth studio -H 0.0.0.0 -p 8888

然后在浏览器中打开 http://localhost:8888

搜索 tarruda/DeepSeek-V4-Flash-GGUF 开始聊天

``

使用 HuggingFace Spaces 运行 Unsloth

``

无需设置

在浏览器中打开 https://huggingface.co/spaces/unsloth/studio

搜索 tarruda/DeepSeek-V4-Flash-GGUF 开始聊天

``

Pi (https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF?local-app=pi)如何使用 tarruda/DeepSeek-V4-Flash-GGUF 配合 Pi:

启动 llama.cpp 服务器

``

安装 llama.cpp:

brew install llama.cpp

启动本地 OpenAI 兼容服务器:

llama serve -hf tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS ``

在 Pi 中配置模型

``

安装 Pi:

npm install -g @mariozechner/pi-coding-agent

添加到 ~/.pi/agent/models.json:

{ “providers”: { “llama-cpp”: { “baseUrl”: “http://localhost:8080/v1”, “api”: “openai-completions”, “apiKey”: “none”, “models”: [ { “id”: “tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS” } ] } } } ``

运行 Pi

``

在项目目录中启动 Pi:

pi ``

Hermes Agent新 (https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF?local-app=hermes-agent)如何使用 tarruda/DeepSeek-V4-Flash-GGUF 配合 Hermes Agent:

启动 llama.cpp 服务器

``

安装 llama.cpp:

brew install llama.cpp

启动本地 OpenAI 兼容服务器:

llama serve -hf tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS ``

配置 Hermes

``

安装 Hermes:

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup

将 Hermes 指向本地服务器:

hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS ``

运行 Hermes

hermes

Atomic Chat新Docker Model Runner (https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF?local-app=docker-model-runner)如何使用 tarruda/DeepSeek-V4-Flash-GGUF 配合 Docker Model Runner:

docker model run hf.co/tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS

Lemonade (https://huggingface.co/tarruda/DeepSeek-V4-Flash-GGUF?local-app=lemonade)如何使用 tarruda/DeepSeek-V4-Flash-GGUF 配合 Lemonade:

拉取模型

``

从 https://lemonade-server.ai/ 下载 Lemonade

lemonade pull tarruda/DeepSeek-V4-Flash-GGUF:IQ3_XXS ``

运行并与模型聊天

lemonade run user.DeepSeek-V4-Flash-GGUF-IQ3_XXS

列出所有可用模型

lemonade list

相似文章

antirez/deepseek-v4-gguf

Hugging Face Models Trending

Antirez发布了专门为DS4推理引擎优化的DeepSeek V4 Flash GGUF量化版本,针对不同内存大小提供了优化配置,使得这个大型MoE模型可以在本地运行。

DeepSeek V4 完整论文发布:FP4 QAT 技术细节与训练稳定性技巧 [D]

Reddit r/MachineLearning

DeepSeek 发布了完整的 V4 论文,详细介绍了 FP4 量化感知训练、MoE 训练稳定性技巧(预判路由与 SwiGLU 截断),以及用于 RLHF 的生成式奖励模型,实现了显著的效率提升——V4-Flash 在 100 万上下文长度下仅需 V3.2 的 10% FLOPs 和 7% 的 KV 缓存。

Bartowski 已发布 DS4 GGUF

Reddit r/LocalLLaMA

Bartowski 发布了 DeepSeek-V4-Flash 的 GGUF 量化版本,并邀请用户与 Antirez 的版本进行对比。