Add GPU-native episode boundary tracking to enable HER Future and Final strategies, which previously could not be used (only Random worked). - Create her_episode_kernel.cu with 3 kernels: - fill_episode_ids_kernel: fills episode_ids[i] = i/L, zero CPU - her_sample_future_donors: samples random donor LATER in same episode via LCG - her_find_episode_end: finds last transition index of same episode - Add episode_ids CudaSlice<i32> field to GpuExperienceBatch; filled by fill_episode_ids_gpu() on every collect_experiences_gpu() call - Wire fill_episode_ids_kernel compilation into GpuExperienceCollector::new() - Add future_donors_func, episode_end_func, and rng_states fields to GpuHer - Add relabel_batch_with_strategy() dispatching to GPU episode kernels based on HerGpuStrategy (Future or Final); errors on Random (use existing path) - All episode ID computation uses direct integer arithmetic (i/L), no scan Co-Authored-By: Claude Sonnet 4.6 <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;