forked from danny-avila/LibreChat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🍎 feat: Apple MLX as Known Endpoint (danny-avila#2580)
* add integration with Apple MLX * fix: apple icon + image mkd link --------- Co-authored-by: “Extremys” <“[email protected]”> Co-authored-by: Danny Avila <[email protected]>
- Loading branch information
1 parent
0e50c07
commit d21a056
Showing
8 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Apple MLX | ||
description: Using LibreChat with Apple MLX | ||
weight: -6 | ||
--- | ||
## MLX | ||
Use [MLX](https://ml-explore.github.io/mlx/build/html/index.html) for | ||
|
||
* Running large language models on local Apple Silicon hardware (M1, M2, M3) ARM with unified CPU/GPU memory) | ||
|
||
|
||
### 1. Install MLX on MacOS | ||
#### Mac MX series only | ||
MLX supports GPU acceleration on Apple Metal backend via `mlx-lm` Python package. Follow Instructions at [Install `mlx-lm` package](https://github.com/ml-explore/mlx-examples/tree/main/llms) | ||
|
||
|
||
### 2. Load Models with MLX | ||
MLX supports common HuggingFace models directly, but it's recommended to use converted and tested quantized models (depending on your hardware capability) provided by the [mlx-community](https://huggingface.co/mlx-community). | ||
|
||
Follow Instructions at [Install `mlx-lm` package](https://github.com/ml-explore/mlx-examples/tree/main/llms) | ||
|
||
1. Browse the available models [HuggingFace](https://huggingface.co/models?search=mlx-community) | ||
2. Copy the text from the model page `<author>/<model_id>` (ex: `mlx-community/Meta-Llama-3-8B-Instruct-4bit`) | ||
3. Check model size. Models that can run in CPU/GPU unified memory perform the best. | ||
4. Follow the instructions to launch the model server [Run OpenAI Compatible Server Locally](https://github.com/ml-explore/mlx-examples/blob/main/llms/mlx_lm/SERVER.md) | ||
|
||
```mlx_lm.server --model <author>/<model_id>``` | ||
|
||
### 3. Configure LibreChat | ||
Use `librechat.yaml` [Configuration file (guide here)](./ai_endpoints.md) to add MLX as a separate endpoint, an example with Llama-3 is provided. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters