llama

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

func LoadModel

func LoadModel(modelPath string, nThreads int) (*Model, error)

LoadModel loads a GGUF model at modelPath and returns a Model. nThreads sets how many CPU threads to use (0 = default).

func (*Model) Close

func (m *Model) Close()

func (*Model) Predict

func (m *Model) Predict(prompt string, opts PredictOptions) (string, error)

Predict runs the model and returns the text output

type PredictOptions

type PredictOptions struct {
	MaxTokens int
	Temp      float32
	TopK      int
	TopP      float32
}

PredictOptions controls generation

Jump to

Keyboard shortcuts

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