Skip to content

Commit

Permalink
drop change in get_vocab_size
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandros Koumparoulis <[email protected]>
  • Loading branch information
akoumpa committed Dec 9, 2024
1 parent 2f7824d commit ea51639
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions nemo/lightning/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ def get_vocab_size(
from nemo.utils import logging

after = vocab_size
multiple = make_vocab_size_divisible_by

tp_size = config.tensor_model_parallel_size
if make_vocab_size_divisible_by % tp_size != 0:
multiple *= tp_size

multiple = make_vocab_size_divisible_by * config.tensor_model_parallel_size
after = ((after + multiple - 1) // multiple) * multiple
logging.info(
f"Padded vocab_size: {after}, original vocab_size: {vocab_size}, dummy tokens:" f" {after - vocab_size}."
Expand Down

0 comments on commit ea51639

Please sign in to comment.