Skip to content

和AR baseline的推理结果有diff #4

Closed

Description

@mZhenz

作者你好,请问你们有看过Qwen3-8b+Qwen3-8B-DFlash-b16和Qwen3-8b推理结果有没有diff吗,理论上,这两个推理结果应该没有区别吧?

我这边测出来加上Qwen3-8B-DFlash-b16之后,HumanEval和MBPP测试指标相较于裸推Qwen3-8b有明显掉点,并且推理结果也有不少diff,这个是符合预期的吗?

Activity

  1. jianc99 commented on Jan 14, 2026

    @jianc99
    Member

    Thanks for reporting this.

    In principle, the accuracy should be very similar. Please also check this PR for more details:
    sgl-project/sglang#16818

    In our own tests, we did observe that on some prompts the generation results can differ slightly, even under greedy decoding. We believe this is caused by numerical randomness introduced by the attention kernel. That said, we do not observe a significant accuracy drop overall—speculative decoding is theoretically lossless, so it should not degrade performance in expectation.

    Could you please share your test environment (hardware, CUDA / PyTorch versions) and the evaluation code or scripts you used? That would help us reproduce the issue and better understand the root cause.

  2. dcw02 commented on Jan 14, 2026

    @dcw02

    Yes outputs diverge on some prompts due to kernel differences, this is a known thing for other speculative decoding models as well. This also happens depending on concurrency/batch size for non speculative decoding!

  3. mZhenz commented on Jan 15, 2026

    @mZhenz
    Author

    感谢回复,
    diff和transformers版本有关,对齐transformers==4.57.3后指标没有diff了,使用transformers==5.0.0会有比较大的diff。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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