types

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (

	// MediaTypeModelConfigV01 is the media type for the model config json.
	MediaTypeModelConfigV01 = types.MediaType("application/vnd.docker.ai.model.config.v0.1+json")

	// MediaTypeGGUF indicates a file in GGUF version 3 format, containing a tensor model.
	MediaTypeGGUF = types.MediaType("application/vnd.docker.ai.gguf.v3")

	// MediaTypeSafetensors indicates a file in safetensors format, containing model weights.
	MediaTypeSafetensors = types.MediaType("application/vnd.docker.ai.safetensors")

	// MediaTypeVLLMConfigArchive indicates a tar archive containing vLLM-specific config files.
	MediaTypeVLLMConfigArchive = types.MediaType("application/vnd.docker.ai.vllm.config.tar")

	// MediaTypeDirTar indicates a tar archive containing a directory with its structure preserved.
	MediaTypeDirTar = types.MediaType("application/vnd.docker.ai.dir.tar")

	// MediaTypeLicense indicates a plain text file containing a license
	MediaTypeLicense = types.MediaType("application/vnd.docker.ai.license")

	// MediaTypeMultimodalProjector indicates a Multimodal projector file
	MediaTypeMultimodalProjector = types.MediaType("application/vnd.docker.ai.mmproj")

	// MediaTypeChatTemplate indicates a Jinja chat template
	MediaTypeChatTemplate = types.MediaType("application/vnd.docker.ai.chat.template.jinja")

	FormatGGUF        = Format("gguf")
	FormatSafetensors = Format("safetensors")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Format       Format            `json:"format,omitempty"`
	Quantization string            `json:"quantization,omitempty"`
	Parameters   string            `json:"parameters,omitempty"`
	Architecture string            `json:"architecture,omitempty"`
	Size         string            `json:"size,omitempty"`
	GGUF         map[string]string `json:"gguf,omitempty"`
	Safetensors  map[string]string `json:"safetensors,omitempty"`
	ContextSize  *uint64           `json:"context_size,omitempty"`
}

Config describes the model.

type ConfigFile

type ConfigFile struct {
	Config     Config     `json:"config"`
	Descriptor Descriptor `json:"descriptor"`
	RootFS     v1.RootFS  `json:"rootfs"`
}

type Descriptor

type Descriptor struct {
	Created *time.Time `json:"created,omitempty"`
}

Descriptor provides metadata about the provenance of the model.

type Format

type Format string

type Model

type Model interface {
	ID() (string, error)
	GGUFPaths() ([]string, error)
	SafetensorsPaths() ([]string, error)
	ConfigArchivePath() (string, error)
	MMPROJPath() (string, error)
	Config() (Config, error)
	Tags() []string
	Descriptor() (Descriptor, error)
	ChatTemplatePath() (string, error)
}

type ModelArtifact

type ModelArtifact interface {
	ID() (string, error)
	Config() (Config, error)
	Descriptor() (Descriptor, error)
	v1.Image
}

type ModelBundle

type ModelBundle interface {
	RootDir() string
	GGUFPath() string
	SafetensorsPath() string
	ChatTemplatePath() string
	MMPROJPath() string
	RuntimeConfig() Config
}

Jump to

Keyboard shortcuts

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