Answers.Body: <p>The reason you would load a pre-existing model is that it offers something of value to your task (e.g. named entity recognition for food) and the cost of training it from scratch is not worth it.  For example, to train GPT-3 from scratch would cost several million dollars.  Typically someone will use a model like BERT and fine tune it.  This is called transfer learning.  With spaCy you will typically use en_core_web_sm which was trained on the OntoNotes corpus and includes named entities.  Making a custom food NER using en_core_web_sm should be more accurate than making one from scratch. You should be able to build a good model with and without transfer learning fairly quickly if you have a GPU.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-05T20:49:17.670Z
Answers.Text: Would you add reference or web link of transfer learning? For the spaCy tool, I found only https://spacy.io/usage/embeddings-transformers.
Answers.UserDisplayName: Cloud Cho
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-01-06T05:02:44.003Z
Answers.LastActivityDate: 2021-01-06T05:02:44.003Z
Answers.UserDisplayName: Brian O'Donnell
Body: <p>Further to my <a href="https://ai.stackexchange.com/q/25498/43434">last question</a>, I am training a custom entity of FOODITEM to be recognized by Spacy's  Name Entity Recognition engine. I am following tutorials online, following is the advise given in most of the tutorials;</p>
  <blockquote>
  <p><strong>Load the model or create an empty model</strong></p>
  </blockquote>
  <blockquote>
  <p>We can create an empty model and train it with our annotated dataset or we can use the existing spacy model and re-train with our annotated data.</p>
  </blockquote>
  <p>But none of the tutorials tell how/why to choose between the two options. Also, I don't understand how will the choice affect my final output or the training of the model.</p>
  <p>How do I make the choice between a pre-trained model or a blank model? What are the factors to consider?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-05T20:45:09.877Z
Comments.Text: Would you add reference or weblink for retraining using spaCy tool?
Comments.UserDisplayName: Cloud Cho
Tags: <natural-language-processing><spacy><named-entity-recognition>
Title: Should we use a pre-trained model or a blank model for custom entity training of NER in spacy?
UserDisplayName: The White Cloud
ThreadText: # Should we use a pre-trained model or a blank model for custom entity training of NER in spacy?
  
  (Asked by: username_0 on 2021-01-05)
  
  Further to my [last question](https://ai.stackexchange.com/q/25498/43434), I am training a custom entity of FOODITEM to be recognized by Spacy's Name Entity Recognition engine. I am following tutorials online, following is the advise given in most of the tutorials;
  
  > **Load the model or create an empty model**
  
  > We can create an empty model and train it with our annotated dataset or we can use the existing spacy model and re-train with our annotated data.
  
  But none of the tutorials tell how/why to choose between the two options. Also, I don't understand how will the choice affect my final output or the training of the model.
  
  How do I make the choice between a pre-trained model or a blank model? What are the factors to consider?
  
  **Tags:** natural-language-processing, spacy, named-entity-recognition
  
  > **Comments:**
  > **username_1**: Would you add reference or weblink for retraining using spaCy tool?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-01-06. Score: 1 | Accepted answer
  
  The reason you would load a pre-existing model is that it offers something of value to your task (e.g. named entity recognition for food) and the cost of training it from scratch is not worth it. For example, to train GPT-3 from scratch would cost several million dollars. Typically someone will use a model like BERT and fine tune it. This is called transfer learning. With spaCy you will typically use en\_core\_web\_sm which was trained on the OntoNotes corpus and includes named entities. Making a custom food NER using en\_core\_web\_sm should be more accurate than making one from scratch. You should be able to build a good model with and without transfer learning fairly quickly if you have a GPU.
  
  > **Comments:**
  > **username_1**: Would you add reference or web link of transfer learning? For the spaCy tool, I found only https://spacy.io/usage/embeddings-transformers.  
  
  ---
  
  