From f17b1c9731d6e0b5f7ff5afb552aa6346eb479c5 Mon Sep 17 00:00:00 2001 From: Leonid Pershin Date: Fri, 21 Aug 2026 08:54:21 +0300 Subject: [PATCH] Update Ollama model configurations and documentation for clarity and consistency - Revised model descriptions in `ollama-models.example.yaml` to emphasize uncensored and abliterated requirements, enhancing user understanding. - Updated documentation in `llm.md` to reflect changes in model tags and their meanings, ensuring accurate guidance for users. - Modified CLI help messages to clarify the nature of presets, reinforcing that all options are abliterate models with Russian support. - Enhanced the `llm_runtime.py` file to align preset labels with the updated model descriptions, improving consistency across the codebase. --- docs/llm.md | 15 ++++++++------- ollama-models.example.yaml | 16 +++++++--------- src/gpu_rent/cli.py | 2 +- src/gpu_rent/llm_runtime.py | 20 +++++++++----------- tests/test_llm_runtime.py | 4 ++++ 5 files changed, 29 insertions(+), 28 deletions(-) diff --git a/docs/llm.md b/docs/llm.md index b8eccf3..a3a366c 100644 --- a/docs/llm.md +++ b/docs/llm.md @@ -83,13 +83,14 @@ $env:OLLAMA_HOST = "http://127.0.0.1:17811" | # | ключ | tag / смысл | | --- | --- | --- | -| 1 | **recommended** | `huihui_ai/qwen2.5-vl-abliterated:7b` — vision+RU, ~6 GB | -| 2 | light | VL 3B abliterate (~3 GB) | -| 3 | text | text-only `qwen2.5-abliterate:7b` | -| 4 | stock | `qwen2.5:7b` | -| 5 | alt | другой text abliterate 7B | -| 6 | empty | только runtime | -| — | keep | не трогать yaml (если уже спросили повторно) | +| 1 | **recommended** | `huihui_ai/qwen2.5-vl-abliterated:7b` — RU + vision, ~6 GB | +| 2 | light | `…:3b` — то же, мало VRAM (~3 GB) | +| 3 | text | `huihui_ai/qwen2.5-abliterate:7b` — RU, без vision (~5 GB) | +| 4 | big | `huihui_ai/qwen2.5-vl-abliterated:32b` — RU + vision (~21 GB) | +| 5 | empty | только runtime | +| — | keep | не трогать yaml | + +Все пресеты (кроме `empty`) — **abliterated** Qwen2.5 с нормальным русским. Официальные censored-теги (`qwen2.5vl:…`) в меню нет. `default: true` в yaml — preferred в логе; pull идёт по всему списку. diff --git a/ollama-models.example.yaml b/ollama-models.example.yaml index 71356c4..40d0ed9 100644 --- a/ollama-models.example.yaml +++ b/ollama-models.example.yaml @@ -1,15 +1,13 @@ # Copy to ollama-models.yaml (gitignored). Used when LLM_RUNTIME=ollama. -# name = exact tag for `ollama pull` (Ollama library / community). -# Empty models: [] → runtime only, no pull. -# Purpose: SwarmUI prompt help — vision + RU/EN on the same GPU as diffusion. +# name = exact tag for `ollama pull`. +# Requirement: uncensored (abliterated) + Russian. Empty models: [] → no pull. models: - # Recommended (~6GB): vision + Russian/English, low refusal + # Recommended (~6GB): vision + RU/EN, abliterated - name: huihui_ai/qwen2.5-vl-abliterated:7b default: true - # Alternatives (uncomment / use presets on setup|up): - # light — huihui_ai/qwen2.5-vl-abliterated:3b (~3GB) - # stock — qwen2.5vl:7b (official library) - # text — huihui_ai/qwen2.5-abliterate:7b (no vision, ~5GB) - # big — qwen2.5vl:32b (~21GB; llm-only) + # Presets (setup / up --ollama-preset …): + # light — huihui_ai/qwen2.5-vl-abliterated:3b (~3GB) + # text — huihui_ai/qwen2.5-abliterate:7b (~5GB, no vision) + # big — huihui_ai/qwen2.5-vl-abliterated:32b (~21GB) diff --git a/src/gpu_rent/cli.py b/src/gpu_rent/cli.py index a326191..90d6894 100644 --- a/src/gpu_rent/cli.py +++ b/src/gpu_rent/cli.py @@ -398,7 +398,7 @@ def open( def setup( llm: Optional[str] = typer.Option(None, "--llm", help="none|ollama"), ollama_preset: Optional[str] = typer.Option( - None, "--ollama-preset", help="recommended|light|stock|text|big|empty" + None, "--ollama-preset", help="recommended|light|text|big|empty (все — abliterate + RU)" ), watchdog: Optional[bool] = typer.Option( None, "--watchdog/--no-watchdog", help="Поставить local-watchdog" diff --git a/src/gpu_rent/llm_runtime.py b/src/gpu_rent/llm_runtime.py index c395473..c973730 100644 --- a/src/gpu_rent/llm_runtime.py +++ b/src/gpu_rent/llm_runtime.py @@ -16,22 +16,20 @@ from gpu_rent.paths import ( VALID_RUNTIMES = frozenset({"none", "ollama"}) OLLAMA_PRESETS: dict[str, list[str]] = { - # Ollama library / community tags only (no GGUF). Tuned for SwarmUI prompt help: - # vision + RU/EN, share VRAM with diffusion on typical 24 GiB. - "recommended": ["huihui_ai/qwen2.5-vl-abliterated:7b"], # ~6 GB, low refusal - "light": ["huihui_ai/qwen2.5-vl-abliterated:3b"], # ~3 GB, tight VRAM - "stock": ["qwen2.5vl:7b"], # official library vision + # Requirement: uncensored (abliterated) + solid Russian. Qwen2.5 family. + # Vision tags preferred for SwarmUI prompt help with images. + "recommended": ["huihui_ai/qwen2.5-vl-abliterated:7b"], # ~6 GB + "light": ["huihui_ai/qwen2.5-vl-abliterated:3b"], # ~3 GB "text": ["huihui_ai/qwen2.5-abliterate:7b"], # ~5 GB, no vision - "big": ["qwen2.5vl:32b"], # ~21 GB — llm-only or ≥40 GiB free + "big": ["huihui_ai/qwen2.5-vl-abliterated:32b"], # ~21 GB "empty": [], } OLLAMA_PRESET_LABELS: dict[str, str] = { - "recommended": "Qwen2.5-VL 7B abliterate (картинки+RU, ~6GB)", - "light": "Qwen2.5-VL 3B abliterate (мало VRAM, ~3GB)", - "stock": "официальный qwen2.5vl:7b (library, больше отказов)", - "text": "Qwen2.5 7B abliterate text-only (~5GB)", - "big": "qwen2.5vl:32b (~21GB; llm-only / большой GPU)", + "recommended": "VL 7B abliterate — RU + картинки (~6GB)", + "light": "VL 3B abliterate — RU + картинки, мало VRAM (~3GB)", + "text": "7B abliterate text — RU, без vision (~5GB)", + "big": "VL 32B abliterate — RU + картинки (~21GB)", "empty": "только runtime, без pull", "keep": "не менять ollama-models.yaml", } diff --git a/tests/test_llm_runtime.py b/tests/test_llm_runtime.py index 8e27efd..79ec76c 100644 --- a/tests/test_llm_runtime.py +++ b/tests/test_llm_runtime.py @@ -55,3 +55,7 @@ def test_write_preset(tmp_path: Path): write_ollama_models_preset(path, "recommended") entries = parse_ollama_models(path) assert entries[0].name == "huihui_ai/qwen2.5-vl-abliterated:7b" + write_ollama_models_preset(path, "big") + assert parse_ollama_models(path)[0].name == "huihui_ai/qwen2.5-vl-abliterated:32b" + write_ollama_models_preset(path, "text") + assert parse_ollama_models(path)[0].name == "huihui_ai/qwen2.5-abliterate:7b"