PretrainedLoader<T>
Helpers & Utilities ยท AiDotNet.ModelLoading.Pretrained
Resolves a PretrainedSource to a ready-to-use model: it downloads (for hub sources),
reads config.json, looks the architecture up in PretrainedArchitectures,
reconstructs the network, and loads its pretrained weights. This is the engine behind the
AiModelBuilder.ConfigureModel(PretrainedSource) facade overload.
For Beginners
Give it a recipe card (PretrainedSource) and it hands back a
finished model โ downloading, unpacking, and wiring the weights for you.
Methods
| Method | Summary |
|---|---|
IFullModel<T, Tensor<T>, Tensor<T>> Load(PretrainedSource source) |
Loads the model described by source. |
Task<IFullModel<T, Tensor<T>, Tensor<T>>> LoadAsync(PretrainedSource source, CancellationToken cancellationToken) |
Asynchronous variant of Load. |
ValueTuple<NeuralNetworkBase<T>, ITokenizer> LoadGgufWithTokenizer(string path, PretrainedSource source) |
Loads a GGUF checkpoint as both a decoder model and its matching tokenizer from a single file open, so a server has everything it needs to run the model at parity with llama.cpp. |