feat(ml-alpha): CfcConfig extended with n_batch + seq_len for v2 forward (X11a)
Adds CfcConfig.n_batch (default 1) and CfcConfig.seq_len (default 32). PerceptionTrainer's trunk construction passes its training-time n_batch/seq_len. Default values support backtester inference (B=1, K=32). X11 foundation: subsequent commits add intermediate buffer fields + forward_v2 method on CfcTrunk sized from these config fields. With X11 complete, fxt-backtest can drive the v2 forward through the trunk without instantiating a full PerceptionTrainer. Verification: ml-alpha + ml-backtesting + fxt-backtest all build clean. Per spec §1.1 (X11 foundation).
This commit is contained in:
@@ -101,6 +101,11 @@ pub struct CfcConfig {
|
||||
/// (X1) and the per-stack Mamba2Block constructions added in X3/X5.
|
||||
/// Default matches `PerceptionTrainerConfig::default().mamba2_state_dim`.
|
||||
pub mamba2_state_dim: usize,
|
||||
/// X11: inference batch + sequence dims for the v2 forward buffers
|
||||
/// allocated on the trunk. Backtesters typically use (1, 32);
|
||||
/// training-time consumers (PerceptionTrainer) pass their own dims.
|
||||
pub n_batch: usize,
|
||||
pub seq_len: usize,
|
||||
}
|
||||
|
||||
impl Default for CfcConfig {
|
||||
@@ -110,6 +115,8 @@ impl Default for CfcConfig {
|
||||
n_hid: HIDDEN_DIM,
|
||||
cfc_n_in: HIDDEN_DIM,
|
||||
mamba2_state_dim: 16,
|
||||
n_batch: 1,
|
||||
seq_len: 32,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -515,6 +515,8 @@ impl PerceptionTrainer {
|
||||
n_hid: HIDDEN_DIM,
|
||||
cfc_n_in: HIDDEN_DIM,
|
||||
mamba2_state_dim: cfg.mamba2_state_dim,
|
||||
n_batch: cfg.n_batch,
|
||||
seq_len: cfg.seq_len,
|
||||
},
|
||||
cfg.seed,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user