Skip to content
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

What is [Prompt len] and [Tokens to Generate]? #2

Closed
fishiu opened this issue Oct 31, 2023 · 3 comments
Closed

What is [Prompt len] and [Tokens to Generate]? #2

fishiu opened this issue Oct 31, 2023 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@fishiu
Copy link

fishiu commented Oct 31, 2023

Sorry I am not quite familiar with inference: in fine-tune/training, I simply use the concept of max_seq_length. Are [Prompt len] and [Tokens to Generate] the same as max_seq_length? How could they be different?

@RahulSChand
Copy link
Owner

RahulSChand commented Nov 1, 2023

You are right that in fine-tuning/training there is no concept of "prompt Len" & "tokens to generate". Only max_seq_length is required. When you use the GitHub site, the max_seq_length = prompt Len + tokens to Generate.

The prompt Len & context Len concept is only for inference time. For example, if you have a question which is made of 100 words(tokens) and you want to generate an answer of 500 tokens. Here the first 100 tokens are processed at once while the next 500 tokens are processed token by token. Therefore a distinction is needed. The first 100 words are your "prompt Len" & the next 500 words are your "tokens to generate"

@fishiu
Copy link
Author

fishiu commented Nov 1, 2023

Thanks for your reply! So if I want to get the memory result of fine-tuning, I should set "tokens to generate" to 0 right? However that is forbidden (warning that it have to be positive)

@RahulSChand
Copy link
Owner

You can set it as 1. The results will be almost exactly the same (maybe a 1-2 MB difference at most)

@RahulSChand RahulSChand added the question Further information is requested label Nov 5, 2023
@RahulSChand RahulSChand self-assigned this Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants