Comments (4)
@matthewdouglas @TimDettmers any insights? Thanks!
from bitsandbytes.
Hi @Edenzzzz,
Make sure that this chunk is contiguous as F.optimizer_update_32bit ultimately treats it as 1D.
dist_low_rank_grad = torch.load("dist_low_rank_grad.pt").contiguous()
I was able to reproduce your results, and after this change I believe I'm seeing the desired result.
RTX 3060, CUDA 12.4, torch==2.2.2+cu121, bitsandbytes==0.43.1
from bitsandbytes.
Thanks a lot! This worked. The non-contiguous tensor came from torch.chunk and torch.distributed.all_gather.
I wonder if that's due to the c++ kernel not considering the reshaped strides and assuming row-major format? I can file in a PR to make it contiguous if you feel that's helpful.
from bitsandbytes.
I wonder if that's due to the c++ kernel not considering the reshaped strides and assuming row-major format?
Yes, exactly. The C++ kernel assumes it's row-major and only knows the total number of elements.
I can file in a PR to make it contiguous if you feel that's helpful.
That seems like a reasonable check to me, so a PR to add that sounds good!
from bitsandbytes.
Related Issues (20)
- AnimateDiff SDXL won't run
- AttributeError: 'NoneType' object has no attribute 'cquantize_blockwise_fp16_nf4' HOT 5
- Could not load bitsandbytes native library: 'NoneType' object has no attribute 'split' HOT 1
- ImportError: Using `bitsandbytes` 8-bit quantization requires Accelerate: `pip install accelerate` and the latest version of bitsandbytes: `pip install -i https://pypi.org/simple/ bitsandbytes`
- RuntimeError: Something when wrong when trying to find file. Maybe you do not have a linux system? HOT 1
- Error in Windows HOT 2
- please provide python whel package in nvidia jetson agx orin (aarch64 + cuda) HOT 1
- Exact version match required between the system and PyTorch CUDA libraries for the compilation to succeed HOT 1
- Error invalid device ordinal at line 359 in file /opt/bitsandbytes/csrc/pythonInterface.c
- Request for AdamW8bit support on CPU (would help TorchTune) HOT 5
- 8bit CAME optimizer
- "Only Tensors of floating point and complex dtype can require gradients", on FSDP, Accelerate, quatization HOT 1
- Is it possible to enable fused op F.gemv_4bit in F.gemv_4bit backward? HOT 1
- OSError: libcusparse.so.11: cannot open shared object file: No such file or directory CUDA Setup failed despite CUDA being available.
- out kwarg in matmul_4bit() is not working HOT 2
- load_in_8bit hangs on ROCm HOT 3
- RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument mat2 in method wrapper_CUDA_mm) HOT 2
- NotImplementedError: igemmlt not available (probably built with NO_CUBLASLT)
- ROCm and 8-bit quantization
- "You have a version of `bitsandbytes` that is not compatible with 4bit inference and training" HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitsandbytes.