INamedTensorSource

Interfaces · AiDotNet.Agentic.Models.Local

A source of named weight tensors readable as Double arrays — the common surface over the safetensors and GGUF readers that WeightImporter imports from.

Known implementations: DbrxTensorSource, FusedProjectionSource, GgufFile, GgufModelSource, SafetensorsFile, ShardedSafetensorsSource

For Beginners

Both file formats (safetensors, GGUF) can list their weight arrays by name and hand them back as numbers. This interface is that shared ability, so the importer doesn’t care which format the weights came from.

Properties

Property Summary
IReadOnlyCollection<string> TensorNames { get; } Gets the names of the tensors available in this source.

Methods

Method Summary
double[] ReadAsDouble(string name) Reads a tensor’s values as Double.