unsloth/studio/backend/core/inference
Daniel Han 434dee9618 Tighten _can_estimate_kv gate and treat sliding_window=0 as disabled
Two additional fixes from review round 1 (5/8 and 4/8 reviewer consensus):

1. _can_estimate_kv now requires BOTH key_length AND value_length for
   the explicit-dims path. Previously key_length alone was enough,
   which could cause silent fallthrough to the legacy formula with
   fabricated defaults (n_kv=1, head_dim=128) when value_length was
   absent from the GGUF.

2. SWA path now requires sliding_window > 0. Some GGUFs use 0 as a
   disabled sentinel. Without this guard, min(ctx, 0) would zero out
   all SWA layer contributions, severely underestimating KV cache.
2026-04-01 12:49:41 +00:00
..
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
_html_to_md.py Studio: simplify tool-call dedup and replace html2text with builtin converter (#4722) 2026-03-31 06:15:18 -07:00
audio_codecs.py studio: per-model inference defaults, GGUF slider fix, reasoning toggle (#4325) 2026-03-16 06:37:55 -07:00
defaults.py studio: web search, KV cache dtype, training progress, inference fixes 2026-03-17 00:30:01 -07:00
inference.py [studio] multi gpu: revert to balanced for inference. (#4698) 2026-03-31 01:24:41 -07:00
llama_cpp.py Tighten _can_estimate_kv gate and treat sliding_window=0 as disabled 2026-04-01 12:49:41 +00:00
orchestrator.py fix: auto-retry stalled HF downloads with HF_HUB_DISABLE_XET=1 (#4712) 2026-03-31 03:00:46 -07:00
tools.py Studio: simplify tool-call dedup and replace html2text with builtin converter (#4722) 2026-03-31 06:15:18 -07:00
worker.py fix: auto-retry stalled HF downloads with HF_HUB_DISABLE_XET=1 (#4712) 2026-03-31 03:00:46 -07:00