Method LoadEncrypted
LoadEncrypted(string, GgufEncryptionScheme, string, DeviceConfiguration, LoadingOptions, ModelLoadingProgressCallback)
Load a GGUF model from an LM-Kit encrypted container, decrypting tensor bytes on the fly from disk. The plaintext GGUF is never materialized in memory nor written back to disk: only the metadata block (a few MB) and one tensor's worth of bytes at a time are ever decrypted.
public static LM LoadEncrypted(string encryptedPath, GgufEncryptionScheme scheme, string password, LM.DeviceConfiguration deviceConfiguration = null, LM.LoadingOptions loadingOptions = null, LM.ModelLoadingProgressCallback loadingProgress = null)
Parameters
encryptedPathstringschemeGgufEncryptionSchemepasswordstringdeviceConfigurationLM.DeviceConfigurationloadingOptionsLM.LoadingOptionsloadingProgressLM.ModelLoadingProgressCallback
Returns
Remarks
Pass loadingOptions.LoadTensors = false to load only the metadata and
vocabulary without decrypting any tensor bytes. This is the encrypted-model
equivalent of the plaintext metadata-only path.
LoadEncrypted(string, string, DeviceConfiguration, LoadingOptions, ModelLoadingProgressCallback)
Load a GGUF model from an LM-Kit encrypted container, reading the encryption scheme from the container's own header. Equivalent to LoadEncrypted(string, GgufEncryptionScheme, string, DeviceConfiguration, LoadingOptions, ModelLoadingProgressCallback) with the recorded scheme.
public static LM LoadEncrypted(string encryptedPath, string password, LM.DeviceConfiguration deviceConfiguration = null, LM.LoadingOptions loadingOptions = null, LM.ModelLoadingProgressCallback loadingProgress = null)
Parameters
encryptedPathstringpasswordstringdeviceConfigurationLM.DeviceConfigurationloadingOptionsLM.LoadingOptionsloadingProgressLM.ModelLoadingProgressCallback