Documentation
¶
Index ¶
- Constants
- type Backend
- type LLAMACPP
- func (l *LLAMACPP) DefaultArgs(model *coreapi.OpenModel) []string
- func (l *LLAMACPP) DefaultCommands() []string
- func (l *LLAMACPP) DefaultResources() inferenceapi.ResourceRequirements
- func (l *LLAMACPP) DefaultVersion() string
- func (l *LLAMACPP) Image(version string) string
- func (l *LLAMACPP) Name() inferenceapi.BackendName
- type SGLANG
- func (s *SGLANG) DefaultArgs(model *coreapi.OpenModel) []string
- func (s *SGLANG) DefaultCommands() []string
- func (s *SGLANG) DefaultResources() inferenceapi.ResourceRequirements
- func (s *SGLANG) DefaultVersion() string
- func (s *SGLANG) Image(version string) string
- func (s *SGLANG) Name() inferenceapi.BackendName
- type VLLM
- func (v *VLLM) DefaultArgs(model *coreapi.OpenModel) []string
- func (v *VLLM) DefaultCommands() []string
- func (v *VLLM) DefaultResources() inferenceapi.ResourceRequirements
- func (v *VLLM) DefaultVersion() string
- func (v *VLLM) Image(version string) string
- func (v *VLLM) Name() inferenceapi.BackendName
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) DefaultCommands ¶
func (*LLAMACPP) DefaultResources ¶
func (l *LLAMACPP) DefaultResources() inferenceapi.ResourceRequirements
func (*LLAMACPP) DefaultVersion ¶
func (*LLAMACPP) Name ¶
func (l *LLAMACPP) Name() inferenceapi.BackendName
type SGLANG ¶
type SGLANG struct{}
func (*SGLANG) DefaultCommands ¶
func (*SGLANG) DefaultResources ¶
func (s *SGLANG) DefaultResources() inferenceapi.ResourceRequirements
func (*SGLANG) DefaultVersion ¶
func (*SGLANG) Name ¶
func (s *SGLANG) Name() inferenceapi.BackendName
type VLLM ¶
type VLLM struct{}
func (*VLLM) DefaultCommands ¶
func (*VLLM) DefaultResources ¶
func (v *VLLM) DefaultResources() inferenceapi.ResourceRequirements
func (*VLLM) DefaultVersion ¶
func (*VLLM) Name ¶
func (v *VLLM) Name() inferenceapi.BackendName
Click to show internal directories.
Click to hide internal directories.