Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
c06fa19
Studio: add opt-in vLLM and SGLang inference engines
oobabooga Sep 21, 2026
42e5c51
Studio: extend optional engines with vision, precision and parallel m…
oobabooga Sep 21, 2026
a67b8f1
Studio: allow loading explicitly restored inference engines
oobabooga Sep 21, 2026
5b6e9f8
Studio: support tool calling with managed inference engines
oobabooga Sep 21, 2026
3960bdf
Merge main into feat/studio-opt-in-engines
oobabooga Sep 22, 2026
eec4b11
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 22, 2026
c38665c
Restore managed engine settings on rollback and launch the normalized…
oobabooga Sep 22, 2026
b3fa171
Run optional engine checks in validate before the picker unloads
oobabooga Sep 22, 2026
26b2bd4
Patch the httpx module the managed tool route imports in its tests
oobabooga Sep 22, 2026
f0d40ad
Fetch remote image URLs in Studio before forwarding them to a managed…
oobabooga Sep 22, 2026
b624522
Give managed engine requests the llama-server first-token deadline
oobabooga Sep 22, 2026
daa5da8
Refuse an outdated engine profile on the backend unless it was restored
oobabooga Sep 22, 2026
5b0c980
Name the text encoding for engine subprocess output and the lease file
oobabooga Sep 22, 2026
21a9b95
Update repository guard tests for the optional engine changes
oobabooga Sep 22, 2026
d4e098a
Merge main into feat/studio-opt-in-engines
oobabooga Sep 23, 2026
bfe7a08
Run optional engines on Studio's PyTorch instead of a separate Python…
oobabooga Sep 23, 2026
bf56a58
Keep the chat GPU claim when a managed engine does not stop on unload
oobabooga Sep 24, 2026
424e26b
Report a managed engine that survives load cancellation and keep it h…
oobabooga Sep 24, 2026
86cfd70
Launch managed engines only on GPUs visible to Studio
oobabooga Sep 24, 2026
2394aa4
Default the engine GPU picker to the first GPU Studio sees
oobabooga Sep 24, 2026
c1649be
Merge main into feat/studio-opt-in-engines
oobabooga Sep 25, 2026
3d563ec
Load a compare pane with its remembered vLLM or SGLang settings
oobabooga Sep 25, 2026
0dffb49
Validate a model switch on the GPUs its load will use
oobabooga Sep 25, 2026
a2c3765
Trim comments in opt-in engine code
danielhanchen Sep 25, 2026
300b507
Send managed engines only data URL images
danielhanchen Sep 25, 2026
3e095cb
Keep engine status probes from failing real engine work
danielhanchen Sep 25, 2026
afb6f34
Give the load-time nvidia-smi probes the same 60s allowance
danielhanchen Sep 25, 2026
b7c2a63
Time out engine startup on silence, not a fixed 15 minutes
danielhanchen Sep 25, 2026
8482d76
Disable vLLM's vendored DeepGEMM when it was built for another Python
danielhanchen Sep 25, 2026
cedc789
Start a model switch without a saved config on the default engine
danielhanchen Sep 25, 2026
4fabd0f
Cache a failed nvidia-smi probe for 5 minutes
danielhanchen Sep 25, 2026
9a8715e
Format the engine switch test
danielhanchen Sep 25, 2026
b8057ec
Give the engine silence test room for a slow interpreter start
danielhanchen Sep 25, 2026
38bc4b0
Never run nvidia-smi inside an engines status poll
danielhanchen Sep 25, 2026
6ca8706
Run the malware and remote-code consent gates before a managed engine…
danielhanchen Sep 25, 2026
11c6df2
Treat saved vLLM/SGLang targets as managed in image checks
danielhanchen Sep 25, 2026
ec7c160
Let the legacy model_id-only delete clear a saved engine choice
danielhanchen Sep 25, 2026
c9ac7d8
Merge main into feat/studio-opt-in-engines
danielhanchen Sep 25, 2026
0f6207d
Reap a crashed engine before engine status, install, repair or removal
danielhanchen Sep 25, 2026
5250577
Count managed-engine tokens when reasoning_effort is "none"
danielhanchen Sep 25, 2026
3412f23
Tighten engine comments
danielhanchen Sep 25, 2026
d8ea265
Merge main into feat/studio-opt-in-engines
danielhanchen Sep 26, 2026
f602f83
Share Studio's PyTorch with engines installed from the PyTorch index
danielhanchen Sep 26, 2026
59a5f65
Keep each engine environment's FlashInfer JIT cache inside it
danielhanchen Sep 26, 2026
0c3c2e9
Hide Studio's NVFP4 FlashInfer from shared engine environments
danielhanchen Sep 26, 2026
dc683cf
Give engines the locked pip nvcc for FlashInfer JIT on driver-only hosts
danielhanchen Sep 26, 2026
b226fc6
Download only what Studio lacks: reuse its accepted versions, fetch F…
danielhanchen Sep 26, 2026
0e061d6
Require glibc 2.35 for vLLM, whose wheel is manylinux_2_35
danielhanchen Sep 26, 2026
0513f1e
Update engines to vLLM 0.26.0 and SGLang 0.5.17
danielhanchen Sep 26, 2026
0417f6c
Keep TorchAO precisions working on the upgraded engines
danielhanchen Sep 26, 2026
511e5fe
Merge remote-tracking branch 'origin/main' into r11491
danielhanchen Sep 27, 2026
6e6fedb
Accept a text response_format on managed engines and name audio model…
danielhanchen Sep 27, 2026
8f8beca
Merge remote-tracking branch 'origin/main' into r11491
danielhanchen Sep 28, 2026
3df4446
Merge remote-tracking branch 'origin/main' into r11491
danielhanchen Sep 28, 2026
e1a7439
Serve managed-engine n > 1 one choice at a time, reap an engine a can…
danielhanchen Sep 28, 2026
916e2e3
Report the public model id on managed-engine tool responses
danielhanchen Sep 28, 2026
4af4116
Serve a tool catalog with tool_choice none as plain chat on models wi…
danielhanchen Sep 28, 2026
fdf3502
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 28, 2026
c1d084d
Store only non-default engine fields in model overrides, so an all-de…
danielhanchen Sep 29, 2026
abeaca9
Refuse to start training while a managed engine that failed to stop s…
danielhanchen Sep 29, 2026
7c0c000
Pass the engine key in the environment and guard every vLLM route wit…
danielhanchen Sep 29, 2026
5acac1d
Reuse Studio's TorchAO for engines only at the version the adapter co…
danielhanchen Sep 29, 2026
571a37c
Leave engine-specific VRAM headroom measured on a 24 GB card
danielhanchen Sep 29, 2026
c9e9a10
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 29, 2026
36c20fc
Merge main into feat/studio-opt-in-engines
danielhanchen Sep 29, 2026
08d934f
Keep the NVIDIA driver's library path for managed engines and their i…
danielhanchen Sep 29, 2026
5f6a726
Revert the driver library path change; it moves to its own PR
danielhanchen Sep 29, 2026
3be719c
Merge main into feat/studio-opt-in-engines
danielhanchen Oct 1, 2026
7d82b0f
Engines: lock a release per Studio PyTorch (vLLM 0.30 / SGLang 0.5.20…
danielhanchen Oct 1, 2026
197d96f
SGLang 0.5.18+: run without --torchao-config and refuse load-time INT…
danielhanchen Oct 1, 2026
7c419a1
Precision picker: disable INT8 and 4-bit for SGLang releases without …
danielhanchen Oct 1, 2026
d070583
SGLang 0.5.18+: disable CUDA graphs with the per-phase backend flags
danielhanchen Oct 1, 2026
54b15c0
Merge main into feat/studio-opt-in-engines
danielhanchen Oct 1, 2026
6899423
Merge remote-tracking branch 'origin/main' into r11491
danielhanchen Oct 2, 2026
24dd21e
Engines: skip CUTLASS DSL's CUDA 12 libraries, which a driver 580 hos…
danielhanchen Oct 2, 2026
ea82f00
unsloth run: --engine vllm|sglang serves through an optional engine, …
danielhanchen Oct 2, 2026
5915028
Engines: share nvcc's headers only at the locked release, so FlashInf…
danielhanchen Oct 2, 2026
55df9b3
Engines: take nvcc and its headers from one release, all from Studio …
danielhanchen Oct 2, 2026
a900d9f
Reaping a crashed engine also drops its chat GPU claim and shared res…
danielhanchen Oct 2, 2026
2b03e2d
Shared engines: keep the engine's nvidia tree first when Studio's sit…
danielhanchen Oct 2, 2026
22019df
Engines: an INT4 / INT8 SGLang cannot convert resets on switching and…
danielhanchen Oct 2, 2026
3badbb7
Engines: CUDA runtime headers travel with nvcc, so a shared engine ne…
danielhanchen Oct 2, 2026
3632693
unsloth run --engine: a restored engine loads as is
danielhanchen Oct 2, 2026
feb9ac1
Engines: one merged CUDA include tree, so Studio headers pick up the …
danielhanchen Oct 2, 2026
bc06998
Engines: keep a share of large GPUs free for vLLM's sampler warmup
danielhanchen Oct 2, 2026
829ce71
Engines: keep the current-date note on rebuilt managed-engine messages
danielhanchen Oct 2, 2026
1c03ce1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 2, 2026
c5d783b
Model picker: keep GGUF row badges aligned with rows that have the se…
danielhanchen Oct 2, 2026
edc9f42
Engines: validate the INT4 a legacy load_in_4bit request becomes, bef…
danielhanchen Oct 2, 2026
0c6c6a0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 2, 2026
4757676
Engines: keep lock files byte-exact on Windows clones; mark Linux-onl…
danielhanchen Oct 2, 2026
ee2c279
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 2, 2026
95df13b
Engines: install-machinery tests are Linux engine-host tests
danielhanchen Oct 2, 2026
246a61b
Merge main into feat/studio-opt-in-engines
danielhanchen Oct 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Keep the chat GPU claim when a managed engine does not stop on unload
  • Loading branch information
oobabooga committed Sep 24, 2026
commit bf56a58aeb4ffff09cec0862f5a22ee8130220b5
6 changes: 5 additions & 1 deletion studio/backend/routes/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -18685,9 +18685,13 @@ async def _unload_model_impl(request: UnloadRequest, current_subject: str):
await _drain_and_recancel_before_teardown(
force = request.force_cancel_active, action = "Unloading the model"
)
await asyncio.to_thread(
managed = getattr(backend, "_managed_engine", None) is not None
stopped = await asyncio.to_thread(
backend.unload_model, _resident_standard_model_name(backend, request.model_path)
)
# A live engine still holds its VRAM, so keep the chat claim, as training does.
if managed and stopped is False:
raise HTTPException(status_code = 500, detail = "The inference engine did not stop.")
note_model_unloaded()
account_access.clear_resident("chat")
await asyncio.to_thread(release_chat_gpu_claim)
Expand Down
30 changes: 30 additions & 0 deletions studio/backend/tests/test_managed_engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,36 @@ def test_failed_managed_stop_blocks_training(monkeypatch):
assert backend.active_model_name == "model"


def test_failed_managed_stop_keeps_the_chat_gpu_claim_on_unload(monkeypatch):
import asyncio
from types import SimpleNamespace
from fastapi import HTTPException
from core.inference.orchestrator import InferenceOrchestrator
from models.inference import UnloadRequest
import routes.inference as inference_route

backend = InferenceOrchestrator.__new__(InferenceOrchestrator)
backend._subprocess_shutdown_lock = threading.RLock()
backend.active_model_name = "model"
backend.models = {"model": {"engine": "vllm"}}
backend.loading_models = set()
backend._managed_engine = SimpleNamespace(stop = lambda: False)
released = []
monkeypatch.setattr(inference_route, "get_inference_backend", lambda: backend)
monkeypatch.setattr(
inference_route,
"get_llama_cpp_backend",
lambda: SimpleNamespace(is_active = False, is_loaded = False, model_identifier = None),
)
monkeypatch.setattr(inference_route, "release_chat_gpu_claim", lambda: released.append(True))

with pytest.raises(HTTPException) as raised:
asyncio.run(inference_route._unload_model_impl(UnloadRequest(model_path = "model"), "tester"))
assert raised.value.status_code == 500
assert released == []
assert backend.active_model_name == "model"


def test_dead_managed_server_is_reaped_without_clearing_live_server(monkeypatch):
from types import SimpleNamespace
from core.inference.orchestrator import InferenceOrchestrator
Expand Down
Loading