pub enum LoadError {
Show 16 variants
OpenFileFailed {
source: Error,
path: PathBuf,
},
NoParentPath {
path: PathBuf,
},
ReadExactFailed {
source: Error,
bytes: usize,
},
Io(Error),
InvalidUtf8(FromUtf8Error),
InvalidIntegerConversion(TryFromIntError),
UnsupportedFileType(i32),
InvalidMagic {
path: PathBuf,
magic: u32,
},
InvalidFormatVersion {
container_type: ContainerType,
version: u32,
},
HyperparametersF16Invalid {
ftype: i32,
},
UnknownTensor {
tensor_name: String,
path: PathBuf,
},
TensorWrongSize {
tensor_name: String,
path: PathBuf,
},
UnsupportedElementType {
tensor_name: String,
ftype: u32,
path: PathBuf,
},
InvariantBroken {
path: Option<PathBuf>,
invariant: String,
},
ModelNotCreated {
path: PathBuf,
},
MultipartNotSupported {
paths: Vec<PathBuf>,
},
}
Expand description
Errors encountered during the loading process.
Variants§
OpenFileFailed
A file failed to open.
NoParentPath
There is no parent path for a given path.
ReadExactFailed
Reading exactly bytes
from a file failed.
Fields
Io(Error)
A non-specific IO error.
InvalidUtf8(FromUtf8Error)
One of the strings encountered was not valid UTF-8.
InvalidIntegerConversion(TryFromIntError)
One of the integers encountered could not be converted to a more appropriate type.
UnsupportedFileType(i32)
The f16_
hyperparameter had an invalid value.
InvalidMagic
An invalid magic number was encountered during the loading process.
InvalidFormatVersion
The version of the format is not supported by this version of llm
.
Fields
container_type: ContainerType
The format that was encountered.
HyperparametersF16Invalid
The f16
hyperparameter had an invalid value.
UnknownTensor
The tensor tensor_name
was encountered during the loading of path
, but was not seen during
the model prelude.
TensorWrongSize
The tensor tensor_name
did not match its expected size.
UnsupportedElementType
The tensor tensor_name
did not have the expected format type.
Fields
InvariantBroken
An invariant was broken.
This error is not relevant unless loader2
is being used.
ModelNotCreated
The model could not be created.
This implies that there were no tensors in the model to be loaded.
This error is not relevant unless loader2
is being used.
MultipartNotSupported
Multiple parts of the model were found.
Multi-part models are not supported. Please convert the model to a single part.