﻿# RealMLP vectorized training: folds and ensemble members remain separate learned models

Plan RealMLP vectorized cross-validation by preserving split-specific preprocessing and parameters while accounting for the extra model axis in GPU memory.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-realmlp-vectorized-folds-ensemble-model-axis-memory/
Language: en

## Identify the vectorized dimension

RealMLP can train multiple splits and ensemble members together using vectorized computation. The [PyTabKit overview](https://raw.githubusercontent.com/dholzmueller/pytabkit/main/README.md) describes vectorized cross-validation as an execution advantage. This does not mean that all folds share one set of learned parameters. A resource plan should identify the number of independently trained models represented by the extra tensor dimension, separately from the number of data rows in each training batch.

## Preserve split-specific evidence

The [standalone implementation guide](https://raw.githubusercontent.com/dholzmueller/pytabkit/main/pytabkit/models/realmlp/README.md) describes vectorization across train/test splits, train/validation splits and ensemble members. It also states that preprocessing statistics are computed separately from each split's training portion. A port that computes one global scaler across all folds changes evaluation evidence. Vectorized execution is not permission to pool held-out targets or fit preprocessing on rows excluded from a particular model's training population.

## Follow the training resource contract

The [training documentation](https://raw.githubusercontent.com/dholzmueller/pytabkit/main/docs/source/models/03_training_implementation.md) constructs split-index structures and explicit interface resources for the original training path. Preserve the selected implementation and its resource controls rather than assuming a generic trainer's device flag describes all scheduling. Training several models together can improve hardware utilization while increasing parameter, optimizer and activation state. Measure that actual configuration before transferring a single-model memory estimate to a larger cross-validation run.

## Separate fold ensembling from refitting

A workflow can retain fold models for an ensemble or use validation-selected training duration to refit another model on a larger population. Those are different final artifacts with different training scopes. The [RealMLP tuning guide](/journal/fg2-realmlp-tuned-defaults-versus-dataset-hpo/) provides selection context. Record which model set serves predictions and how its outputs are combined, rather than reporting only the cross-validation count used during development.

## Verify the model axis before timing

Use a small reviewed split set and inspect each model's train/validation membership, preprocessing statistics and saved parameters. The [entity-group guide](/journal/data-guide-entity-group-split-design/) supplies population controls. Then measure peak GPU memory, host state and total training time for the vectorized run. A useful result distinguishes better execution utilization from fewer statistical models, preserving the independence of fitted states while explaining the resource cost and prediction behavior of the final ensemble or refitted artifact.
