unsloth/studio/backend/core
Daniel Han 653eb3819a
fix(studio): allow context length slider to reach model's native limit (#4746)
* fix(studio): allow context length slider to reach model's native limit

The context length slider was hard-capped to the VRAM-estimated maximum,
preventing users from requesting higher context even though the backend
already handles it safely (multi-GPU selection, --fit fallback). Expose
the model's native context length from GGUF metadata as a separate API
field and use it as the slider ceiling instead. Add an amber warning
when the selected context exceeds the estimated VRAM capacity.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Raise VRAM budget to 90% and add native_context_length tests

Increase the GPU memory utilization threshold from 70% to 90% across
_select_gpus and _fit_context_to_vram, allowing longer context lengths
before VRAM capping kicks in.

Add 33 tests for the native_context_length feature covering the backend
property, context value separation invariants, Pydantic models, route
completeness, edge cases, and cross-platform binary I/O.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-04-01 06:12:52 -07:00
..
data_recipe build(deps): bump oxc-parser (#4571) 2026-03-25 02:44:38 -07:00
export studio: add HF/local model selection UI for GGUF export (#4365) 2026-03-28 22:18:25 +04:00
inference fix(studio): allow context length slider to reach model's native limit (#4746) 2026-04-01 06:12:52 -07:00
training fix(studio): correct default weight_decay and learning rate (#4695) 2026-03-31 13:50:25 +04:00
__init__.py Combine studio setup fixes: frontend caching, venv isolation, Windows CPU support (#4413) 2026-03-18 03:52:25 -07:00