-
Notifications
You must be signed in to change notification settings - Fork 2k
feat: Add 4-bit loading + LoRA support for low VRAM optimization #60
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
Merged
Merged
Changes from all commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
c7a952d
Add files via upload
accemlcc 5e65ab1
perf: optimize abliteration matrix op (#46)
accemlcc 3cacbae
Fix line endings to LF
accemlcc 8f1fafd
Resolve merge conflict by keeping LoRA implementation
accemlcc cc06d27
Add hybrid approach for GPT-OSS compatibility
accemlcc c6bc76d
Merge upstream/master - keep hybrid approach
accemlcc 5657491
Fix projector bug, update print statement, revert README
accemlcc 86b8852
Revert README changes to match upstream
accemlcc 529a91a
Fix import sorting for ruff
accemlcc bdd3f57
Fix reload_model for evaluate_model, add type hints and validation
accemlcc 1e0b38b
Apply ruff formatting
accemlcc e8c9bd0
Replace load_in_4bit with quantization enum
accemlcc 018d926
Fix precision loss: use FP32 refusal direction directly
accemlcc e4b8eb5
Move r assignment into non-LoRA path
accemlcc b87e28c
Fix linting: apply ruff formatting
accemlcc 4e4f741
Add auto-merge for LoRA adapters on save/upload
accemlcc 1e3e50e
Fix linting: apply ruff formatting
accemlcc 907d22d
Implement CPU-based merge for 4-bit models with OOM fallback
accemlcc 055ebb2
Remove use_lora flag (LoRA always on), add user prompt for 4-bit export
accemlcc a0638a9
Fix: PEFT target_modules expects module names without path prefix
accemlcc 63b9071
Fix linting: apply ruff formatting
accemlcc 1a37f3d
Add LoRA fallback and fix quantization_config handling
accemlcc 9d4717e
Add 8-bit quantization support via bitsandbytes
accemlcc 5f65132
Improve LoRA merge warning and fix linting
accemlcc 7531367
Apply final ruff formatting
accemlcc 2ca6943
Fix CI: apply ruff import sorting
accemlcc 6ce0569
Use tiny model for CI efficiency
accemlcc 8aa25a0
Fix import sorting in test_lora.py
accemlcc 595239f
Fix formatting in test_lora.py
accemlcc e49111a
Merge upstream changes (analyzer + deps)
accemlcc 7eed4ff
feat: Show merge warning for all models (requires high RAM)
accemlcc 7906410
style: Apply ruff fixes
accemlcc 9e3ddb4
Merge remote-tracking branch 'origin/master' into pr-60
92873a4
Fix undefined Style import in main.py
6282ee2
Fix(model): Support MoE/3D tensors and enforce dtype safety in ablite…
c6603df
Fix(ci): Format model.py with ruff
dac116f
Fix(main): Remove invalid style argument from prompt_select and unuse…
7b4ca56
Fix logic errors, memory leak, and redundant merges in main.py
accemlcc 9e38d45
Fix linting and formatting issues (isort, ruff)
accemlcc b4adb23
chore: Simplify .gitattributes as requested
accemlcc deaf613
refactor: Remove defensive try-except around LoRA initialization
accemlcc cfead9e
chore: Update uv.lock with peft and bitsandbytes
accemlcc e376a97
chore: Regenerate uv.lock to include missing peft dependency
accemlcc 1b3ea78
style: Fix import sorting (isort) for CI compliance
accemlcc a86240e
style: Simplify .gitattributes to single line as requested
accemlcc df6036b
Address PR #60 feedback: Remove caching, fix LoRA reload, global LoRA…
accemlcc b39c165
Merge master into pr-60 (resolve conflicts)
accemlcc 5e399f4
Address PR review comments: clarify code, fix quantization, rename me…
accemlcc c689af7
Restore gc.collect() before empty_cache() for large models
accemlcc 6a29f17
refactor: Remove LoRA fallback remnants, simplify code
accemlcc 34b34fc
Address p-e-w review feedback: rename reset_model, remove loaded_mode…
accemlcc da6aa82
Restore skip logic for non-LoRA modules and fix 4-bit base_layer.weig…
accemlcc dc3178f
Remove defensive lora_A check per review - get_layer_modules already …
accemlcc 2493c77
Fix try_add: nest component init inside Module check, add assert for …
accemlcc e0f8324
Add note about module.weight assumption for type checking
accemlcc 6bd2446
Change 'Reloading model' to 'Resetting model' in logging
accemlcc f685d14
Merge upstream master, resolve conflict: keep parameter printing with…
accemlcc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * text eol=lf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.