server

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 9 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. If the model is quantized (has _scale tensors), returns the quantization type (e.g., "FP8"). Otherwise returns the torch_dtype from config.json.

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