Property MaxPackedSamples
- Namespace
- LMKit.Finetuning
- Assembly
- LM-Kit.NET.dll
MaxPackedSamples
Upper bound on how many samples may share one training window. Each packed sample trains on its own attention sequence with positions restarting at zero, so co-resident samples never attend to each other, and loss never crosses a sample boundary. 1 (the default) gives every sample its own padded window; 0 picks the largest value that divides GradientAccumulation (at most 8); an explicit value must divide GradientAccumulation, so the samples combined per optimizer step stay exactly that setting. Samples carrying images are never packed, and architectures whose batches split per sequence (hybrid and recurrent) always train unpacked.
public int MaxPackedSamples { get; set; }
Property Value
Exceptions
- ArgumentOutOfRangeException
Value is negative.