In the tensor-parallel case V is sharded among ranks
| 13 | |
| 14 | @dataclass |
| 15 | class SyntheticInputs: |
| 16 | """In the tensor-parallel case V is sharded among ranks""" |
| 17 | |
| 18 | weights: torch.Tensor # [V, D], bfloat16 |
| 19 | hidden_states: torch.Tensor # [n_hidden_states, D], bfloat16 |
| 20 | logits: ( |
| 21 | torch.Tensor |
| 22 | ) # [n_hidden_states, V], float32 (the exact logits before bf16 quantization) |
| 23 | vocab_size: int |
| 24 | hidden_size: int |
| 25 | |
| 26 | |
| 27 | def make_synthetic_inputs( |
no outgoing calls