Repository navigation
New quant types, activation quantization - #1034
Merged
Merged
Conversation
Disty0
reviewed
Oct 4, 2025
Disty0
reviewed
Oct 4, 2025
Collaborator
Author
|
Known issues:
|
- increase offloading alignment to 16 - disable grads for SVDQuant to save vram
Collaborator
Author
|
Collaborator
Author
|
torch.compile bug workaround for Chroma and Qwen pushed, but
|
… loss - explicit torch.no_grad() on forwards, to avoid torch.compile problems - don't cast x to compute_dtype before matmul, if x is quantized anyway - set GGUF compute_dtype to train_dtype - various fixes
Merged
Anai-Guo
added a commit
to Anai-Guo/OneTrainer
that referenced
this pull request
Aug 31, 2026
__load_ckpt gained a required quantization parameter in Nerogar#1034, but the call sites in the SD and SDXL loaders were never updated, so every .ckpt load raises TypeError and is reported as 'could not load model'.
1 of 2 tasks
states-spec
pushed a commit
to states-spec/OneTrainer-Plus
that referenced
this pull request
Oct 4, 2026
__load_ckpt takes a quantization argument since the quantization rework (upstream Nerogar#1034, 2025-11), but load() still called it without one. The TypeError was caught like any other load failure, so an SD 1.5/2.x model in .ckpt format always ended in "could not load model". SDXL reads .ckpt through from_single_file in its safetensors path first, so its fallback was rarely reached, but the call was just as wrong. Upstream has the same calls. Checked through the real loaders with diffusers' ckpt converter stubbed to return a tiny diffusers model (the stub refuses a pickled .ckpt as safetensors, as diffusers does): SD 1.5 failed with "__load_ckpt() missing 1 required positional argument: 'quantization'" before and loads after; SDXL loads in both. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011z4fFGwikUdiKShtgwZP9C
states-spec
pushed a commit
to states-spec/OneTrainer-Plus
that referenced
this pull request
Oct 26, 2026
…preview-2) compress sat between dtype and *args, so a positional call LinearW8A8(dtype, in, out) bound in_features to compress. The fork's rocm_check "W8A8 linear layers" check builds its layers that way and failed with "Linear.__init__() missing 1 required positional argument: 'out_features'" since the compression change (Nerogar#1630). The quantizer passes compress by keyword and is unaffected. Upstream also adds a FIXME: bnb's Linear8bitLt takes input_features/output_features, but __create_linear_layer passes in_features/out_features, so the INT_8 weight dtype fails to construct (TypeError). Checked: broken in the fork and upstream since Nerogar#1034. Not fixed here, because more of that path has not run since then (e.g. get_unquantized_weight has no Linear8bitLt case, so DoRA would read raw int8 data). Tested on the CPU: LinearW8A8(torch.int8, 64, 32, bias=True) builds 64 -> 32 with compress off (TypeError before); INT_W8A8 and FLOAT_8 quantized layers still build through replace_linear_with_quantized_layers. (cherry picked from commit c2f3bff) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011z4fFGwikUdiKShtgwZP9C
states-spec
pushed a commit
to states-spec/OneTrainer-Plus
that referenced
this pull request
Oct 26, 2026
- config version 13 and how the fork's migration numbers line up with upstream's; run_name/final_output_dir replace output_model_destination - offloading: boundary checkpoint layers (non-reentrant), the model.offload_conductor dict, activation offloading through saved_tensors_hooks, disk streaming (default on), simplex, MemPools and OT_ROCM_MEM_POOLS - adv_optm 2.5.16 (AdaMuon factored, AdaMuon Nesterov default, Prodigy Nesterov still broken), A8 dtypes and the Triton autotune/LDS note, INT_8 broken since Nerogar#1034, HF repo access check offline behavior - OFT: DoRA-OFT and spectral norm clipping, the marker suffix rule for new adapter buffers, oft_scaled default history - fragmentation diagnostics, the Qt theme toggle and last tab - line references refreshed Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011z4fFGwikUdiKShtgwZP9C
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
tldr: train LoRA twice as fast as before
Switch to this PR:
and then update.sh / update.bat
Compiled blocks
W8A8 quant types
SVDQuant
Why no int4 / fp4?
Nunchaku (https://github.com/nunchaku-tech/nunchaku) have shown that 4-bit quants are possible at no noticable quality loss. Even though their matrix math is faster than 8-bit quants, my benchmarks show that there is no performance gain overall for training just by employing 4-bit matrix math. The 8-bit linear math is already fast enough - most of the remaining time in a training step is spent on bf16 attention and other layers.
I believe the additional improved performance achieved by Nunchaku is due to their manual kernel fusion, not due to 4bit matmuls - but happy to be proven wrong.
includes #1091