Class LM.LoadingOptions
Represents options for loading a model, allowing customization of the loading process.
public sealed class LM.LoadingOptions
- Inheritance
-
LM.LoadingOptions
- Inherited Members
Properties
- EnableCpuWeightRepacking
Whether weights placed in host memory may be repacked into CPU-optimized layouts (a large matrix-multiplication speedup for CPU inference). Repacked layouts serve forward inference only: fine-tuning cannot read them, so a model intended for TRAINING on the CPU must be loaded with this set to
false. Models fully offloaded to a GPU are unaffected either way. Defaults totrue.
- EnableSpeculativeDecodingDrafts
Gets or sets a value indicating whether the speculative decoding draft assets packaged with the model are loaded for this LM instance.
- LoadTensors
Gets or sets a value indicating whether model weights should be loaded. Setting this property to false allows for quicker access to model properties like metadata and vocabulary without loading the weights.
- MetadataOverrides
Gets or sets a collection of metadata overrides to apply during the model loading process.
Methods
- Clone()
Creates a deep clone of the current LM.LoadingOptions instance.