Repository navigation
logs : reduce - #23021
logs : reduce#23021
Conversation
| if (!is_resume) { | ||
| mtmd_helper_log_set(common_log_default_callback, nullptr); | ||
| } |
There was a problem hiding this comment.
@ngxson Wasn't sure what is the intent here of gating this with is_resume. I just moved the mtmd log initialization to the constructor server_context_impl(). Please confirm this is OK.
There was a problem hiding this comment.
the reason why it's gated was because mtmd_helper_log_set is not thread-safe, so it should only be called once when the program starts.
although, there is another way, you can call mtmd_helper_log_set unconditionally in server_context_impl::init() function
|
@ggml-org/maintainers After this change the server logs will be quite reduced by default. You can easily go back to the old amount of logs if you are used to them by adding |
pwilkin
left a comment
There was a problem hiding this comment.
Good change, I like the added verbosity levels. Previously it was really hard to find a balance between standard mode that hid a lot of things and verbose mode that spammed tons of info on every token generated.
| server_context_impl() { | ||
| mtmd_helper_log_set(common_log_default_callback, nullptr); | ||
| } | ||
|
|
- Opt-in flag that surfaces the per-device free-memory probe table (currently TRACE-only after ggml-org#23021) at INFO when set; default off.
* logs : reduce * args : fix envs * server : fix build * common : print verbosity level at start * server : clean-up logs * server : print prompt processing timings + sampling params * minor : whitespaces
ggml_check_sycl()'s "Running with Environment Variables:" block has produced no output since 2026-05-14 and the cause is neither of the two obvious ones. It IS called on the registry path (ggml_backend_dev_init -> ggml_backend_sycl_device_init -> ggml_backend_sycl_init -> ggml_check_sycl), and it runs after the log callback is installed. The block executes; the output is then discarded. ROOT CAUSE, AND IT IS NOT A SYCL BUG. Upstream 67b2b7f ("logs : reduce", ggml-org#23021) made common_get_verbosity() in common/log.cpp map GGML_LOG_LEVEL_INFO to LOG_LEVEL_TRACE (4), while common_log_verbosity_thold defaults to LOG_DEFAULT_LLAMA = LOG_LEVEL_INFO (3). common_log_default_callback then tests 4 <= 3, which is false, so it drops EVERY library and backend GGML_LOG_INFO line at default verbosity. This silently affects every backend's init output, not just SYCL: "Found N SYCL devices:" went dark on the same commit, as did llama.cpp's own llama_model_loader: and print_info: lines. Anyone debugging "my backend prints nothing at startup" on CUDA, Vulkan or Metal is looking at the same mechanism. Verified by running the same Mistral gate twice. With default flags the run shows 58 seconds of model loading with zero library output; adding -v to the identical command brings all of it back, env block included. The one SYCL line that survives (GGML_SYCL_F16 build:) carries no timestamp prefix because it is a raw fprintf in fattn.cpp, bypassing the log system entirely. This also explains why a `llama-bench -v` run showed nothing either: -v there only suppresses llama-bench's own null log callback, it never raises common_log_verbosity_thold, so common_log_default_callback still filters. Adding a WARN line naming only the settings whose parsed value is non-default. WARN (2) clears the default threshold; a stock run prints nothing extra, so benchmark output and existing log captures are unchanged (diffed against a pre-change capture: identical modulo timings). Values are read back from the parsed g_ggml_sycl_* globals rather than getenv, so a misspelled variable is correctly absent instead of being echoed back as if it had taken effect -- which would deepen the very ambiguity this fixes. The INFO table is left alone. It is correct code, -v-only like the rest of the backend banners; promoting 25 lines of SYCL-specific output above the threshold while llama.cpp's own model info stays hidden would be noise and a gratuitous divergence from upstream log policy. The gate is a RUNTIME test, not a source assertion: the reporting code was present and correct the whole time and only its output vanished, which no source assertion can see. test-sycl-env-report installs a capturing ggml_log_set callback before the first init (the static `initialized` guard gives no second chance), drives the real registry -> dev_init path, and asserts the report both names the variable that was set and does NOT name one left at its default -- the negative half is what stops a report that printed everything unconditionally from passing. Labelled sycl;env, deliberately not cache/mem-handle/residency, which the throttled sweep excludes; pinned to level_zero:1 so a bare ctest stays off the measurement card. Refs: llama.cpp-5bd8 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01EHYpYxXNwtkx2t8dQJNumx
* logs : reduce * args : fix envs * server : fix build * common : print verbosity level at start * server : clean-up logs * server : print prompt processing timings + sampling params * minor : whitespaces
* logs : reduce * args : fix envs * server : fix build * common : print verbosity level at start * server : clean-up logs * server : print prompt processing timings + sampling params * minor : whitespaces
Unverified placement now fails. From llama.cpp b9151 the "offloaded N/M layers to GPU", buffer and fit lines are logged at verbosity 4 (trace), not the default 3 (ggml-org/llama.cpp#23021). b9360+ reads the threshold from LLAMA_ARG_LOG_VERBOSITY (#23778). A pin bump to b11146/v0.5.0 would have turned every host's check into "unknown", which passed. - ods doctor: a loaded ODS-managed GPU llama-server whose load log states no placement is "unverified": a blocker (ODS-LLM-GPU-PLACEMENT-UNVERIFIED), exit 1. Lemonade, external LLMs, CPU-only installs and a missing log are skipped. A rotated-out load section stays a warning, and so does a load still in progress. - docker-compose.base.yml passes LLAMA_ARG_LOG_VERBOSITY=4. b9014 ignores the name and prints placement at its default. Captured on tower2: b11146 at 4 prints placement and logs about as many lines per request as b9014 does at its default. - tests/contracts/test-llama-placement-log.py: every pinned llama.cpp build must have a captured load log that the doctor parser reads. The host agent's parser is checked too once it exists. Moving a pin fails CI until a log from the new build is captured and parsed; b9151+ also needs the verbosity wiring, and native pins need -lv 4. Wired into test-linux.yml with the residency tests, which CI did not run before. - Dashboard: an unverified placement from a loaded container/native server is shown as "GPU placement unverified", drops "Fits GPU" and is not recorded as GPU speed. Fix advice follows llama.cpp's own fit numbers. On the idle 8 GB laptop (6492 MiB needed, 6860 MiB free, 1024 MiB default margin) doctor and the Models page no longer say to close GPU apps. They say to reload the model (ODS re-fits it) or set LLAMA_ARG_FIT_TARGET=512 / LLAMA_ARG_UBATCH=256. "Free memory or shrink" advice is kept for a GPU that really is full. "Reload on GPU" in the context dialog sends {"reload": true}, which activates the running model again instead of returning already_active. MoE expert overflow and CPU KV with every layer on the GPU no longer read "Model partly on CPU (49/49 layers on GPU)". Co-Authored-By: Claude Opus 5.5 <[email protected]>
Unverified placement now fails. From llama.cpp b9151 the "offloaded N/M layers to GPU", buffer and fit lines are logged at verbosity 4 (trace), not the default 3 (ggml-org/llama.cpp#23021). b9360+ reads the threshold from LLAMA_ARG_LOG_VERBOSITY (#23778). A pin bump to b11146/v0.5.0 would have turned every host's check into "unknown", which passed. - ods doctor: a loaded ODS-managed GPU llama-server whose load log states no placement is "unverified": a blocker (ODS-LLM-GPU-PLACEMENT-UNVERIFIED), exit 1. Lemonade, external LLMs, CPU-only installs and a missing log are skipped. A rotated-out load section stays a warning, and so does a load still in progress. - docker-compose.base.yml passes LLAMA_ARG_LOG_VERBOSITY=4. b9014 ignores the name and prints placement at its default. Captured on tower2: b11146 at 4 prints placement and logs about as many lines per request as b9014 does at its default. - tests/contracts/test-llama-placement-log.py: every pinned llama.cpp build must have a captured load log that the doctor parser reads. The host agent's parser is checked too once it exists. Moving a pin fails CI until a log from the new build is captured and parsed; b9151+ also needs the verbosity wiring, and native pins need -lv 4. Wired into test-linux.yml with the residency tests, which CI did not run before. - Dashboard: an unverified placement from a loaded container/native server is shown as "GPU placement unverified", drops "Fits GPU" and is not recorded as GPU speed. Fix advice follows llama.cpp's own fit numbers. On the idle 8 GB laptop (6492 MiB needed, 6860 MiB free, 1024 MiB default margin) doctor and the Models page no longer say to close GPU apps. They say to reload the model (ODS re-fits it) or set LLAMA_ARG_FIT_TARGET=512 / LLAMA_ARG_UBATCH=256. "Free memory or shrink" advice is kept for a GPU that really is full. "Reload on GPU" in the context dialog sends {"reload": true}, which activates the running model again instead of returning already_active. MoE expert overflow and CPU KV with every layer on the GPU no longer read "Model partly on CPU (49/49 layers on GPU)". Co-Authored-By: Claude Opus 5.5 <[email protected]>
Overview
Reducing the amount of logs that we print by default. Feedback is welcome about what to remove further and what to keep.
Additional information
LOG_LEVEL_TRACE = 4LOG_LEVEL_DEBUGfrom 4 to 5INFOlogs coming fromlibllama,libmtmdandlibggml*toLOG_LEVEL_TRACElibcommonaccordinglyThe old level of logging can be enabled by adding
-lv 4to the CLI args.Requirements