Skip to content

[MLX][Spec] Add synchronous Gemma 4 MTP worker - #4

Draft
wirybeaver wants to merge 1 commit into
prototype/mlx-gemma4-mtp-assistantfrom
prototype/mlx-gemma4-mtp-worker
Draft

wirybeaver wants to merge 1 commit into
prototype/mlx-gemma4-mtp-assistantfrom
prototype/mlx-gemma4-mtp-worker

Conversation

@wirybeaver

@wirybeaver wirybeaver commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Stack

PR 4 of 6. Depends on #3.

  • Base: prototype/mlx-gemma4-mtp-assistant
  • Head: prototype/mlx-gemma4-mtp-worker

Scope

Adds the dormant MLX-native, one-draft synchronous worker:

  • atomic verify → prepare candidate → propose → commit orchestration;
  • CPU-only spec-v2 relay and scheduler-owned commit accounting;
  • finish, failure, and cache-clear lifecycle cleanup;
  • CPU request-slot assignment without Triton.

Serving dispatch is intentionally deferred to the next PR. Tests use one tiny target and a scripted proposer, with no checkpoint or broad matrix.

Tests

test/registered/unit/hardware_backend/mlx/test_gemma4_mtp_worker.py

Covers accept/reject parity beyond cache rotation, scheduler commit ownership, proposal-failure rollback and retry, natural-finish cleanup, and CPU slot fallback. Result: 4 passed, 4 subtests passed.


CI States

Latest PR Test (Base): ❌ Run #30053099858
Latest PR Test (Extra): ❌ Run #30053099701

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant