🚀 DeepSeek-V2-Lite-Chat-IMat-GGUF
這是基於llama.cpp的imatrix量化方法對deepseek-ai/DeepSeek-V2-Lite-Chat進行量化後的模型,可有效優化模型性能與存儲需求。
原模型:deepseek-ai/DeepSeek-V2-Lite-Chat
原數據類型:BF16
(bfloat16
)
量化方式:基於llama.cpp的分支 PR 7519
IMatrix數據集:點擊查看
🚀 快速開始
下載模型
使用huggingface-cli下載
首先,確保你已經安裝了huggingface-cli:
pip install -U "huggingface_hub[cli]"
然後,你可以指定下載特定的文件:
huggingface-cli download legraphista/DeepSeek-V2-Lite-Chat-IMat-GGUF --include "DeepSeek-V2-Lite-Chat.Q8_0.gguf" --local-dir ./
如果模型大小超過50GB,它會被分割成多個文件。若要將它們全部下載到本地文件夾,請運行:
huggingface-cli download legraphista/DeepSeek-V2-Lite-Chat-IMat-GGUF --include "DeepSeek-V2-Lite-Chat.Q8_0/*" --local-dir DeepSeek-V2-Lite-Chat.Q8_0
# 合併GGUF文件的方法請參考FAQ
推理
簡單聊天模板
<|begin▁of▁sentence|>User: {user_message_1}
Assistant: {assistant_message_1}<|end▁of▁sentence|>User: {user_message_2}
Assistant:
帶系統提示的聊天模板
<|begin▁of▁sentence|>{system_message}
User: {user_message_1}
Assistant: {assistant_message_1}<|end▁of▁sentence|>User: {user_message_2}
Assistant:
使用Llama.cpp進行推理
llama.cpp/main -m DeepSeek-V2-Lite-Chat.Q8_0.gguf --color -i -p "prompt here (according to the chat template)"
✨ 主要特性
- 量化優化:採用imatrix量化方法,在降低模型存儲需求的同時,儘可能保留模型性能。
- 多量化類型支持:提供了多種量化類型的文件,如Q8_0、Q6_K、Q4_K等,可根據不同的需求進行選擇。
- 易於使用:提供了詳細的下載和推理示例,方便用戶快速上手。
📦 安裝指南
安裝huggingface-cli
pip install -U "huggingface_hub[cli]"
💻 使用示例
基礎用法
下載特定文件
huggingface-cli download legraphista/DeepSeek-V2-Lite-Chat-IMat-GGUF --include "DeepSeek-V2-Lite-Chat.Q8_0.gguf" --local-dir ./
使用Llama.cpp進行推理
llama.cpp/main -m DeepSeek-V2-Lite-Chat.Q8_0.gguf --color -i -p "prompt here (according to the chat template)"
高級用法
下載分割的模型文件
huggingface-cli download legraphista/DeepSeek-V2-Lite-Chat-IMat-GGUF --include "DeepSeek-V2-Lite-Chat.Q8_0/*" --local-dir DeepSeek-V2-Lite-Chat.Q8_0
合併分割的GGUF文件
gguf-split --merge DeepSeek-V2-Lite-Chat.Q8_0/DeepSeek-V2-Lite-Chat.Q8_0-00001-of-XXXXX.gguf DeepSeek-V2-Lite-Chat.Q8_0.gguf
📚 詳細文檔
文件信息
IMatrix文件
狀態:✅ 可用
鏈接:點擊查看
常用量化文件
所有量化文件
🔧 技術細節
IMatrix未全部應用的原因
根據這項調查,似乎只有較低的量化級別能從imatrix輸入中受益(根據hellaswag結果)。
合併分割的GGUF文件的方法
- 確保你已經安裝了
gguf-split
:
- 訪問https://github.com/ggerganov/llama.cpp/releases 下載適合你係統的zip文件。
- 解壓文件後,你應該能找到
gguf-split
。
- 找到你的GGUF分割文件所在的文件夾(例如:
DeepSeek-V2-Lite-Chat.Q8_0
)。
- 運行以下命令合併文件:
gguf-split --merge DeepSeek-V2-Lite-Chat.Q8_0/DeepSeek-V2-Lite-Chat.Q8_0-00001-of-XXXXX.gguf DeepSeek-V2-Lite-Chat.Q8_0.gguf
確保將gguf-split
指向分割文件的第一個塊。
📄 反饋與建議
如果你有任何建議,歡迎在 @legraphista 聯繫我!