# 將 Hugging Face 上的模型安裝到 OLlama :::info 以下以 colab 做示範 ::: ## 安裝 huggingface hub ```bash !pip install huggingface-hub ``` ## 下載 Hugging Face 上的模型 本次使用此模型 [mistrallite.Q4_K_M.gguf](https://huggingface.co/TheBloke/MistralLite-7B-GGUF/blob/main/mistrallite.Q4_K_M.gguf) 執行以下下載指令 ``` !huggingface-cli download \ TheBloke/MistralLite-7B-GGUF \ mistrallite.Q4_K_M.gguf \ --local-dir downloads \ --local-dir-use-symlinks False ``` ## 建立 Modelfile.txt 包裝模型檔 Modelfile.txt 的內容如下: FROM 路徑/模型檔名稱.gguf ``` FROM ./downloads/mistrallite.Q4_K_M.gguf ``` 將 Modelfile.txt 存檔 ## 包裝模型檔 ``` !ollama create 自訂模型名稱 -f Modelfile.txt ``` 執行後開始跑  完成畫面  ## 確認模型存在 執行以下指令查看現有模型是否有剛才下載的模型 ``` !ollama list ```  ## 使用 colab 實測各大模型 ### 1. Taiwan-LLM-13B-v2.0-chat-Q8_0.gguf 13.8 GB 的台灣語言模型實測結果, 速度龜速, 生成內容很不理想 
×
Sign in
Email
Password
Forgot password
or
Sign in via Google
Sign in via Facebook
Sign in via X(Twitter)
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
Continue with a different method
New to HackMD?
Sign up
By signing in, you agree to our
terms of service
.