Skip to content

[Kunlunxin] Fix duplicate generation - #324

Open
0songHan wants to merge 2 commits into
flagos-ai:v0.1.0from
0songHan:fix/kunlunxin-duplicate-generation
Open

[Kunlunxin] Fix duplicate generation#324
0songHan wants to merge 2 commits into
flagos-ai:v0.1.0from
0songHan:fix/kunlunxin-duplicate-generation

Conversation

@0songHan

Copy link
Copy Markdown

PR Category

Vendor

PR Type

Bug Fixes

Description

Fix duplicate / garbled generation during multi-card inference on Kunlunxin.

The issue was caused by TP-inconsistent random sampling, which could lead to different tensor-parallel ranks selecting different next tokens and eventually producing duplicated or garbled outputs. This PR ensures TP-consistent random sampling on Kunlunxin.

Related Issues

N/A

Changes

  • Fix TP-consistent random sampling on Kunlunxin.
  • Resolve duplicate / garbled generation during multi-card inference.

Testing

Validated on the following models with multi-card inference:

  • Qwen3.6-27B
  • Qwen3.5-35B-A3B

Checklist

  • I have run the existing tests and they pass
  • I have added tests for my changes (if applicable)
  • I have updated the documentation (if applicable)

0songHan and others added 2 commits July 27, 2026 12:05
Remove docstring explaining TP-consistent sampling issue on Kunlunxin XPU.
@github-actions github-actions Bot added the core label Jul 29, 2026
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


0songHan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants