Class AsposeAIModelConfig
Namespace: Aspose.OCR
Assembly: Aspose.OCR.dll (25.8.0)
Represents configuration settings for loading an LLM model.
public class AsposeAIModelConfig
Inheritance
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
AsposeAIModelConfig()
public AsposeAIModelConfig()
Properties
AllowAutoDownload
If true, the model will be automatically downloaded if not available locally.
public bool AllowAutoDownload { get; set; }
Property Value
ContextSize
Defines the maximum number of tokens the LLM can use as context during inference. If null, the default context size defined by the model will be used. Larger values allow the model to consider more text but may require more memory.
public int? ContextSize { get; set; }
Property Value
int ?
DirectoryModelPath
Optional path where downloaded or processed models will be cached. If not set, a default system location will be used.
public string? DirectoryModelPath { get; set; }
Property Value
string ?
FileModelPath
Local path to the folder containing the model files. If specified, this will be used instead of downloading. Default empty.
public string? FileModelPath { get; set; }
Property Value
string ?
GpuLayers
Number of GPU layers to use for the model. If not specified, the default value (40) will be used. Set to 0 to run entirely on the CPU.
public int? GpuLayers { get; set; }
Property Value
int ?
HuggingFaceQuantization
Optional quantization type to use when downloading from HuggingFace. Examples: “int8”, “fp16”, “none”. Default q4_k_m.
public string? HuggingFaceQuantization { get; set; }
Property Value
string ?
HuggingFaceRepoId
ID of the model on HuggingFace (e.g., “openai/gpt2”). If specified, the model will be downloaded from HuggingFace. Default bartowski/Qwen2.5-3B-Instruct-GGUF.
public string? HuggingFaceRepoId { get; set; }
Property Value
string ?