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: llamacpp/native/README.md
+8-18Lines changed: 8 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# Native llama-server
2
2
3
+
This project builds the upstream llama.cpp server (`llama-server`) directly from the llama.cpp submodule and renames it to `com.docker.llama-server`.
4
+
3
5
## Building
4
6
5
7
cmake -B build
@@ -15,7 +17,7 @@
15
17
16
18
This project uses llama.cpp as a git submodule located at `vendor/llama.cpp`, which points to the official llama.cpp repository at https://github.com/ggml-org/llama.cpp.git.
17
19
18
-
The project applies custom patches to llama.cpp's server implementation (`server.cpp` and `utils.hpp`) to integrate with the Docker model-runner architecture. These patches are maintained in `src/server/server.patch`.
20
+
We build the upstream `llama-server` binary directly without any modifications.
19
21
20
22
### Prerequisites
21
23
@@ -45,32 +47,20 @@ If the submodule is already initialized, this command is safe to run and will en
45
47
popd
46
48
```
47
49
48
-
3.**Apply the custom llama-server patch:**
50
+
3.**Build and test:**
49
51
50
52
```bash
51
-
make -C src/server clean
52
-
make -C src/server
53
-
```
54
-
55
-
This will:
56
-
- Clean the previous patched files
57
-
- Copy the new `server.cpp` and `utils.hpp` from the updated llama.cpp
58
-
- Apply our custom patches from `src/server/server.patch`
59
-
60
-
4.**Build and test:**
53
+
# Build from the native directory
54
+
cmake -B build
55
+
cmake --build build --parallel 8 --config Release
61
56
62
-
```bash
63
-
# Build from the native directory
64
-
cmake -B build
65
-
cmake --build build --parallel 8 --config Release
66
-
67
57
# Test the build
68
58
./build/bin/com.docker.llama-server --model <path to model>
69
59
```
70
60
71
61
Make sure everything builds cleanly without errors.
0 commit comments