Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Conversation

@nlpfollower
Copy link

Seems like we should yield the cur_token/next_token when it's an eos or eot so that it is included in the generator_func in chat. Also this way start_pos is incremented to an empty position in the cache. Repro similar to #1462, although there is no visible response degradation.

I've pushed logs from my trace (nlpfollower#2). You can see how without this yield the first id in the input_pos at the beginning of a round overlaps, and overwrites, the last cache entry made in the previous turn.

@pytorch-bot
Copy link

pytorch-bot bot commented Jan 23, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/torchchat/1474

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit aef0b8b with merge base 42c52bf (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 23, 2025
@Jack-Khuu
Copy link
Contributor

Thanks for another fix; I'll try to verify over the weekend

Copy link
Contributor

@Jack-Khuu Jack-Khuu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guts says this is legit, I'll give it another look

@Jack-Khuu Jack-Khuu merged commit 53a1004 into pytorch:main Feb 7, 2025
62 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants