MCPcopy Create free account
hub / github.com/Pints-AI/1.5-Pints / permute_part

Method permute_part

tokenizer/convert/convert.py:613–615  ·  view source on GitHub ↗
(self, n_part: int, n_head: int, n_head_kv: int)

Source from the content-addressed store, hash-verified

611 return self
612
613 def permute_part(self, n_part: int, n_head: int, n_head_kv: int) -> UnquantizedTensor:
614 r = self.ndarray.shape[0] // 3
615 return UnquantizedTensor(permute(self.ndarray[r * n_part : r * n_part + r, ...], n_head, n_head_kv))
616
617 def part(self, n_part: int) -> UnquantizedTensor:
618 r = self.ndarray.shape[0] // 3

Callers

nothing calls this directly

Calls 2

UnquantizedTensorClass · 0.85
permuteFunction · 0.85

Tested by

no test coverage detected