Skip to main content

🚀 Unified NLP Pipelines for Language Models

Project description

PyPI Downloads Docs License

Langformers

Langformers is a flexible and user-friendly library that unifies NLP pipelines for both Large Language Models (LLMs) and Masked Language Models (MLMs) into one simple API.

What makes Langformers special? Whether you're generating text, training classifiers, labelling data, embedding sentences, reranking sentences, or building a semantic search index... the API stays consistent:

from langformers import tasks

component = tasks.create_<something>(...)
component.<do_something>()

No need to juggle different frameworks — Langformers brings Hugging Face Transformers, Ollama, FAISS, ChromaDB, Pinecone, and more under one unified interface.

Use the same pattern everywhere:

tasks.create_generator(...)   # Chatting with LLMs
tasks.create_labeller(...)    # Data labelling using LLMs
tasks.create_embedder(...)    # Embeding Sentences
tasks.create_reranker(...)    # Reranking Sentences
tasks.create_classifier(...)  # Training a Text Classifier
tasks.create_tokenizer()      # Training a Custom Tokenizer
tasks.create_mlm(...)         # Pretraining an MLM
tasks.create_searcher(...)    # Vector Database search
tasks.create_mimicker(...)    # Knowledge Distillation
tasks.create_chunker(...)     # Chunking for LLMs

Installation

Langformers can be installed using pip.

pip install -U langformers

Supported Tasks

Below are the pre-built NLP tasks available in Langformers. Each link points to an example in Langformer's documentation to help you get started quickly.

Generative LLMs (e.g., Llama, Mistral, DeepSeek)

Masked Language Models (e.g., RoBERTa)

Embeddings & Search (e.g., Sentence Transformers, FAISS, Pinecone)

Documentation

Complete documentation and advanced usage examples are available at: https://langformers.com.

License

Langformers is released under the Apache License 2.0.

Contributing

We welcome contributions! Please see our contribution guidelines for details.


Built with ❤️ for the future of language AI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langformers-0.3.1.tar.gz (870.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langformers-0.3.1-py3-none-any.whl (890.6 kB view details)

Uploaded Python 3

File details

Details for the file langformers-0.3.1.tar.gz.

File metadata

  • Download URL: langformers-0.3.1.tar.gz
  • Upload date:
  • Size: 870.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.10

File hashes

Hashes for langformers-0.3.1.tar.gz
Algorithm Hash digest
SHA256 e6cb735a39c93d2f001273d4a25f380f6cf523d650c3fcebf18f10622d89e176
MD5 08baf151a1b601a91b28070a670a3a55
BLAKE2b-256 27b4a1e23bcc5cf5664d591009da768084dcacfb033624aef707ea5eb71c0e1a

See more details on using hashes here.

File details

Details for the file langformers-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: langformers-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 890.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.10

File hashes

Hashes for langformers-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba00f47c256742e6e4cd83f40f59f820cc4aee6d1c82ab219d656fdff580025a
MD5 5a72d2f40bc3431f18dbbeb818d5ef51
BLAKE2b-256 7fa0ccfafc1df1d6c0bb4b30831e856fe14a6d992fcf52c3b86a3faec6fcf7b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page