Skip to content

Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦

C

Merge pull request #1803 from enitimeago/feat/glm53-continue-rewind

Vincenzo Fornaro1b0dd1b1d6c2
diff --cc c/tests/glm53_vision_serve_harness.py
index c7224706,0302770e..08dd8499
--- a/c/tests/glm53_vision_serve_harness.py
+++ b/c/tests/glm53_vision_serve_harness.py
@@@ -111,14 -114,19 +114,24 @@@ def main() -> int
if "READY" not in read_line(process.stdout):
print("FAIL: nessun READY")
return 1
- read_line(process.stdout) # STAT
+ line = read_line(process.stdout) # CAPS vision=<0|1>, then STAT
+ while line.startswith("CAPS "):
+ line = read_line(process.stdout)
+ if not line.startswith("STAT "):
+ print(f"FAIL: dopo READY {line!r}, atteso STAT")
+ return 1
first = ask(process, 1, prompt, images[0])
second = ask(process, 2, prompt, images[1])
+ # Un turno con l'immagine che si ferma al primo token lascia in cache
+ # esattamente il prompt. Lo stesso prompt SENZA IMAGE ha gli stessi id,
+ # ma le righe sono state fatte dagli embedding dell'immagine: il motore
+ # non deve riprendere da li' (id uguali non dicono quale immagine).
+ ask(process, 3, prompt, images[0], max_tokens=1)
+ body = prompt.encode("utf-8")
+ process.stdin.write(f"SUBMIT 4 0 {len(body)} 1 0.0 1.0\n".encode() + body + b"\n")
+ process.stdin.flush()
+ while not read_line(process.stdout).startswith(("DONE 4 ", "ERROR 4 ")):
+ pass
process.stdin.close()
process.wait(timeout=120)
finally: