Documentation
¶
Index ¶
- func BestWeightGGUFName(names []string) string
- func BestWeightGGUFRelPath(relPaths []string) string
- func CollectWeightGGUFRelPaths(root string) ([]string, error)
- func IsMMProjGGUF(name string) bool
- func IsMTPGGUF(path string) bool
- func IsWeightGGUF(path string) bool
- func KnownQuantLabels() []string
- func QuantLabel(basename string) string
- func QuantLabelFromRepoPath(relPath string) string
- func QuantRank(basename string) int
- func QuantRankFromRepoPath(relPath string) int
- type FileEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BestWeightGGUFName ¶
BestWeightGGUFName picks the highest-precision weight GGUF basename. Tie-breaker: lexicographic order on name for stability.
func BestWeightGGUFRelPath ¶
BestWeightGGUFRelPath picks the highest-precision file by repo-relative or filesystem-relative path.
func CollectWeightGGUFRelPaths ¶
CollectWeightGGUFRelPaths returns relative paths to weight .gguf files under root (recursive walk).
func IsMMProjGGUF ¶
IsMMProjGGUF reports whether name looks like a multimodal projector GGUF.
func IsMTPGGUF ¶ added in v0.9.35
IsMTPGGUF reports whether path looks like a multi-token-prediction module GGUF, either by filename token (mtp-model-Q8_0.gguf) or by folder (MTP/model.gguf). These modules carry their own architecture and cannot be loaded as a main model.
func IsWeightGGUF ¶
IsWeightGGUF reports whether path is a main model weight .gguf file, excluding companion modules (multimodal projectors and multi-token-prediction modules) that llama-server cannot load as a standalone model.
func KnownQuantLabels ¶
func KnownQuantLabels() []string
KnownQuantLabels returns the GGUF quantization labels recognized by the picker, ordered from higher precision to lower precision.
func QuantLabel ¶
QuantLabel returns the canonical GGUF quantization label from a weight filename.
func QuantLabelFromRepoPath ¶
QuantLabelFromRepoPath extracts the canonical GGUF quantization label from a repo-relative path. The filename takes precedence; if it has no known quant token, parent directories are considered.
func QuantRank ¶
QuantRank returns a precision rank for a weight GGUF basename; higher is better. Returns -1 if no known quantization token is found.
func QuantRankFromRepoPath ¶
QuantRankFromRepoPath ranks using the repo-relative path: the filename is used first; if it has no known quant token, any parent directory whose name matches a quant (e.g. Q8_0/) is used. This supports layouts like Q8_0/model.gguf vs Q4_0/model.gguf.
Types ¶
type FileEntry ¶
FileEntry is a minimal file description for GGUF download filtering.
func FilterWeightGGUFFiles ¶
FilterWeightGGUFFiles keeps every shard of the highest-known-precision variant. If there is at most one weight file, or no file has a known quant token, entries are returned unchanged.
func FilterWeightGGUFFilesByQuant ¶
FilterWeightGGUFFilesByQuant keeps every shard whose GGUF quantization label matches want (case-insensitive). want must be non-empty. Matching uses QuantLabelFromRepoPath on each entry path.