Files
alzeo/tests/test_one_engine_units.py
Hasan BasbunarandClaude Opus 5.5 12eccea5c3 qwen4-35b: the Qwen4 35B-A3B lane, RadixArk's NVFP4 with its DFlash2 draft on SGLang's qwen4 image, the model's KV in FP8
Qwen published Qwen4-35B-A3B on 2026-12-04. The lane serves RadixArk's NVFP4 of it with RadixArk's DFlash2 draft, on the
image SGLang's cookbook gives Qwen4 (lmsysorg/sglang:qwen4, by its arm64 digest), with the DFlash2 arm of the cookbook's
DGX Spark recipe, which the published image serves though the cookbook says otherwise (measured on the reference box). Two
settings of its own, measured: the model's KV cache in FP8, since with the draft's in BF16 SGLang kept it in BF16 too and
held 612,672 tokens, less than the window; a share of 0.72, 1,278,336 tokens and 41 requests at a time. Qwen's tokenizer is
the checkpoint's own code (--trust-remote-code), read whole before it ran.

Its installer and unit, the switch (the checkpoint and the draft, each pinned as refs/main), the uninstall, the cockpit (its
card and note, its draft checked before a start, its start's default), opencode (823000/200000, four levels), pi and omp
(omp's minimal sent as off, a tier omp left out), the CI's checks, Qwen's native encoder in lane-templates-check, every
list of lanes, the licences (the draft's card states none), its pages and the v1.62.0 notes. Decisions 1703, 1704, 1707
and 1709 to 1719.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 11:58:14 +01:00

62 lines
2.9 KiB
Python

#!/usr/bin/env python3
"""Every lane's unit tells systemd that it runs alone, and in what order.
Two engines on the unified pool is the livelock this box power-cycles out of. The image
unit said so with Conflicts= and no After=, and Conflicts= orders nothing: its start and
the text lane's stop ran side by side (5 to 60 s in the reference box's journal on
2026-09-23). The two text units said nothing at all to each other, so the 27B and the
flash lane could run together, or both start at boot if both were enabled.
With Conflicts= and After= on every other lane, measured on the box's systemd 255 with
throwaway units (2026-09-24): each switch finished the stop before the start, in all four
directions tried, with no ordering-cycle warning, and a transaction asking for two lanes
at once started one of them only.
"""
import pathlib
import re
import unittest
REPO = pathlib.Path(__file__).resolve().parents[1]
LANES = {
"qwen38-sglang.service": ("qwen38-sglang.service.template", "qwen38-sglang-1m.service.template"),
"qwen38-flash.service": ("qwen38-flash.service.template",),
"qwen38-image.service": ("qwen38-image.service.template",),
"qwen38-video.service": ("qwen38-video.service.template",),
"qwen38-kolibri.service": ("qwen38-kolibri.service.template",),
"qwen38-nemotron.service": ("qwen38-nemotron.service.template",),
"qwen38-nemotron-super.service": ("qwen38-nemotron-super.service.template",),
"qwen38-flash-local.service": ("qwen38-flash-local.service.template",),
"qwen38-ornith-122b.service": ("qwen38-ornith-122b.service.template",),
"qwen38-flash-unsloth.service": ("qwen38-flash-unsloth.service.template",),
"qwen38-image-h3.service": ("qwen38-image-h3.service.template",),
"qwen38-transcribe.service": ("qwen38-transcribe.service.template",),
"qwen38-lfm25.service": ("qwen38-lfm25.service.template",),
"qwen38-lfm3.service": ("qwen38-lfm3.service.template",),
"qwen38-inkling.service": ("qwen38-inkling.service.template",),
"qwen38-qwen4-35b.service": ("qwen38-qwen4-35b.service.template",),
}
ALL = set(LANES)
def unit_list(template, key):
unit = (REPO / template).read_text().split("[Service]")[0]
return {u for line in re.findall(rf"(?m)^{key}=(.*)$", unit) for u in line.split()}
class EveryLaneRunsAlone(unittest.TestCase):
def test_each_lane_conflicts_with_every_other_lane(self):
for lane, templates in LANES.items():
for t in templates:
with self.subTest(template=t):
self.assertEqual(unit_list(t, "Conflicts"), ALL - {lane})
def test_each_lane_is_ordered_after_what_it_conflicts_with(self):
for templates in LANES.values():
for t in templates:
with self.subTest(template=t):
self.assertEqual(unit_list(t, "Conflicts") - unit_list(t, "After"), set())
if __name__ == "__main__":
unittest.main(verbosity=2)