backend

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 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
	// DefaultCommand returns the command to start the inference backend.
	DefaultCommand() []string
	// Args returns the bootstrap arguments to start the backend.
	// The second parameter represents which particular modelRole involved, like draft.
	Args([]*coreapi.OpenModel, coreapi.ModelRole) []string
}

Backend represents the inference engine, such as vllm.

func SwitchBackend

func SwitchBackend(name inferenceapi.BackendName) Backend

type LLAMACPP

type LLAMACPP struct{}

func (*LLAMACPP) Args added in v0.0.6

func (l *LLAMACPP) Args(models []*coreapi.OpenModel, involvedRole coreapi.ModelRole) []string

func (*LLAMACPP) DefaultCommand added in v0.0.6

func (l *LLAMACPP) DefaultCommand() []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) Args added in v0.0.6

func (s *SGLANG) Args(models []*coreapi.OpenModel, involvedRole coreapi.ModelRole) []string

func (*SGLANG) DefaultCommand added in v0.0.6

func (s *SGLANG) DefaultCommand() []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 SpeculativeBackend added in v0.0.6

type SpeculativeBackend interface {
	// contains filtered or unexported methods
}

SpeculativeBackend represents backend supports speculativeDecoding inferenceMode.

type VLLM

type VLLM struct{}

func (*VLLM) Args added in v0.0.6

func (v *VLLM) Args(models []*coreapi.OpenModel, involvedRole coreapi.ModelRole) []string

func (*VLLM) DefaultCommand added in v0.0.6

func (v *VLLM) DefaultCommand() []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