unsloth/studio/backend
Daniel Han d7a78599e6 studio: optimize llama.cpp build with static linking, ccache, ninja
Benchmarked BUILD_SHARED_LIBS ON vs OFF:
- Build time identical (~55s both on 192-core B200)
- Static: 75MB self-contained binary, no LD_LIBRARY_PATH needed
- Shared: 7.4MB + .so deps, needs lib path management
- Both work correctly

Optimizations applied to LlamaCppBuilder:
- BUILD_SHARED_LIBS=OFF: static binary, simpler deployment
- ccache: 27x faster rebuilds (55s -> 2s with warm cache)
- Ninja generator: parallel builds
- CMAKE_CUDA_ARCHITECTURES: build only for detected GPU arch
- CMAKE_CUDA_FLAGS=--threads=0: multi-threaded CUDA compilation
- GGML_NATIVE=ON: native CPU optimizations
- LLAMA_BUILD_TESTS=OFF, LLAMA_BUILD_EXAMPLES=OFF: skip unused targets
- LLAMA_BUILD_SERVER=ON: build only what we need
2026-03-16 14:15:14 +00:00
..
assets studio: per-model inference defaults, GGUF slider fix, reasoning toggle (#4325) 2026-03-16 06:37:55 -07:00
auth fix: remove old comments (#4292) 2026-03-14 16:50:13 +04:00
core studio: optimize llama.cpp build with static linking, ccache, ninja 2026-03-16 14:15:14 +00:00
loggers Final cleanup 2026-03-12 18:28:04 +00:00
models studio: per-model inference defaults, GGUF slider fix, reasoning toggle (#4325) 2026-03-16 06:37:55 -07:00
plugins Final cleanup 2026-03-12 18:28:04 +00:00
requirements fix: remove old comments (#4292) 2026-03-14 16:50:13 +04:00
routes [pre-commit.ci] auto fixes from pre-commit.com hooks 2026-03-16 14:02:50 +00:00
state Final cleanup 2026-03-12 18:28:04 +00:00
tests fix(seed): disable remote code execution in seed inspect dataset loads (#4275) 2026-03-13 19:37:43 +04:00
utils [pre-commit.ci] auto fixes from pre-commit.com hooks 2026-03-16 14:02:50 +00:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
colab.py Final cleanup 2026-03-12 18:28:04 +00:00
main.py studio: training progress visibility + deferred llama.cpp compilation 2026-03-16 14:02:20 +00:00
run.py fix: Ctrl+C not terminating backend on Linux (#4316) 2026-03-16 11:58:09 +04:00