Files
gpu-rent/docs/llm.md
T
Leonid Pershin 2005b00175 Update configuration and documentation for LLM support and local watchdog
- Added `ollama-models.yaml` to .gitignore and implemented logic to copy it in gpu-rent.ps1 and gpu-rent.sh.
- Enhanced env.example to include new variables for LLM runtime options and local watchdog configuration.
- Updated CLI commands to support LLM options during setup and execution, including new flags for Ollama and llama.cpp.
- Improved documentation in cli.md and README.md to reflect changes in LLM integration and local watchdog functionality.
- Adjusted architecture and decisions documentation to clarify the role of LLMs and local watchdog in the system.
2026-08-21 05:29:23 +03:00

60 lines
2.3 KiB
Markdown

# LLM рядом со SwarmUI (opt-in)
По умолчанию поднимается только SwarmUI. Ollama или llama.cpp — по флагу, `LLM_RUNTIME` в `gpu-rent.vars` / `.env`, или через wizard.
## Включение
```text
gpu-rent setup # спросит none/ollama/llamacpp + пресет моделей
gpu-rent up --ollama # разово
gpu-rent up --llm llamacpp
# или в gpu-rent.vars:
LLM_RUNTIME=ollama
```
Без параметров `gpu-rent` / `gpu-rent up` (без `--yes`) спросит про LLM, если в vars ещё `none`.
## Порты (только loopback + туннель)
| Сервис | VM | localhost |
| --- | --- | --- |
| SwarmUI | 7801 | 17801 |
| Ollama | 11434 | 17811 |
| llama.cpp | 8080 | 17812 |
```text
gpu-rent tunnel
gpu-rent open --llm # http://127.0.0.1:17811 (Ollama)
# клиент:
set OLLAMA_HOST=http://127.0.0.1:17811
```
## Ollama models
Как Civitai `models.yaml`:
- `ollama-models.example.yaml` — в git
- `ollama-models.yaml` — локальный (gitignore)
На `up` при `LLM_RUNTIME=ollama` CLI делает `ollama pull` по списку. Уже скачанные не трогает; лишние на диске не удаляет.
### Пресеты setup
| preset | tag | зачем |
| --- | --- | --- |
| **recommended** | `huihui_ai/qwen2.5-abliterate:7b` | RU/EN, ~5GB, мало отказов — помощь с промптами |
| light | `qwen2.5:3b` | быстрее, слабее |
| stock | `qwen2.5:7b` | официальный, больше цензуры |
| alt | `richardyoung/qwen2.5-7b-instruct-abliterated` | другой abliterate |
| empty | `[]` | только runtime |
Community abliterate-модели без гарантий безопасности — для личного prompt-help / NSFW-тегов рядом со SwarmUI.
## llama.cpp
Ставит `llama-server` и systemd. GGUF клади вручную в `/mnt/swarm_data/llamacpp/models` на data-диске (или через SSH), затем `systemctl restart gpu-rent-llamacpp`.
## Idle-killer
Busy также если идёт `ollama pull`, в Ollama есть loaded model, или llama.cpp занимает слоты.