builder

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: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder builds a model artifact

func FromGGUF

func FromGGUF(path string) (*Builder, error)

FromGGUF returns a *Builder that builds a model artifacts from a GGUF file

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, target Target, pw io.Writer) error

Build finalizes the artifact and writes it to the given target, reporting progress to the given writer

func (*Builder) WithChatTemplateFile

func (b *Builder) WithChatTemplateFile(path string) (*Builder, error)

WithChatTemplateFile adds a Jinja chat template file to the artifact which takes precedence over template from GGUF.

func (*Builder) WithContextSize

func (b *Builder) WithContextSize(size uint64) *Builder

func (*Builder) WithLicense

func (b *Builder) WithLicense(path string) (*Builder, error)

WithLicense adds a license file to the artifact

func (*Builder) WithMultimodalProjector

func (b *Builder) WithMultimodalProjector(path string) (*Builder, error)

WithMultimodalProjector adds a Multimodal projector file to the artifact

type Target

type Target interface {
	Write(context.Context, types.ModelArtifact, io.Writer) error
}

Target represents a build target

Jump to

Keyboard shortcuts

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