How to easily fine-tune any Natural Language Processing Transformer for Named-Entity Recognition in any language.

Photo by vinsky2002 on Pixabay

In this article, we will go through how to easily fine-tune any pretrained Natural Language Processing (=NLP) transformer for Named-Entity Recognition (=NER) in any language.

Why should you care? Well, NER is a powerful NLP task with many applications, as has been thoroughly described on Towards Data Science. However, effectively using NER often requires language or domain specific fine-tuning of your NER model based on the pretrained transformers that are available and realistic to use given your compute budget.

To show you how to do just that, we use the python package NERDA to fine-tune a BERT transformer for NER.


Notes from Industry

In this post we will go through how we built a complete ML Ops framework in two weeks leaning on best practices of DevOps from software engineering.

Our implementation of ML Ops @ Ekstra Bladet is entitled “Jokke”. Source: Ekstra Bladet
Our implementation of ML Ops @ Ekstra Bladet is entitled “Jokke”. Source: Ekstra Bladet
Our implementation of ML Ops @ Ekstra Bladet is entitled “Jokke”. Source: Ekstra Bladet.

Many organizations have invested in developing services based on machine learning but are still fighting to wrap their heads around the best way to transition machine learning models from development to production.

As of today the approaches for this are often rigorous and imply all sorts of manual processes (with all of the operational risks such manual processes entail). This is hugely inefficient and counter-productive from both an organizational and model developer perspective.

The Solution: ML Ops

When you develop a real-life machine learning service, you are in fact developing a piece of software. …

Lars Kjeldgaard

Data Scientist @ Ekstra Bladet, PIN. Author of a couple of R and Python Packages.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store