          cfg = {"device": use_gpu}
          optimizer = nlp.begin_training(lambda: corpus.train_examples, **cfg)
      nlp._optimizer = None
  
      # Load in pretrained weights
      if init_tok2vec is not None:
          components = _load_pretrained_tok2vec(nlp, init_tok2vec)
          msg.text(f"Loaded pretrained tok2vec for: {components}")
  
      # Verify textcat config
 
</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                 textcat.model.tok2vec.from_bytes(file_.read())
 </s> add                 textcat.model.get_ref("tok2vec").from_bytes(file_.read()) </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)
    # Load in pretrained weights (TODO: this may be broken in the config rewrite)
          cfg = {"device": use_gpu}
          optimizer = nlp.begin_training(lambda: corpus.train_examples, **cfg)
      nlp._optimizer = None
  
    # Load in pretrained weights (TODO: this may be broken in the config rewrite)
      if init_tok2vec is not None:
          components = _load_pretrained_tok2vec(nlp, init_tok2vec)
          msg.text(f"Loaded pretrained tok2vec for: {components}")
  
      # Verify textcat config
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/train.py