Local model selection

From AtlasOmnia/hermes-custom-pack · View interactive version

Local model selection is an AI agent skill from the GitHub repository AtlasOmnia/hermes-custom-pack. local-model-selection — Choose and recommend local LLM models for Hermes Agent — VRAM-tier recommendations, uncensored/abliterated variants, quant selection, model family naming conventions, dual-GPU setups, and auxiliary model selection.

How to use this skill

Skill file

Local Model Selection for Hermes

Use this skill when the user asks which local model to run, which quant to pick, which uncensored variant to use, how to pair models across GPUs, or what auxiliary model to use alongside their main model.

When to use

Trigger on requests like:

For storage operations, distinguish the machine being cleaned from any remote model host. For LM Studio, inventory exact model directories, check lms ps before deletion, delete only explicitly named model repositories, and verify both path removal and real free-space change; see references/lm-studio-model-storage-operations.md. For Ollama on macOS, cross-check ollama list, allocated model blobs/manifests, and large files before claiming models exist, then use the process/app/CLI/package/data verification sequence in references/macos-ollama-storage-and-uninstall.md for a complete uninstall.

Core rule: verify model existence before recommending

Never fabricate model names. Model families have specific size tiers — not every number exists in every family. Before recommending, verify the model exists on HuggingFace or Ollama.

When a user asks for recommendations:

If you mix up versions (e.g., saying "Qwen 3.5" when Qwen 3.6 is current), correct yourself directly instead of hedging.

Model family naming conventions

Qwen family

| Family | Sizes | Key dates |

|--------|-------|-----------|

| Qwen3 | 0.6B, 1.7B, 4B, 8B, 14B, 32B | Dec 2025 |

| Qwen3.5 | 0.8B, 2B, 4B, 9B, 27B, 35B-A3B, 122B-A10B | Feb–Jul 2026 |

| Qwen3.6 | 27B, 35B-A3B, 40B (Claude distill) | Apr 2026 |

| Qwen-AgentWorld | 35B-A3B, 397B-A17B | Jun 2026 — world-model CPT/SFT/RL atop Qwen3.5 MoE, 256K ctx |

Common pitfall: No Qwen3.5 14B exists. Qwen3 has 14B; Qwen3.5 has 9B. Do not combine family names with wrong sizes.

AgentWorld positioning: Qwen-AgentWorld-35B-A3B is best treated as a world-model / agent-worker candidate, not a drop-in replacement for Qwen3.6-27B dense as the main Hermes brain. Early community reports are promising for long, non-coding agent tasks and local tool-heavy workflows, but mixed for coding. Before judging quality, verify the chat template/tool-call formatting; a patched Qwen chat_template.jinja may be necessary for reliable role/tool behavior.

Gemma 4 family (Apr 2026)

| Size | Type | Notes |

|------|------|-------|

| 12B | Dense | Vision + tool calling |

| 26B-A4B | MoE (~4B active) | Vision + tool calling, good 16GB pick |

| 31B | Dense | Vision + tool calling |

Other relevant families

Uncensored/abliterated landscape

Three main techniques:

| Method | How | Trade-off |

|--------|-----|-----------|

| Heretic | LoRA-based refusal vector extraction | Lowest KL divergence, best capability preservation |

| HauhauCS | Aggressive/Balanced variants | Balanced variant tuned for agentic stability. Aggressive strips preamble. |

| Huihui | Crude abliteration (proof-of-concept) | Can cause catastrophic degradation at larger scales (KL >3 on 4B+) |

Key findings from community benchmarks (Nathan Sapwell, Apr 2026)

Where to find uncensored GGUFs

VRAM tier recommendations (as of June 2026)

16GB VRAM tier (RTX 5070 Ti-class cards)

| Rank | Model | Repo | Quant | VRAM | Notes |

|------|-------|------|-------|------|-------|

| 1 | Gemma 4 26B-A4B Heretic | mradermacher/gemma-4-26B-A4B-it-heretic-GGUF | Q4_K_M | ~14GB | MoE, vision, tool calling. InsiderLLM top pick. |

| 2 | Mistral Small 24B Abliterated | various on HF | Q4_K_M | ~14GB | Dense, BSWEN #1 pick, limited ctx room |

| 3 | GPT-OSS 20B Heretic | DavidAU/OpenAi-GPT-oss-20b-HERETIC-uncensored-NEO-Imatrix-gguf | IQ4_NL | ~12GB | Highest benchmark scores, MoE can be quirky |

