UltraRAG icon indicating copy to clipboard operation
UltraRAG copied to clipboard

Output is truncated in Vanilla RAG

Open alex-l-zhou opened this issue 1 year ago • 2 comments

Describe the bug When I chat with Vanilla RAG, the LLM's responses are truncated.

  1. I tried modifying ./resource/models/MiniCPM3-4B/config.json/max_position_embeddings to 13088 (the maximum my GPU allows, 3090 24G), but it didn't work.
  2. Also tried modifying ./ultrarag/modules/llm/vllm_like.py's max_tokens on line 61 to a larger number, but it also didn't work.
  3. 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:

  1. Call python scripts/download_models.py
  2. Invoke webUI
  3. Under "Model Manage" → "Select LLM Model", select "Custom". Under "Model Path", enter "./resource/models/MiniCPM3-4B".
  4. The rest follows the video on README.md.

Expected behavior Vanilla RAG generates responses that aren't truncated.

Screenshots Image

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.

alex-l-zhou avatar Jan 26 '25 19:01 alex-l-zhou

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 avatar Jan 26 '25 20:01 ChenYX24

@ChenYX24 thank you, the issue is solved.

alex-l-zhou avatar Jan 27 '25 06:01 alex-l-zhou