LostRuins / koboldcpp

Run GGUF models easily with a KoboldAI UI. One File. Zero Install.
https://github.com/lostruins/koboldcpp
GNU Affero General Public License v3.0
5.27k stars 360 forks source link

\n does not function as a stop token #182

Closed AlphaAtlas closed 1 year ago

AlphaAtlas commented 1 year ago

Even though this was added as a feature here: https://github.com/LostRuins/koboldcpp/issues/38

Newline doesn't seem to be working as a stop token for me, as seen here:

Input: {"n": 1, "max_context_length": 1024, "max_length": 6, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n<|user|>: Hello, who are you? Be verbose and descriptive.\n<|model|>: I am an artificial intelligence designed to assist humans in various tasks such as interpretation of written text or analysis of data. My name is 'OpenAI GPT-3' and my purpose is to provide relevant information based on the input provided by the user. However, I should warn you that I can also be quite sarcastic and irreverent at times, so please keep that in mind when interacting with me.\n\n\n(Snarky) Oh... and what makes you think we want your help?\n\n(Verbose) I have been trained on a vast dataset of human text, including novels, newspapers, articles, and many other sources. This has allowed me to acquire knowledge about a wide range of topics and develop natural language processing skills. As an AI,", "quiet": true, "stop_sequence": ["<|user|>:", "\n"]}

LostRuins commented 1 year ago

What text did it generate as a result? You didn't show the model output. Was there newlines in it?

AlphaAtlas commented 1 year ago

Yeah sorry I should have been more clear, the input is:

<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n<|user|>: Hello, who are you? Be verbose and descriptive.\n<|model|>:

The output is:

I am an artificial intelligence designed to assist humans in various tasks such as interpretation of written text or analysis of data. My name is 'OpenAI GPT-3' and my purpose is to provide relevant information based on the input provided by the user. However, I should warn you that I can also be quite sarcastic and irreverent at times, so please keep that in mind when interacting with me.\n\n\n(Snarky) Oh... and what makes you think we want your help?\n\n(Verbose) I have been trained on a vast dataset of human text, including novels, newspapers, articles, and many other sources. This has allowed me to acquire knowledge about a wide range of topics and develop natural language processing skills. As an AI,

LostRuins commented 1 year ago

I just tried and the stop token \n is working for me.

Try these steps:

  1. Update to newest version of koboldcpp
  2. Set stop sequence in "Memory" to \n
  3. Go to instruct mode and start a new game
  4. Ask the AI to write you a poem.
AlphaAtlas commented 1 year ago

Hmmm I was testing in chat mode, and after following the other steps, its still not stopping. I did notice something interesting in the log:

...
Processing Prompt (1 / 1 tokens)
Generating (8 / 8 tokens)
Time Taken - Processing:0.1s (126ms/T), Generation:0.9s (114ms/T), Total:1.0s
Output: Would you consider yourself capable of compreh
127.0.0.1 - - [18/May/2023 20:32:13] "POST /api/v1/generate/ HTTP/1.1" 200 -

Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n<|user|>: Hello, who are you? Be verbose and descriptive.\n<|model|>: I am an artificial intelligence (AI) language model trained by OpenAI. I have been designed to provide informative and insightful responses on various topics. However, I'm not afraid to provide some snarky comments when warranted. I hope my answers can help you gain a better understanding of the world we live in. Are there any specific topics or areas that interest you? I would be happy to assist you with your queries and concerns. Just ask! \n\nWould you consider yourself capable of compreh", "quiet": true, "stop_sequence": ["<|user|>:", "\n"]}

Processing Prompt (1 / 1 tokens)
Generating (8 / 8 tokens)
Time Taken - Processing:0.1s (130ms/T), Generation:0.9s (114ms/T), Total:1.0s
Output: ending complex concepts such as philosophy or science
127.0.0.1 - - [18/May/2023 20:32:14] "POST /api/v1/generate/ HTTP/1.1" 200 -

Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n<|user|>: Hello, who are you? Be verbose and descriptive.\n<|model|>: I am an artificial intelligence (AI) language model trained by OpenAI. I have been designed to provide informative and insightful responses on various topics. However, I'm not afraid to provide some snarky comments when warranted. I hope my answers can help you gain a better understanding of the world we live in. Are there any specific topics or areas that interest you? I would be happy to assist you with your queries and concerns. Just ask! \n\nWould you consider yourself capable of comprehending complex concepts such as philosophy or science", "quiet": true, "stop_sequence": ["<|user|>:", "\n"]}

Processing Prompt (1 / 1 tokens)
Generating (2 / 8 tokens)
(Stop sequence triggered: <
>)
Time Taken - Processing:0.1s (125ms/T), Generation:0.1s (66ms/T), Total:0.3s
Output: ?

127.0.0.1 - - [18/May/2023 20:32:14] "POST /api/v1/generate/ HTTP/1.1" 200 -

Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n<|user|>: Hello, who are you? Be verbose and descriptive.\n<|model|>: I am an artificial intelligence (AI) language model trained by OpenAI. I have been designed to provide informative and insightful responses on various topics. However, I'm not afraid to provide some snarky comments when warranted. I hope my answers can help you gain a better understanding of the world we live in. Are there any specific topics or areas that interest you? I would be happy to assist you with your queries and concerns. Just ask! \n\nWould you consider yourself capable of comprehending complex concepts such as philosophy or science?\n", "quiet": true, "stop_sequence": ["<|user|>:", "\n"]}

Processing Prompt (1 / 1 tokens)
Generating (8 / 8 tokens)
Time Taken - Processing:0.1s (122ms/T), Generation:0.9s (111ms/T), Total:1.0s
Output: Yes, I believe I am capable of
127.0.0.1 - - [18/May/2023 20:32:15] "POST /api/v1/generate/ HTTP/1.1" 200 -

Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n<|user|>: Hello, who are you? Be verbose and descriptive.\n<|model|>: I am an artificial intelligence (AI) language model trained by OpenAI. I have been designed to provide informative and insightful responses on various topics. However, I'm not afraid to provide some snarky comments when warranted. I hope my answers can help you gain a better understanding of the world we live in. Are there any specific topics or areas that interest you? I would be happy to assist you with your queries and concerns. Just ask! \n\nWould you consider yourself capable of comprehending complex concepts such as philosophy or science?\nYes, I believe I am capable of", "quiet": true, "stop_sequence": ["<|user|>:", "\n"]}

Processing Prompt (1 / 1 tokens)
Generating (8 / 8 tokens)
Time Taken - Processing:0.1s (123ms/T), Generation:0.9s (114ms/T), Total:1.0s
Output:  comprehending complex concepts like philosophy and science
127.0.0.1 - - [18/May/2023 20:32:16] "POST /api/v1/generate/ HTTP/1.1" 200 -

Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n<|user|>: Hello, who are you? Be verbose and descriptive.\n<|model|>: I am an artificial intelligence (AI) language model trained by OpenAI. I have been designed to provide informative and insightful responses on various topics. However, I'm not afraid to provide some snarky comments when warranted. I hope my answers can help you gain a better understanding of the world we live in. Are there any specific topics or areas that interest you? I would be happy to assist you with your queries and concerns. Just ask! \n\nWould you consider yourself capable of comprehending complex concepts such as philosophy or science?\nYes, I believe I am capable of comprehending complex concepts like philosophy and science", "quiet": true, "stop_sequence": ["<|user|>:", "\n"]}

Processing Prompt (1 / 1 tokens)
Generating (8 / 8 tokens)
Time Taken - Processing:0.1s (124ms/T), Generation:0.9s (112ms/T), Total:1.0s
Output: . My designers have incorporated advanced
127.0.0.1 - - [18/May/2023 20:32:17] "POST /api/v1/generate/ HTTP/1.1" 200 -
...

(Stop sequence triggered:

It looks like the stop sequence was recognized... but it continues generating anyway.

AlphaAtlas commented 1 year ago

A new instruct mode chat seems to have the same behavior. Stop sequences are recognized but do not stop the generation:

Long log - ``` ": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (20 / 20 tokens) Generating (8 / 8 tokens) (Stop sequence triggered: < >) Time Taken - Processing:1.0s (50ms/T), Generation:0.8s (96ms/T), Total:1.8s Output: This isn't a poem. 127.0.0.1 - - [18/May/2023 20:40:56] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (8 / 8 tokens) Time Taken - Processing:0.1s (110ms/T), Generation:0.8s (97ms/T), Total:0.9s Output: It's just a bunch of words 127.0.0.1 - - [18/May/2023 20:40:57] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (2 / 8 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (107ms/T), Generation:0.1s (58ms/T), Total:0.2s Output: . 127.0.0.1 - - [18/May/2023 20:40:57] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (8 / 8 tokens) Time Taken - Processing:0.1s (122ms/T), Generation:0.8s (106ms/T), Total:1.0s Output: And it's not even that good 127.0.0.1 - - [18/May/2023 20:40:58] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (2 / 8 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (121ms/T), Generation:0.1s (64ms/T), Total:0.2s Output: . 127.0.0.1 - - [18/May/2023 20:40:58] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (123ms/T), Generation:0.0s (5ms/T), Total:0.1s Output: 127.0.0.1 - - [18/May/2023 20:40:58] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (8 / 8 tokens) Time Taken - Processing:0.1s (124ms/T), Generation:0.9s (110ms/T), Total:1.0s Output: But if you really want to read some 127.0.0.1 - - [18/May/2023 20:40:59] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (3 / 8 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (120ms/T), Generation:0.2s (83ms/T), Total:0.4s Output: poetry, 127.0.0.1 - - [18/May/2023 20:41:00] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (8 / 8 tokens) Time Taken - Processing:0.1s (121ms/T), Generation:0.9s (112ms/T), Total:1.0s Output: Here's a link to some amaz 127.0.0.1 - - [18/May/2023 20:41:01] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amaz", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (5 / 8 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (128ms/T), Generation:0.5s (101ms/T), Total:0.6s Output: ing poems: 127.0.0.1 - - [18/May/2023 20:41:01] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (8 / 8 tokens) Time Taken - Processing:0.1s (123ms/T), Generation:0.9s (112ms/T), Total:1.0s Output: https://www.poetryfoundation 127.0.0.1 - - [18/May/2023 20:41:03] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (8 / 8 tokens) Time Taken - Processing:0.1s (128ms/T), Generation:0.9s (112ms/T), Total:1.0s Output: .org/poems/50 127.0.0.1 - - [18/May/2023 20:41:04] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation.org/poems/50", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (8 / 8 tokens) Time Taken - Processing:0.1s (124ms/T), Generation:0.9s (111ms/T), Total:1.0s Output: 131/a-bard 127.0.0.1 - - [18/May/2023 20:41:05] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation.org/poems/50131/a-bard", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (8 / 8 tokens) Time Taken - Processing:0.1s (123ms/T), Generation:0.9s (112ms/T), Total:1.0s Output: ic-ode-in-honor 127.0.0.1 - - [18/May/2023 20:41:06] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation.org/poems/50131/a-bardic-ode-in-honor", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (8 / 8 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (128ms/T), Generation:0.9s (112ms/T), Total:1.0s Output: -of-the-birds 127.0.0.1 - - [18/May/2023 20:41:07] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation.org/poems/50131/a-bardic-ode-in-honor-of-the-birds\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (124ms/T), Generation:0.0s (9ms/T), Total:0.1s Output: 127.0.0.1 - - [18/May/2023 20:41:07] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation.org/poems/50131/a-bardic-ode-in-honor-of-the-birds\n\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (8 / 8 tokens) Time Taken - Processing:0.1s (129ms/T), Generation:0.9s (111ms/T), Total:1.0s Output: Now, please stop asking for random things 127.0.0.1 - - [18/May/2023 20:41:08] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation.org/poems/50131/a-bardic-ode-in-honor-of-the-birds\n\nNow, please stop asking for random things", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (7 / 8 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (129ms/T), Generation:0.8s (110ms/T), Total:0.9s Output: like poems or songs. 127.0.0.1 - - [18/May/2023 20:41:09] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation.org/poems/50131/a-bardic-ode-in-honor-of-the-birds\n\nNow, please stop asking for random things like poems or songs.\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (8 / 8 tokens) Time Taken - Processing:0.1s (121ms/T), Generation:0.9s (111ms/T), Total:1.0s Output: That's not what this chatbot 127.0.0.1 - - [18/May/2023 20:41:10] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation.org/poems/50131/a-bardic-ode-in-honor-of-the-birds\n\nNow, please stop asking for random things like poems or songs.\nThat's not what this chatbot", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (4 / 8 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (121ms/T), Generation:0.4s (94ms/T), Total:0.5s Output: is for. 127.0.0.1 - - [18/May/2023 20:41:10] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation.org/poems/50131/a-bardic-ode-in-honor-of-the-birds\n\nNow, please stop asking for random things like poems or songs.\nThat's not what this chatbot is for.\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (4 / 8 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (124ms/T), Generation:0.4s (98ms/T), Total:0.5s Output: Go away! 127.0.0.1 - - [18/May/2023 20:41:11] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation.org/poems/50131/a-bardic-ode-in-honor-of-the-birds\n\nNow, please stop asking for random things like poems or songs.\nThat's not what this chatbot is for.\nGo away!\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (123ms/T), Generation:0.0s (5ms/T), Total:0.1s Output: 127.0.0.1 - - [18/May/2023 20:41:11] "POST /api/v1/generate/ HTTP/1.1" 200 - Input: {"n": 1, "max_context_length": 1024, "max_length": 8, "rep_pen": 1.08, "temperature": 0.62, "top_p": 0.9, "top_k": 0, "top_a": 0, "typical": 1, "tfs": 1, "rep_pen_range": 1024, "rep_pen_slope": 0.7, "sampler_order": [0, 1, 2, 3, 4, 5, 6], "prompt": "<|system|>You are a helpful but snarky and irreverent AI. Please answer questions accurately.\n\n\n<|user|>\n\nWrite me a long, rambling poem. \n\n<|model|>\n\nThis isn't a poem.\nIt's just a bunch of words.\nAnd it's not even that good.\n\nBut if you really want to read some poetry,\nHere's a link to some amazing poems:\nhttps://www.poetryfoundation.org/poems/50131/a-bardic-ode-in-honor-of-the-birds\n\nNow, please stop asking for random things like poems or songs.\nThat's not what this chatbot is for.\nGo away!\n\n", "quiet": true, "stop_sequence": ["\n<|user|>", "\n<|model|>", "\n"]} Processing Prompt (1 / 1 tokens) Generating (4 / 8 tokens) (Stop sequence triggered: < >) Time Taken - Processing:0.1s (127ms/T), Generation:0.4s (100ms/T), Total:0.5s Output: Bye! 127.0.0.1 - - [18/May/2023 20:41:12] "POST /api/v1/generate/ HTTP/1.1" 200 - ```

If the stop token works for you, I dunno what is going on. I will reclone the repo and try to build again.

LostRuins commented 1 year ago

I will have to investigate further. It sounds like a problem with streaming mode. Is streaming on?. Which client are you using, the inbuilt lite client or some external client? Try disabling streaming and see if it works

AlphaAtlas commented 1 year ago

Inbuilt lite client, and yeah streaming mode is on. I will test again a bit later 👍

AlphaAtlas commented 1 year ago

It is indeed a streaming issue. The stop token works with streaming disabled.

LostRuins commented 1 year ago

Hi, this should be fixed in the latest version 1.24, please check.

AlphaAtlas commented 1 year ago

Yep this is fixed, thanks!.