Commit Graph
7 Commits
Author SHA1 Message Date
osobhandClaude Sonnet 5 4aaa36a57a style: cargo fmt --workspace (whitespace/wrapping only, no semantic change)
Whole-workspace rustfmt pass picked up while iterating on Mamba GPU
backward work. Verified formatting-only via diff sampling; no logic
changed.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-10 07:09:36 -07:00
Claude CodeandClaude Opus 4.8 df6ce1ce22 feat(rtx-nn): genericize the layer library over B::FloatElem (f64-capable)
Phase 4b of the rustytorch f32→f64 plan. Relaxed ~36 `impl<B: Backend<FloatElem =
f32>>` blocks across 7 layer files to `impl<B: Backend>` over B::FloatElem:
normalization (LayerNorm/RMSNorm), activation (LeakyReLU/ELU), dropout (1d/2d/3d),
embedding, attention (MultiHeadAttention), transformer (MLP/Block/Encoder), conv
(Conv1d/2d). Config scalars stay f32 and convert via B::FloatElem::from_f32; the
layers delegate to the already-generic GenericTensor ops. f32 numerics byte-identical.

The whole common rtx-nn layer library now runs on CpuBackendF64.

Validated: 334 f32 lib tests (no regression) + 2 capstone + 3 new f64 layer smoke
tests (layer_norm/conv2d/attention on CpuBackendF64) pass; QPUDIDP surrogate still
compiles; clippy clean.

Remaining f32-gated: batch_norm (GenericBatchNorm1d/2d/GroupNorm) — its manual
mean/variance arithmetic needs a `where B::FloatElem: num_traits::Float` bound;
focused follow-on. (Plus rtx-autograd's f32 tape, the deep-re-architecture item.)

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-26 23:07:52 -07:00
Claude CodeandClaude Opus 4.8 c28a848250 feat(rtx-nn): f64-capable GenericLinear + f64 MLP gradient-precision capstone
Phase 4/5 of the rustytorch f32→f64 plan. GenericLinear's 3
`impl<B: Backend<FloatElem = f32>>` blocks relaxed to `impl<B: Backend>`
(from_weights takes &[B::FloatElem]; Xavier scale via B::FloatElem::from_f64), so a
Linear→ReLU→Linear MLP runs end-to-end on CpuBackendF64. f32 backward-compat holds
via B::FloatElem = f32.

Capstone (tests/f64_mlp_precision.rs): a 4→8→1 MLP gradient checked vs central
finite differences — f64 err 6.99e-12 (≤1e-9) vs f32 err 1.01e-2, i.e. f64 ~1.45e9×
more accurate. This is the quantum-precision-gradient win that motivated the migration.

Validated: rtx-nn 334 f32 lib tests + 2 new f64 capstone tests pass; rtx-autograd
builds + tests pass; **QPUDIDP qpu-didp-surrogate compiles + 15 tests pass** (uses
GenericLinear). clippy clean.

Scope note: rtx-autograd's reverse-mode tape stores f32 concretely
(backward()->HashMap<_,Vec<f32>>) — making it f64 is a deep tape re-architecture, not
a constraint relaxation, so it's a documented follow-on (no current consumer uses it;
QPUDIDP hand-rolls f64 backprop). Other rtx-nn layers (conv/transformer/attention/...)
remain f32-gated — same mechanical relaxation, follow-on.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-26 22:36:23 -07:00
osobhandClaude Opus 4.7 6d59251c51 rtx-nn / rtx-multimodal: cargo fmt reformatting
Pure formatting changes across rtx-nn (conv_transpose1d, conv/mod, rnn/lstm)
and rtx-multimodal (audio/generation, audio/source_separation): multi-line
braces, trailing commas, import ordering. No logic changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-04-27 18:37:07 -07:00
osobhandClaude Opus 4.6 85b77d49f2 Add audio neural layers and model architectures for ClawSample integration
New nn layers:
- ConvTranspose1d with stride, padding, output_padding (9 tests)
- LSTM/BiLSTM with multi-layer support and hidden state (10 tests)

Audio source separation:
- Demucs ONNX inference with segmented overlap-add processing
- Native HtDemucs architecture (encoder/decoder with BiLSTM bottleneck)
- StemType enum: vocals, drums, bass, other, piano, guitar

Audio generation:
- Stable Audio Open ONNX inference scaffold
- GenerationParams (prompt, duration, steps, cfg_scale, seed)

ONNX export scripts:
- export_demucs_onnx.py — Demucs v4 to ONNX with segment chunking
- export_stable_audio_onnx.py — Stable Audio Open components
- export_mert_onnx.py — MERT music understanding transformer

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-04-17 12:27:12 -07:00
osobhandClaude Opus 4.6 02d382d5f6 style: apply rustfmt across all crates and demos
Consistent formatting pass: line wrapping, import sorting, trailing
whitespace removal, let-chain indentation, merged derive attributes,
and unsafe block reformatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-04-12 07:01:58 -07:00
redclawsystems 4d88dc0584 Initial commit 2026-03-04 00:08:42 +00:00