- Initialize LoRA parameters on the same device as the base linear layer
- Load adapter weights directly to the model device instead of hardcoded CPU
- Slice XReg linear regression outputs to match the specified sequence lengths
- Replace batch-wide covariate normalization with per-input normalization
in create_covariate_matrix to prevent cross-input scale leakage.
- Refactor BatchedInContextXRegLinear.fit to solve ridge regression
per instance rather than as a single global matrix solve, avoiding
cross-contamination between batched inputs.
- Truncate JAX regression outputs to the actual train/test lengths
after the padded matrix multiply, fixing shape mismatches for
non-power-of-2 horizons (e.g. horizon=24 was returning 32 elements).
- Add Apr. 2026 update entry for PEFT pipeline, unit tests, and community fixes
- Replace 'under construction' numbered list with checklist of completed items:
Flax model, covariate support, docs/examples, PEFT pipeline, unit tests
Apply changes from PR #391 by @MarcoGorworworelli:
- Fix train_gen() to iterate in proper batch_size chunks instead of
yielding all time series at once when permute=False
- Add test_data_loader.py to verify batch boundaries
Apply changes from PR #393 by @MarcoGorworworelli:
- Normalize covariates per-input instead of batch-wide to prevent
each input's result from depending on batch composition
- Fit separate ridge regressions per time series instead of a single
batched regression, preventing cross-series data leakage
- Applied to both src/timesfm/utils/xreg_lib.py and v1/src/timesfm/xreg_lib.py
Apply changes from PR #396 by @shahrukhx01:
- Fix typo 'complied' -> 'compiled' in ForecastConfig docstrings
- Replace bare print() with logging.info() in load_checkpoint()
PEFTTrainer with production-grade training loop:
- PyTorch DDP multi-GPU via torchrun
- Mixed-precision training (fp16/bf16) with GradScaler
- Gradient checkpointing for long contexts
- Cosine-with-warmup LR schedule
- MSE loss + optional pinball quantile loss (9 channels)
- Early stopping on validation loss
- Adapter-only checkpointing (safetensors)
- W&B logging (rank-0 only)
- Differentiable training forward that replicates the 2.5
patch -> RevIN -> transformer -> output-head -> un-RevIN path
Sliding-window dataset that produces (context, mask, target) tuples:
- Accepts list of arrays, long-format, or wide-format DataFrames
- Context length auto-rounded to multiple of patch_len (32)
- Left-pads short series with proper masking
- Configurable stride for window overlap