feat(v9): Phase 10 Schritt 1 — Modell-Capabilities aus GGUF-Metadaten
- model_caps.py: dependency-freier GGUF-Header-Reader (architecture, expert_count, context_length, parameter_count) — offline/authoritativ, bricht vor dem Tokenizer-Array ab. Leitet Tag-Set ab: MoE(+aktive B), Tools (yes via --jinja/Template | likely via Familie | no), Vision, Coder, Reasoning, Embedding, native ctx/params. Familien-Liste nur Fallback. - models.py status(): meta.capabilities ergänzt. - ModelsPanel: "KANN"-Spalte zeigt jetzt Capability-Chips statt Text/Code/Bild. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ from routers.cookbook import hf_file_size
|
||||
from llamaswap import (_swap_get, read_config, write_config,
|
||||
model_id_from_path, set_role_alias, ROLE_IDS)
|
||||
from hw_math import extract_params_b, max_ctx_for, estimate_memory_gb
|
||||
from model_caps import capabilities
|
||||
import re
|
||||
import os
|
||||
import shutil
|
||||
@@ -90,6 +91,7 @@ def status():
|
||||
size_bytes = None
|
||||
quant = ""
|
||||
filename = ""
|
||||
path = ""
|
||||
m_path = re.search(r'-(?:m|-model)\s+([^\s]+)', cmd)
|
||||
if m_path:
|
||||
path = m_path.group(1).replace("'", "").replace('"', '')
|
||||
@@ -137,6 +139,10 @@ def status():
|
||||
"optimal_ctx": (_oc := (max_ctx_for(_pb, quant or "Q4_K_M", ram_gb) if ram_gb else None)),
|
||||
"peak_ram_gb": round(estimate_memory_gb(_pb, quant or "Q4_K_M", ctx), 1),
|
||||
"peak_ram_optimal_gb": (round(estimate_memory_gb(_pb, quant or "Q4_K_M", _oc), 1) if _oc else None),
|
||||
"capabilities": capabilities(
|
||||
name=filename or name, cmd=cmd,
|
||||
gguf_path=(path if (path and os.path.exists(path)) else ""),
|
||||
),
|
||||
}
|
||||
}
|
||||
# Laufende Download-Jobs erkennnen: Modell bekommt state "downloading" + Fortschritt.
|
||||
|
||||
Reference in New Issue
Block a user