ModelParams class

Constructors

ModelParams()
ModelParams.fromJson(Map<String, dynamic> json)
Constructs a ModelParams instance from a JSON map
factory

Properties

checkTensors bool
Validate model tensor data
getter/setter pair
formatter PromptFormat?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
kvOverrides Map<String, dynamic>
Override key-value pairs of the model metadata (Note: Currently not fully wired to C struct in this wrapper)
getter/setter pair
mainGpu int
The GPU that is used for the entire model when split_mode is none
getter/setter pair
nGpuLayers int
Number of layers to store in VRAM
getter/setter pair
noHost bool
Bypass host buffer allowing extra buffers to be used
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
splitMode LlamaSplitMode
How to split the model across multiple GPUs
getter/setter pair
tensorSplit List<double>
Proportion of the model (layers or rows) to offload to each GPU
getter/setter pair
useExtraBufts bool
Use extra buffer types (used for weight repacking)
getter/setter pair
useMemoryLock bool
Force system to keep model in RAM
getter/setter pair
useMemorymap bool
Use mmap if possible
getter/setter pair
vocabOnly bool
Only load the vocabulary, no weights
getter/setter pair

Methods

dispose() → void
Free allocated memory
get() llama_model_params
Constructs and returns a llama_model_params object with current settings
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the ModelParams instance to a JSON map
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited