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

Created DEFAULT_NUM_CTX VAR with a default of 32768 #328

Merged
merged 3 commits into from
Nov 22, 2024

Conversation

aaronbolton
Copy link

@aaronbolton aaronbolton commented Nov 18, 2024

Adding DEFAULT_NUM_CTX to enable easier adjust on context sizes

DEFAULT_NUM_CTX VAR set to a default of 32768 but can be adjusted in .env.local, also adding some example values to .env.example

Example Context Values for qwen2.5-coder:32b

32768 # Consumes 36GB of VRAM
24576 # Consumes 32GB of VRAM
12288 # Consumes 26GB of VRAM
6144 # Consumes 24GB of VRAM

@chrismahoney chrismahoney self-requested a review November 19, 2024 01:01
Copy link
Collaborator

@chrismahoney chrismahoney left a comment

Choose a reason for hiding this comment

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

This is ready to go so long as the env var is added wherever else they are used in the codebase (i.e. Docker resources)


# Example Context Values for qwen2.5-coder:32b
#
# DEFAULT_NUM_CTX=32768 # Consumes 36GB of VRAM
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would also just leave an empty uncommented entry here as well, to avoid any issues with process.env missing the variable so we could call it out in errors if necessary.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, this will need to live anywhere else that the env vars are being utilized, Dockerfile and docker-compose files for example. Other than that this looks good to me.

@chrismahoney
Copy link
Collaborator

Keeping an eye on the community thread for this, as long as it keeps working well for y'all I'll merge tomorrow. Doesn't have any negative impact if this new env var is missing, just continues defaulting to 32768 num_ctx. Cheers!

aaronbolton and others added 2 commits November 19, 2024 07:46
adding further changes for DEFAULT_NUM_CTX, including docs
@chrismahoney chrismahoney merged commit ad8b48e into stackblitz-labs:main Nov 22, 2024
1 check 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.

2 participants