MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / permute_part

Method permute_part

convert.py:492–494  ·  view source on GitHub ↗
(self, n_part: int, n_head: int, n_head_kv: int)

Source from the content-addressed store, hash-verified

490 return self
491
492 def permute_part(self, n_part: int, n_head: int, n_head_kv: int) -> UnquantizedTensor:
493 r = self.ndarray.shape[0] // 3
494 return UnquantizedTensor(permute(self.ndarray[r * n_part : r * n_part + r, ...], n_head, n_head_kv))
495
496 def part(self, n_part: int) -> UnquantizedTensor:
497 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