- GpuAdamW: add grad_scale param to CUDA kernel — gradient clipping was computed but never applied - PPO load_checkpoint: load .actor.bin/.critic.bin weights (was Xavier re-init with TODO) - CudaLinear::set_weights(): new method for checkpoint weight import - TLOB/KAN/TGGN/Liquid backward: real GPU backprop via GpuLinear::backward() + GpuAdamW - Mamba2 backward: SPSA gradient estimation replacing random pseudo-gradients (Spall 1992) - Mamba2 adapter: wire SPSA backward with GPU-cached input/target/loss tensors - TFT/xLSTM/Diffusion backward: explicit errors routing to native train() methods - TLOB load_checkpoint: load .weights.json via GpuVarStore::import_from_host() - train_baseline_supervised: 30 candle→native API fixes (Tensor/Device eliminated) - evaluate_baseline: 38 candle→native API fixes (DQN/PPO/supervised GPU eval paths) - evaluate_supervised: candle→native fixes (forward_loss instead of forward+compute_loss) - cuda_test: rewrite to cudarc 0.19 (MlDevice, CudaSlice, memcpy) - train_baseline_rl: Device→CudaContext for GPU double-buffer - hyperopt_baseline_rl: CudaContext→MlDevice::cuda() for device pool - xLSTM deterministic test: fix for stateful LSTM (hidden state changes between predictions) - Liquid early stopping test: deterministic data for reliable convergence - Mamba2Config: add spsa_epsilon field (default 0.01, serde backward-compatible) - Clean stale candle comments from trainer, inference_validator, mamba optimizer 1853 tests pass (302+359+168+169+855), 0 failures, 0 clippy warnings, 8/8 examples compile. 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;