ggufpick

package
v0.9.55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BestWeightGGUFName

func BestWeightGGUFName(names []string) string

BestWeightGGUFName picks the highest-precision weight GGUF basename. Tie-breaker: lexicographic order on name for stability.

func BestWeightGGUFRelPath

func BestWeightGGUFRelPath(relPaths []string) string

BestWeightGGUFRelPath picks the highest-precision file by repo-relative or filesystem-relative path.

func CollectWeightGGUFRelPaths

func CollectWeightGGUFRelPaths(root string) ([]string, error)

CollectWeightGGUFRelPaths returns relative paths to weight .gguf files under root (recursive walk).

func IsMMProjGGUF

func IsMMProjGGUF(name string) bool

IsMMProjGGUF reports whether name looks like a multimodal projector GGUF.

func IsMTPGGUF added in v0.9.35

func IsMTPGGUF(path string) bool

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

func IsWeightGGUF(path string) bool

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

func QuantLabel(basename string) string

QuantLabel returns the canonical GGUF quantization label from a weight filename.

func QuantLabelFromRepoPath

func QuantLabelFromRepoPath(relPath string) string

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

func QuantRank(basename string) int

QuantRank returns a precision rank for a weight GGUF basename; higher is better. Returns -1 if no known quantization token is found.

func QuantRankFromRepoPath

func QuantRankFromRepoPath(relPath string) int

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

type FileEntry struct {
	Path string
	Name string
	Size int64
}

FileEntry is a minimal file description for GGUF download filtering.

func FilterWeightGGUFFiles

func FilterWeightGGUFFiles(entries []FileEntry) []FileEntry

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

func FilterWeightGGUFFilesByQuant(entries []FileEntry, want string) []FileEntry

FilterWeightGGUFFilesByQuant keeps every shard whose GGUF quantization label matches want (case-insensitive). want must be non-empty. Matching uses QuantLabelFromRepoPath on each entry path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL