backend

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DEFAULT_BACKEND_PORT = 8080
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// Name returns the inference backend name in this project.
	Name() inferenceapi.BackendName
	// Image returns the container image for the inference backend.
	Image(version string) string

	// DefaultVersion returns the default version for the inference backend.
	DefaultVersion() string
	// DefaultResources returns the default resources set for the container.
	DefaultResources() inferenceapi.ResourceRequirements
	// DefaultCommands returns the default command to start the inference backend.
	DefaultCommands() []string
	// DefaultArgs returns the default bootstrap arguments to start the backend.
	DefaultArgs(*coreapi.OpenModel) []string
}

Backend represents the inference engine, such as vllm.

func SwitchBackend

func SwitchBackend(name inferenceapi.BackendName) Backend

type LLAMACPP

type LLAMACPP struct{}

func (*LLAMACPP) DefaultArgs

func (l *LLAMACPP) DefaultArgs(model *coreapi.OpenModel) []string

func (*LLAMACPP) DefaultCommands

func (l *LLAMACPP) DefaultCommands() []string

func (*LLAMACPP) DefaultResources

func (l *LLAMACPP) DefaultResources() inferenceapi.ResourceRequirements

func (*LLAMACPP) DefaultVersion

func (l *LLAMACPP) DefaultVersion() string

func (*LLAMACPP) Image

func (l *LLAMACPP) Image(version string) string

func (*LLAMACPP) Name

func (l *LLAMACPP) Name() inferenceapi.BackendName

type SGLANG

type SGLANG struct{}

func (*SGLANG) DefaultArgs

func (s *SGLANG) DefaultArgs(model *coreapi.OpenModel) []string

func (*SGLANG) DefaultCommands

func (s *SGLANG) DefaultCommands() []string

func (*SGLANG) DefaultResources

func (s *SGLANG) DefaultResources() inferenceapi.ResourceRequirements

func (*SGLANG) DefaultVersion

func (s *SGLANG) DefaultVersion() string

func (*SGLANG) Image

func (s *SGLANG) Image(version string) string

func (*SGLANG) Name

func (s *SGLANG) Name() inferenceapi.BackendName

type VLLM

type VLLM struct{}

func (*VLLM) DefaultArgs

func (v *VLLM) DefaultArgs(model *coreapi.OpenModel) []string

func (*VLLM) DefaultCommands

func (v *VLLM) DefaultCommands() []string

func (*VLLM) DefaultResources

func (v *VLLM) DefaultResources() inferenceapi.ResourceRequirements

func (*VLLM) DefaultVersion

func (v *VLLM) DefaultVersion() string

func (*VLLM) Image

func (v *VLLM) Image(version string) string

func (*VLLM) Name

func (v *VLLM) Name() inferenceapi.BackendName

Jump to

Keyboard shortcuts

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