-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feat-request-middleware
- Loading branch information
Showing
7 changed files
with
258 additions
and
45 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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp | ||
index 342042ff..224db9b5 100644 | ||
index 3cd0d2fa..6c5e811a 100644 | ||
--- a/examples/llava/clip.cpp | ||
+++ b/examples/llava/clip.cpp | ||
@@ -2419,7 +2419,7 @@ bool clip_image_batch_encode(clip_ctx * ctx, const int n_threads, const clip_ima | ||
struct ggml_tensor * patches = ggml_graph_get_tensor(gf, "patches"); | ||
int* patches_data = (int*)malloc(ggml_nbytes(patches)); | ||
for (int i = 0; i < num_patches; i++) { | ||
- patches_data[i] = i + 1; | ||
+ patches_data[i] = i; | ||
} | ||
ggml_backend_tensor_set(patches, patches_data, 0, ggml_nbytes(patches)); | ||
free(patches_data); | ||
@@ -2608,7 +2608,7 @@ bool clip_image_batch_encode(clip_ctx * ctx, const int n_threads, const clip_ima | ||
struct ggml_tensor * patches = ggml_graph_get_tensor(gf, "patches"); | ||
int* patches_data = (int*)malloc(ggml_nbytes(patches)); | ||
for (int i = 0; i < num_patches; i++) { | ||
- patches_data[i] = i + 1; | ||
+ patches_data[i] = i; | ||
} | ||
ggml_backend_tensor_set(patches, patches_data, 0, ggml_nbytes(patches)); | ||
free(patches_data); |
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,35 @@ | ||
|
||
+++ | ||
disableToc = false | ||
title = "Running on Nvidia ARM64" | ||
weight = 27 | ||
+++ | ||
|
||
LocalAI can be run on Nvidia ARM64 devices, such as the Jetson Nano, Jetson Xavier NX, and Jetson AGX Xavier. The following instructions will guide you through building the LocalAI container for Nvidia ARM64 devices. | ||
|
||
## Prerequisites | ||
|
||
- Docker engine installed (https://docs.docker.com/engine/install/ubuntu/) | ||
- Nvidia container toolkit installed (https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#installing-with-ap) | ||
|
||
## Build the container | ||
|
||
Build the LocalAI container for Nvidia ARM64 devices using the following command: | ||
|
||
```bash | ||
git clone https://github.com/mudler/LocalAI | ||
|
||
cd LocalAI | ||
|
||
docker build --build-arg SKIP_DRIVERS=true --build-arg BUILD_TYPE=cublas --build-arg BASE_IMAGE=nvcr.io/nvidia/l4t-jetpack:r36.4.0 --build-arg IMAGE_TYPE=core -t localai-orin . | ||
``` | ||
|
||
## Usage | ||
|
||
Run the LocalAI container on Nvidia ARM64 devices using the following command, where `/data/models` is the directory containing the models: | ||
|
||
```bash | ||
docker run -e DEBUG=true -p 8080:8080 -v /data/models:/build/models -ti --restart=always --name local-ai --runtime nvidia --gpus all localai-orin | ||
``` | ||
|
||
Note: `/data/models` is the directory containing the models. You can replace it with the directory containing your models. |
Submodule hugo-theme-relearn
updated
11 files
Oops, something went wrong.