mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-06 12:54:19 +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>
51 lines
1.9 KiB
Python
51 lines
1.9 KiB
Python
#!/usr/bin/env python3
|
|
"""The Flash FP4-Local lane's opencode provider, in one place.
|
|
|
|
install.sh's generator writes it into the opencode config once the lane is installed, and
|
|
switch-model.sh adds it to a config written before that, so both take it from here and the two
|
|
cannot drift.
|
|
|
|
Usage: oc-flash-local.py <base_url> <api-key file> <ctx> <out> <name>
|
|
prints {"provider": {"flash-local": ...}}, the shape oc-merge-limits.py --add-providers reads.
|
|
"""
|
|
import json
|
|
import sys
|
|
|
|
# The checkpoint's chat template is the Qwen3.8 one the flash lane serves, byte for byte, patched
|
|
# the same way (patch-template.py), with the default its model card ships: xhigh, Hasan's choice
|
|
# for this lane (2026-10-19). So the same four levels, the default first, as a picker lists it.
|
|
LEVELS = ("xhigh", "lean", "low", "medium")
|
|
|
|
|
|
def provider(base_url, key_file, ctx, out, name):
|
|
"""The provider block. The model reads images, as the flash lane's does."""
|
|
return {
|
|
"npm": "@ai-sdk/openai-compatible",
|
|
"name": "Qwen3.8-Flash-Next FP4-Local (DGX Spark)",
|
|
"options": {"baseURL": base_url, "apiKey": f"{{file:{key_file}}}"},
|
|
"models": {"qwen3.8-flash-next-fp4": {
|
|
"name": name,
|
|
"limit": {"context": ctx, "input": ctx, "output": out},
|
|
"variants": {lvl: {"chat_template_kwargs": {"reasoning_effort": lvl}} for lvl in LEVELS},
|
|
"attachment": True,
|
|
"modalities": {"input": ["text", "image"], "output": ["text"]},
|
|
}},
|
|
}
|
|
|
|
|
|
def main():
|
|
if len(sys.argv) != 6:
|
|
print(__doc__.strip(), file=sys.stderr)
|
|
sys.exit(2)
|
|
base_url, key_file, ctx, out, name = sys.argv[1:6]
|
|
try:
|
|
ctx, out = int(ctx), int(out)
|
|
except ValueError:
|
|
print("ctx and out are token counts", file=sys.stderr)
|
|
sys.exit(2)
|
|
print(json.dumps({"provider": {"flash-local": provider(base_url, key_file, ctx, out, name)}}, indent=2))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|