Property GpuLayerCount
GpuLayerCount
Gets or sets the number of layers to process on the GPU, optimizing performance by leveraging available VRAM (GPU memory).
public int GpuLayerCount { get; set; }
Property Value
- int
The default value is MaxValue, which signifies that all layers will be processed on the GPU, provided the available VRAM allows it. If insufficient memory is available or the specified value exceeds the GPU’s capacity, the number of layers processed on the GPU may be reduced at runtime.
Remarks
This property controls how many layers of computation should be executed on the GPU. The value is constrained by the available GPU resources, specifically the VRAM.
- If HasGpuSupport is true, this value defines the number of layers to run on the GPU, with a minimum of 0 (no layers on the GPU).
- If GPU support is unavailable, this property is automatically set to 0, ensuring no layers are processed on the GPU.