"test/vscode:/vscode.git/clone" did not exist on "3488f3142c734326b54badfba4b166173647d1b2"
Unverified Commit 080e42d0 authored by Stas Bekman's avatar Stas Bekman Committed by GitHub
Browse files

[megatron-bert-uncased-345m] fix conversion (#16639)

parent 09a272b0
......@@ -300,6 +300,10 @@ def main():
if args.config_file == "":
# Default config of megatron-bert 345m
config = MegatronBertConfig()
# different megatron-bert-*-345m models have different vocab sizes, so override the default
# config (which is for megatron-bert-cased-345m) with the actual vocab dimension
config.vocab_size = input_state_dict["model"]["lm_head"]["bias"].numel()
else:
config = MegatronBertConfig.from_json_file(args.config_file)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment