Files
alzeo/tests/test_one_engine_units.py
T
Hasan BasbunarandClaude Opus 5.5 4c031634ad v1.51: the Liquid AI LFM3 lane (lfm3), on vLLM's own nightly image, in every lane list
Liquid AI's LFM3 1.7B in its official NVFP4 (LiquidAI/LFM3-1.7B-NVFP4 at cfe4b5ea), served by
vllm/vllm-openai's nightly of commit 60bd6dd by digest, pulled as published: LFM3 came to vLLM on
2026-11-06 and is in no release. A text lane of its own on the text lanes' port, behind the proxy and
its key: the key by --config (redacted in vLLM's own log line), the vLLM lanes' middleware for every
route but /health and /metrics, its served name lfm3-1.7b, the model's whole window (262,144), the
qwen3 reasoning parser and the qwen3_coder tool-call parser its template's form asks for, the prompt
tokens details, its own vLLM, FlashInfer and Triton caches. --gpu-memory-utilization is LFM3_GMU, 0.75:
this nightly extends its KV cache into every byte left free after its warmup, and the reference box
kept 1,087 MiB available at its lowest with none set. The prefix cache at vLLM's default for this
hybrid model, measured 99 to 100 % of an agent's next turn.

One engine at a time: Conflicts= and After= with every engine unit, both ways. install-lfm3.sh on
vllm-lane.sh like the other vLLM lanes (--units-only, --prepare, --stage, --uninstall, the proof with a
tool call), refused on a 64 GB box (fits_64 False: no 64 GB share was measured); install.sh puts its
unit in on demand (--no-lfm3, --with-lfm3, --all-weights, 41 GB), switch-model.sh lfm3 fetches its
checkpoint in its own image and points opencode at it, uninstall.sh takes it all, check-pins.sh
checks its revision and its image, the cockpit's sudoers its unit.

Its clients: the opencode provider lfm3 (oc-lfm3.py, its window by oc-limits.sh), pi and omp. Its
template reads enable_thinking, true by default, and no level: opencode offers the high and none
variants, pi off and high alone (HELD_LEVELS maps every other level to null), the two states it holds.

Found on the way: the vLLM lanes' cache-report test now lists it, and its family tests, the lists'
counts and the --all-weights total (1235 GB) follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 15:38:53 +01:00

60 lines
2.7 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",),
}
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)