use case ยท multi-model
NER finds mentions but treats "Angela Merkel" and "Merkel" as two unrelated spans. To connect them you need meaning, not spelling โ so compose two models: BERT NER extracts every entity mention, then all-MiniLM-L6 embeds each mention in its sentence and links the ones that sit close together in vector space. The result is lightweight coreference / entity linking, running entirely on your device.
BERT NER (~110 MB) extracts; MiniLM embeddings (~25 MB) links. Each auto-initialises from cache when present.
Grouping uses a similarity threshold you control โ slide it up for stricter links, down for looser ones. Embedding the mention in its sentence gives the model context, so "Merkel" and "the German chancellor" can land near "Angela Merkel" even though they share no words. It's a demo-grade linker, but the shape is exactly how production entity resolution is built.