using LlamaApp.Common; namespace LlamaApp.HuggingFace; /// /// A Hugging Face repository representing a single downloadable model build /// (one quant of one size of one model family). is the HF /// repo id (e.g. ggml-org/gpt-oss-20b-GGUF) used for downloading. /// public record Repository : IModel { /// Hugging Face repo id, e.g. "ggml-org/gpt-oss-20b-GGUF". public required string Name { get; init; } /// /// Server model id = <repo>:<quant> (or just <repo> /// when is empty) — the form POST /models/load /// requires. See . /// public string ServerModelId => string.IsNullOrEmpty(Quant) ? Name : $"{Name}:{Quant}"; public required string Description { get; init; } public required string License { get; init; } /// Human-readable parameter count from the catalog, e.g. "20B". public required string Parameters { get; init; } /// Human-readable download size, e.g. "12.1 GB". public required string Size { get; init; } public required bool Vision { get; init; } // ---- Extra catalog metadata (not part of IModel) ---- /// Display name for the size, e.g. "GPT-OSS 20B". public string? DisplayName { get; init; } /// Brand/family label, e.g. "OpenAI", "Qwen". public string? Brand { get; init; } /// Quantization label, e.g. "Q4_0", "mxfp4". public string? Quant { get; init; } /// Raw size in bytes — useful for sorting/comparison. public ulong SizeBytes { get; init; } /// Whether the catalog marks this family as featured. public bool Featured { get; init; } }