Documentation
¶
Overview ¶
Package client provides client-side model creation for safetensors-based models.
This package is in x/ because the safetensors model storage format is under development. It also exists to break an import cycle: server imports x/create, so x/create cannot import server. This sub-package can import server because server doesn't import it.
Index ¶
Constants ¶
const MinOllamaVersion = "0.14.0"
MinOllamaVersion is the minimum Ollama version required for safetensors models.
Variables ¶
This section is empty.
Functions ¶
func CreateModel ¶
func CreateModel(opts CreateOptions, p *progress.Progress) error
CreateModel imports a model from a local directory. This creates blobs and manifest directly on disk, bypassing the HTTP API. Automatically detects model type (safetensors LLM vs image gen) and routes accordingly.
func QuantizeSupported ¶
func QuantizeSupported() bool
QuantizeSupported returns false when MLX is not available
Types ¶
type CreateOptions ¶
type CreateOptions struct {
ModelName string
ModelDir string
Quantize string // "int4", "int8", "nvfp4", or "mxfp8" for quantization
Modelfile *ModelfileConfig // template/system/license from Modelfile
}
CreateOptions holds all options for model creation.
type ModelfileConfig ¶
ModelfileConfig holds configuration extracted from a Modelfile.