unsloth/studio/backend/core
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
..
data_recipe Improve AI Assist: Update default model, model output parsing, logging, and dataset mapping UX (#4323) 2026-03-16 16:04:35 +04:00
export Final cleanup 2026-03-12 18:28:04 +00:00
inference studio: optimize llama.cpp build with static linking, ccache, ninja 2026-03-16 14:15:14 +00:00
training studio: training progress visibility + deferred llama.cpp compilation 2026-03-16 14:02:20 +00:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00