Skip to content

Very high losses when training a custom NER in SpaCy v3.2 #9971

Discussion options

You must be logged in to vote

Without knowing a lot from your dataset / use-case, it might be tricky to infer how to best train your model.
However here are some sanity-checks that I usually do:

  1. Do you have data imbalance? You can use spaCy's debug data to check that.
  2. Are you using a spaCy NER config that was optimized for accuracy? You can generate your own using init config or refer to the Quickstart here.
  3. Perhaps you can use medspacy as your baseline? If you have access to a GPU, it may be worth to try the en_core_web_trf model as well.
  4. You can probably do some hyperparameter search on dropout, batch size, and learning rate. You can refer to the WandB sweep project to get you started.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@ljvmiranda921
Comment options

@faouinti
Comment options

@ljvmiranda921
Comment options

@Pravin770
Comment options

@tamish-jain
Comment options

Answer selected by polm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf / accuracy Performance: accuracy
4 participants