You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Studio API: /v1/completions support + logprobs for non-GGUF models (MLX/Transformers) #7703
Unsloth Studio's /v1/completions only works when a GGUF model is loaded. For non-GGUF backends (e.g. MLX) it returns a 503. Non-GGUF models are limited to /v1/chat/completions. This blocks a vast number of use cases, including log-likelihood-based evaluation using tools such as lm-evaluation-harness.
Reproduction
Start Unsloth Studio and load a non-GGUF model.
Request http://127.0.0.1:8888/v1/completions and optionally enable logprobs. Example:
{"error":{"message":"No GGUF model loaded. Load a GGUF model first. Or enable Model auto-switch (Settings > API) to load a requested model automatically.","type":"api_error","param":null,"code":null}}
HTTP 503
Additionally, even /v1/chat/completions rejects requests with logprobs outright, and this isn't just limited to non-GGUFs:
{"error":{"message":"logprobs is not supported for chat completions.","type":"invalid_request_error","param":"logprobs","code":"unsupported_parameter"}}
HTTP 400
Conversely, /v1/completions work perfectly against GGUF models, and also return per-token logprobs proxied from llama-server.
By the way, this issue is a prerequisite for #5867 (built-in benchmarking in Studio with lm_eval). I'm the assignee there and already have lm_eval-based benchmarking working for GGUF models through Studio.
Log-likelihood benchmarks like MMLU and HellaSwag need support for logprobs, and many other benchmarks also rely on /v1/completions requests. Neither works for MLX/transformers models right now, so shipping benchmarks without this would limit benchmarking to GGUF only. Adding /v1/completions (and logprobs) support for non-GGUF backends would unlock benchmarking across all backends.
Fixed! Sorry on the delay. Non-GGUF models now serve /v1/completions with logprobs: MLX reports them from the model's own logits before any sampler, and /tokenize answers from a resident MLX model too, while a model running on the opt-in vLLM or SGLang engine is served by relaying to it, which handles logprobs, echo and prompt_logprobs natively. unsloth eval also gained --backend vllm for scoring with vLLM directly. That covers log-likelihood harnesses such as lm-evaluation-harness on Apple Silicon and on Linux GPUs. Two gaps remain: /v1/chat/completions still refuses logprobs, and an in-process transformers model still has no completions path.
To update: uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir (if it's not in the current release yet it'll be in the next one). Unsloth Desktop will have an update banner. For Studio, use unsloth studio update. For Docker, use docker exec <container> unsloth-studio-update. Reopen if it still happens.
Activity
dotVansh commentedon Jul 31, 2026
By the way, this issue is a prerequisite for #5867 (built-in benchmarking in Studio with
lm_eval). I'm the assignee there and already havelm_eval-based benchmarking working for GGUF models through Studio.Log-likelihood benchmarks like MMLU and HellaSwag need support for
logprobs, and many other benchmarks also rely on/v1/completionsrequests. Neither works for MLX/transformers models right now, so shipping benchmarks without this would limit benchmarking to GGUF only. Adding/v1/completions(andlogprobs) support for non-GGUF backends would unlock benchmarking across all backends.Lyxot commentedon Aug 3, 2026
I'm working on this for MLX backend
dotVansh commentedon Aug 3, 2026
That’s amazing, thanks! Do let me know if I can help in any way
Studio: serve /v1/completions from managed vLLM and SGLang engines (u…
Studio: logprobs on /v1/completions and /tokenize for MLX models (uns…
danielhanchen commentedon Oct 20, 2026
Fixed! Sorry on the delay. Non-GGUF models now serve
/v1/completionswith logprobs: MLX reports them from the model's own logits before any sampler, and/tokenizeanswers from a resident MLX model too, while a model running on the opt-in vLLM or SGLang engine is served by relaying to it, which handleslogprobs,echoandprompt_logprobsnatively.unsloth evalalso gained--backend vllmfor scoring with vLLM directly. That covers log-likelihood harnesses such as lm-evaluation-harness on Apple Silicon and on Linux GPUs. Two gaps remain:/v1/chat/completionsstill refuses logprobs, and an in-process transformers model still has no completions path.To update:
uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir(if it's not in the current release yet it'll be in the next one). Unsloth Desktop will have an update banner. For Studio, useunsloth studio update. For Docker, usedocker exec <container> unsloth-studio-update. Reopen if it still happens.Add a vLLM backend to unsloth eval (unslothai#14228)
Benchmark card: run as a Benchmarks evals task instead of its own job…