Commit 10349d37 authored by zhuwenwen's avatar zhuwenwen
Browse files

fix weights_not_loaded

parent bcd4dc84
......@@ -272,7 +272,7 @@ class DefaultModelLoader(BaseModelLoader):
# that have loaded weights tracking currently.
if model_config.quantization is None and loaded_weights is not None:
weights_not_loaded = weights_to_load - loaded_weights
weights_not_loaded = {k for k in weights_not_loaded if not k.endwith("indexer.weights_proj.bias")}
weights_not_loaded = {k for k in weights_not_loaded if not k.endswith("indexer.weights_proj.bias")}
if weights_not_loaded:
raise ValueError("Following weights were not initialized from "
f"checkpoint: {weights_not_loaded}")
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