Output is truncated in Vanilla RAG
Describe the bug When I chat with Vanilla RAG, the LLM's responses are truncated.
- I tried modifying
./resource/models/MiniCPM3-4B/config.json/max_position_embeddingsto 13088 (the maximum my GPU allows, 3090 24G), but it didn't work. - Also tried modifying
./ultrarag/modules/llm/vllm_like.py'smax_tokenson line 61 to a larger number, but it also didn't work. - I thought it could be an issue with vLLM, but when I checked their repo I couldn't find an answer.
To Reproduce Steps to reproduce the behavior:
- Call
python scripts/download_models.py - Invoke webUI
- Under "Model Manage" → "Select LLM Model", select "Custom". Under "Model Path", enter "./resource/models/MiniCPM3-4B".
- The rest follows the video on README.md.
Expected behavior Vanilla RAG generates responses that aren't truncated.
Screenshots
Desktop (please complete the following information):
- OS: Ubuntu 22.04.5 LTS
- Browser: Firefox 134.0
This might be a dumb question, but I'm at my wit's end :( Please let me know if more information needs to be provided.
Thanks for your detailed report! The issue with max_tokens on line 61 not working is because the webUI calls the arun function (even though streaming output isn’t supported yet). To fix this, we’ve supplemented the relevant parameters and updated the default max_tokens value to 1024. Let me know if this resolves your issue!
@ChenYX24 thank you, the issue is solved.