Skip to content

[Bug] SDAR模型推理 #4052

@Auraithm

Description

@Auraithm

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug

你好,感谢你们的杰出工作!我观察到你们目前已经支持了DLLM类型的SDAR模型的推理加速,但是我想知道是否能够支持返回解码的顺序?我注意到如果我尝试使用流式输出,返回的东西并不是我期望的,比如说block=4,denoising_step=4,如果是动态采样那每步应该最多输出4个token,但是实际测试远高于此,静态采样也是如此,或许目前尚不支持此方法?我目前的需求是获得模型每步解码的token,或者每个token解码的步骤。

Reproduction

我按照流式输出并解码每个token,可以看到每次的输出的数量似乎并不符合预期

['To', ' find', ' the', ' minimum', ' value', ' of', ' the', ' function']
[' $', 'f', '(x', ')']
[' =', ' \\', 'frac', '{', '4', 'x', '^', '2', ' -', ' ', '4', 'x', ' +', ' ', '4', '}{']
['x', '^', '2', ' +', ' ', '2', 'x', ' +', ' ', '4', '}$', ',']
[' we', ' start', ' by', ' simpl', 'ifying', ' the', ' expression', '.']
[' We', ' can', ' rewrite', ' the']
[' numerator', ' and', ' the', ' denominator']
[' in', ' a', ' more', ' convenient']
[' form', '.\n\n', 'First', ',', ' let', "'s", ' rewrite', ' the']
[' numerator', ' and', ' the', ' denominator', ':\n', '$$', '\n', '4', 'x', '^', '2', ' -']
[' ', '4', 'x', ' +', ' ', '4', ' =', ' ', '4', '(x', '^', '2']
[' -', ' x', ' +', ' ']
['1', ')\n', '$$', '\n', '$$', '\n', 'x', '^', '2', ' +', ' ', '2', 'x', ' +', ' ', '4']
[' =', ' (', 'x', ' +', ' ', '1', ')^', '2']
[' +', ' ', '3', '\n']
['$$', '\n\n', 'Now', ',', ' let', "'s", ' rewrite', ' the']
[' function', ' $', 'f', '(x']
[')$', ':\n', '$$', '\n']
['f', '(x', ')', ' =', ' \\', 'frac', '{', '4', '(x', '^', '2', ' -', ' x', ' +', ' ', '1']
[')}', '{(', 'x', ' +', ' ', '1', ')^', '2']
[' +', ' ', '3', '}\n']
['$$', '\n\n', 'Next', ',', ' we', ' will', ' use', ' calculus']
[' to', ' find', ' the', ' critical', ' points', ' of', ' $', 'f']
['(x', ')', '$.', ' We', ' start', ' by', ' finding', ' the']
[' derivative', ' of', ' $', 'f', '(x', ')$', ' using', ' the']
[' quotient', ' rule', '.', ' The']
[' quotient', ' rule', ' states', ' that', ' if', ' $', 'f', '(x', ')', ' =', ' \\', 'frac']
['{', 'g', '(x', ')}', '{', 'h', '(x', ')}']
['$,', ' then', ':\n', '$$']
['\n', 'f', "'(", 'x', ')', ' =', ' \\', 'frac', '{', 'g', "'(", 'x', ')', 'h', '(x', ')']
[' -', ' g', '(x', ')', 'h', "'(", 'x', ')}']
['{', '[', 'h', '(x']
[')]', '^', '2', '}\n', '$$', '\n\n', 'Here', ',', ' $', 'g', '(x', ')', ' =', ' ', '4', '(x']
['^', '2', ' -', ' x', ' +', ' ', '1', ')$', ' and', ' $', 'h', '(x']
[')', ' =', ' (', 'x']
[' +', ' ', '1', ')^', '2', ' +', ' ', '3', '$.', ' We', ' need', ' to']
[' find', ' $', 'g', "'(", 'x', ')$', ' and', ' $', 'h', "'(", 'x', ')$']
[':\n', '$$', '\n', 'g', "'(", 'x', ')', ' =', ' ', '4', '(', '2', 'x', ' -', ' ', '1']
[')', ' =', ' ', '8', 'x', ' -', ' ', '4', '\n', '$$', '\n', '$$']
['\n', 'h', "'(", 'x']

Environment

lmdeploy最新版

Error traceback

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions