- Remove internal/cmd/php/ (now core/php repo) - Remove internal/cmd/ci/ and internal/cmd/sdk/ (now core/ci repo) - Remove internal/variants/ build tag system entirely - Move all 30 remaining command packages from internal/cmd/ to cmd/ - Rewrite main.go with direct imports (no more variant selection) - Update all cross-references from internal/cmd/ to cmd/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
450 B
Go
22 lines
450 B
Go
//go:build darwin && arm64 && mlx
|
|
|
|
package ml
|
|
|
|
import (
|
|
"fmt"
|
|
"log/slog"
|
|
|
|
"forge.lthn.ai/core/go/pkg/ml"
|
|
)
|
|
|
|
func createServeBackend() (ml.Backend, error) {
|
|
if serveModelPath != "" {
|
|
slog.Info("ml serve: loading native MLX backend", "path", serveModelPath)
|
|
b, err := ml.NewMLXBackend(serveModelPath)
|
|
if err != nil {
|
|
return nil, fmt.Errorf("mlx backend: %w", err)
|
|
}
|
|
return b, nil
|
|
}
|
|
return ml.NewHTTPBackend(apiURL, modelName), nil
|
|
}
|