从 Ollama 库下载模型。
如果你安装了uv
,你可以简单地运行:
uv run ollama_dl.py llama3.2
让它安装所需的依赖项并运行脚本来下载 Meta Llama 3.2 的默认latest
版本。
(如果您没有uv
,请设置 Python virtualenv, pip install -e .
并使用ollama-dl
运行。)
下载模型后,您可以使用例如 llama.cpp:
$ ollama-dl llama3.2:1b
[09/26/24 14:32:04] INFO Downloading to: library-llama3.2-1b
library-llama3.2-1b/template-966de95ca8a6.txt (1 KB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
library-llama3.2-1b/license-a70ff7e570d9.txt (5 KB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
library-llama3.2-1b/license-fcc5a6bec9da.txt (7 KB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
library-llama3.2-1b/model-74701a8c35f6.gguf (1259 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
$ ../llama.cpp/llama-cli -m library-llama3.2-1b/model-74701a8c35f6.gguf -p "We're no strangers to love"
build: 3828 (95bc82fb) with Apple clang version 16.0.0 (clang-1600.0.26.3) for arm64-apple-darwin23.6.0
[...]
We're no strangers to love, but we're no strangers to the chaos that comes with it. And, quite frankly, we're rather fond of a good argument.
^C