Skip to content

Input Chinese Its talk with itself #843

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
huanxiang666 opened this issue Apr 8, 2023 · 11 comments
Closed

Input Chinese Its talk with itself #843

huanxiang666 opened this issue Apr 8, 2023 · 11 comments
Labels

Comments

@huanxiang666
Copy link

image
When I use Chinese
Its will talk with itself

@huanxiang666
Copy link
Author

你好 means Hello in English
It will output another message

@Belluxx
Copy link

Belluxx commented Apr 8, 2023

To fix this, there should be an option to choose a text that must be added at the end of the user input.
In this cause we should append \n### Assistant: so that the context is ready for a reply, this would also fix the chat escape that sometimes happens.

However nobody mentioned this in the past so i don't know if it will be added as a feature.

@yjlcoder
Copy link

yjlcoder commented Apr 8, 2023

@Belluxx 's answer is correct.

Here is my setup. In my initial prompt, I ask the bot to enter a new line and print "### Human:" after the response. In the interactive mode, I normally manually input "\ <new_line> ### Assistant:" to the end so the assistant could take over the control.

For a chatgpt-like experience:

./prompts/chatgpt.txt:

### Human: Let's start a chat between a curious human and an artificial intelligence assistant.
The assistant gives helpful, detailed, and polite answers to the human's questions.
The response should be concise and should focus on the topic human bring up. Don't include other topics.
After the response, the assistant should create a new line and print "### Human:" to pass the control to human.
### Assitant: Sure, I'm ready to assist you with any questions or topics you have in mind.
### Human:

command

./main -m <model_path> -t 6 -c 2048 -n 2048 --color -i -n -1 --reverse-prompt '### Human:' -f prompts/chatgpt.txt

@huanxiang666
Copy link
Author

image

@huanxiang666
Copy link
Author

But I use Chinese ,\n###
Its still talk with itself
You can try send “你好”

@huanxiang666
Copy link
Author

image

@Belluxx
Copy link

Belluxx commented Apr 10, 2023

Try to write the chinese prompt, then before pressing "enter" append a \. Then press enter and then add ### Assistant: and press enter again

@yjlcoder
Copy link

I suggest you start the conversation with something like informative question or practical instruction. If you are using original LLama, you should know it's not fine-tuned for ChatGPT-like question-and-answer style conversations but for simply completing the text based on the context.

There are fine-tuned models such as Alpaca or Vicuna (the model I use in the screenshot). Note that the outcome of Chinese conversations is still weaker / less ideal compared to English ones. For Chinese specific model, you can start by looking into Chinese-LLaAMA-Alpaca or ChatGLM-6B.

Btw, "\n" stands for a new line, not meaning you need to manually type "\n" in the console.

Screenshot from 2023-04-09 19-36-59

@ivanstepanovftw
Copy link
Collaborator

Adapt prompt itself, translate it to CN and try again.

@patrakov
Copy link

This is likely a special case of #667

@github-actions github-actions bot added the stale label Mar 25, 2024
Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants