janhq / jan

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer. Multiple engine support (llama.cpp, TensorRT-LLM)
https://jan.ai/
GNU Affero General Public License v3.0
22.02k stars 1.26k forks source link

bug: What's wrong with `tinyllama-1.1b`? #3288

Closed imtuyethan closed 1 week ago

imtuyethan commented 1 month ago
  1. Start the first conversation in Jan
  2. Choose tinyllama-1.1b
  3. It started generating nonsense. What's wrong with tinyllama-1.1b? Is it because of the model or because of our configuration?

https://github.com/user-attachments/assets/f8a6eed0-58fd-4a1a-a779-3e7ad5e75675

Van-QA commented 2 weeks ago

Need to review the stop token and promt template.

nguyenhoangthuan99 commented 2 weeks ago
  1. Currently we are using this chat template: <|system|>\n{system_message}<|user|>\n{prompt}<|assistant|>, but when I use jinja2 tool to render chat template from source it should look like this \n\n<|system|>\n{system_message}</s>\n\n\n\n\n<|user|>\n{prompt}</s>\n\n\n<|assistant|>\n\n.
  2. I updated it in our repo. And test again but it still generate answer not related to question.

Image

I used model from above source with the correct prompt template + stop token, it still have buggy answer. I think this bug can be caused by model's quality.

Image

0xSage commented 1 week ago

thanks for the thorough investigation @nguyenhoangthuan99 🙏 closing as its likely a tinyllama quality issue at this point.