unbiased-strata is the engine plus a front end. Started normally it runs the front end, which starts a copy of itself as the engine (--engine) and talks to it over a pipe in the engine's own line protocol, as upstream's Python server does. The engine source is included unchanged; only its entry point is renamed at compile time. Tokenizer, Jinja chat template and HTTP library come from the pinned llama.cpp submodule. Endpoints: POST /v1/chat/completions (with streaming and reasoning_content), GET /v1/models, GET /health. Builds on the RTX 3090 pod. Not yet verified end to end. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
20 lines
967 B
Makefile
20 lines
967 B
Makefile
# UnbiasedStrata build. Needs CMake 3.24+, a C++20 compiler and the CUDA toolkit. Nothing is downloaded.
|
|
BUILD_DIR ?= build
|
|
# RTX 30 (86), RTX 40 (89) and RTX 50 (120) in one binary. sm_120 needs CUDA 12.8+, and upstream recommends 13.0+.
|
|
CUDA_ARCHS ?= 86;89;120
|
|
# capped: inside a container nproc reports the host's CPUs, not the container's quota
|
|
JOBS ?= $(shell n=$$(nproc 2>/dev/null || echo 4); [ $$n -gt 16 ] && n=16; echo $$n)
|
|
|
|
.PHONY: build clean
|
|
|
|
build:
|
|
@test -f third_party/llama.cpp/ggml/CMakeLists.txt || \
|
|
{ echo "third_party/llama.cpp is empty: run 'git submodule update --init' first"; exit 1; }
|
|
cmake -S . -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_CUDA=ON -DSTRATA_NATIVE_EXPERTS=ON \
|
|
-DSTRATA_PORTABLE=ON -DSTRATA_BUILD_TESTS=OFF "-DCMAKE_CUDA_ARCHITECTURES=$(CUDA_ARCHS)"
|
|
cmake --build $(BUILD_DIR) -j $(JOBS) --target unbiased-strata
|
|
@echo "built: $(BUILD_DIR)/unbiased-strata"
|
|
|
|
clean:
|
|
rm -rf $(BUILD_DIR)
|