Run this model with HF Jobs

Run 0xlean/Qwen3.8-27B-OpenCode-MLX-Q4 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/0xlean/Qwen3.8-27B-OpenCode-MLX-Q4. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/0xlean/Qwen3.8-27B-OpenCode-MLX-Q4 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/0xlean/Qwen3.8-27B-OpenCode-MLX-Q4. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
0xlean's picture
Document oMLX comparison against NetProjects Q4
90378c4 verified
|
Raw History Blame Contribute Delete
5.81 kB
# Evaluation
## Completed
- Checked the Hub checksums for the pinned base and adapter inputs.
- Tested the chunked merge with synthetic matrices and ran it on the real 18-shard checkpoint.
- Verified that all three output shards are present and the MLX configuration specifies affine 4-bit with group size 64.
- Loaded the fused checkpoint on an M2 Max with 32 GB unified memory and generated the correct answer to a short arithmetic prompt.
## Synthetic OpenCode pilot
One run per task and model on an M2 Max with 32 GB unified memory, using
OpenCode 2.3.2 and mlx-lm 0.32.2. Each time is elapsed CLI wall time in
seconds, including startup and tool calls.
| Fixture | Base Q4 | Base seconds | Fused Q4 | Fused seconds |
| --- | --- | ---: | --- | ---: |
| Empty mean | Pass | 35.0 | Pass | 74.8 |
| Split once | Pass | 42.6 | Pass | 42.6 |
| Stable count | Pass | 49.0 | Pass | 43.1 |
| Adjacent intervals | Pass | 82.3 | Fail | 45.9 |
| Page count | Pass | 44.2 | Pass | 45.7 |
| **Tasks passed** | **5/5** | | **4/5** | |
The fused checkpoint passed one fewer fixture in this pilot. The fixtures are
small, the base ran first, and the two checkpoints were stored on different
drives. The observed timing differences do not establish a throughput
advantage. A broader evaluation on repository tasks is still needed.
## oMLX comparison with NetProjects
On November 29, 2026, we ran the same five synthetic fixtures on an M2 Max
with 32 GB of unified memory. OpenCode used oMLX for inference. We ran the
[0xlean fused Q4](https://huggingface.co/0xlean/Qwen3.8-27B-OpenCode-MLX-Q4)
first and the
[NetProjects fused Q4](https://huggingface.co/netprojects/Qwen3.8-27B-opencode-adapted-MLX-4bit)
second, in separate server runs. Each build had one attempt per fixture and
a 180-second limit per attempt. Both used the same fixture definitions and
independent test checks.
The local checkpoints both specify affine 4-bit quantization with group size
64. Their `tokenizer.json` and `chat_template.jinja` files are byte-identical.
The NetProjects checkpoint includes native MTP weights. The recorded run
metadata does not establish whether speculative decoding was active or pin the
exact NetProjects checkpoint revision and oMLX/OpenCode versions.
Times are elapsed OpenCode CLI seconds, including agent overhead and tool
calls. Calls are counted from the recorded OpenCode tool events.
| Fixture | 0xlean result | Seconds | Calls | NetProjects result | Seconds | Calls |
| --- | --- | ---: | ---: | --- | ---: | ---: |
| Empty mean | Pass | 34.7 | 2 | Pass | 35.4 | 2 |
| Split once | Pass | 43.6 | 2 | Pass | 45.9 | 2 |
| Stable count | Pass | 24.8 | 2 | Pass | 30.0 | 2 |
| Adjacent intervals | Fail | 28.7 | 2 | Fail | 29.1 | 2 |
| Page count | Pass | 45.5 | 3 | Pass | 28.7 | 2 |
| **Total** | **4/5** | **177.3** | **11** | **4/5** | **169.1** | **10** |
### Shared failure
Four patches were byte-identical across builds. Both emitted this patch for
the half-open interval fixture:
```diff
def overlaps(a, b):
- return a[0] <= b[1] and b[0] <= a[1]
+ return a[0] < b[1] and b[0] < a[1]
```
Both failed `assert not overlaps((2, 2), (1, 3))`. The strict inequalities
exclude intervals that only touch at an endpoint, but an empty interval
inside a nonempty one still satisfies both inequalities. The only fixture
with different patches was page count, and both solutions passed its tests.
The builds tied on these fixtures. With one attempt per task, a fixed model
order, and different tool sequences on page count, the elapsed times are
descriptive. The pilot does not establish a speed advantage or show how
either build generalizes to larger repositories. The earlier mlx-lm pilot
compared the fused build against an unadapted Q4 base.
## Protocol for a larger OpenCode A/B
Compare the fused Q4 with the pinned Qwen base converted using the same
mlx-vlm version, 4-bit affine quantization and group size 64. Use the same
tokenizer and chat template for both arms to isolate the effect of the merge.
Run the same OpenCode build, MLX server, prompts, context budget, sampling
settings, tools and time limit. Disable thinking in both arms.
Use at least five tasks with fixed starting commits and independent tests.
Representative tasks include a parser edge case, a broken regression,
input validation, a behavior-preserving refactor and a small feature.
Start each trial in a clean copy and a new session. Alternate which model
runs first and keep the original tests outside the agent's editable files.
Record infrastructure errors separately and keep failed trials in the report.
| Task and commit | Model | Trial | Original tests pass | Seconds | Tool calls | Intervention or failure |
| --- | --- | --- | --- | --- | --- | --- |
## Reproduce the synthetic pilot
Convert the pinned base directly with the same quantization flags as the
fused checkpoint. Use the fused checkpoint's `tokenizer.json`,
`tokenizer_config.json` and `chat_template.jinja` in both arms. Serve one
checkpoint at a time. The initial default server configuration exceeded GPU
memory during OpenCode prefill. The pilot uses the following options for both arms.
```bash
mlx_lm.server --model /path/to/checkpoint \
--host 127.0.0.1 --port 18765 --temp 0 \
--chat-template-args '{"enable_thinking": false}' \
--kv-bits 4 --quantized-kv-start 0 --prefill-step-size 128 \
--prompt-cache-bytes 536870912
# In another terminal, use OpenCode 2.3.2.
python evaluate.py "$(command -v opencode)" \
--base-url http://127.0.0.1:18765/v1 --time-limit 120
```
The runner gives each task a new project and restricts the agent to reading
and editing the supplied fixture. It runs the original checks separately.
Run the fixtures in a disposable evaluation environment because they execute
model-edited Python.