Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrammarSampler ¶ added in v0.6.7
type GrammarSampler struct {
// contains filtered or unexported fields
}
func NewGrammarSampler ¶ added in v0.6.7
func NewGrammarSampler(model model.TextProcessor, grammarStr string) (*GrammarSampler, error)
func (*GrammarSampler) Accept ¶ added in v0.6.7
func (g *GrammarSampler) Accept(token int32)
func (*GrammarSampler) Apply ¶ added in v0.6.7
func (g *GrammarSampler) Apply(tokens []token)
func (*GrammarSampler) Free ¶ added in v0.6.7
func (g *GrammarSampler) Free()
type Sampler ¶
type Sampler struct {
// contains filtered or unexported fields
}
func NewSampler ¶ added in v0.5.13
func NewSampler(temperature float32, topK int, topP float32, minP float32, seed int, grammar *GrammarSampler) Sampler
TODO(parthsareen): update sampler interface to use json unmarshal https://github.com/ollama/ollama/issues/9278
Click to show internal directories.
Click to hide internal directories.