liblloyal 1.0.0
Composable primitives for llama.cpp inference
Loading...
Searching...
No Matches
lloyal::ModelRegistry Class Reference

Thread-safe registry for sharing llama_model instances. More...

#include <model_registry.hpp>

Static Public Member Functions

static std::shared_ptr< llama_model > acquire (const std::string &fsPath, const llama_model_params &params)
 Acquire a model from cache or load if not present.
 

Detailed Description

Thread-safe registry for sharing llama_model instances.

IMPORTANT: This is a CLASS with static members, not a namespace. Converting to header-only requires inline static members (C++17).

Definition at line 76 of file model_registry.hpp.

Member Function Documentation

◆ acquire()

std::shared_ptr< llama_model > lloyal::ModelRegistry::acquire ( const std::string &  fsPath,
const llama_model_params &  params 
)
inlinestatic

Acquire a model from cache or load if not present.

Parameters
fsPathFilesystem path to model file (file:// prefix normalized)
paramsModel load parameters (GPU layers, mmap, etc.)
Returns
shared_ptr to model, or nullptr if load failed

Definition at line 156 of file model_registry.hpp.


The documentation for this class was generated from the following file: