Help us shape the future of Go! Take the 2026 Go Developer Survey

options

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Model            string   `json:"model,omitempty" yaml:"model"`
	Prompt           string   `json:"prompt,omitempty" yaml:"prompt"`
	UseMMap          bool     `json:"useMMap,omitempty" yaml:"useMMap"`
	ContextSize      int      `default:"512" json:"contextSize,omitempty" yaml:"contextSize"`
	NumPredict       int      `default:"-1" json:"numPredict,omitempty" yaml:"numPredict"`
	BatchSize        int      `default:"2048" json:"batchSize,omitempty" yaml:"batchSize"`
	GroupAttnFactor  int      `default:"1" json:"groupAttnFactor,omitempty" yaml:"groupAttnFactor"`
	GroupAttnWeight  int      `default:"512" json:"groupAttnWeight,omitempty" yaml:"groupAttnWeight"`
	NumKeep          int      `default:"0" json:"numKeep,omitempty" yaml:"numKeep"`
	RopeFreqBase     float64  `json:"ropeFreqBase,omitempty" yaml:"ropeFreqBase"`
	RopeFreqScale    float64  `json:"ropeFreqScale,omitempty" yaml:"ropeFreqScale"`
	Interactive      bool     `json:"interactive,omitempty" yaml:"interactive"`
	InteractiveFirst bool     `json:"interactiveFirst,omitempty" yaml:"interactiveFirst"`
	DisplayPrompt    bool     `json:"displayPrompt,omitempty" yaml:"displayPrompt"`
	InputPrefixBos   bool     `json:"inputPrefixBos,omitempty" yaml:"inputPrefixBos"`
	InputPrefix      string   `json:"inputPrefix,omitempty" yaml:"inputPrefix"`
	InputSuffix      string   `json:"inputSuffix,omitempty" yaml:"inputSuffix"`
	Template         string   `json:"template,omitempty" yaml:"template"`
	AntiPrompts      []string `json:"antiPrompts,omitempty" yaml:"antiPrompts"`
	EndOfTextPrompts []string `json:"endOfTextPrompts,omitempty" yaml:"endOfTextPrompts"`
	Warmup           bool     `default:"true" json:"warmup,omitempty" yaml:"warmup"`
}

func LoadConfig added in v0.4.1

func LoadConfig(configFile string) (*Options, error)

func (*Options) ApplyTemplate added in v0.4.0

func (o *Options) ApplyTemplate(str string) string

func (*Options) Params added in v0.6.0

func (o *Options) Params() (unsafe.Pointer, error)

func (*Options) Prepare added in v0.4.1

func (o *Options) Prepare() error

Jump to

Keyboard shortcuts

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