(blocks, block_size, type_size, dtype=None)
| 59 | |
| 60 | # Full weights # |
| 61 | def dequantize_blocks_BF16(blocks, block_size, type_size, dtype=None): |
| 62 | return (blocks.view(torch.int16).to(torch.int32) << 16).view(torch.float32) |
| 63 | |
| 64 | # Legacy Quants # |
| 65 | def dequantize_blocks_Q8_0(blocks, block_size, type_size, dtype=None): |