minor: Add basic editorconfig and pre-commit hooks to enforce style for whitespaces (#1926)
This commit is contained in:
@@ -311,7 +311,7 @@ class VocabParallelEmbedding(torch.nn.Module):
|
||||
def get_sharded_to_full_mapping(self) -> Optional[List[int]]:
|
||||
"""Get a mapping that can be used to reindex the gathered
|
||||
logits for sampling.
|
||||
|
||||
|
||||
During sampling, we gather logits from all ranks. The relationship
|
||||
of index->token_id will follow the same format as outlined in the class
|
||||
docstring. However, after the gather, we want to reindex the final
|
||||
@@ -483,4 +483,4 @@ class ParallelLMHead(VocabParallelEmbedding):
|
||||
|
||||
def forward(self, input_):
|
||||
del input_
|
||||
raise RuntimeError("LMHead's weights should be used in the sampler.")
|
||||
raise RuntimeError("LMHead's weights should be used in the sampler.")
|
||||
|
||||
Reference in New Issue
Block a user