How can i change conv_depth of a ner model for training

Hi Ines,

I would like to train NER with +-8 tokens around it which is by default 4. I have changed it in en_core_web_md/ner model cfg to look like:


So sould i just run prodigy ner train receipe on this model to get 8 token size or will i need some other settings too?

Other thing what is "conv_window" used for?

Hi Sahil,

If you simply change the config like that, the model won't load correctly, as the weights won't be valid for the model architecture.

You can't change the depth of an already trained model --- you'll have to train from scratch to do that. In v2 these settings are all fairly buried, they're exposed much better in the upcoming v3. You can try changing the depth using the conv_depth environment variable prior to training, or with the spacy pretrain command.

One reason these settings aren't exposed very well in v2 is that tuning them actually doesn't help very much. You're unlikely to see much accuracy improvement from changing the convolution depth, or at least I haven't seen much improvement from it in my own experiments.

The conv_window setting changes how many words on either side each convolution layer processes. The default of 1 has been better on every problem I've tried it on.