Date: 2026-06-10
Refine generate_models_preset.py so generated models-preset.ini entries use richer and more practical llama-server parameters, with all derivation based on GGUF metadata rather than filename heuristics.
mmproj detection from sibling files because it is an explicit companion artifact, not a naming heuristic.In scope:
generate_models_preset.pyOut of scope:
start-llama-router.batThe current generator reads some GGUF metadata, but practical preset output is still too thin:
This makes the output weaker than the known-good single-model startup profile in start-qwen3.6-35b-a3b.bat.
Classify models from metadata and explicit companion files only:
asr_multimodal
mmproj existsmoe
expert_count is present and greater than zerodense
There must be no filename keyword fallback for MoE detection or any other preset behavior.
The generator should continue reading GGUF key-value metadata directly from the header and use these keys where available:
general.architecture<architecture>.context_length<architecture>.block_count<architecture>.expert_count<architecture>.expert_used_countgeneral.size_labelgeneral.nameThese values are enough to support classification plus bounded parameter generation.
Generate a richer field set per model section.
Dense models should receive:
ctx-sizen-gpu-layersthreadsbatch-sizeubatch-sizeparallelcache-type-kcache-type-vkv-unifiedkv-offloadmlockmmapseedflash-attnDense values can stay moderately permissive, but must still be derived from metadata-sensitive rules instead of one fixed default map.
ASR or multimodal models should stay conservative:
parallelbatch-sizectx-size than large chat defaultsmmprojMoE models should receive:
n-cpu-moen-cpu-moe must be emitted only for metadata-confirmed MoE models.
Each tunable numeric field should have a clear bounded range, with the selected value derived within that range.
Required nearby comments for key fields:
ctx-sizen-gpu-layersn-cpu-moe when presentthreadsbatch-sizeubatch-sizeparallelComment format should be simple and consistent, for example:
; ctx-size range = 512..131072; chosen = 43008
ctx-size = 43008
For fields where the lower or upper bound is determined by metadata, the comment must use that metadata-derived bound.
The generator does not need exact benchmarking logic. It needs stable, explainable rules.
Recommended direction:
ctx-size
context_lengthn-gpu-layers
block_countn-cpu-moe
block_countthreads
parallel
batch-size and ubatch-size
cache-type-k and cache-type-v
q8_0 for long-context or MoE models, otherwise a safer baselinemmap
start-qwen3.6-35b-a3b.batBackup generation should no longer be the default behavior.
Recommended implementation:
--backup support only if trivial to preserveKeep the current single-script architecture, but tighten responsibilities:
Tests should cover:
expert_count, not filename textn-cpu-moemmprojcache-type-k and cache-type-v are policy choices rather than direct metadata facts, so the rules must stay simple and predictable.The workspace currently lacks normal Git repository behavior for commit operations, so this spec is written locally without a commit step.