client

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 8 Imported by: 0

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

View Source
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           // "fp8" for quantization
	Modelfile *ModelfileConfig // template/system/license from Modelfile
}

CreateOptions holds all options for model creation.

type ModelfileConfig

type ModelfileConfig struct {
	Template string
	System   string
	License  string
}

ModelfileConfig holds configuration extracted from a Modelfile.

Jump to

Keyboard shortcuts

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