Documentation
¶
Index ¶
- func ToAdapterType(s string) v1.AdapterType
- func ToQuantizationType(s string) v1.QuantizationType
- type AssumeRoleConfig
- type Config
- type DebugConfig
- type DownloaderConfig
- type DownloaderKind
- type HuggingFaceDownloaderConfig
- type ModelConfig
- type ObjectStoreConfig
- type OllamaDownloaderConfig
- type S3Config
- type S3DownloaderConfig
- type WorkerConfig
- type WorkerTLSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToAdapterType ¶ added in v0.119.0
func ToAdapterType(s string) v1.AdapterType
ToAdapterType converts to v1.AdapterType.
func ToQuantizationType ¶ added in v0.119.0
func ToQuantizationType(s string) v1.QuantizationType
ToQuantizationType converts to v1.QuantizationType.
Types ¶
type AssumeRoleConfig ¶
type AssumeRoleConfig struct {
RoleARN string `yaml:"roleArn"`
ExternalID string `yaml:"externalId"`
}
AssumeRoleConfig is the assume role configuration.
type Config ¶
type Config struct {
ObjectStore ObjectStoreConfig `yaml:"objectStore"`
// BaseModels is the list of base models to load. Currently each model follows Hugging Face's model format.
BaseModels []string `yaml:"baseModels"`
// Models is the list of fine-tuned or quantized models to load. Currently each model follows Hugging Face's model format.
Models []ModelConfig `yaml:"models"`
ModelLoadInterval time.Duration `yaml:"modelLoadInterval"`
// RunOnce is set to true when models are loaded only once.
RunOnce bool `yaml:"runOnce"`
Downloader DownloaderConfig `yaml:"downloader"`
ModelManagerServerWorkerServiceAddr string `yaml:"modelManagerServerWorkerServiceAddr"`
ComponentStatusSender status.Config `yaml:"componentStatusSender"`
Worker WorkerConfig `yaml:"worker"`
Debug DebugConfig `yaml:"debug"`
}
Config is the configuration.
type DebugConfig ¶
type DebugConfig struct {
Standalone bool `yaml:"standalone"`
}
DebugConfig is the debug configuration.
type DownloaderConfig ¶
type DownloaderConfig struct {
Kind DownloaderKind `yaml:"kind"`
HuggingFace HuggingFaceDownloaderConfig `yaml:"huggingFace"`
S3 S3DownloaderConfig `yaml:"s3"`
Ollama OllamaDownloaderConfig `yaml:"ollama"`
}
DownloaderConfig is the downloader configuration.
type DownloaderKind ¶
type DownloaderKind string
DownloaderKind is the downloader kind.
const ( // DownloaderKindS3 is the S3 downloader kind. DownloaderKindS3 DownloaderKind = "s3" // DownloaderKindHuggingFace is the Hugging Face downloader kind. DownloaderKindHuggingFace DownloaderKind = "huggingFace" // DownloaderKindOllama is the Ollama downloader kind. DownloaderKindOllama DownloaderKind = "ollama" )
type HuggingFaceDownloaderConfig ¶
type HuggingFaceDownloaderConfig struct {
CacheDir string `yaml:"cacheDir"`
}
HuggingFaceDownloaderConfig is the Hugging Face downloader configuration.
type ModelConfig ¶ added in v0.119.0
type ModelConfig struct {
Model string `yaml:"model"`
BaseModel string `yaml:"baseModel"`
AdapterType string `yaml:"adapterType"`
QuantizationType string `yaml:"quantizationType"`
}
ModelConfig is the configuration for non-base-models.
type ObjectStoreConfig ¶
type ObjectStoreConfig struct {
S3 S3Config `yaml:"s3"`
}
ObjectStoreConfig is the object store configuration.
type OllamaDownloaderConfig ¶ added in v1.6.0
type OllamaDownloaderConfig struct {
Port int `yaml:"port"`
}
OllamaDownloaderConfig is the Ollama downloader configuration.
type S3Config ¶
type S3Config struct {
EndpointURL string `yaml:"endpointUrl"`
Region string `yaml:"region"`
InsecureSkipVerify bool `yaml:"insecureSkipVerify"`
Bucket string `yaml:"bucket"`
PathPrefix string `yaml:"pathPrefix"`
// BaseModelPathPrefix is the path prefix for the base models in the object store. A model is stored under
// <ObjectStore.S3.PathPrefix>/<BaseModelPathPrefix>.
BaseModelPathPrefix string `yaml:"baseModelPathPrefix"`
AssumeRole *AssumeRoleConfig `yaml:"assumeRole"`
}
S3Config is the S3 configuration.
type S3DownloaderConfig ¶
type S3DownloaderConfig struct {
EndpointURL string `yaml:"endpointUrl"`
Region string `yaml:"region"`
InsecureSkipVerify bool `yaml:"insecureSkipVerify"`
Bucket string `yaml:"bucket"`
PathPrefix string `yaml:"pathPrefix"`
IsPublic bool `yaml:"isPublic"`
AssumeRole *AssumeRoleConfig `yaml:"assumeRole"`
}
S3DownloaderConfig is the S3 downloader configuration.
type WorkerConfig ¶
type WorkerConfig struct {
TLS WorkerTLSConfig `yaml:"tls"`
}
WorkerConfig is the worker configuration.
type WorkerTLSConfig ¶
type WorkerTLSConfig struct {
Enable bool `yaml:"enable"`
}
WorkerTLSConfig is the worker TLS configuration.