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

Validate context length for generation and validation #33

Conversation

sfc-gh-jhilgart
Copy link
Collaborator

No description provided.

@@ -0,0 +1,11 @@
_MODEL_CONTEXT_LENGTH = 7000 # We use 7k so that we can reserve 1k for response tokens.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we account for instruction tokens in the prompt?

Copy link
Collaborator Author

@sfc-gh-jhilgart sfc-gh-jhilgart May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty loose as is. Instruction tokens, even for llama3, are only ~20 tokens.

I can add an additional buffer here though!

@sfc-gh-jhilgart sfc-gh-jhilgart merged commit 940de24 into main May 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants