Encoder API¶
MultiChannelEncoder
¶
Bases: Module
forward(channel_inputs)
¶
Forward pass through multi-channel encoder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
channel_inputs
|
Dict[str, Dict[str, Tensor]]
|
Dict mapping channel names to tokenized inputs Each channel has 'input_ids' and 'attention_mask' |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Optional[Tensor]]
|
Dict with: - 'embedding': Hyperbolic embedding in Lorentz model (batch_size, embedding_dim+1) - 'embedding_euc': Euclidean embedding before projection (batch_size, embedding_dim) [optional] - 'gate_probs': MoE gating probabilities - 'top_k_indices': MoE top-k expert indices |