mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-05 20:34:17 +01:00
install-inkling.sh serves Thinking Machines' Inkling 2 Mini (thinkingmachines/Inkling-2-Mini at its pinned revision, Apache-2.0: a looped mixture of experts, 26.4B parameters with 3.4B active, text and images in) with the DSpark draft head its checkpoint carries, on the text port behind the proxy, as model inkling-2-mini. The engine is SGLang from the image its cookbook gives the model (lmsysorg/sglang:inkling-2-mini, by the digest of its arm64 build), with the cookbook's DGX Spark recipe and its DSpark arm word for word, as the reference box measured it on 2026-11-22: a static share of 0.45, FA4, bfloat16, pages of 128, 8 draft tokens verified per step, MAX_JOBS=4 and the four SGLANG_OPT_* variables, xgrammar, images on, the inkling reasoning and inkling2 tool-call parsers; the model's window of 1,048,576 tokens and the 48 requests SGLang set itself, said so that no later default moves them; and what every SGLang lane of this box passes besides (the key by --config, the scheduler parked when idle, the metrics, the cache report). Its fetch pins refs/main, through which SGLang reads the draft head by the model's name. Its caches keep the kernels its engine compiles at its first start. The lane in every list: the registry, boxmem (refused on a 64 GB box: measured on a 128 GB one only), every engine unit's Conflicts= and After=, the proxy's hold units and its pair's lane names, install.sh (--with-inkling, --no-inkling, on demand by default, its boot kept by an update, its proof, its summary line), switch-model.sh (target inkling), prepare-lane.sh, uninstall.sh (its image is its own: the uninstall takes its tag and a prune reclaims it), check-pins.sh, the cockpit's sudoers lines, the CI's lists and gates, and lane-templates-check.py (its template as published, rendered for every client shape as SGLang hands them). The cockpit follows it as an SGLang text lane (the canary, the pool guard and the autoheal are its own), with its card, its names, its note with the reference box's measures, its engine, its boot default (222 s measured), its journal and its container; its mark is a plain badge of Thinking Machines' initials, no icon set having one. Its clients: opencode's provider inkling (oc-inkling.py), images in, five variants each a level its template reads by name, a pair of 374,000 and 32,000 that fits the pool measured at its window, and oc-fit-limits.py keeping that output as its ceiling whatever its window (ANSWER_CAPPED), as its card recommends limits on output tokens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
62 lines
3.4 KiB
Python
62 lines
3.4 KiB
Python
#!/usr/bin/env python3
|
|
"""The SGLang text engines open no port for their rendezvous, and keep gloo and NCCL on lo (2026-10-30).
|
|
|
|
An SGLang engine of one process still sets torch.distributed up, by default through a TCPStore at
|
|
tcp://127.0.0.1:<a free port>, and torch makes that store listen on every interface whatever address
|
|
it is given: the 27B lane, its container on the host's network, listened on *:23906 with no key on
|
|
the reference box, which has no firewall. Both pinned images read SGLANG_DISTRIBUTED_INIT_METHOD_OVERRIDE
|
|
(srt/distributed/bootstrap.py, _resolve_dist_init_method; read in the 27B's v0.5.22 and the flash lane's
|
|
nightly on 2026-10-30): set to file:///tmp/sglang-rdv, the rendezvous goes through a file in the
|
|
container, which --rm makes new at each start, and no port opens for it. The 27B lane started that way
|
|
with nothing listening past loopback that FP4-Local alone did not have, and answered (2026-10-30).
|
|
"""
|
|
import pathlib
|
|
import unittest
|
|
|
|
REPO = pathlib.Path(__file__).resolve().parents[1]
|
|
FLAG = "-e SGLANG_DISTRIBUTED_INIT_METHOD_OVERRIDE=file:///tmp/sglang-rdv "
|
|
# gloo's and NCCL's bootstrap on lo: under the real clients the 27B lane listened on four ports of the
|
|
# reference box's LAN address without it, though the box's name resolves to 127.0.0.1 (2026-10-30), and
|
|
# the flash lane and the diffusion lanes did the same.
|
|
IFNAMES = "-e GLOO_SOCKET_IFNAME=lo -e NCCL_SOCKET_IFNAME=lo "
|
|
|
|
|
|
def sglang_starts():
|
|
"""Every file of the repo that starts an SGLang text engine."""
|
|
return sorted(p.name for p in [*REPO.glob("*.template"), REPO / "run.sh"]
|
|
if "sglang.launch_server" in p.read_text())
|
|
|
|
|
|
class EveryEngineStartTakesTheFileRendezvous(unittest.TestCase):
|
|
def test_the_starts_are_the_ones_this_test_knows(self):
|
|
# a new SGLang lane is held to it as soon as its unit exists
|
|
self.assertEqual(sglang_starts(), ["qwen38-flash-launch.sh.template", "qwen38-inkling.service.template",
|
|
"qwen38-lfm25.service.template",
|
|
"qwen38-sglang-1m.service.template", "qwen38-sglang-64.service.template",
|
|
"qwen38-sglang.service.template", "run.sh"])
|
|
|
|
def test_each_docker_run_passes_it_once_with_a_fresh_container(self):
|
|
for name in sglang_starts():
|
|
with self.subTest(name=name):
|
|
text = (REPO / name).read_text()
|
|
run = text[text.index("docker run"):]
|
|
self.assertEqual(run.count(FLAG), 1)
|
|
self.assertEqual(run.count(IFNAMES), 1)
|
|
# the file is the container's own: new at each start, never one a mount carries over
|
|
self.assertIn("docker run --rm ", text)
|
|
self.assertNotRegex(run, r"-v [^ ]*:/tmp[ /:]")
|
|
|
|
def test_the_units_say_why(self):
|
|
for name in sglang_starts():
|
|
if name == "run.sh":
|
|
continue # the native unit's docker run: CI compares their flags and
|
|
# values, and the test above their -e lines
|
|
with self.subTest(name=name):
|
|
text = (REPO / name).read_text()
|
|
self.assertIn("SGLANG_DISTRIBUTED_INIT_METHOD_OVERRIDE: the rendezvous of the engine's one process",
|
|
text[:text.index("docker run")])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|