ModelLoaderRegistry

Registry for model loaders with GGUF auto-detection.

Reads the general.architecture field from a GGUF file header and resolves the appropriate ModelLoaderDescriptor.

Usage:

// Register loaders (typically at startup)
ModelLoaderRegistry.register(LlamaLoaderDescriptor)
ModelLoaderRegistry.register(Gemma3nLoaderDescriptor)

// Auto-detect from file
val (arch, descriptor) = ModelLoaderRegistry.detect(source)

Functions

Link copied to clipboard

Look up the descriptor for a known architecture.

Link copied to clipboard

Detect the architecture and return the matching descriptor.

Link copied to clipboard

Detect the model architecture from a GGUF file.

Link copied to clipboard

Register a loader descriptor for an architecture. Replaces any previously registered descriptor for the same architecture.

Link copied to clipboard

Return all registered descriptors.