forked from vllm-project/vllm
-
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.
[Hardware][Apple] Native support for macOS Apple Silicon (vllm-projec…
…t#11696) Signed-off-by: Wallas Santos <[email protected]> Co-authored-by: Michael Goin <[email protected]>
- Loading branch information
Showing
11 changed files
with
209 additions
and
29 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
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,51 @@ | ||
(installation-apple)= | ||
|
||
# Installation for macOS | ||
|
||
vLLM has experimental support for macOS with Apple Silicon. For now, users shall build from the source vLLM to natively run on macOS. For more details, like running on vLLM in a docker container, see [ARM CPU Documentation](installation-arm) | ||
|
||
Currently the CPU implementation for macOS supports FP32 and FP16 datatypes. | ||
|
||
## Requirements | ||
|
||
- **Operating System**: `macOS Sonoma` or later | ||
- **SDK** `XCode 15.4` or later with Command Line Tools | ||
- **Compilers**: `Apple Clang >= 15.0.0` | ||
|
||
<!-- (arm-backend-quick-start-dockerfile)= --> | ||
|
||
## Build and installation | ||
|
||
After installation of XCode and the Command Line Tools, which include Apple Clang, execute the following commands to build and install vLLM from the source. | ||
|
||
``` | ||
$ git clone https://github.com/vllm-project/vllm.git | ||
$ cd vllm | ||
$ pip install -r requirements-cpu.txt | ||
$ pip install -e . | ||
``` | ||
|
||
```{note} | ||
On macOS the `VLLM_TARGET_DEVICE` is automatically set to `cpu`, which currently is the only supported device. | ||
``` | ||
|
||
|
||
|
||
## Troubleshooting | ||
|
||
If the build has error like the following snippet where standard C++ headers cannot be found, try to remove and reinstall your | ||
[Command Line Tools for Xcode](https://developer.apple.com/download/all/). | ||
|
||
``` | ||
[...] fatal error: 'map' file not found | ||
1 | #include <map> | ||
| ^~~~~ | ||
1 error generated. | ||
[2/8] Building CXX object CMakeFiles/_C.dir/csrc/cpu/pos_encoding.cpp.o | ||
[...] fatal error: 'cstddef' file not found | ||
10 | #include <cstddef> | ||
| ^~~~~~~~~ | ||
1 error generated. | ||
``` | ||
|
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ gpu-cuda | |
gpu-rocm | ||
cpu-x86 | ||
cpu-arm | ||
cpu-apple | ||
hpu-gaudi | ||
tpu | ||
xpu | ||
|
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
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