| 4 | Qwen3 14B Abliterated | huihui-ai/Qwen3-14B-abliterated | Q4_K_M | ~10.7GB | Same Qwen DNA as main 27B, lots of headroom |

| 5 | Qwen3.5 9B Uncensored | HauhauCS/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive | Q4_K_M | ~6GB | Lightning fast, weak for complex aux tasks |

24GB VRAM (RTX 3090/4090)

32GB VRAM tier (RTX 5090-class cards)

8-12GB VRAM

Dense vs MoE: which architecture for Hermes agent work

Rule: For a primary Hermes brain, dense models consistently outperform MoE in the same family on agentic benchmarks. The MoE speed advantage comes from activating fewer parameters per token — that's throughput, not intelligence.

| Benchmark | Qwen3.6-27B (dense) | Qwen3.6-35B-A3B (MoE) | Delta |

|-----------|---------------------|----------------------|-------|

| SWE-bench Verified | 77.2 | 73.4 | +3.8 |

| Terminal-Bench 2.0 | 59.3 | 51.5 | +7.8 |

| SkillsBench (coding agent) | 48.2 | 28.7 | +19.5 |

| MMLU-Pro | 86.2 | 85.2 | +1.0 |

| GPQA Diamond | 87.8 | 86.0 | +1.8 |

| LiveCodeBench v6 | 83.9 | 80.4 | +3.5 |

| BenchLM aggregate | 71 | 62 | +9 |

The MoE model (35B total, ~3B active/token) is 3-4x faster in token generation but loses quality across the board. The dense model (27B all active) processes more parameters per token — slower but smarter. For Hermes agent work where tool calling reliability, multi-step reasoning, and coding matter: dense wins.

MoE excels at throughput-heavy tasks: RAG pipelines, serving many concurrent requests, or when speed is the primary constraint and quality is acceptable at a lower tier. Dense is the right pick for your primary agent brain on hardware that can run it comfortably.

Quant selection guide

| Quant | BF16 % | Size vs BF16 | Best for |

|-------|--------|-------------|----------|

| Q4_K_M | ~94-95% | ~25% | Budget, max context headroom |

| Q5_K_M | ~96% | ~30% | Good balance |

| Q6_K | ~97.4% | ~35% | Minimum for serious agent work |

| Q8_0 | ~98.5% | ~50% | Best quality, tight on VRAM |

Community rule (r/LocalLLaMA, May 2026): "Q6 really is the minimum. Q4_K_M amplifies a bias invisible at Q6+. Q4 looks fine on single-shot benchmarks but starts losing coherence on sequential tool calling."

For Hermes agent workloads with heavy multi-tool use (long context, frequent tool calls, config edits, JSON schemas):

Exception: MoE models (GPT-OSS 20B, Gemma 26B-A4B) tolerate lower quants better. IQ4_NL on GPT-OSS 20B is described as "wild, off-the-cuff" but still functional.

Narrow Q4 exception: cloud-orchestrated local delegates

Q4_K_M is still not the default recommendation for a standalone primary Hermes brain. It can be rational for a bounded local delegated worker when a stronger cloud flagship owns decomposition, architecture, integration, and final verification.

Require all of the following:

If concurrency is not materially valuable, keep Q6/Q8. For the decision matrix, mmproj guidance, and a verified Qwen-Q4 + Gemma-Q6 example, read references/cloud-orchestrated-q4-delegates.md. Routing mechanics belong in the model-switching guidance.

KV cache quantization

When the user asks about KV cache precision (Q8 vs Q4), or about splitting K-cache vs V-cache:

Hard rule: avoid CPU/system-RAM spillover at all costs for agent workloads. A second GPU over PCIe is preferable to offloading layers/KV cache into main RAM; token speed drops hard and latency spikes once you hit CPU memory.

If Q8_0 weights + Q8_0 KV would cause LM Studio to offload:

Asymmetric K=Q8 / V=Q4 is mostly research-level and not reliably exposed; don't recommend it as a practical solution unless there's clear backend support.

Dual-GPU usage guidance (single model across GPUs)

When the user has two GPUs and a single large model that doesn't fit comfortably on one:

Important: LM Studio auto-balances across GPUs — it does NOT let you pin one model to one GPU.

If they also want a secondary model:

Thinking mode for agent workloads

When the user asks whether to enable/disable "thinking" or internal reasoning:

Qwen3.6-27B local coding-agent preset

For qwen3.6-27b-nvfp4-mtp acting as a Hermes coding/tool agent—not as the top-level cloud orchestrator—start with:

Do not default to temperature 0 for autonomous agent loops; it can make recovery and tool selection overly rigid. If edits wander or tool behavior becomes unstable, lower temperature to 0.3–0.4 before disabling thinking. Thinking-off is reserved for disposable one-shot rewriting, classification, or summaries—not coding, file mutation, terminal work, or verification loops.

LM Studio prompt ownership when serving Hermes

When LM Studio is acting as Hermes's OpenAI-compatible backend:

Rule of thumb: LM Studio serves the model cleanly; Hermes owns agent behavior.

Do not blame the checkpoint for tool-grammar initialization failures

If plain chat, a small structured response, and a one-tool request succeed but a full Hermes session fails before generation with Failed to initialize samplers: failed to parse grammar, treat the model/quant/MTP path as provisionally healthy. Inspect LM Studio's exact preceding grammar error and the advertised Hermes schemas. llama.cpp can reject one oversized nested constraint—such as a generated char{1,5000} rule from a tool string maxLength: 5000—before the model runs. Compare slim-tool and full-tool Hermes-path smokes, then fix/defer the offending schema or use the upstream tiered-disclosure mitigation; changing quants is not a grounded response to this signature.

Verify Hermes routing layers before judging a local setup

A Hermes profile's displayed model is only its main model. It does not reveal the profile's delegated-agent or auxiliary routes. Before answering whether two roles are “the same” or whether a dual-model setup works, inspect and state all three layers:

  1. model.* — profile main/orchestrator.
  2. delegation.* — spawned agent worker.
  3. auxiliary.* and task-specific overrides — compression, vision, approval, titles, and related support calls.

Then query LM Studio's /v1/models for advertised IDs and /api/v1/models for live context, parallel slots, capabilities, and load settings. Require a Hermes-path smoke in addition to a raw endpoint smoke. Named custom-provider vision aliases, uncapped image requests, single-slot recovery, context-metadata matching, and one-shot background-delegation verification are covered in references/hermes-local-routing-verification.md.

Dual-GPU dual-model setups

When the user has two GPUs and wants separate worker + auxiliary models, current LM Studio builds support two viable architectures.

One LM Studio server with multiple loaded models

Recent LM Studio builds can keep multiple models loaded behind the same OpenAI-compatible endpoint. Each loaded instance can have its own context length and parallel count.

Verification is mandatory:

This is the simplest architecture when both models fit and hard GPU pinning is unnecessary.

Engine Protocol CPU thread pools

Current LM Studio builds place llama.cpp CPU thread control under Load → Advanced Load Params → CPU Thread Pool Size. This is a load-time setting; verify the running server uses the intended --threads N after reloading.

For multiple simultaneously active, GPU-offloaded model servers, divide physical CPU cores across the busy servers instead of giving every process the full machine. A 24-core/24-thread CPU with two active servers should start at 12 threads each. Fully GPU-offloaded models rarely benefit from all CPU cores; CPU-offloaded models may. Hybrid P/E-core systems should benchmark smaller pools because synchronization on slower E-cores and cross-process contention can reduce performance.

Do not interpret --tensor-split values as literal percentages or subtract their sum from 1 to claim CPU spill. llama.cpp treats them as normalized proportions. Prove CPU layer offload using load logs, --n-gpu-layers, GPU telemetry, CPU utilization during a request, and throughput—not process RAM usage alone.

Detailed sizing, verification commands, fallbacks, and the tensor-split pitfall are in references/lm-studio-engine-protocol-threading.md.

LM Studio + llama.cpp server for strict isolation

GPU 0: LM Studio → worker model on port <port-a>
GPU 1: llama-server → auxiliary model on port <port-b>
 Windows: set CUDA_VISIBLE_DEVICES=1
 Linux: CUDA_VISIBLE_DEVICES=1 llama-server -m model.gguf --port <port> -ngl 99

Use separate runtimes when a model must be pinned to one GPU, independent endpoint availability matters, or one runtime's allocator causes cross-GPU contention.

What still does not work reliably

See references/cloud-orchestrated-q4-delegates.md for a verified same-endpoint Qwen worker + Gemma auxiliary example.

Orchestrator selection for external tool executors

