Skip to content

[IMPORTANT] [Bionic/MLX] Context auto-fits to 4,864 but Bionic still rejects requests as too large #2212

Description

@imCinq

Which version of LM Studio?
LM Studio: 0.4.20+1
Bionic: 1.0.3+3
CLI commit: 71bd99c

Which operating system?
macOS 26.5.2 — build 25F84
MacBook Air, Apple M2
Unified memory: 16 GB

What is the bug?
When loading prism-ml/Ternary-Bonsai-27B-mlx-2bit through Bionic/LM Studio, the requested context length is automatically reduced by LM Studio from 6,144 to 4,864 tokens because of the memory guardrail.

The loaded instance correctly shows:

Ternary Bonsai 27B MLX 2bit 4864 ctx Loaded

However, Bionic still reports:

The selected model was loaded with a context length too small for this request.

Changing the requested context length to 5,000, 6,144, and later 4,096 did not resolve the error. The model remains loaded and idle, but Bionic cannot issue a request.

This appears to be a mismatch between the requested/configured context length and the actual auto-fitted context length reported by the loaded model instance.

Screenshots

Image Image

Logs
At a requested context of 6,144:

text [2026-07-27 17:14:31][DEBUG][context_fit][INFO]: Model context auto-fit: family=qwen3_5 max=262,144 fitted=4,864 safe_ceiling=8.84GiB estimated_peak=8.84GiB

[2026-07-27 17:14:31][DEBUG][cache_store][INFO]: VLM prompt cache context target: configured=6,144 fitted=4,864 effective=6,144

The loaded-instance UI and lms ps both report 4,864, despite the cache-store entry retaining effective=6,144.

LM Studio’s memory estimate also reports that the 6,144-token configuration cannot be loaded under its current guardrails:

text canLoad=false estimatedUsageBytes=11929518865.599998 estimatedModelUsageBytes=8521084904 estimatedContextUsageBytes=3408433961.5999994

After changing the requested context to 4,096:

text [2026-07-27 17:29:14][DEBUG][context_fit][INFO]: Model context auto-fit: fitted=4,864 safe_ceiling=8.84GiB estimated_peak=8.84GiB

[cache_store][INFO]: VLM prompt cache context target: configured=4,096 fitted=4,864 effective=4,864

To Reproduce
Steps to reproduce the behavior:
Use a Mac with Apple Silicon and 16 GB unified memory.

Install LM Studio 0.4.20+1 and Bionic 1.0.3+3.

Download and select:
prism-ml/Ternary-Bonsai-27B-mlx-2bit
Load the model through Bionic with a requested context of 6,144.

Observe that the loaded instance reports 4,864 ctx.

Send a Bionic request.

Observe the context-too-small error.

Eject and reload with a requested context of 4,096.

Confirm that LM Studio still reports an actual context of 4,864.

Retry the request; the same error persists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions