types

package
v0.0.0-...-c9b8f36 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: 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")

	// 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")
)

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"`
	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)
	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
	ChatTemplatePath() string
	MMPROJPath() string
	RuntimeConfig() Config
}

Jump to

Keyboard shortcuts

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