mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-06 21:04:21 +01:00
nvidia/Qwen3.8-Flash-Next-FP4-Local, its experts and its n-gram table in NVFP4 by NVIDIA's quantization-aware distillation, served as its model card says for a DGX Spark: the community b12x vLLM image it names, pinned by digest, the KV cache in FP8, 262,144 tokens, MTP drafting 4 tokens, 8 requests at a time, a memory share of 0.8. Its own unit, installer and switch target, on the base the other vLLM lanes share (vllm-lane.sh), under the name qwen3.8-flash-next-fp4. The flash lane on SGLang is unchanged. What this box adds to the card's command: - The n-gram table is read at every token from the checkpoint's own files. From a USB SSD, 8 requests decoded 15.6 tokens a second in all, from the internal NVMe 77.7 (reference box, 2026-10-20). With the cache on another disk than the home directory's, ple-table.py copies the table's seven files beside it, each checked against its sha256, and the unit mounts them over the cache's own (FLASH_LOCAL_PLE_DIR= chooses, none reads in place). The copies go with the lane. - Docker's default seccomp profile (Docker 29.6.2's, unchanged) plus the three io_uring calls the table is read with, AppArmor kept, where the card turns both off: the same speed (1 stream 23.3 against 23.4 tok/s, 8 streams 76.7 against 77.7), and a user namespace still refused. - The key asked by the middleware the other vLLM lanes run, on every route but /health and /metrics: no --api-key, since this build's own guard would put /metrics behind it. - Its chat template, the flash lane's Qwen template patched the same way, with xhigh as its default, Hasan's choice for this lane. Its opencode provider (oc-flash-local.py), its limits (the flash lane's pair), pi and omp, the pin checks, the full uninstall. Every other lane's unit conflicts with it and orders after it, and the proxy holds requests for it while it boots. Tests: the table's files, their copies and their mounts (ple-table.py, mutants killed), every lane alone on the GPU, the proxy's hold, the pins, the uninstall untagging its own image only. Co-Authored-By: Dimitris Kontokostas <jimkont@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
54 lines
2.3 KiB
Python
54 lines
2.3 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",),
|
|
}
|
|
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)
|