      msg.good(f"Loaded model '{vectors_model}'")
      pretrained_vectors = None if not use_vectors else nlp.vocab.vectors
      model = create_pretraining_model(
          nlp,
          Tok2Vec(
              width,
              embed_rows,
              conv_depth=conv_depth,
              pretrained_vectors=pretrained_vectors,
              bilstm_depth=bilstm_depth,  # Requires PyTorch. Experimental.
 
</s> remove             cnn_maxout_pieces=cnn_pieces,  # If set to 1, use Mish activation.
 </s> add             maxout_pieces=cnn_pieces,  # If set to 1, use Mish activation.
            window_size=1,
            char_embed=False,
            nM=64,
            nC=8 </s> remove     mock.assert_called_once_with(ANY, nlp, foo="bar")
 </s> add     # The model will be initialized to None by the factory
    mock.assert_called_once_with(ANY, nlp, None, foo="bar") </s> remove         return factory(self, **config)
 </s> add         default_config = self.defaults.get(name, None)

        # transform the model's config to an actual Model
        model_cfg = None
        if "model" in config:
            model_cfg = config["model"]
            if not isinstance(model_cfg, dict):
                user_warning(Warnings.W099.format(type=type(model_cfg), pipe=name))
                model_cfg = None
            del config["model"]
        if model_cfg is None and default_config is not None:
            user_warning(Warnings.W098)
            model_cfg = default_config["model"]
        model = None
        if model_cfg is not None:
            self.config[name] = {"model":  model_cfg}
            model = registry.make_from_config({"model": model_cfg}, validate=True)["model"]
        return factory(self, model, **config) </s> remove         if "exclusive_classes" not in cfg:
            self.cfg["exclusive_classes"] = True
 </s> add  </s> remove     @classmethod
    def Model(cls, nr_class, **cfg):
        depth = util.env_opt('parser_hidden_depth', cfg.get('hidden_depth', 1))
        subword_features = util.env_opt('subword_features',
                            cfg.get('subword_features', True))
        conv_depth = util.env_opt('conv_depth', cfg.get('conv_depth', 4))
        conv_window = util.env_opt('conv_window', cfg.get('conv_window', 1))
        t2v_pieces = util.env_opt('cnn_maxout_pieces', cfg.get('cnn_maxout_pieces', 3))
        bilstm_depth = util.env_opt('bilstm_depth', cfg.get('bilstm_depth', 0))
        self_attn_depth = util.env_opt('self_attn_depth', cfg.get('self_attn_depth', 0))
        nr_feature_tokens = cfg.get("nr_feature_tokens", cls.nr_feature)
        if depth not in (0, 1):
            raise ValueError(TempErrors.T004.format(value=depth))
        parser_maxout_pieces = util.env_opt('parser_maxout_pieces',
                                            cfg.get('maxout_pieces', 2))
        token_vector_width = util.env_opt('token_vector_width',
                                           cfg.get('token_vector_width', 96))
        hidden_width = util.env_opt('hidden_width', cfg.get('hidden_width', 64))
        if depth == 0:
            hidden_width = nr_class
            parser_maxout_pieces = 1
        embed_size = util.env_opt('embed_size', cfg.get('embed_size', 2000))
        pretrained_vectors = cfg.get('pretrained_vectors', None)
        tok2vec = Tok2Vec(width=token_vector_width,
                          embed_size=embed_size,
                          conv_depth=conv_depth,
                          window_size=conv_window,
                          cnn_maxout_pieces=t2v_pieces,
                          subword_features=subword_features,
                          pretrained_vectors=pretrained_vectors,
                          bilstm_depth=bilstm_depth)
        tok2vec = chain(tok2vec, list2array())
        tok2vec.set_dim("nO", token_vector_width)
        lower = PrecomputableAffine(hidden_width,
                    nF=nr_feature_tokens, nI=token_vector_width,
                    nP=parser_maxout_pieces)
        lower.set_dim("nP", parser_maxout_pieces)
        if depth == 1:
            with use_ops('numpy'):
                upper = Linear(nr_class, hidden_width, init_W=zero_init)
        else:
            upper = None

        cfg = {
            'nr_class': nr_class,
            'nr_feature_tokens': nr_feature_tokens,
            'hidden_depth': depth,
            'token_vector_width': token_vector_width,
            'hidden_width': hidden_width,
            'maxout_pieces': parser_maxout_pieces,
            'pretrained_vectors': pretrained_vectors,
            'bilstm_depth': bilstm_depth,
            'self_attn_depth': self_attn_depth,
            'conv_depth': conv_depth,
            'window_size': conv_window,
            'embed_size': embed_size,
            'cnn_maxout_pieces': t2v_pieces
        }
        model = ParserModel(tok2vec, lower, upper)
        model.initialize()
        return model, cfg

 </s> add 
        # TODO: replace with config
        build_Tok2Vec_model(
      msg.good(f"Loaded model '{vectors_model}'")
      pretrained_vectors = None if not use_vectors else nlp.vocab.vectors
      model = create_pretraining_model(
          nlp,
        # TODO: replace with config
        build_Tok2Vec_model(
              width,
              embed_rows,
              conv_depth=conv_depth,
              pretrained_vectors=pretrained_vectors,
              bilstm_depth=bilstm_depth,  # Requires PyTorch. Experimental.
keep keep keep keep replace keep keep keep keep keep
 Default settings to configurations (#4995)

* fix grad_clip naming

* cleaning up pretrained_vectors out of cfg

* further refactoring Model init's

* move Model building out of pipes

* further refactor to require a model config when creating a pipe

* small fixes

* making cfg in nn_parser more consistent

* fixing nr_class for parser

* fixing nn_parser's nO

* fix printing of loss

* architectures in own file per type, consistent naming

* convenience methods default_tagger_config and default_tok2vec_config

* let create_pipe access default config if available for that component

* default_parser_config

* move defaults to separate folder

* allow reading nlp from package or dir with argument 'name'

* architecture spacy.VocabVectors.v1 to read static vectors from file

* cleanup

* default configs for nel, textcat, morphologizer, tensorizer

* fix imports

* fixing unit tests

* fixes and clean up

* fixing defaults, nO, fix unit tests

* restore parser IO

* fix IO

* 'fix' serialization test

* add *.cfg to manifest

* fix example configs with additional arguments

* replace Morpohologizer with Tagger

* add IO bit when testing overfitting of tagger (currently failing)

* fix IO - don't initialize when reading from disk

* expand overfitting tests to also check IO goes OK

* remove dropout from HashEmbed to fix Tagger performance

* add defaults for sentrec

* update thinc

* always pass a Model instance to a Pipe

* fix piped_added statement

* remove obsolete W029

* remove obsolete errors

* restore byte checking tests (work again)

* clean up test

* further test cleanup

* convert from config to Model in create_pipe

* bring back error when component is not initialized

* cleanup

* remove calls for nlp2.begin_training

* use thinc.api in imports

* allow setting charembed's nM and nC

* fix for hardcoded nM/nC + unit test

* formatting fixes

* trigger build 
spacy/cli/pretrain.py