mlc-ai / mlc-llm

Universal LLM Deployment Engine with ML Compilation
https://llm.mlc.ai/
Apache License 2.0
19.08k stars 1.56k forks source link

[Bug] chatModule.resetChat() not always work well on iOS and Llama 2 #1267

Closed ruiba168 closed 11 months ago

ruiba168 commented 11 months ago

🐛 Bug

chatModule.resetChat() is used to clear session info. If i call chatModule.resetChat() before every prefill call, previous prompt should not influent next round's out. But i found if i keep do prefill/decode/resetChat about 10-20 round later, sound resetChat() didn't reset it well, the decoded result will try to answer previous prompt and current prompt together

To Reproduce

Steps to reproduce the behavior:

  1. Just use MLCChat iOS app to do test

Expected behavior

Environment

Additional context

tqchen commented 11 months ago

Thank you for reporting this. do you mind to try and see if we can also reproduce this behavior through python API? This would help us better diagnose potential issues(as python api and iOS uses the same backend impl).

davidpissarra commented 11 months ago

Hi @ruiba168, any updates? Can you share some concrete steps on how to reproduce the issue you are facing, so I can follow up on this? Thanks a lot!