neulab/knn-transformers

PyTorch + HuggingFace code for RetoMaton: "Neuro-Symbolic Language Modeling with Automaton-augmented Retrieval" (ICML 2022), including an implementation of kNN-LM and kNN-MT

40
/ 100
Emerging

This project helps machine learning researchers and practitioners enhance existing language models and machine translation models by integrating k-nearest neighbor (kNN) retrieval. You start with a pre-trained language model, which is then augmented with a 'datastore' of training examples. The output is a more accurate language model or machine translation model, specifically useful for those working on improving text generation, summarization, or translation quality.

286 stars. No commits in the last 6 months.

Use this if you are an NLP researcher or machine learning engineer looking to improve the performance of Hugging Face's `transformers` language models or machine translation models using retrieval-augmented methods without extensive code modifications.

Not ideal if you are a business user or an application developer who needs a ready-to-use API or a pre-packaged solution for a specific NLP task without delving into model architecture or training pipelines.

natural-language-processing machine-translation language-modeling text-generation deep-learning-research
Stale 6m No Package No Dependents
Maintenance 0 / 25
Adoption 10 / 25
Maturity 16 / 25
Community 14 / 25

How are scores calculated?

Stars

286

Forks

23

Language

Python

License

MIT

Last pushed

Oct 20, 2022

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/transformers/neulab/knn-transformers"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.