MCPcopy
hub / github.com/Zyphra/Zonos / embed_codes

Method embed_codes

zonos/model.py:97–98  ·  view source on GitHub ↗
(self, codes: torch.Tensor)

Source from the content-addressed store, hash-verified

95 return spk_embedding.unsqueeze(0).bfloat16()
96
97 def embed_codes(self, codes: torch.Tensor) -> torch.Tensor:
98 return sum(emb(codes[:, i]) for i, emb in enumerate(self.embeddings))
99
100 def apply_heads(self, hidden_states: torch.Tensor) -> torch.Tensor:
101 return torch.stack([head(hidden_states) for head in self.heads], dim=1)

Callers 3

_decode_one_tokenMethod · 0.95
capture_regionMethod · 0.95
_prefillMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected