MCPcopy
hub / github.com/city96/ComfyUI-GGUF / to_uint16

Function to_uint16

dequant.py:51–53  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

49 return (x[:, 0] | x[:, 1] << 8 | x[:, 2] << 16 | x[:, 3] << 24).unsqueeze(1)
50
51def to_uint16(x):
52 x = x.view(torch.uint8).to(torch.int32)
53 return (x[:, 0] | x[:, 1] << 8).unsqueeze(1)
54
55def split_block_dims(blocks, *args):
56 n_max = blocks.shape[1]

Callers 1

dequantize_blocks_IQ4_XSFunction · 0.85

Calls 1

toMethod · 0.80

Tested by

no test coverage detected