Windows 11 运行 Qwen 1.5 LLM
目录
注意
本文最后更新于 2024-02-17,文中内容可能已过时。
Windows 11 运行 Qwen 1.5 LLM
参考
前言
2024 年 2 月 15 日 Ollama 发布了适用于 Windows 平台的预览版。我们终于可以直接在 Windows 平台下面直接运行 LLM 了。
安装 Ollama
直接进入 Ollama 安装 exe,接着双击会默认安装在 C 盘下。等待片刻即可完成安装,安装完成后重新启动一个 Powershell,运行 ollama 即可检查安装是否完成。出现类似下方消息即为完成。
> ollama.exe
Usage:
ollama [flags]
ollama [command]
Available Commands:
serve Start ollama
create Create a model from a Modelfile
show Show information for a model
run Run a model
pull Pull a model from a registry
push Push a model to a registry
list List models
cp Copy a model
rm Remove a model
help Help about any command
Flags:
-h, --help help for ollama
-v, --version Show version information
Use "ollama [command] --help" for more information about a command.
拉取 Qwen 模型
由于我的 PC 没有安装独立显卡,所以我使用最小的 Qwen 模型,即 Qwen 1.5-0.5B。当然这里可以查看到所有 Qwen 的最新模型,你也可以使用其他的模型。输入以下命令即可拉取模型,大陆无需梯子,而且拉取完毕自动运行,类似 Dcoker 的使用体验,对于新手绝对友好。
> ollama run qwen:0.5b-chat
pulling manifest
pulling fad2a06e4cc7... 100% ▕████████████████████████████████████████████████████████▏ 394 MB
pulling 41c2cf8c272f... 100% ▕████████████████████████████████████████████████████████▏ 7.3 KB
pulling 1da0581fd4ce... 100% ▕████████████████████████████████████████████████████████▏ 130 B
pulling f02dd72bb242... 100% ▕████████████████████████████████████████████████████████▏ 59 B
pulling ea0a531a015b... 100% ▕████████████████████████████████████████████████████████▏ 485 B
verifying sha256 digest
writing manifest
removing any unused layers
success
>>>
与 LLM 交互
在字符串 >>>
后面输入文字,回车发送即可与 LLM 发送文字交互。当然由于我使用的是 CPU 去运行大模型,我的输出非常的慢,而且会导致其他的程序卡顿。