Documentation
¶
Index ¶
Constants ¶
View Source
const (
// Name is the backend name.
Name = "mlx"
)
Variables ¶
View Source
var ErrStatusNotFound = errors.New("Python or mlx-lm not found")
Functions ¶
func GetMaxTokens ¶ added in v1.0.5
func GetMaxTokens(modelCfg types.Config, backendCfg *inference.BackendConfiguration) *uint64
GetMaxTokens returns the max tokens (context size) from model config or backend config. Model config takes precedence over backend config. Returns nil if neither is specified (MLX will use model defaults).
Types ¶
type Config ¶ added in v1.0.5
type Config struct {
// Args are the base arguments that are always included.
Args []string
}
Config is the configuration for the MLX backend.
func NewDefaultMLXConfig ¶ added in v1.0.5
func NewDefaultMLXConfig() *Config
NewDefaultMLXConfig creates a new MLXConfig with default values.
func (*Config) GetArgs ¶ added in v1.0.5
func (c *Config) GetArgs(bundle types.ModelBundle, socket string, mode inference.BackendMode, config *inference.BackendConfiguration) ([]string, error)
GetArgs implements BackendConfig.GetArgs.
Click to show internal directories.
Click to hide internal directories.