[Bugfix][Qwen3-TTS] Handle codec generations that exhaust their token budget (#6728)
Signed-off-by: Sy03 <1370724210@qq.com>
This commit is contained in:
14 files changed
+551
-43
No files matched your search
@@ -1,4 +1,5 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
"""Unit tests for speech token-usage accounting (issue #4646).
|
||||
|
||||
These exercise the pure usage logic without a model/server: input-token
|
||||
@@ -205,6 +206,14 @@ def test_output_tokens_from_stage_metrics():
|
||||
assert acc.total() == 77
|
||||
|
||||
|
||||
def test_output_tokens_preserves_stage0_finish_reason():
|
||||
acc = SpeechOutputTokenCounter()
|
||||
res = _final_res(stage0_out=128)
|
||||
res.metrics["stage_metrics"]["0"]["finish_reason"] = "length"
|
||||
acc.observe(res)
|
||||
assert acc.stage0_finish_reason == "length"
|
||||
|
||||
|
||||
def test_output_tokens_takes_max_across_stages():
|
||||
acc = SpeechOutputTokenCounter()
|
||||
acc.observe(_final_res(stage0_out=42, stage1_out=0))
|
||||
|
||||
Reference in new issue
Block a user