config

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromBytes

func NewFromBytes(b []byte) (*InferenceConfig, *FineTuneConfig, error)

Types

type Dataset added in v0.7.0

type Dataset struct {
	Source string `yaml:"source"`
	Type   string `yaml:"type"`
}

type FineTuneConfig added in v0.7.0

type FineTuneConfig struct {
	APIVersion string             `yaml:"apiVersion"`
	Target     string             `yaml:"target"`
	BaseModel  string             `yaml:"baseModel"`
	Datasets   []Dataset          `yaml:"datasets"`
	Config     FineTuneConfigSpec `yaml:"config"`
	Output     FineTuneOutputSpec `yaml:"output"`
}

type FineTuneConfigSpec added in v0.7.0

type FineTuneConfigSpec struct {
	Unsloth FineTuneConfigUnslothSpec `yaml:"unsloth"`
}

type FineTuneConfigUnslothSpec added in v0.7.0

type FineTuneConfigUnslothSpec struct {
	Packing                   bool    `yaml:"packing"`
	MaxSeqLength              int     `yaml:"maxSeqLength"`
	LoadIn4bit                bool    `yaml:"loadIn4bit"`
	BatchSize                 int     `yaml:"batchSize"`
	GradientAccumulationSteps int     `yaml:"gradientAccumulationSteps"`
	WarmupSteps               int     `yaml:"warmupSteps"`
	MaxSteps                  int     `yaml:"maxSteps"`
	LearningRate              float64 `yaml:"learningRate"`
	LoggingSteps              int     `yaml:"loggingSteps"`
	Optimizer                 string  `yaml:"optimizer"`
	WeightDecay               float64 `yaml:"weightDecay"`
	LrSchedulerType           string  `yaml:"lrSchedulerType"`
	Seed                      int     `yaml:"seed"`
}

type FineTuneOutputSpec added in v0.7.0

type FineTuneOutputSpec struct {
	Quantize string `yaml:"quantize"`
	Name     string `yaml:"name"`
}

type InferenceConfig added in v0.7.0

type InferenceConfig struct {
	APIVersion string   `yaml:"apiVersion"`
	Debug      bool     `yaml:"debug"`
	Runtime    string   `yaml:"runtime"`
	Backends   []string `yaml:"backends"`
	Models     []Model  `yaml:"models"`
	Config     string   `yaml:"config"`
}

type Model

type Model struct {
	Name            string           `yaml:"name"`
	Source          string           `yaml:"source"`
	SHA256          string           `yaml:"sha256"`
	PromptTemplates []PromptTemplate `yaml:"promptTemplates"`
}

type PromptTemplate

type PromptTemplate struct {
	Name     string `yaml:"name"`
	Template string `yaml:"template"`
}

Jump to

Keyboard shortcuts

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