Skip to content

fix: change debug log from ERROR to DEBUG in RepetitionPenaltyKernel#4363

Merged
lvhan028 merged 1 commit intoInternLM:mainfrom
murray-macdonald:fix/remove-smem-error-log
Feb 24, 2026
Merged

fix: change debug log from ERROR to DEBUG in RepetitionPenaltyKernel#4363
lvhan028 merged 1 commit intoInternLM:mainfrom
murray-macdonald:fix/remove-smem-error-log

Conversation

@murray-macdonald
Copy link
Contributor

Problem

The TM_LOG_ERROR call in ApplyRepetitionPenalty() (line 190 of sampling_penalty_kernels.cu) reports the shared memory allocation size on every invocation during inference. This produces excessive console spam:

[TM][ERROR] smem_size = 1024 [TM][ERROR] smem_size = 1024 [TM][ERROR] smem_size = 1024 ...

This message fires once per token generation step and is not an error condition the value (e.g., 1024 bytes for an ~8K vocabulary bitmask) is a perfectly normal shared memory allocation well within GPU limits.

Impact

  • Floods the console during inference, making it difficult to spot real errors
  • Confuses users who see [ERROR] and assume something is wrong
  • Particularly visible in downstream projects like Soprano TTS which use lmdeploy as a backend

Fix

One-line change: TM_LOG_ERROR TM_LOG_DEBUG

This preserves the diagnostic information for developers who enable debug logging while keeping the console clean at default log levels.

The TM_LOG_ERROR call in ApplyRepetitionPenalty() reports the shared
memory allocation size (smem_size) on every invocation. This is a
diagnostic message, not an error condition  the value is always a
normal allocation (e.g. 1024 bytes for an ~8K vocabulary bitmask),
well within GPU limits.

This causes excessive '[TM][ERROR] smem_size = 1024' console spam
during inference, which is confusing to users and drowns out real
error messages. Changing to TM_LOG_DEBUG preserves the diagnostic
for developers while keeping the console clean at default log levels.
@lvhan028 lvhan028 merged commit 182627a into InternLM:main Feb 24, 2026
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants