8000 Multiply LSTM peephole weights by the corresponding cell state by JarvisDing-sdu · Pull Request #504 · gomlx/gomlx · GitHub
[go: up one dir, main page]

Skip to content

Multiply LSTM peephole weights by the corresponding cell state - #504

Merged
janpfeifer merged 2 commits into
gomlx:mainfrom
JarvisDing-sdu:codex/go-core-onnx-nov30
Nov 30, 2026
Merged

janpfeifer merged 2 commits into
gomlx:mainfrom
JarvisDing-sdu:codex/go-core-onnx-nov30

Conversation

@JarvisDing-sdu
Copy link
Copy Markdown
Contributor

A peephole weight currently contributes a constant gate offset. Multiply input and forget gate weights by the previous cell and the output gate weight by the newly computed cell.

The regression checks a single step with zero initial state and three different peepholes against the scalar recurrence. With an input-gate weight of 2, the expected hidden value is 0.18169974; the previous implementation produced 0.29275617. Tested the LSTM package on the Go CPU backend.

AI assistance: Codex helped prepare and test this change.

@janpfeifer
janpfeifer merged commit c936e4d into gomlx:main Nov 30, 2026
4 checks passed
@janpfeifer
Copy link
Copy Markdown
Contributor

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet
490B

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0