Documentation
¶
Index ¶
- func ChatTemplatePath(i WithLayers) (string, error)
- func Config(i WithRawConfigFile) (types.Config, error)
- func ConfigArchivePath(i WithLayers) (string, error)
- func ConfigFile(i WithRawConfigFile) (*types.ConfigFile, error)
- func Descriptor(i WithRawConfigFile) (types.Descriptor, error)
- func GGUFPaths(i WithLayers) ([]string, error)
- func ID(i WithRawManifest) (string, error)
- func MMPROJPath(i WithLayers) (string, error)
- func ManifestForLayers(i WithLayers) (*v1.Manifest, error)
- func SafetensorsPaths(i WithLayers) ([]string, error)
- type BaseModel
- func (m *BaseModel) Config() (types.Config, error)
- func (m *BaseModel) ConfigFile() (*v1.ConfigFile, error)
- func (m *BaseModel) ConfigName() (v1.Hash, error)
- func (m *BaseModel) Descriptor() (types.Descriptor, error)
- func (m *BaseModel) Digest() (v1.Hash, error)
- func (m *BaseModel) ID() (string, error)
- func (m *BaseModel) LayerByDiffID(hash v1.Hash) (v1.Layer, error)
- func (m *BaseModel) LayerByDigest(hash v1.Hash) (v1.Layer, error)
- func (m *BaseModel) Layers() ([]v1.Layer, error)
- func (m *BaseModel) Manifest() (*v1.Manifest, error)
- func (m *BaseModel) MediaType() (ggcr.MediaType, error)
- func (m *BaseModel) RawConfigFile() ([]byte, error)
- func (m *BaseModel) RawManifest() ([]byte, error)
- func (m *BaseModel) Size() (int64, error)
- type Layer
- type WithLayers
- type WithRawConfigFile
- type WithRawManifest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChatTemplatePath ¶
func ChatTemplatePath(i WithLayers) (string, error)
func Config ¶
func Config(i WithRawConfigFile) (types.Config, error)
Config returns the types.Config for the model.
func ConfigArchivePath ¶
func ConfigArchivePath(i WithLayers) (string, error)
func ConfigFile ¶
func ConfigFile(i WithRawConfigFile) (*types.ConfigFile, error)
func Descriptor ¶
func Descriptor(i WithRawConfigFile) (types.Descriptor, error)
Descriptor returns the types.Descriptor for the model.
func GGUFPaths ¶
func GGUFPaths(i WithLayers) ([]string, error)
func ID ¶
func ID(i WithRawManifest) (string, error)
func MMPROJPath ¶
func MMPROJPath(i WithLayers) (string, error)
func ManifestForLayers ¶
func ManifestForLayers(i WithLayers) (*v1.Manifest, error)
func SafetensorsPaths ¶
func SafetensorsPaths(i WithLayers) ([]string, error)
Types ¶
type BaseModel ¶ added in v1.0.3
type BaseModel struct {
ModelConfigFile types.ConfigFile
LayerList []v1.Layer
}
BaseModel provides a common implementation for model types. It can be embedded by specific model format implementations (GGUF, Safetensors, etc.)
func (*BaseModel) ConfigFile ¶ added in v1.0.3
func (m *BaseModel) ConfigFile() (*v1.ConfigFile, error)
func (*BaseModel) Descriptor ¶ added in v1.0.3
func (m *BaseModel) Descriptor() (types.Descriptor, error)
func (*BaseModel) LayerByDiffID ¶ added in v1.0.3
func (*BaseModel) LayerByDigest ¶ added in v1.0.3
func (*BaseModel) RawConfigFile ¶ added in v1.0.3
func (*BaseModel) RawManifest ¶ added in v1.0.3
type Layer ¶
type Layer struct {
Path string
v1.Descriptor
}
func (Layer) Compressed ¶
func (l Layer) Compressed() (io.ReadCloser, error)
func (Layer) Uncompressed ¶
func (l Layer) Uncompressed() (io.ReadCloser, error)
type WithLayers ¶
type WithLayers interface {
WithRawConfigFile
Layers() ([]v1.Layer, error)
}
type WithRawConfigFile ¶
type WithRawManifest ¶
type WithRawManifest interface {
// RawManifest returns the serialized bytes of this model's manifest file.
RawManifest() ([]byte, error)
}
WithRawManifest defines the subset of types.Model used by these helper methods
Click to show internal directories.
Click to hide internal directories.