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

llama: significance of truncating input to ctxLen - 4 #16

Closed
iboB opened this issue Jul 22, 2024 · 2 comments
Closed

llama: significance of truncating input to ctxLen - 4 #16

iboB opened this issue Jul 22, 2024 · 2 comments
Assignees
Labels
good first issue Good for newcomers question Further information is requested

Comments

@iboB
Copy link
Member

iboB commented Jul 22, 2024

Why truncate to ctxLen - 4? Why is that 4 significant.

This is kept for now as per llama.cpp demos, but we should investigate.

@iboB iboB added the question Further information is requested label Jul 22, 2024
@iboB iboB added the good first issue Good for newcomers label Jul 29, 2024
@pminev
Copy link
Contributor

pminev commented Aug 13, 2024

I was looking at the commits and PRs:

Finally I talked with G.Gerganov and it was added to secure space (at least 4) in KV cache for the new generated tokens. I didn't ask him further why it's explicitly 4, but it seems like when new tokens are generated the input will be truncated, in order to have enough space again.

@iboB iboB added the i:llama label Oct 2, 2024
@iboB
Copy link
Member Author

iboB commented Oct 4, 2024

this can be closed now. There is a link to this issue in the code for reference

@iboB iboB closed this as completed Oct 4, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Local SDK MVP Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants