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

Allow assigning dedicated memory reservation for adapters on GPU #303

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

tgaddair
Copy link
Contributor

@tgaddair tgaddair commented Mar 4, 2024

Related #283.

@tgaddair tgaddair merged commit f56238a into main Mar 5, 2024
2 checks passed
@tgaddair tgaddair deleted the adapter-mem-res branch March 5, 2024 00:14
@@ -773,8 +776,9 @@ def warmup(self, batch: FlashCausalLMBatch, max_new_tokens: int):
total_gpu_memory = torch.cuda.get_device_properties(self.device).total_memory

free_memory = max(
0, total_free_memory - (1 - MEMORY_FRACTION) * total_gpu_memory
0, total_free_memory - (1 - MEMORY_FRACTION + ADAPTER_MEMORY_FRACTION) * total_gpu_memory
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be (1 - (MEMORY_FRACTION + ADAPTER_MEMORY_FRACTION))?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, maybe I'm misinterpreting the original MEMORY_FRACTION

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.

None yet

2 participants