MCPcopy Create free account
hub / github.com/microsoft/BitNet / permute_part

Method permute_part

utils/convert.py:799–801  ·  view source on GitHub ↗
(self, n_part: int, n_head: int, n_head_kv: int)

Source from the content-addressed store, hash-verified

797 return self
798
799 def permute_part(self, n_part: int, n_head: int, n_head_kv: int) -> UnquantizedTensor:
800 r = self.ndarray.shape[0] // 3
801 return UnquantizedTensor(permute(self.ndarray[r * n_part : r * n_part + r, ...], n_head, n_head_kv))
802
803 def part(self, n_part: int) -> UnquantizedTensor:
804 r = self.ndarray.shape[0] // 3

Callers

nothing calls this directly

Calls 2

UnquantizedTensorClass · 0.70
permuteFunction · 0.70

Tested by

no test coverage detected