You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,7 @@ If it doesn't include a specific model, you can always [create your own images](
119
119
### Apple Silicon (experimental)
120
120
121
121
> [!NOTE]
122
-
> To enable GPU acceleration on Apple Silicon, please see [Podman Desktop documentation](https://podman-desktop.io/docs/podman/gpu).
122
+
> To enable GPU acceleration on Apple Silicon, please see [Podman Desktop documentation](https://podman-desktop.io/docs/podman/gpu). For more information, please see [GPU Acceleration](https://sozercan.github.io/aikit/docs/gpu).
123
123
>
124
124
> Apple Silicon is an _experimental_ runtime and it may change in the future. This runtime is specific to Apple Silicon only, and it will not work as expected on other architectures, including Intel Macs.
Copy file name to clipboardExpand all lines: website/docs/create-images.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -76,10 +76,16 @@ The `model` build argument is the model URL to download and use. You can use any
76
76
77
77
#### `runtime`
78
78
79
-
The `runtime` build argument adds the applicable runtimes to the image. By default, aikit will automatically choose the most optimized CPU runtime. You can use `cuda` to include NVIDIA CUDA runtime libraries. For example:
79
+
The `runtime` build argument adds the applicable runtimes to the image. By default, aikit will automatically choose the most optimized CPU runtime.
80
+
81
+
You can use `cuda` to include NVIDIA CUDA runtime libraries. For example:
80
82
81
83
`--build-arg="runtime=cuda"`.
82
84
85
+
or `applesilicon` to include Apple Silicon runtime libraries. For example:
86
+
87
+
`--build-arg="runtime=applesilicon"`.
88
+
83
89
### Multi-Platform Support
84
90
85
91
AIKit supports AMD64 and ARM64 multi-platform images. To build a multi-platform image, you can simply add `--platform linux/amd64,linux/arm64` to the build command. For example:
Copy file name to clipboardExpand all lines: website/docs/gpu.md
+39-2Lines changed: 39 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: GPU Acceleration
3
3
---
4
4
5
5
:::note
6
-
At this time, only NVIDIA GPU acceleration is supported. Please open an issue if you'd like to see support for other GPU vendors.
6
+
At this time, only NVIDIA GPU acceleration is supported, with experimental support for Apple Silicon. Please open an issue if you'd like to see support for other GPU vendors.
7
7
:::
8
8
9
9
## NVIDIA
@@ -57,6 +57,43 @@ If GPU acceleration is working, you'll see output that is similar to following i
Apple Silicon is an experimental runtime and it may change in the future. This runtime is specific to Apple Silicon only, and it will not work as expected on other architectures, including Intel Macs.
68
+
:::
69
+
70
+
AIKit supports Apple Silicon GPU acceleration with Podman Desktop for Mac with [`libkrun`](https://github.com/containers/libkrun). Please see [Podman Desktop documentation](https://podman-desktop.io/docs/podman/gpu) on how to enable GPU support.
71
+
72
+
To get started with Apple Silicon GPU-accelerated inferencing, make sure to set the following in your `aikitfile` and build your model.
73
+
74
+
```yaml
75
+
runtime: applesilicon # use Apple Silicon runtime
76
+
```
77
+
78
+
Please note that only the default `llama.cpp` backend with `gguf` models are supported for Apple Silicon.
79
+
80
+
After building the model, you can run it with:
81
+
82
+
```bash
83
+
# for pre-made models, replace "my-model" with the image name
84
+
podman run --rm --device /dev/dri -p 8080:8080 my-model
85
+
```
86
+
87
+
If GPU acceleration is working, you'll see output that is similar to following in the debug logs:
88
+
89
+
```bash
90
+
6:16AM DBG GRPC(phi-3.5-3.8b-instruct-127.0.0.1:39883): stderr ggml_vulkan: Found 1 Vulkan devices:
0 commit comments