Replace per-sample forward_loss_kernel, backward_kernel, and weight_grad_reduce_kernel with batched cublasLtMatmul (TF32 FAST_TF32). Forward/backward matmuls use pre-cached IqnGemmDesc descriptors (same pattern as CachedGemmDesc in batched_forward/backward). Element-wise ops (ReLU, sigmoid-hadamard, quantile Huber loss, bias add/reduce, h_s2 tiling, d_h_s2 reduction) use cubin kernels. - Constructor: new(stream, config) -> new(shared_handle, config) - 13 GEMM descriptors: 1 embed fwd, 4 branch fwd, 1 embed dW, 4 branch dW, 4 branch dX (backward accumulates with beta=1.0) - 10 new cubin kernels: relu_fwd/bwd, hadamard_sigmoid/bwd, quantile_huber_loss, bias_add/grad_reduce, h_s2_tile, d_h_s2_reduce, cos_tile - Zero atomicAdd, fully deterministic, CUDA Graph compatible Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ml
10-model ML ensemble for the Foxhunt HFT system, built on Candle v0.9.1.
Models
- DQN (Rainbow) — deep Q-network with prioritized replay, dueling heads, noisy nets
- PPO — proximal policy optimization with GAE, LSTM policies, clip-higher
- TFT — temporal fusion transformer for multi-horizon forecasting
- Mamba2 — state space model for sequence prediction
- Liquid Networks — biologically inspired networks for non-stationary data
- TLOB — transformer-based limit order book analysis
- KAN — Kolmogorov-Arnold networks
- xLSTM — extended LSTM architecture
- TGGN — temporal graph neural network
- Diffusion — diffusion-based generative model
Key Modules
ensemble— model ensemble coordination and confidence aggregationhyperopt— PSO-based hyperparameter optimization with per-model adapterstrainers— unified training loops (DQN, PPO, supervised)inference—InferenceAdaptertrait for predictioncheckpoint— model checkpointing and restorationevaluation— walk-forward evaluation pipeline
Usage
use ml::dqn::DQN;
use ml::ppo::PpoTrainer;