server

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSafetensorsDtype

func GetSafetensorsDtype(name model.Name) (string, error)

GetSafetensorsDtype returns the quantization type for a safetensors model. Reads quant_type from the first tensor blob's __metadata__. Falls back to torch_dtype from config.json if no quant metadata.

func GetSafetensorsLLMInfo

func GetSafetensorsLLMInfo(name model.Name) (map[string]any, error)

GetSafetensorsLLMInfo extracts model information from safetensors LLM models. It reads the config.json layer and returns a map compatible with GGML's KV format.

func GetSafetensorsTensorInfo

func GetSafetensorsTensorInfo(name model.Name) ([]api.Tensor, error)

GetSafetensorsTensorInfo extracts tensor information from safetensors model layers. Each tensor is stored as a minimal safetensors file with an 88-byte header containing metadata.

Types

This section is empty.

Jump to

Keyboard shortcuts

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