PretrainedArchitectures<T>
Helpers & Utilities · AiDotNet.ModelLoading.Pretrained
Registry mapping Hugging Face architecture / model-type names to the factory that reconstructs and weight-loads that architecture. Seeded with the LLaMA-family decoders; extend it to teach the pretrained loader new architectures without touching the facade.
For Beginners
When a model is loaded, AiDotNet looks up its architecture name (from
config.json) here to find the code that knows how to build that particular kind of model.
Adding support for a new family is a single Register call.
Properties
| Property | Summary |
|---|---|
IReadOnlyCollection<string> RegisteredNames { get; } |
The registered architecture names, for diagnostics / error messages. |
Methods
| Method | Summary |
|---|---|
bool TryResolve(HuggingFaceConfig config, string architectureOverride, DecoderFactory<T> factory) |
Resolves the factory for a config, trying (in order) an explicit override, each declared architecture class, then the model type. |
void Register(string architectureName, DecoderFactory<T> factory) |
Registers (or replaces) the factory for an architecture / model-type name. |