mirror of
https://github.com/p-e-w/heretic.git
synced 2026-12-03 18:42:57 +07:00
[GH-ISSUE #282] Error when trying to save the abliteration result. #161
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#161
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 @rigin on GitHub (Apr 7, 2026).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/282
The abliteration log:
Log.txt
config.toml
config.toml.txt
I saved the model locally and now I can't find it on huggingface.co:
aya-expanse-32b-bnb-4bit
config.json
It's a shame to get horseradish after 15 hours of calculations...)))
@p-e-w commented on GitHub (Apr 7, 2026):
If it wasn't uploaded to HF then an error must have been displayed.
Also, you didn't lose anything. There is a checkpoint file created during the run. Just re-run Heretic with the same arguments and it will offer to continue from the checkpoint. You don't have to re-run anything.
@p-e-w commented on GitHub (Apr 7, 2026):
What do you mean? If you saved locally, why would it be on HF?
@rigin commented on GitHub (Apr 7, 2026):
I mean the original model. I downloaded it from HF some time ago, used it for abliteration, but now I can't find its page on HF.
@rigin commented on GitHub (Apr 7, 2026):
I downloaded the result locally.
`? What do you want to do with the decensored model? Save the model to a local folder
? Path to the folder: F:\LLMs\aya-expanse-32b-bnb-4bit-abliterated-1
Saving merged model...
C:\Users\vadim\anaconda3\envs\heretic\Lib\site-packages\peft\tuners\lora\bnb.py:397: UserWarning: Merge lora module to 4-bit linear may get different generations due to rounding errors.
warnings.warn(
C:\Users\vadim\anaconda3\envs\heretic\Lib\site-packages\bitsandbytes\backends\cuda\ops.py:213: FutureWarning: _check_is_size will be removed in a future PyTorch release along with guard_size_oblivious. Use _check(i >= 0) instead.
torch._check_is_size(blocksize)
Error:`
If I change in the config the parameter quantization = "none" to quantization = "bnb_4bit" does the process start from the checkpoint?
@p-e-w commented on GitHub (Apr 7, 2026):
Yes, but the quantization will be reset to the original. Continuing from a checkpoint entails resetting all settings, else the continuation would be inconsistent.
If you want to hack around like this you will have to patch the code.
Note that Heretic doesn't support loading bnb-quantized models that are already quantized on disk. It supports on-the-fly quantization when loading an FP model.
@rigin commented on GitHub (Apr 7, 2026):
That is, you need to take an unquantized model and set the parameter quantization = "bnb_4bit", then with abliteration the model is quantized?
@p-e-w commented on GitHub (Apr 7, 2026):
You take an unquantized model and set
quantization = "bnb_4bit".Heretic will load the model with 4-bit quantization, using about 70% less memory. It will perform abliteration using FP LoRAs, without touching the model in memory.
When you export the model, Heretic will load the full precision model into CPU RAM, and merge the abliteration LoRAs into it, then export the resulting model in full precision.
In other words, you get FP output, but the processing is done using quantization. The best of both worlds, so to speak.
@rigin commented on GitHub (Apr 7, 2026):
How can I delete a checkpoint to free up disk space?
@p-e-w commented on GitHub (Apr 7, 2026):
The checkpoint is just a few kilobytes. It's a tiny JSON file. You can find it in the
checkpointsfolder.@p-e-w commented on GitHub (Jun 16, 2026):
Closing this as I don't see an actionable issue here anymore.