Skip to content

cmake : llguidance build parser library only #14608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2025

Conversation

EZForever
Copy link
Contributor

@EZForever EZForever commented Jul 10, 2025

The LLGuidance repo contains a lot of stuffs, while the parser library we care about (libllguidance.a and llguidance.h) is only a small portion of it, under parser directory as per project README, thus building the whole project when building llama.cpp is unnecessary and a waste of time and compute power. This PR instructs CMake to only build the parser library, which cuts the number of compiled Rust packages from ~300 to 75, and provides a ~40% overall build speed increase.

Tested with a GitHub Codespace with 2 vCPUs, 8GB RAM, and llama.cpp b5857 with default CMake config (cmake . -B build -DLLAMA_LLGUIDANCE=ON && time cmake --build build -j $(nproc)):

Before (b5857):

real    11m3.258s
user    17m34.982s
sys     1m11.124s

After (this PR):

real    6m38.164s
user    10m23.589s
sys     0m41.985s

@EZForever
Copy link
Contributor Author

The failed macOS check seems to have nothing to do with this PR.

@ggerganov ggerganov merged commit ac44eb6 into ggml-org:master Jul 10, 2025
47 of 48 checks passed
gabe-l-hart added a commit to gabe-l-hart/llama.cpp that referenced this pull request Jul 10, 2025
* origin/master:
cmake : do not search for curl libraries by ourselves (ggml-org#14613)
SYCL: Initial set_rows kernel implementation (ggml-org#14562)
llama : minor coding style fix for smollm3 (ggml-org#14605)
cmake : bump llguidance version to v1.0.1 (ggml-org#14609)
cmake : llguidance build parser library only (ggml-org#14608)
cuda : support Falcon-H1 state size for SSM_SCAN (ggml-org#14602)

Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants