Repository navigation
Abyss v1.3.79 — 長い tool 引数のストリームを高速化 / Faster streamed tool calls
変更点(2026-10-30 の Strata/Maya 確認から 2 件。考え方は Maya #626 / #419、コードは Abyss 独自)
- ストリームの tool 呼び出し: 本文が届くたびに先頭から終わりのタグを探していたため、長い引数では引数の長さの 2 乗で遅くなっていた(エージェントが 200 KB のファイルを Write すると 8 文字ずつの受信で CPU 約 1 秒)。新しく届いた断片と境目をまたぐぶんだけを探すようにし、200 KB で 1.0 秒 → 0.01〜0.06 秒。出力イベントは旧パーサと 7,680 通りの分け方で完全一致(GLM / Qwen / DSML V4・V4.1 の全形式)。
- サーバーの接続に
TCP_NODELAY: 1 トークンずつの SSE が前の断片の遅延 ACK を待たない(遅い回線で最大 40 ms ずつ)。 --calibrateの保存値(~/.config/project-maya/calibration.json)を GPU の PCIe リンク(世代・幅)とドライバの版でも区別。x16 スロットと OCuLink x4 の付け替えやドライバ更新のあとに、別の条件で測った値を使い回していた。古い形式の値は使わず、セットアップが「何で測った値か・今は何か・./abyss.sh --calibrateで測り直す」を 1 行で知らせる。
エンジンは v1.3.78 と同じ(サーバーとセットアップ側のみの変更)。RTX 5090 を OCuLink で付けたときのリンクの読み取りは今週末に確認します。
Changes (two items of the 2026-10-30 Strata/Maya review; ideas from Maya #626 / #419, Abyss's own code)
- Streamed tool calls: every new piece searched the whole call body from the start for the end tag, so long arguments cost the square of their length (an agent's 200 KB Write at 8 characters a piece took about a second of CPU). Only the new piece plus the tail a split tag needs is searched now: 200 KB 1.0 s → 0.01-0.06 s, events identical to the old parser on 7,680 chunkings (every form: GLM, Qwen, DSML V4 and V4.1).
- The server's connections set
TCP_NODELAY: one-token SSE pieces no longer wait for the delayed ACK of the piece before (up to 40 ms each on a slow link). --calibrate's store (~/.config/project-maya/calibration.json) keys by the GPU's PCIe link (gen/width) and driver too: a card moved between an x16 slot and an OCuLink x4, or a driver update, reused the tuning measured on the other. Older entries are not reused; the setup says in one line what they were measured on, what it is now, and that./abyss.sh --calibratemeasures again.
The engine is the same as v1.3.78 (server and setup changes only). The PCIe link as an RTX 5090 on OCuLink reports it is checked this weekend.