[GH-ISSUE #440] ollama本地部署671b满血版r1输出乱码 #350

Closed
opened 2026-10-26 21:19:48 +00:00 by bsakaguchi · 12 comments
Owner

Originally created by @Red-Scarff on GitHub (Feb 17, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/440

我按照这篇博客https://litianc.cn/2025/02/Deepseek-R1-Deploy/的方式,下载gguf在服务器用ollama本地部署了671b满血版r1,具体的gguf仓库为https://modelscope.cn/models/unsloth/DeepSeek-R1-GGUF/files下的DeepSeek-R1-Q4_K_M,下载之后用llama.cpp(https://github.com/ggerganov/llama.cpp.git)对gguf进行了合并,然后使用modelfile进行导入,我为合并后的模型命名为deepSeek-quant-671b,所以我想当我看到这样的输出时我的部署应该已经成功了?

Image

然而实际上当我启动ollama run deepSeek-quant-671b的时候,我对它的所有提问得到的回答都是一串无意义的乱码

Image

有人可以帮我检查出现了什么问题吗?感激不尽
启动ollama serve后得到的log如下:

2025/02/17 19:15:59 routes.go:1187: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/home/tione/notebook/ollama_models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[* http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]"

如果还需要我提供其他信息的话请联系我,我会及时查询并回复

Originally created by @Red-Scarff on GitHub (Feb 17, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-R1/issues/440 我按照这篇博客[https://litianc.cn/2025/02/Deepseek-R1-Deploy/](url)的方式,下载gguf在服务器用ollama本地部署了671b满血版r1,具体的gguf仓库为[https://modelscope.cn/models/unsloth/DeepSeek-R1-GGUF/files](url)下的DeepSeek-R1-Q4_K_M,下载之后用llama.cpp([https://github.com/ggerganov/llama.cpp.git](url))对gguf进行了合并,然后使用modelfile进行导入,我为合并后的模型命名为deepSeek-quant-671b,所以我想当我看到这样的输出时我的部署应该已经成功了? ![Image](https://github.com/user-attachments/assets/cfc7ca06-713f-49ad-bb01-f20f3a1a35f7) 然而实际上当我启动`ollama run deepSeek-quant-671b`的时候,我对它的所有提问得到的回答都是一串无意义的乱码 ![Image](https://github.com/user-attachments/assets/148516bc-8ed3-49bc-9195-9ee96d6fe4a3) 有人可以帮我检查出现了什么问题吗?感激不尽 启动`ollama serve`后得到的log如下: > 2025/02/17 19:15:59 routes.go:1187: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: HTTPS_PROXY: HTTP_PROXY: NO_PROXY: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_GPU_OVERHEAD:0 OLLAMA_HOST:http://127.0.0.1:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_KV_CACHE_TYPE: OLLAMA_LLM_LIBRARY: OLLAMA_LOAD_TIMEOUT:5m0s OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MODELS:/home/tione/notebook/ollama_models OLLAMA_MULTIUSER_CACHE:false OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[* http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://* vscode-webview://*] OLLAMA_SCHED_SPREAD:false ROCR_VISIBLE_DEVICES: http_proxy: https_proxy: no_proxy:]" 如果还需要我提供其他信息的话请联系我,我会及时查询并回复
Author
Owner

@MeowTsukiko commented on GitHub (Feb 18, 2025):

有人吗,我也遇到了同样的问题,等回复,looking forward to a reply

<!-- gh-comment-id:2664500364 --> @MeowTsukiko commented on GitHub (Feb 18, 2025): 有人吗,我也遇到了同样的问题,等回复,looking forward to a reply
Author
Owner

@Ponkyao commented on GitHub (Feb 18, 2025):

为啥不用vllm部署

<!-- gh-comment-id:2664759966 --> @Ponkyao commented on GitHub (Feb 18, 2025): 为啥不用vllm部署
Author
Owner

@magicgopher commented on GitHub (Feb 18, 2025):

这样需要多大的gpu才可以部署满血版的模型?

<!-- gh-comment-id:2664828719 --> @magicgopher commented on GitHub (Feb 18, 2025): 这样需要多大的gpu才可以部署满血版的模型?
Author
Owner

@Red-Scarff commented on GitHub (Feb 18, 2025):

实际上,当我部署了DeepSeek-R1-UD-Q2_K_XL这个量化版本,并不会出现输出乱码的问题,一切正常。所以我想可能是llama.cpp和DeepSeek-R1-Q4_K_M有不兼容的地方,或者https://modelscope.cn/models/unsloth/DeepSeek-R1-GGUF/files中的DeepSeek-R1-Q4_K_M有某些损毁之处?

<!-- gh-comment-id:2664841336 --> @Red-Scarff commented on GitHub (Feb 18, 2025): 实际上,当我部署了DeepSeek-R1-UD-Q2_K_XL这个量化版本,并不会出现输出乱码的问题,一切正常。所以我想可能是llama.cpp和DeepSeek-R1-Q4_K_M有不兼容的地方,或者[https://modelscope.cn/models/unsloth/DeepSeek-R1-GGUF/files](https://github.com/deepseek-ai/DeepSeek-R1/issues/url)中的DeepSeek-R1-Q4_K_M有某些损毁之处?
Author
Owner

@sxk000 commented on GitHub (Feb 18, 2025):

有个问题:量化版、蒸馏版可以叫满血版吗?DeepSeek-R1是属于什么版?

<!-- gh-comment-id:2665086654 --> @sxk000 commented on GitHub (Feb 18, 2025): 有个问题:量化版、蒸馏版可以叫满血版吗?DeepSeek-R1是属于什么版?
Author
Owner

@deepsicker commented on GitHub (Feb 18, 2025):

有个问题:量化版、蒸馏版可以叫满血版吗?DeepSeek-R1是属于什么版?

量化是降低了模型权重的精度 ,比如 1.232423423 缩小到1.23这样

<!-- gh-comment-id:2665090966 --> @deepsicker commented on GitHub (Feb 18, 2025): > 有个问题:量化版、蒸馏版可以叫满血版吗?DeepSeek-R1是属于什么版? 量化是降低了模型权重的精度 ,比如 1.232423423 缩小到1.23这样
Author
Owner

@Mini-Jelly commented on GitHub (Feb 18, 2025):

本地部署了671b,你看看是不是性能不够

<!-- gh-comment-id:2665575230 --> @Mini-Jelly commented on GitHub (Feb 18, 2025): 本地部署了671b,你看看是不是性能不够
Author
Owner

@Red-Scarff commented on GitHub (Feb 19, 2025):

本地部署了671b,你看看是不是性能不够

我认为不是,服务器的显存很大并没有占满,启动DeepSeek-R1-Q4_K_M后每张卡基本显存占用了60%(后四张卡显存占用更多是因为我同时在跑其他的任务

Image

<!-- gh-comment-id:2667323446 --> @Red-Scarff commented on GitHub (Feb 19, 2025): > 本地部署了671b,你看看是不是性能不够 我认为不是,服务器的显存很大并没有占满,启动DeepSeek-R1-Q4_K_M后每张卡基本显存占用了60%(后四张卡显存占用更多是因为我同时在跑其他的任务 ![Image](https://github.com/user-attachments/assets/b1c45df2-9d15-4152-9eca-52e37af04f03)
Author
Owner

@mowentian commented on GitHub (Feb 19, 2025):

建议移步相关社区以寻求支持~

<!-- gh-comment-id:2668183196 --> @mowentian commented on GitHub (Feb 19, 2025): 建议移步相关社区以寻求支持~
Author
Owner

@fridayL commented on GitHub (Feb 24, 2025):

有人吗,我也遇到了同样的问题,等回复,looking forward to a reply

有解决吗

<!-- gh-comment-id:2677826158 --> @fridayL commented on GitHub (Feb 24, 2025): > 有人吗,我也遇到了同样的问题,等回复,looking forward to a reply 有解决吗
Author
Owner

@Red-Scarff commented on GitHub (Feb 24, 2025):

有人吗,我也遇到了同样的问题,等回复,looking forward to a reply

有解决吗

至少我还没有解决..怀疑是模型量化出了问题,已经转向调用API了..

<!-- gh-comment-id:2678233063 --> @Red-Scarff commented on GitHub (Feb 24, 2025): > > 有人吗,我也遇到了同样的问题,等回复,looking forward to a reply > > 有解决吗 至少我还没有解决..怀疑是模型量化出了问题,已经转向调用API了..
Author
Owner

@magicgopher commented on GitHub (Feb 27, 2025):

有人吗,我也遇到了同样的问题,等回复,looking forward to a reply

有解决吗

我直接用阿里云的百炼的API来玩671b参数的了。😂

<!-- gh-comment-id:2687189061 --> @magicgopher commented on GitHub (Feb 27, 2025): > > 有人吗,我也遇到了同样的问题,等回复,looking forward to a reply > > 有解决吗 我直接用阿里云的百炼的API来玩671b参数的了。😂
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-R1#350
No description provided.