Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,7 @@ set(SOURCES_CORE
src/cpp/server/backends/kokoro_server.cpp
src/cpp/server/backends/sd_server.cpp
src/cpp/server/backends/vllm_server.cpp
src/cpp/server/backends/mlx_server.cpp
src/cpp/server/backends/backend_utils.cpp
src/cpp/server/backend_manager.cpp
src/cpp/server/ollama_api.cpp
Expand Down
43 changes: 43 additions & 0 deletions src/cpp/include/lemon/backends/mlx_server.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#pragma once

#include "../wrapped_server.h"
#include "backend_utils.h"
#include <string>

namespace lemon {
namespace backends {

class MLXServer : public WrappedServer {
public:
static InstallParams get_install_params(const std::string& backend, const std::string& version);

inline static const BackendSpec SPEC = BackendSpec(
"mlx",
"mlx-server"
, get_install_params
);

MLXServer(const std::string& log_level,
ModelManager* model_manager,
BackendManager* backend_manager);

~MLXServer() override;

void load(const std::string& model_name,
const ModelInfo& model_info,
const RecipeOptions& options,
bool do_not_upgrade = false) override;

void unload() override;

// ICompletionServer implementation
json chat_completion(const json& request) override;
json completion(const json& request) override;
json responses(const json& request) override;

private:
std::string model_path_; // Filesystem path for model name rewriting
};

} // namespace backends
} // namespace lemon
7 changes: 5 additions & 2 deletions src/cpp/resources/backend_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,8 @@
"moonshine": {
"cpu": "moonshine0.0.62"
},
"clear_bin_if_lemonade_below": "9.4.0"
}
"clear_bin_if_lemonade_below": "9.4.0",
"mlx": {
"system": "26aad7e"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid pinning a version for the system MLX backend

For a system backend, get_recipe_version() returns unknown because there is no Lemonade-managed version.txt, but this new expected version makes system_info mark an otherwise available mlx-server as update_required. The advertised action is lemonade backends install mlx:system, which BackendManager::install_backend() immediately no-ops for system, so users are left with a permanently update-required backend even when the binary is in PATH.

Useful? React with 👍 / 👎.

}
}
Loading
Loading