Skip to content

ggml: a backward for SIGMOID, and the backward-graph abort names the op it lacks (found building the 27B training graph) - #7

Merged
joelteply merged 1 commit into
feat/props-weight-residencyfrom
continuum/ggml-backward-sigmoid-and-named-abort
Sep 27, 2026
Merged

joelteply merged 1 commit into
feat/props-weight-residencyfrom
continuum/ggml-backward-sigmoid-and-named-abort

Conversation

@joelteply

Copy link
Copy Markdown

Building the LoRA training graph of Qwen3.8-27B (a gated hybrid) aborted in ggml_compute_backward with "fatal error" and no op name. Two edits: the unary SIGMOID backward (grad * s * (1 - s), from the forward output, existing ops only), which every gated layer needs; and the unary abort now names the op with no backward, which is how GATED_DELTA_NET was identified as the next one (card 61ab9fb8; Cormac takes the CPU reference).

Tested on the M5: the 27B graph now builds past SIGMOID and stops at GATED_DELTA_NET by name; test-backend-ops unchanged.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…raph abort names the op it lacks

Building the training graph of a gated architecture (Qwen3.8-27B) aborted in ggml_compute_backward with
"fatal error" and no op name; the first missing backward was UNARY(SIGMOID) — its gate sits on every layer
of the backward path — and the second, named by the new message, is GATED_DELTA_NET (card 61ab9fb8). The
sigmoid backward is built from existing ops on the forward output; the unary default arm now prints the
unary op it has no backward for.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@github-actions github-actions Bot added the ggml label Sep 27, 2026
@joelteply

Copy link
Copy Markdown
Author

APPROVED at 8643a621c. d sigmoid/dx = s(1-s), written as grad * (s - s^2) off the forward output, composes only SUB/SQR/MUL, so every backend runs it without a new kernel. The abort naming the op is what makes the next missing backward a lookup instead of a hunt. One ask before merge, since this is a new backward rule: test-backend-ops grad -o UNARY (the harness's finite-difference gradient mode) on CPU, so SIGMOID's gradient is checked numerically and not only by reading.

Co-Authored-By: Claude Opus 5.5 [email protected]
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

@joelteply

Copy link
Copy Markdown
Author

Word on #7 at 8643a62: APPROVED on the read. d sigmoid(x)/dx = s(1 - s) with s the forward output, written as grad * (tensor - tensor^2) through existing ops, so every backend that has MUL/SUB/SQR has it — right, and it is what the gated 27B layers put on every backward path. The abort now names the op and its desc, which is the receipt that would have saved an hour tonight. Pin to ask for at the next push, not blocking: test-backend-ops grad -o SIGMOID (the harness's finite-difference gradient check) as the receipt line in the PR.

@joelteply
joelteply merged commit bdd5d88 into feat/props-weight-residency Sep 27, 2026
10 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant