mirror of
https://github.com/p-e-w/heretic.git
synced 2026-12-03 18:42:57 +07:00
[GH-ISSUE #96] CUDA out of memory issue #51
Labels
No labels
bug
enhancement
enhancement
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
p-e-w/heretic#51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Hotohori on GitHub (Jan 3, 2026).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/96
I switched because of the support of max_memory to the actual build (so NOT v1.1.0) and it was running without any problem to the end until I need to selected which trial I want to save locally.
I select a trial, give it a name and when it should start saving I directly get a "CUDA out of memory" error. The app still runs, but it happened 3 times again, then I switched back to the trial selection, select the same one again and this time the app crashed completely with the same message.
Don't know what issue it is, maybe a memory handling problem.
I tried to use heretic on my local RTX 4090 on the Mistral Nemo (12B) model which didn't fully goes into VRAM. I run into a out of memory issue with 1.1.0 and could only use a batch size of 32, failed on 64, with limiting the VRAM to 18GB I could use a batch size of 128 what, even when more of the model is on CPU, still a lot faster. But I hit that problem at the end.
Nvidia-smi (I'm on CachyOS) said heretic used 22,5GB VRAM while I only selected a trail to save, so before saving.
I added my tries to save it with all errors until the app crashed into the log.txt.
log.txt
@Hotohori commented on GitHub (Jan 3, 2026):
Reduced the max memory to 16GB instead of 18GB and again, as soon I want to save it CUDA out of memory. Another 6 hour wasted... Have enough from this BS, at least for the moment.
@p-e-w commented on GitHub (Jan 4, 2026):
This looks like a memory leak of some kind. If possible, please Git bisect the problem to identify which commit introduced it. Note that you do not have to do a full run to test it; just run Heretic with
--n-trials 1and you will get the trial selection menu immediately (you can also press Ctrl+C during any trial to get the menu).@mightykatun commented on GitHub (Mar 26, 2026):
Hi, I am encountering the same issue with openai/gpt-oss-120b with an RXT4090, getting almost the same output with or without the --max-memory flag.
Fails too with a smaller model (tried openai/gpt-oss-20b), but later. I don't know it it's a requirement to be able to fit the entire model in the gpu?
Log for openai/gpt-oss-120b
Log for openai/gpt-oss-20b
I'll git bissect later today
@p-e-w commented on GitHub (Mar 27, 2026):
See #239.
@mightykatun commented on GitHub (Mar 27, 2026):
Thanks! I'll take a look at it once it's merged and update you on if it fixes the issue :)
@p-e-w commented on GitHub (Jun 16, 2026):
This should be fixed in #239.