Table of Contents

Property GradientAccumulation

Namespace
LMKit.Finetuning
Assembly
LM-Kit.NET.dll

GradientAccumulation

Samples accumulated per optimizer step: gradients from this many samples combine before the weights update, multiplying the effective batch size without growing memory. 1 (the default) steps on every sample. Accumulation periods never cross the end of an epoch: when the epoch's sample count is not a multiple of this value, its last period combines the samples left and is applied as the mean over them.

public int GradientAccumulation { get; set; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

Value is below 1.

Share