Langformers: Unified NLP Pipelines for Language Models

Rabindra Lamsal, Maria Rodriguez Read, Shanika Karunasekera
4/12/2025
cs.CL

No official code found. Best implementation: langformers/langformers (19 stars, Apache-2.0, last commit 2026-02-27).

Abstract

Transformer-based language models have revolutionized the field of natural language processing (NLP). However, using these models often involves navigating multiple frameworks and tools, as well as writing repetitive boilerplate code. This complexity can discourage non-programmers and beginners, and even slow down prototyping for experienced developers. To address these challenges, we introduce Langformers, an open-source Python library designed to streamline NLP pipelines through a unified, factory-based interface for large language model (LLM) and masked language model (MLM) tasks. Langformers integrates conversational AI, MLM pretraining, text classification, sentence embedding/reranking, data labelling, semantic search, and knowledge distillation into a cohesive API, supporting popular platforms such as Hugging Face and Ollama. Key innovations include: (1) task-specific factories that abstract training, inference, and deployment complexities; (2) built-in memory and streaming for conversational agents; and (3) lightweight, modular design that prioritizes ease of use. Documentation: https://langformers.com

View on arXivView PDF

Code Implementations(1)

Apache-2.0

πŸš€ Unified NLP Pipelines for Language Models

191HTML, PythonApr 8, 20257 months agoApache-2.0
bertchromadbchunkingdata-labelingembeddings+13 more

Similar Papers

Cite this paper

@article{lamsal2025langformers,
  title  = {Langformers: Unified NLP Pipelines for Language Models},
  author = {Rabindra Lamsal and Maria Rodriguez Read and Shanika Karunasekera},
  year   = {2025},
  eprint = {2504.09170},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.09170v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.09170.svg)](https://codeofpaper.com/paper/2504.09170)

Discussion