When a model orchestrates a separate cloud-powered application agent—such as a cloud model operating the Hermes for Excel bridge—choose the orchestrator for controller duties, not for the executor's domain alone.

  1. Split the roles explicitly:
  1. Never let either model grade its own work. Workbook values/formulas/formats, tool transcripts, test commands, and exit codes are the acceptance surface.
  2. If one local model must both orchestrate and repair TypeScript/Python, prefer the strongest dense tool/coding model that fits at the intended context. On a 32GB Blackwell card, stock Qwen3.6-27B Q6_K is the reliability-first one-model choice; use thinking, one parallel slot, Flash Attention, GPU KV offload, and enough KV headroom to avoid spill.
  3. If cloud orchestration is allowed, compare against the available Codex coding-agent route before downloading another local checkpoint. A strong cloud coding model can be the better controller/repair agent, while a local model remains the unlimited-runtime fallback. Put repetition in an external bounded controller rather than one endless conversation, and define quota/failure fallback before launch.
  4. Treat Qwen-AgentWorld-35B-A3B as a specialized benchmark challenger, not an automatic replacement for a dense coding agent. It is trained as a language world model across MCP, terminal, SWE, web, OS, and related domains and is fast at roughly 3B active parameters, but normal Hermes tool behavior, chat-template compatibility, coding repairs, and required long-context memory must pass the exact workload first. On a 32GB card, Q6 leaves little context headroom; Q5-class quants are more practical but increase the need for live evaluation.
  5. Prefer current stock/upstream-derived GGUFs with verified developer-role and nested tool-call templates over flashy community distills when reliability is the objective. Verify exact repository, filename, template, loaded context, and a Hermes-path tool-call smoke before judging the model.

For overnight autoresearch, model quality and campaign architecture are separate decisions: even the best model needs a persistent controller, frozen evaluator, bounded iteration contract, durable logs, and clean keep/revert semantics.

Auxiliary model selection for Hermes

Hermes has 11 auxiliary task slots. The two that matter most for model choice:

| Task | Priority | Needs |

|------|----------|-------|

| compression | HIGH — touches agent state | Reliable, handles long inputs |

| approval | HIGH — can allow/block commands | Reliable reasoning |

| vision | HIGH if main lacks mmproj | Vision support |

| web_extract | MEDIUM | Cheap, fast |

| title_generation | LOW | Disposable |

For 16GB auxiliary alongside a 27B main:

Cross-family is preferred. Running the same model family on both GPUs means a failure mode affecting one probably affects both. Different architectures (dense + MoE) or different families (Qwen + Gemma) is safer.

Small auxiliary verifier/compressor guidance

When the user wants a small model that can both compress context and run a loop to check whether a task/result is correct:

  1. If Gemma 4 12B IT Q6_K fits, recommend it over E4B/9B. It is the practical sweet spot for compression plus meaningful sanity checks.
  2. Use one parallel request for verifier/compressor duty. Parallel=2 duplicates active KV/context pressure and trades away reliability for throughput. Only raise parallelism for low-stakes batch summaries that stay fully in VRAM.
  3. Configure high effective context, but leave headroom. For a 128K context auxiliary model, 80% is 102,400 tokens; use that as a conservative operating target when the runtime needs a manual value.
  4. Verifier scope matters:
  1. Hermes does not have a single universal “verify every final answer with aux” switch. Wire the model into built-in auxiliary tasks instead: auxiliary.compression, compression.summary_*, auxiliary.approval with approvals.mode: smart, and optionally auxiliary.monitor / auxiliary.triage_specifier. For task-result verification, include an explicit verification instruction in the task prompt or spawn a verifier/delegation pass deliberately.
  2. Use the model ID exposed by the live local endpoint, not the GGUF filename guess. Query /v1/models when permitted; otherwise tell the user to copy the loaded model name from LM Studio/llama.cpp.
  3. Use whole-trigger matching as the safe default, then evaluate the shared-model exception explicitly. Hermes' built-in compressor sends the whole compressible middle in one request; it does not map-reduce through repeated chunks. Normally the auxiliary context should meet the main trigger. When reusing one stronger local checkpoint for parallel workers and compression, calculate trigger × (1 - target_ratio) plus prior-summary/instruction headroom and prove the near-boundary request live before accepting a smaller worker slot. See references/shared-local-worker-compressor.md.
  4. Interpret compression.target_ratio correctly. It is the fraction of the compression threshold retained as the recent raw tail, not a source-to-summary output ratio. Lowering it summarizes more history and leaves more room; it does not make a short-context auxiliary process multiple chunks.
  5. Size a shared compressor for its largest client, not the smallest worker. If the same Gemma/compressor can summarize both a cloud parent and local delegated Qwen sessions, calculate every client's effective trigger and provision against the largest one. A compressor sized only to the Qwen worker may be safe for Qwen yet truncate or force early compaction for the larger cloud parent. Keep the larger context unless the routes are truly isolated or the cloud trigger is deliberately lowered and verified.

For mechanics, worked arithmetic, model-selection consequences, and verification, read references/hermes-compression-window-matching.md.

NVFP4 inference parameter tuning

NVFP4 quants (e.g., the community RSF series — tens of thousands of downloads/month, actively updated) trade some quality for significant speed gains (~1.7x prefill over Q4_K_M). When the author publishes same-top-token probability metrics, use them to set Top K:

If output feels too narrow or refuses valid options, raise K by 5-10. If it wanders into artifacts or repetition, lower it back down.

NVFP4 backend and MTP requirements

Separate three claims that were previously conflated:

  1. Native NVFP4 execution: Current llama.cpp CUDA builds can execute NVFP4 tensors directly on Blackwell GPUs. LM Studio support depends on its selected runtime pack, so inspect the installed runtime rather than assuming the app version is enough. Look for GGML_TYPE_NVFP4 handling / CUDA NVFP4 kernels or prove it by loading a known NVFP4 GGUF.
  2. MTP speculative decoding: MTP is optional acceleration for token generation, not a requirement for NVFP4 quality or memory savings. Recent llama.cpp builds can support native Qwen3.6 MTP, but LM Studio may lag or expose it differently. Verify the actual runtime and model tensors before promising a speedup.
  3. Compression workload: Long prompt prefill and summary fidelity matter more than speculative generation speed. Establish a stable non-MTP baseline first; add MTP only if the runtime supports it cleanly and measured end-to-end compression latency improves. Verify LM Studio's native /api/v1/models response, not the filename alone: require the intended loaded instance plus speculative_draft_mtp: true, the actual draft-token limit, live context, parallel count, and Flash Attention state. Then run a compression-shaped prompt near the expected middle size and record returned model, prompt tokens, finish reason, content, and elapsed time. Do not attribute a faster result to MTP when the checkpoint, context, parallelism, or other load settings also changed.

The official nvidia/Qwen3.6-27B-NVFP4 checkpoint targets vLLM/ModelOpt and is the authoritative NVIDIA calibration source. For LM Studio/llama.cpp, use a GGUF conversion that explicitly preserves NVFP4 tensors and documents the precision of non-FFN tensors. On a single 5090 at 262K context, the LibertAIDAI/Qwen3.6-27B-NVFP4-GGUF Q8_0 hybrid is the preferred compression variant; see references/single-gpu-long-context-compression.md.

Shared local worker + compressor

When the user wants one strong local checkpoint to serve parallel delegated agents and compression, do not introduce a second smaller auxiliary model by reflex. First calculate the actual compressible middle (trigger × (1 - target_ratio)), include prior-summary/instruction headroom, and run a near-boundary compression-resolver smoke. Short worker sessions can share one LM Studio continuous-batching instance while the same weights handle compression, provided the tested compression payload fits the live slot.

Keep three context concepts separate:

Current Hermes can auto-lower too aggressively when the live compressor context is below the whole main trigger even though the actual middle fits. Use the narrow, documented workaround only with arithmetic and live proof. Full procedure, verified example, and pitfalls: references/shared-local-worker-compressor.md.

Local document OCR / PDF parsing models

When the user asks about local models for PDF/image OCR, PDF-to-Markdown, or PDF-to-JSON extraction, check references/local-document-ocr-models.md before answering. Key current candidates:

For recall-style questions, give the most likely model first with one short reason and links; do not start with a broad OCR model survey unless the user asks for comparison.

Research methodology

