litgpt icon indicating copy to clipboard operation
litgpt copied to clipboard

litgpt chat converts the prompt I give it to all lower case before feeding it to the model I am chatting with

Open drwslacy47 opened this issue 1 month ago • 2 comments

Bug description

When I use litgpt chat, I am observing that it converts the prompt I provide to all lowercase before feeding it to the model I am chatting with.

The line of code where this happens is here.

Converting a prompt to all lowercase seems like very undesirable behavior because it can affect the model response and it is undermining the intent of the user. I see no reason why this should be happening.

So, this looks like a bug to me. Looking at the code, I suspect it might be an unintentional side-effect of doing a conversion to detect special "end-of-prompt" strings such as "!submit", "!quit", "!exit".

Reproduced in studio

No response

What operating system are you using?

Linux

LitGPT Version

pip show litgpt | grep Version: Version: 0.5.11

drwslacy47 avatar Nov 06 '25 05:11 drwslacy47

yeah, agreed @drwslacy47 — definitely seems unintended. Would you be interested in opening a quick PR to fix this?

bhimrazy avatar Nov 06 '25 06:11 bhimrazy

@bhimrazy: Thanks for looking at this and putting together the fix!

drwslacy47 avatar Nov 08 '25 20:11 drwslacy47

Fixed by #2155

bhimrazy avatar Nov 20 '25 07:11 bhimrazy