Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ git clone --recurse-submodules https://github.com/ServeurpersoCom/qwentts.cpp.gi
cd qwentts.cpp
./buildcuda.sh # NVIDIA GPU
./buildvulkan.sh # AMD/Intel GPU (Vulkan)
./buildmetal.sh # Apple GPU (Metal + BLAS), shared lib too
./buildcpu.sh # CPU only
./buildall.sh # all backends, runtime DL loading
NVCC_CCBIN=g++-13 ./buildcuda.sh # rolling release distros (Arch w/ GCC 16, etc.)
Expand Down Expand Up @@ -203,6 +204,8 @@ only the `qt_*` symbols ; every internal `pipeline_*` and `backend_*`
stays hidden inside the .so. The static `libqwen-core.a` is the default
build artefact and the one the bundled CLI tools link against.

`./buildmetal.sh` passes the flag ; the other build scripts do not.

See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the model, the
GGUF layout, the inference pipeline, every CLI flag, the public API
reference and the validation results.
Expand Down
12 changes: 12 additions & 0 deletions buildmetal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# Apple GPU build. The GGML flags are the macOS platform defaults, pinned
# so the recipe stands on its own. QWEN_SHARED=ON is the addition : it also
# emits libqwen.dylib, the shared target binding consumers (ctypes, bindgen,
# cgo) dlopen. The other recipes keep the static-only default.

rm -rf build
mkdir build
cd build

cmake .. -DGGML_METAL=ON -DGGML_METAL_EMBED_LIBRARY=ON -DGGML_BLAS=ON -DQWEN_SHARED=ON
cmake --build . --config Release -j "$(getconf _NPROCESSORS_ONLN)"
4 changes: 3 additions & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ git clone --recurse-submodules https://github.com/ServeurpersoCom/qwentts.cpp.gi
cd qwentts.cpp
./buildcuda.sh # NVIDIA GPU
./buildvulkan.sh # AMD/Intel GPU (Vulkan)
./buildmetal.sh # Apple GPU (Metal + BLAS), shared lib too
./buildcpu.sh # CPU only
./buildall.sh # all backends, runtime DL loading
```
Expand Down Expand Up @@ -530,7 +531,8 @@ The static `libqwen-core.a` is the default artefact and the one the CLI
tools link. For binding consumers, configure with `-DQWEN_SHARED=ON` to
add `libqwen.so` (or `.dll` / `.dylib`) exporting only the `qt_*`
symbols ; every internal `pipeline_*` and `backend_*` stays hidden
behind `-fvisibility=hidden`.
behind `-fvisibility=hidden`. `./buildmetal.sh` is the one build script
that configures the option in.

## CLI tools

Expand Down