bundle

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModelSubdir is the subdirectory within a bundle where model files are stored
	ModelSubdir = "model"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	// contains filtered or unexported fields
}

Bundle represents a runtime bundle containing a model and runtime config

func Parse

func Parse(rootDir string) (*Bundle, error)

Parse returns the Bundle at the given rootDir

func Unpack

func Unpack(dir string, model types.Model) (*Bundle, error)

Unpack creates and return a Bundle by unpacking files and config from model into dir.

func (*Bundle) ChatTemplatePath

func (b *Bundle) ChatTemplatePath() string

ChatTemplatePath return the path to a Jinja chat template file or "" if none is present.

func (*Bundle) GGUFPath

func (b *Bundle) GGUFPath() string

GGUFPath return the path to model GGUF file. If the model is sharded this will be the path to the first shard, containing metadata headers.

func (*Bundle) MMPROJPath

func (b *Bundle) MMPROJPath() string

MMPROJPath returns the path to a multi-modal projector file or "" if none is present.

func (*Bundle) RootDir

func (b *Bundle) RootDir() string

RootDir return the path to the bundle root directory

func (*Bundle) RuntimeConfig

func (b *Bundle) RuntimeConfig() types.Config

RuntimeConfig returns config that should be respected by the backend at runtime.

func (*Bundle) SafetensorsPath

func (b *Bundle) SafetensorsPath() string

SafetensorsPath returns the path to model safetensors file. If the model is sharded this will be the path to the first shard.

Jump to

Keyboard shortcuts

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