checkLoad abstract method

String? checkLoad(
  1. ModelParams params,
  2. ModelFormat? format
)

Throws LlamaUnsupportedException when loading a model in format with params would ignore an explicitly set field, or needs a runtime or device this platform lacks; the message names the missing capability and the platform or runtime condition.

format is null when only the model file can tell it; the backend then checks again when it loads the file, and the engine ignores the result. Otherwise returns null when the backend checked the load, or why it cannot tell before loading, such as a runtime it did not build. Must not start a runtime or read a file.

Implementation

String? checkLoad(ModelParams params, ModelFormat? format);