medmekk commited on
Commit
131f3b1
·
verified ·
1 Parent(s): 20347e1

Upload folder using huggingface_hub

Browse files
bitsandbytes_mps/bnb_quantized.mm CHANGED
@@ -120,8 +120,8 @@ std::tuple<at::Tensor, at::Tensor> bnb_quantize_4bit(
120
  int64_t quant_type) {
121
  TORCH_CHECK(input.is_mps(), "Input must be on MPS device");
122
  TORCH_CHECK(
123
- blocksize == 64 || blocksize == 128,
124
- "Only blocksize 64 and 128 are supported");
125
  TORCH_CHECK(
126
  quant_type == 1 || quant_type == 2,
127
  "quant_type must be 1 (FP4) or 2 (NF4)");
@@ -190,8 +190,8 @@ at::Tensor bnb_dequantize_4bit(
190
  TORCH_CHECK(packed.is_mps(), "packed must be on MPS device");
191
  TORCH_CHECK(absmax.is_mps(), "absmax must be on MPS device");
192
  TORCH_CHECK(
193
- blocksize == 64 || blocksize == 128,
194
- "Only blocksize 64 and 128 are supported");
195
 
196
  int n = static_cast<int>(numel);
197
  int num_blocks =
 
120
  int64_t quant_type) {
121
  TORCH_CHECK(input.is_mps(), "Input must be on MPS device");
122
  TORCH_CHECK(
123
+ blocksize == 64 || blocksize == 128 || blocksize == 256 || blocksize == 512,
124
+ "Only blocksize 64, 128, 256, and 512 are supported");
125
  TORCH_CHECK(
126
  quant_type == 1 || quant_type == 2,
127
  "quant_type must be 1 (FP4) or 2 (NF4)");
 
190
  TORCH_CHECK(packed.is_mps(), "packed must be on MPS device");
191
  TORCH_CHECK(absmax.is_mps(), "absmax must be on MPS device");
192
  TORCH_CHECK(
193
+ blocksize == 64 || blocksize == 128 || blocksize == 256 || blocksize == 512,
194
+ "Only blocksize 64, 128, 256, and 512 are supported");
195
 
196
  int n = static_cast<int>(numel);
197
  int num_blocks =
build/torch210-metal-aarch64-darwin/_bitsandbytes_mps_9811962_dirty.abi3.so CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c9be20185521046ee042d66544cf94fa448c0e1c0455217ec81cef718d264ed9
3
  size 845176
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28f847d91d0a9ad71b2b191d8c2269e0f2254a1ddee68389133ff17d4f824ca3
3
  size 845176
build/torch29-metal-aarch64-darwin/_bitsandbytes_mps_9811962_dirty.abi3.so CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:be7a2bbf3cae711200855b297de2f3ba3d47379bf2ce52c61dd6cc3053075047
3
  size 844504
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c9ee3bc582c08893dc599413baea1c7d56ffa4f5864f8f14f67b8ddfc5f22b7
3
  size 844504