When researching models for the user:

  1. Start with authoritative sources — Hermes docs, upstream model repos/cards, runtime release notes, then community sources (r/LocalLLaMA, r/LocalLLM, r/hermesagent, HuggingFace).
  2. Verify existence before recommending — check HuggingFace for actual model repos and exact filenames.
  3. Check model family sizes — not every number exists (no Qwen3.5 14B, no Qwen3 9B).
  4. Prefer sustained agent evidence (Terminal-Bench, SWE-bench, real Hermes/tool loops, runtime issue reports) over single-shot benchmarks (MMLU).
  5. Note the quant table — Q4 vs Q6 gap matters for agent loops; for public guidance, recommend Q6 where RAM allows for dense agent models.
  6. Surface recency bias — models and runtimes move fast; for megathreads, check the last 30–45 days and record the compile date.
  7. Run a defensibility pass before public posts: check current MLX-LM, llama.cpp, Ollama, Unsloth, and Hugging Face issues/releases for tool-calling, MTP, cache, Jinja/template, and Apple Metal caveats.
  8. Use subagent verification for public research drafts — ask a separate agent to audit overclaims, missing caveats, and claims that need softer wording.
  9. Keep uncensored/abliterated wording neutral — stock/instruct first; Heretic/HauhauCS/Huihui-style builds are advanced test-first options. Avoid pejorative labels unless backed by direct evidence.
  10. Apple Notes #272 has the full Qwen3.6-27B config guide — reference it for 27B-tier recommendations.
  11. Check runtime evidence, not just model quality. For MLX, inspect ml-explore/mlx-lm issues/releases for OpenAI server behavior, tool-call parsing, Qwen/Gemma support, and MTP truncation. For GGUF, inspect ggml-org/llama.cpp issues/discussions for Apple Metal, MTP, KV cache, and Jinja/template behavior.
  12. Add a known caveats as of <date> section for public megathreads. Include negative evidence such as MLX tool-call gaps, MTP regressions on Metal, template pitfalls, and uncensored variants needing re-test for function calling.
  13. Treat synthesis blogs as lead generators, not final authority. Back headline claims with official docs, model metadata, implementation threads, or reproducible benchmark posts.
  14. Keep recommendations framed around Hermes agent reliability: schema discipline, long tool-loop stability, context/KV management, and OpenAI-compatible endpoint behavior matter as much as tokens/sec.

Mac + Hermes Agent megathread pitfalls

New/untested model VRAM estimation workflow

Use this for brand-new models (just-released, no GGUF, no community quants yet) where the user asks "can I run this with my hardware?"

Step 1: Find the raw FP16 size.

Step 2: Estimate at target quants.

| Quant | Multiplier (vs FP16 size) |

|-------|--------------------------|

| Q8_0 | ×0.50 |

| Q6_K | ×0.36 |

| Q5_K_M | ×0.31 |

| Q4_K_M | ×0.28 |

| Q3_K_M | ×0.22 |

| IQ4_NL | ×0.26 |

For MoE models (35B total / 3B active, 397B total / 17B active, etc.), the total param count determines memory, not the active count — all experts are resident.

Step 3: Add KV cache overhead.

Find architecture params from the model's config.json:

KV cache per token (FP16): layers × kv_heads × head_dim × 2 bytes × 2 (K+V).

At 256K tokens: multiply by 262144. At Q8 KV: ×0.5. At Q4 KV: ×0.25.

If exact arch params are hard to find, use a conservative estimate:

Step 4: Check backend support and GGUF availability.

Step 5: Check multi-GPU feasibility (dual heterogeneous GPUs like 32GB+16GB).

REAP-pruned MoE variants

REAP (Router-weighted Expert Activation Pruning) removes low-impact experts from SMoE models. The technique can produce models that beat full-size stock (Gemma 4 21B REAP scored #1 of 23 on a community benchmark), but Qwen3.6-specific REAP implementations have mixed reviews — one serious evaluation called the results "largely negative."

Key trade-off: REAP reduces total params (35B→19-27B) but active params stay ~3B. For general Hermes agent work, stock 27B dense (27B active/token) remains the safer pick. For VRAM-constrained coding, REAP may be worth exploring. Full model list, benchmark data, and uncensored availability in references/reap-pruned-models.md.

Prefill / prompt processing optimization

When the user asks how to speed up prompt processing (time-to-first-token, prefill throughput) on local hardware:

The two knobs that matter most:

  1. --batch-size (-b) — Logical batch for prefill. Controls how many tokens are processed in one forward pass during the prefill phase. Higher = faster prompt processing but more VRAM required.
  1. --ubatch-size (-ub) — Physical micro-batch within the logical batch. Must be ≤ --batch-size. This is where the biggest recent gains have been found.

LM Studio limitations: LM Studio exposes evalBatchSize in the Advanced settings sidebar but does NOT expose --ubatch-size in its UI. For maximum prefill control, run llama-server directly with explicit -b and -ub flags instead of going through LM Studio for that model.

Other optimization levers:

Upcoming features (as of July 2026):

See references/prefill-optimization-notes.md for benchmark data and tuning recipes.

Support files

Public support files

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.