Memodo: An linear attention solution
Memodo is an linear attention solution that combining the advantages of both RWKV and DeltaNet.
Usage
Just use memodo.MemodoLayer, this is an subclass of torch.nn.Module.
Mechanism
Memodo use the General Delta Rule directly:
S -> S * diag(i) + S * a^T * b + c^T * d
return r * S
With Dynamic Token Shift:
d[t] = sigmoid(silu(lerp(x[t], x[t - 1], w1) * w2) * w3)
x[t] = lerp(x[t], x[t - 1], d[t])
And gated residual:
R -> R + Block(x) * sigmoid(silu(LayerNorm(R) * w1) * w2)
Metadata
Release files for memodo 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| memodo-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for memodo-1.0.0-py3-none-any.whl |
Release files / memodo-1.0.0-py3-none-any.whl
| Download URL | memodo-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b00275db2b1f018b407c905c67a14e3a7ba6cf42de931131d198c2c3c632168
|
|
BLAKE2b-256 checksum How to use checksums |
eb60be0e572bb5e48e2f1c2e2b3207b0ec526dcccfb74a6a5fd7f35de9ec9da3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for memodo 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.