發表文章

目前顯示的是有「Ollama」標籤的文章

關於 Ollama 的簡單筆記

圖片
前言 Ollama 是款大型語言模型 (LLM) 的軟體框架,其為研究人員和使用者提供了簡單且易用的環境,讓使用者於本機端執行各家的大型語言模型。 基本概念 模型所要的系統需求各不相同,例如: 3B 參數至少需要 8 GB RAM 7B 參數至少需要 16 GB RAM 13B 模型至少需要 32 GB RAM 快速安裝 curl -fsSL https://ollama.com/install.sh | sh Ollama 預設安裝在 /usr 目錄下,要注意 root 空間 可用以下方式手動指定目錄: mkdir /home/[USER]/Program/Ollama sudo chown -R ollama:ollama /home/[USER]/Program/Ollama sudo systemctl stop ollama sudo systemctl edit ollama.service ### Anything between here and the comment below will become the new contents of the file [Service] Environment="OLLAMA_MODELS=/home/[USER]/Program/Ollama" ### Lines below this comment will be discarded 下載並執行 Ollama 的模型 ollama serve ollama list ollama run gemma2:2b ollama run llama3 https://ollama.com/library/gemma2 https://ollama.com/library/llama3 將模型檔 GGUF 轉換給 Ollama 使用 建立一個名為 Modelfile 的文字檔,內容輸入: FROM ./gemma.gguf 終端機執行: $ ollam...