Replies: 6 comments 5 replies
-
In the Xcode console view (lower right) note that 1016 tokens were decoded. Most of those were "\n" at the end. |
Beta Was this translation helpful? Give feedback.
-
My prompt had 8 tokens. 1016 tokens were decoded. 8 + 1016 = 1024. I had n_len set to 1024. So, it seems that "\n" was decoded until n _len was reached. And I've confirmed in the debugger that this line ends my decoding loop: if (new_token_id == llama_token_eos(ctx) || n_cur == n_len) { |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
So, I never do receive an EOS token. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
A lot depends on the model, your sampling settings, whether or not the model is instruct tuned, whether or not you're actually using the correct prompt format for instruct-tuned models. You didn't supply any details about the model you were using or whether you just prompted it with exactly just the question (usually won't work that well since it doesn't follow any known instruction format). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
With n_len set to 1024 for the simple.cpp code, and a prompt of:
What is a large language model?
Decoding yields:
A large language model is a type of artificial intelligence (AI) model that is trained on a large corpus of text data to generate language outputs that are coherent and natural-sounding. These models are designed to learn the patterns and structures of language by exposure to a vast amount of text data, and they can be used for a variety of natural language processing tasks, such as language translation, text summarization, and language generation.
Which is followed by a whole lot of "\n" tokens.
Is there a simple explanation for why this happens?
Please pardon my naive question. I am new to this stuff.
Beta Was this translation helpful? Give feedback.
All reactions