Skip to content

Do Not Merge - Convert the runtime and transform stack to Qwen3.6 27B#437

Draft
anupsv wants to merge 9 commits into
chore/simplify-tier1-dead-codefrom
qwen-3.6
Draft

Do Not Merge - Convert the runtime and transform stack to Qwen3.6 27B#437
anupsv wants to merge 9 commits into
chore/simplify-tier1-dead-codefrom
qwen-3.6

Conversation

@anupsv

@anupsv anupsv commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace the Gemma-specific model, harness, worker pinning, artifact defaults, and test suite with a Qwen-only text runtime for mlx-community/Qwen3.6-27B-4bit@c000ac2c… (qwen3_5_text internally)
  • use the pinned library Qwen35TextModel as the production oracle with strict 64-layer hybrid-cache/config/1,847-tensor validation, explicit Qwen golden identity, explicit local baselines, and fail-closed worker/preflight contracts
  • add a hard-disabled editable Qwen fast-path scaffold covering partial RoPE, gated GQA, Gated DeltaNet, SwiGLU blocks, transactional hybrid caches, and a last-token untied LM head, plus an opt-in real-checkpoint parity suite
  • pin the complete Qwen checkpoint manifest and local setup/transform defaults while leaving correctness_prompts/**, the M5 benchmark workflow/configuration, and protected operator artifacts unchanged
  • document the remaining operator handoff: provision Qwen on M5, generate Qwen goldens/GPQA data, calibrate thresholds and paired baseline identity, then activate the custom path only after real-checkpoint parity

Test plan

  • swift build -c release
  • swift test — 378 tests passed
  • MLXFAST_RUN_MLX_RUNTIME_TESTS=1 swift test — 378 tests passed
  • tiny deterministic library prefill/chunk/cache parity
  • opt-in reference parity tests skip cleanly when MLXFAST_QWEN_REFERENCE_WEIGHTS_PATH is absent
  • bash -n across shell scripts, JSON validation, and git diff --check
  • no diff under correctness_prompts/**, .github/workflows/benchmark.yml, or ops/m5-bench/**
  • real 15 GB transformed-checkpoint parity (operator follow-up; custom production gates remain false)

Important scope note

This prepares the codebase but intentionally does not make Qwen officially rankable yet. The protected M5 workflow and correctness artifacts remain Gemma-specific by request, so official Qwen runs must fail closed until the documented operator migration is completed.

Made with Cursor


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

anupsv and others added 9 commits July 11, 2026 10:46
Drop unused APIs, the BenchmarkPromptPlan pass-through, and a superseded freeze test; centralize transformed-weights byte-limit parsing; symlink CLAUDE.md to AGENTS.md; and fix README local-score wording.

Co-authored-by: Cursor <cursoragent@cursor.com>
Delete the manual parallel-correctness probe workflows and combiner script,
move gemma-freshvm to ops/, centralize timed-run score evaluation in
BenchmarkScore.evaluateTimedRun, and trim worker expert-stats threading.

Co-authored-by: Cursor <cursoragent@cursor.com>
The unified score guard must still publish decode/prefill seconds on finite
floor failures, matching the pre-refactor in-process benchmark path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore formatted floor-failure messages, add evaluateTimedRun unit tests,
drop an unused loader variable, and refresh stale combine-era comments.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop unused Gemma4Model.layer, per-layer weight materialization helpers,
and the orphaned --step-range-output sidecar now that the parallel
correctness combiner is gone.

Co-authored-by: Cursor <cursoragent@cursor.com>
The ranked pipeline runs serially on one machine, so step-range slicing,
base-case-only mode, and zero-step skip paths are dead surface area.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace stale multi-VM and timing-only/gates-only machine wording with
phased-run terminology; trim retired parallel-pipeline references in
workflow, overlay script, and contract tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the Gemma-specific model, harness, artifact contract, and tests with a fail-closed Qwen3.5-architecture implementation for the pinned Qwen3.6 27B 4-bit checkpoint. Keep the library model as the production oracle while adding a hard-disabled, parity-tested editable fast-path scaffold and explicit operator handoff for the still-protected M5/golden migration.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tenki-reviewer

Copy link
Copy Markdown

anupsv does not have permission to run Code Reviewer. You can manage permissions in your settings.

@anupsv
anupsv marked this pull request as draft July 12, 2026 01:24
@anupsv
anupsv force-pushed the chore/simplify-tier1-dead-code branch from 9dcb0cb to 1b201fe Compare July 12, 2026 02:08
@anupsv anupsv changed the title Convert the runtime and transform stack to Qwen3.6 27B Do Not Merge - Convert the runtime and transform stack to Qwen3.6 27B Jul 12, 2026
@anupsv
anupsv force-pushed the chore/simplify-tier1-dead-code branch from 1b201fe to b0d1651 Compare July 12, 2026 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant