"tests/vscode:/vscode.git/clone" did not exist on "f0a588b8e2783cea0bd1a6b6d7ac85844d91b268"
Commit 757baee8 authored by Julien Chaumond's avatar Julien Chaumond
Browse files

Fix un-prefixed f-string

see https://github.com/huggingface/transformers/pull/4367#discussion_r426356693

Hat/tip @girishponkiya
parent a27c7959
...@@ -82,8 +82,8 @@ if __name__ == "__main__": ...@@ -82,8 +82,8 @@ if __name__ == "__main__":
compressed_sd["vocab_projector.bias"] = state_dict["cls.predictions.bias"] compressed_sd["vocab_projector.bias"] = state_dict["cls.predictions.bias"]
if args.vocab_transform: if args.vocab_transform:
for w in ["weight", "bias"]: for w in ["weight", "bias"]:
compressed_sd[f"vocab_transform.{w}"] = state_dict["cls.predictions.transform.dense.{w}"] compressed_sd[f"vocab_transform.{w}"] = state_dict[f"cls.predictions.transform.dense.{w}"]
compressed_sd[f"vocab_layer_norm.{w}"] = state_dict["cls.predictions.transform.LayerNorm.{w}"] compressed_sd[f"vocab_layer_norm.{w}"] = state_dict[f"cls.predictions.transform.LayerNorm.{w}"]
print(f"N layers selected for distillation: {std_idx}") print(f"N layers selected for distillation: {std_idx}")
print(f"Number of params transfered for distillation: {len(compressed_sd.keys())}") print(f"Number of params transfered for distillation: {len(compressed_sd.keys())}")
......
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