1
0
Fork 0
mirror of https://github.com/p-e-w/heretic.git synced 2026-12-03 18:42:57 +07:00

[GH-ISSUE #152] Uploading LoRA adapter doesn't work #90

Closed
opened 2026-11-01 04:17:24 +07:00 by bsakaguchi · 10 comments
Owner

Originally created by @p-e-w on GitHub (Feb 14, 2026).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/152

See https://huggingface.co/p-e-w/gpt-oss-20b-heretic-v3-LoRA/tree/main for an example. The adapter_model.safetensors file that is supposed to contain the LoRA is empty. Strangely enough, exporting the adapter to a local folder works, producing a 700 kB safetensors file.

Originally created by @p-e-w on GitHub (Feb 14, 2026). Original GitHub issue: https://github.com/p-e-w/heretic/issues/152 See https://huggingface.co/p-e-w/gpt-oss-20b-heretic-v3-LoRA/tree/main for an example. The `adapter_model.safetensors` file that is supposed to contain the LoRA is empty. Strangely enough, exporting the adapter to a local folder works, producing a 700 kB safetensors file.
bsakaguchi 2026-11-01 04:17:24 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@p-e-w commented on GitHub (Feb 14, 2026):

Actually, it fails for all models. This sucks.

<!-- gh-comment-id:3901325494 --> @p-e-w commented on GitHub (Feb 14, 2026): Actually, it fails for all models. This sucks.
Author
Owner

@kabachuha commented on GitHub (Mar 6, 2026):

@p-e-w What do you think of saving the lora adapter to a temp dir and then upload it through hf hub upload folder?

https://huggingface.co/docs/huggingface_hub/v0.13.2/guides/upload#upload-a-folder

<!-- gh-comment-id:4011854911 --> @kabachuha commented on GitHub (Mar 6, 2026): @p-e-w What do you think of saving the lora adapter to a temp dir and then upload it through hf hub upload folder? https://huggingface.co/docs/huggingface_hub/v0.13.2/guides/upload#upload-a-folder
Author
Owner

@p-e-w commented on GitHub (Mar 6, 2026):

Too brittle, and not what the user expects when they choose "upload".

This has to work in PEFT/Transformers. We're not fixing upstream bugs downstream.

<!-- gh-comment-id:4012355973 --> @p-e-w commented on GitHub (Mar 6, 2026): Too brittle, and not what the user expects when they choose "upload". This has to work in PEFT/Transformers. We're not fixing upstream bugs downstream.
Author
Owner

@kabachuha commented on GitHub (Mar 6, 2026):

Idk add a disclaimer "local only" when saving a lora, just like the RAM disclaimer pops up

The lora file weights a few megabytes, it won't clutter the computer

You really are overcomplicating things

<!-- gh-comment-id:4012468330 --> @kabachuha commented on GitHub (Mar 6, 2026): Idk add a disclaimer "local only" when saving a lora, just like the RAM disclaimer pops up The lora file weights a few megabytes, it won't clutter the computer You *really* are overcomplicating things
Author
Owner

@kabachuha commented on GitHub (Mar 6, 2026):

This is helpful for like 99%+ users who don't have 256+ RAM

<!-- gh-comment-id:4012475815 --> @kabachuha commented on GitHub (Mar 6, 2026): This is helpful for like 99%+ users who don't have 256+ RAM
Author
Owner

@p-e-w commented on GitHub (Mar 7, 2026):

I continue to believe that the correct way forward is to fix the problem, not work around it. That is, model.push_to_hub should do what it claims to do.

I imagine that the root cause of this bug is rather simple, and probably easy to resolve. It's just that this feature is completely useless to me personally, and I have more important things (for me) to work on at the moment.

<!-- gh-comment-id:4016214812 --> @p-e-w commented on GitHub (Mar 7, 2026): I continue to believe that the correct way forward is to fix the problem, not work around it. That is, `model.push_to_hub` should do what it claims to do. I imagine that the root cause of this bug is rather simple, and probably easy to resolve. It's just that this feature is completely useless to me personally, and I have more important things (for me) to work on at the moment.
Author
Owner

@p-e-w commented on GitHub (Mar 7, 2026):

The recommended workaround for people who need this feature is to revert 025ab3a881. I will not merge a fix or workaround into master without understanding the cause of the problem.

<!-- gh-comment-id:4016273384 --> @p-e-w commented on GitHub (Mar 7, 2026): The recommended workaround for people who need this feature is to revert 025ab3a8815d8f857a4d8bfce0e7e6af73cb0736. I will not merge a fix or workaround into master without understanding the cause of the problem.
Author
Owner

@anrp commented on GitHub (Apr 4, 2026):

I wonder what's broken? Maybe try again, was it a transient issue?
I tried tag v1.2.0 + revert 025ab3a, command line uv run heretic --model Qwen/Qwen3-0.6B --batch-size 64 --n-trials 10 --n-startup-trials 5 and uploaded lora adapter to https://huggingface.co/anrp/testhereticuploadlora and it worked fine, safetensors file is 1MB-ish?

Edit: to be clear, uploaded the lora from the menu options available, not saved & then uploaded.

<!-- gh-comment-id:4187935489 --> @anrp commented on GitHub (Apr 4, 2026): I wonder what's broken? Maybe try again, was it a transient issue? I tried tag v1.2.0 + revert 025ab3a, command line `uv run heretic --model Qwen/Qwen3-0.6B --batch-size 64 --n-trials 10 --n-startup-trials 5` and uploaded lora adapter to https://huggingface.co/anrp/testhereticuploadlora and it worked fine, safetensors file is 1MB-ish? Edit: to be clear, uploaded the lora from the menu options available, not saved & then uploaded.
Author
Owner

@p-e-w commented on GitHub (Apr 5, 2026):

@anrp

Thank you for bringing this to my attention, perhaps this has been fixed in Transformers then!

I will verify this soon, and if it indeed works reliably, will re-enable this option for the upcoming 1.3 release of Heretic.

<!-- gh-comment-id:4188347711 --> @p-e-w commented on GitHub (Apr 5, 2026): @anrp Thank you for bringing this to my attention, perhaps this has been fixed in Transformers then! I will verify this soon, and if it indeed works reliably, will re-enable this option for the upcoming 1.3 release of Heretic.
Author
Owner

@p-e-w commented on GitHub (May 9, 2026):

After three cumulative reverts and revert-reverts, this issue is finally fixed. See https://github.com/p-e-w/heretic/pull/308#issuecomment-4377199601 for an explanation of what the problem was.

<!-- gh-comment-id:4412221182 --> @p-e-w commented on GitHub (May 9, 2026): After three cumulative reverts and revert-reverts, this issue is finally fixed. See https://github.com/p-e-w/heretic/pull/308#issuecomment-4377199601 for an explanation of what the problem was.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
p-e-w/heretic#90
No description provided.