Documentation
¶
Index ¶
- type Builder
- func (b *Builder) Build(ctx context.Context, target Target, pw io.Writer) error
- func (b *Builder) HasOnlyConfigChanges() bool
- func (b *Builder) Model() types.ModelArtifact
- func (b *Builder) WithChatTemplateFile(path string) (*Builder, error)
- func (b *Builder) WithConfigArchive(path string) (*Builder, error)
- func (b *Builder) WithContextSize(size int32) *Builder
- func (b *Builder) WithDirTar(path string) (*Builder, error)
- func (b *Builder) WithLicense(path string) (*Builder, error)
- func (b *Builder) WithMultimodalProjector(path string) (*Builder, error)
- type Target
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 FromModel ¶
func FromModel(mdl types.ModelArtifact) (*Builder, error)
FromModel returns a *Builder that builds model artifacts from an existing model artifact
func FromSafetensors ¶
FromSafetensors returns a *Builder that builds model artifacts from safetensors files
func (*Builder) Build ¶
Build finalizes the artifact and writes it to the given target, reporting progress to the given writer
func (*Builder) HasOnlyConfigChanges ¶
HasOnlyConfigChanges returns true if the builder was created from an existing model and only configuration changes were made (no layers added or removed). This is useful for determining if lightweight repackaging optimizations can be used.
func (*Builder) Model ¶
func (b *Builder) Model() types.ModelArtifact
Model returns the underlying model artifact
func (*Builder) WithChatTemplateFile ¶
WithChatTemplateFile adds a Jinja chat template file to the artifact which takes precedence over template from GGUF.
func (*Builder) WithConfigArchive ¶
WithConfigArchive adds a config archive (tar) file to the artifact
func (*Builder) WithContextSize ¶
func (*Builder) WithDirTar ¶
WithDirTar adds a directory tar archive to the artifact. Multiple directory tar archives can be added by calling this method multiple times.
func (*Builder) WithLicense ¶
WithLicense adds a license file to the artifact