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

Class PhaseStats

gpu/stats.py:12–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11@dataclass
12class PhaseStats:
13 name: str
14 tokens: int
15 time: float
16
17 def show(self) -> str:
18 tps = self.tokens / self.time
19 return (
20 f"[{self.name}] "
21 f"generated tokens: {self.tokens}"
22 f" - total time: {self.time:.3f}s"
23 f" - {tps:.1f} tokens per second"
24 )
25
26
27class Stats:

Callers 1

end_phaseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected