Method ValidateFormat
- Namespace
- LMKit.Finetuning
- Assembly
- LM-Kit.NET.dll
ValidateFormat(string, bool)
Validates the model file to ensure it conforms to the LoRA adapter formats supported by LM-Kit, including its header and overall structure.
public static bool ValidateFormat(string modelPath, bool throwException = false)Parameters
- modelPathstring
- The file path of the model to validate. 
- throwExceptionbool
- Indicates whether to throw an exception if the validation fails. If set to - true, an InvalidDataException will be thrown when the file does not match the expected format. If set to- false, the method will return- falseinstead.
Returns
- bool
- Returns - trueif the file is valid and conforms to the expected format; otherwise,- false.
Exceptions
- InvalidDataException
- Thrown when the file integrity does not match the expected format and - throwExceptionis set to- true.