DeepSeek 现在热度实在是太高,导致现在使用起来非常卡顿,体验感不好,一直回复稍后再试~
Ollama 是一个开源的本地大语言模型运行框架,专为在本地机器上便捷部署和运行大型语言模型(LLM)而设计。
qwen、codegeex4、phi4、llama 等,我们可以根据自己的需求选择合适的模型进行本地运行。
验证安装
ollama --version
Ollama 运行模型使用 ollama run 命令。
ollama run deepseek-coder
>>> /?
Available Commands:
/set Set session variables
/show Show model information
/load <model> Load a session or model
/save <model> Save your current session
/clear Clear session context
/bye Exit
/?, /help Help for a command
/? shortcuts Help for keyboard shortcuts
Use """ to begin a multi-line message.
bye >> /
curl http://localhost:11434/api/generate -d '{
"model": "llama3.2",
"prompt":"Why is the sky blue?"
}'
curl http://localhost:11434/api/chat -d '{
"model": "llama3.2",
"messages": [
{ "role": "user", "content": "why is the sky blue?" }
]
}'