Skip vocab in component config overrides
@@ -208,6 +208,10 @@ def load_model_from_path(model_path, meta=False, **overrides):
pipeline = nlp.Defaults.pipe_names
elif pipeline in (False, None):
pipeline = []
+ # skip "vocab" from overrides in component initialization since vocab is
+ # already configured from overrides when nlp is initialized above
+ if "vocab" in overrides:
+ del overrides["vocab"]
for name in pipeline:
if name not in disable:
config = meta.get("pipeline_args", {}).get(name, {})
