ollama

package
v0.382.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 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

func CreateModelfile(
	filePath string,
	modelID string,
	spec *ModelSpec,
	contextLength int,
) error

CreateModelfile creates a new model file.

func ModelName

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

func ModelfilePath(modelDir string, modelID string) string

ModelfilePath returns the model file path.

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