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

Method part

tokenizer/convert/convert.py:617–619  ·  view source on GitHub ↗
(self, n_part: int)

Source from the content-addressed store, hash-verified

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
619 return UnquantizedTensor(self.ndarray[r * n_part : r * n_part + r, ...])
620
621 def permute(self, n_head: int, n_head_kv: int) -> UnquantizedTensor:
622 return UnquantizedTensor(permute(self.ndarray, n_head, n_head_kv))

Callers

nothing calls this directly

Calls 1

UnquantizedTensorClass · 0.85

Tested by

no test coverage detected