Skip to content

本地部署大模型

可使用ollama 安装本地大模型

  1. 先下载ollama
  2. 获取模型

下载ollama

下载地址: https://ollama.com/

image-20250331234457278

获取模型

https://ollama.com/search

qwen2: https://ollama.com/library/qwen2.5

image-20250331234549391

执行以下命令就可以下载到模型

shell
ollama run qwen2.5:1.5b

查询已下载模型列表

shell
ollama list

输出

shell
NAME                       ID              SIZE      MODIFIED
qwen2:1.5b                 f6daf2b25194    934 MB    15 hours ago
nomic-embed-text:latest    0a109f422b47    274 MB    6 weeks ago
deepseek-r1:1.5b           a42b25d8c10a    1.1 GB    2 months ago
llama3.2:latest            a80c4f17acd5    2.0 GB    2 months ago
...

查询模型详情

ollama show llama3.2:latest

输出

shell
	Model
    architecture        llama
    parameters          3.2B
    context length      131072
    embedding length    3072
    quantization        Q4_K_M

  Parameters
    stop    "<|start_header_id|>"
    stop    "<|end_header_id|>"
    stop    "<|eot_id|>"

  License
    LLAMA 3.2 COMMUNITY LICENSE AGREEMENT
    Llama 3.2 Version Release Date: September 25, 2024