Skip to content

GLM-5.3-Flash EXL3 on 2x DGX Spark with TensorFold

Python

CREDITS, README, 0084: Jordi Posthumus authored request_body.py (upstream 977f2cc); the backport by Eduardo Florencio (#90); restore 0085's credit line

MiaAI-Labeaf4d0efa0eb
diff --git a/CREDITS.md b/CREDITS.md
index 1ef9f99..da9f0b5 100644
--- a/CREDITS.md
+++ b/CREDITS.md
@@ -120,8 +120,11 @@ checkpoint's ShapleyMcg attribution and the drafter's license).
(Apache 2.0) as a reference.
- `0084-anthropic-messages`: TensorFold v0.6.3's Anthropic Messages API (commits 8cca6e3 and ba18743, merged as
e9fade0, with ced6139's request framing) by [evilpsycho42](https://github.com/evilpsycho42) and
- [ashhart](https://github.com/ashhart), backported to v0.6.0.
+ [ashhart](https://github.com/ashhart), and its request body reading (`server/request_body.py`, commit 977f2cc) by
+ Jordi Posthumus ([JordiPosthumus](https://github.com/JordiPosthumus)); backported to v0.6.0 by Eduardo Florencio
+ ([eduffd](https://github.com/eduffd)) in [PR #90](https://github.com/MiaAI-Lab/GLM-5.3-Flash-EXL3-2x-DGX-Sparks-TensorFold/pull/90).
- `0085-glm-select-split-loop` (the split selection's last pass over the earlier chunks only): by
+ [BadAd84](https://github.com/BadAd84).
- `0086-glm-prompt-scores-loop` (the prompt scoring, one row and many pool blocks a program): by
[BadAd84](https://github.com/BadAd84).
- `0087-glm-display-kv-dispram` (`DISPLAY_KV_BACKEND=dispram`: `0072`'s display reservation on kindling spark-os): by
diff --git a/README.md b/README.md
index cbee088..2e571d6 100644
--- a/README.md
+++ b/README.md
@@ -604,7 +604,7 @@ applied with `patch -p0` in filename order); `start.sh` rebuilds or re-pulls the
| Capacity status | `0081-tfcap-capacity-status` | every capacity refusal renders the same way: 429 with `Retry-After: 5` (was a bare 503 at two sites, a 400 on the generate path) (by johnwhited, #48) | a refused request's client can back off instead of stacking |
| Admission control | `0082-tfcap-admission-cap` | `TF_GLM_MAX_QUEUED` (unset: queue, as before; a number: past the lanes plus that many queued foreground requests, refuse) turns saturation into a refusal instead of an invisible queue (by johnwhited, #48) | with `TF_GLM_MAX_QUEUED=0`, the fifth request on four lanes: 429 at once with `Retry-After: 5`; unset, it queues as before |
| Delivery abort | `0083-tfcap-delivery-abort` | a stream whose delivery callback raises (broken pipe, reset, timeout) ends at once and frees its lane, instead of the exception escaping and the lane leaking until generation ends (by johnwhited, #48) | a client that dies mid-reply no longer holds a lane |
-| Anthropic Messages | `0084-anthropic-messages` | Anthropic's `/v1/messages` (also `/messages`, with `/count_tokens` suffixes), translated to the same chat completion the OpenAI route serves — text and image blocks, `tool_use` / `tool_result`, thinking, `stop_sequences`, `output_config` effort/JSON schema — with Anthropic SSE streaming and bodies capped at 32 MiB (upstream v0.6.3, by evilpsycho42 and ashhart) | Claude Code and the Anthropic SDKs work against the server directly, without a translating proxy |
+| Anthropic Messages | `0084-anthropic-messages` | Anthropic's `/v1/messages` (also `/messages`, with `/count_tokens` suffixes), translated to the same chat completion the OpenAI route serves — text and image blocks, `tool_use` / `tool_result`, thinking, `stop_sequences`, `output_config` effort/JSON schema — with Anthropic SSE streaming and bodies capped at 32 MiB (upstream v0.6.3, by [evilpsycho42](https://github.com/evilpsycho42) and [ashhart](https://github.com/ashhart), request bodies by [Jordi Posthumus](https://github.com/JordiPosthumus); backported by [Eduardo Florencio](https://github.com/eduffd)) | Claude Code and the Anthropic SDKs work against the server directly, without a translating proxy |
| Concurrent fill | `0062-glm-sliced-fill` | a new prompt's chunks run in layer slices (`FILL_BUDGET_MS`) with decode rounds between them, drafted as usual (`FILL_DRAFTS`), both ranks on the same layer boundaries; the chunk's buffers kept between slices, grouped fills, cache moves and cancellation mid-fill; whole forwards when nothing else decodes | with smooth streaming, the other replies' pauses during a 25k-token fill 630-690 ms -> 81-149 ms (table below) |
Concurrent prompt fill and smooth streaming on two Sparks (`PARALLEL=4`, DFlash2, 1,024-row chunks): three 400-token
diff --git a/patches/0084-anthropic-messages.patch b/patches/0084-anthropic-messages.patch
index ad12de2..cecbea9 100644
--- a/patches/0084-anthropic-messages.patch
+++ b/patches/0084-anthropic-messages.patch
@@ -1,5 +1,6 @@
# Backport of upstream TensorFold's Anthropic Messages API (commits 8cca6e3 and ba18743, merged as e9fade0, plus
-# ced6139's request framing, released in v0.6.3) by evilpsycho42 and ashhart, backported onto the pinned v0.6.0 by
+# ced6139's request framing, released in v0.6.3) by evilpsycho42 and ashhart, and 977f2cc's request_body.py by Jordi Posthumus
+# (JordiPosthumus), backported onto the pinned v0.6.0 by
# MiaAI-Lab, Apache-2.0: Anthropic's /v1/messages (also /messages, with /count_tokens suffixes) on both servers,
# translated to the same chat completion the OpenAI route serves — system prompts, text and image blocks,
# tool_use / tool_result, thinking as reasoning_content, stop_sequences, output_config effort/format — with Anthropic