unsloth/studio/backend
Long Yixing 4e4af72b9c
fix(studio): honor MLX adapter state in compare mode (#7196)
* fix(studio): add MLX adapter state control

* fix(studio): honor MLX adapter comparison state

* fix(studio): keep enabled MLX adapters permissive

* Studio: preserve public error message on MLX compare-mode adapter failures

generate_with_adapter_control raised a plain RuntimeError, which the compare
route handled with the generic handler that drops the operational message.
Raise GenStreamErrorRaised(public=chunk.public) instead and catch it in the
streaming and non-streaming consumers, matching the safetensors tool loop, so
errors like 'model is being unloaded' surface their real message.

* Studio: re-emit VLM think prefill inside the adapter context

The compare-mode merge dropped _generate_vlm's upfront yield of the prefilled
<think> block. Restore it as the first snapshot inside the lock+adapter context
(matching _generate_text) so the UI renders the thinking block during prefill
and a cancel/error before the first token does not drop it. Adds a regression
test asserting the prefill is emitted first, after entering the adapter context.

---------

Co-authored-by: danielhanchen <unslothshared@gmail.com>
2026-07-19 00:27:55 -07:00
..
assets Add DeepSeek-V4-Flash-GGUF to Studio with none/high/max reasoning (#6908) 2026-07-07 06:13:43 -07:00
auth Studio: make the Cloudflare tunnel opt-in (off by default) (#7046) 2026-07-15 06:13:25 -07:00
core fix(studio): honor MLX adapter state in compare mode (#7196) 2026-07-19 00:27:55 -07:00
hub Studio: don't re-download updated GGUFs on load (#7209) 2026-07-17 19:05:46 -03:00
loggers Studio: quiet noisy logs, log real progress, and speed up Windows/macOS dataset prep (#7087) 2026-07-15 06:49:52 -07:00
models Studio: make the Cloudflare tunnel opt-in (off by default) (#7046) 2026-07-15 06:13:25 -07:00
plugins Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
requirements Studio: exclude mlx-lm 0.31.3 (broke gemma4/qwen3_5 QK-norm load on Apple Silicon) (#6803) 2026-07-06 19:40:06 -07:00
routes fix(studio): honor MLX adapter state in compare mode (#7196) 2026-07-19 00:27:55 -07:00
state Studio: shareable per-checkpoint preview links (#6486) 2026-06-24 06:31:53 -07:00
storage Studio: expose Windows drive roots in the folder browser (#7082) 2026-07-15 00:24:11 -07:00
tests fix(studio): honor MLX adapter state in compare mode (#7196) 2026-07-19 00:27:55 -07:00
utils fix(mlx): relax context-store timeout by default (#7141) 2026-07-17 17:13:19 -03:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
_platform_compat.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
cloudflare_tunnel.py Reap Studio child processes when the parent dies abnormally (#6425) 2026-06-18 05:51:22 -07:00
colab.py Studio: make the Cloudflare tunnel opt-in (off by default) (#7046) 2026-07-15 06:13:25 -07:00
main.py feat(studio): expose an opt-in MCP control plane (#7191) 2026-07-17 16:50:39 -07:00
mcp_server.py feat(studio): expose an opt-in MCP control plane (#7191) 2026-07-17 16:50:39 -07:00
run.py Studio: don't apply nest_asyncio on plain CLI starts (breaks asyncio on Python 3.14+) (#7186) 2026-07-17 16:27:28 -07:00
startup_banner.py Fix Windows Studio UTF-8 startup handling (#6614) 2026-07-01 13:47:33 +01:00