ollama

package
v0.329.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateModelfile added in v0.302.0

func CreateModelfile(
	filePath string,
	modelName string,
	spec *ModelSpec,
	contextLengthsByModelID map[string]int,
) error

CreateModelfile creates a new model file.

func ModelName added in v0.326.0

func ModelName(modelID string) string

ModelName returns the Ollama model name from the model ID used in LLM Operator.

Ollama does not accept more than two ":" while the model ID of the fine-tuning jobs is be "ft:<base-model>:<suffix>".

func ModelfilePath added in v0.302.0

func ModelfilePath(modelDir string, modelName string) string

ModelfilePath returns the model file path.

func WriteModelfile added in v0.322.0

func WriteModelfile(
	modelName string,
	spec *ModelSpec,
	contextLengthsByModelID map[string]int,
	file *os.File,
) error

WriteModelfile writes the model file.

Types

type ModelSpec

type ModelSpec struct {
	From        string
	AdapterPath string
}

ModelSpec is the specification for a new model.

Jump to

Keyboard shortcuts

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