安裝: https://www.sysgeek.cn/ollama-on-windows/ 瀏覽器輸入: http://localhost:11434/ 顯示Ollama is running表示正常啟動
ollama下載模型庫地址: https://ollama.com/library?sort=popular
ollama pull qwen2:latest # 安裝qwen2:latest
ollama pull wangshenzhi/llama3-8b-chinese-chat-ollama-q4 # 安裝聊天機器人
ollama pull nomic-embed-text # 安裝文本embeding工具
ollama 加載HuggingFace模型: https://blog.csdn.net/caroline_wendy/article/details/141028040 (之前看不收費,怎么要收費了...)
ollama 實現簡單RAG https://www.sysgeek.cn/ollama-on-windows/
# 查看 Ollama 版本
ollama -v
# 查看已安裝的模型
ollama list
# 運行指定模型
ollama run [modelname]
# 刪除指定模型
ollama rm [modelname]
# 模型存儲位置
# C:\Users\<username>\.ollama\models
C:\Users\admin\.ollama\models
修改Ollama模型位置: F:\ollama\models
增加系統變量:OLLAMA_MODELS -> F:\ollama\models
下面執行失敗404
curl -X POST http://172.30.48.60:8000/api/chat -H "Content-Type: application/json" -d '{"model": "qwen2:latest", "prompt": "天空為什么是藍色的?"}'
參考:https://www.ncnynl.com/archives/202406/6190.html
獲取當前已加載的模型列表。
curl http://localhost:11434/api/tags
查看正在使用的模型
curl http://localhost:11434/api/ps
查看模型的modelfile
ollama show qwen2:latest --modelfile
浙公網安備 33010602011771號