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.4.0.tar.gz (871.1 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.4.0-py3-none-any.whl (891.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for langformers-0.4.0.tar.gz
Algorithm Hash digest
SHA256 0424e449cf75825ce0bac16ab47b8518c0c22792a2538af03555967e1bf71547
MD5 18bd3724ad298ee9c33856ce28038a67
BLAKE2b-256 dcff5c040b730ca26b586df4187b1d32eda4301cb3533868f22417530a36b9a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: langformers-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 891.4 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cc4d78b8413000cea1d970d2ba148bf3c8912f450f140b20556c072d824bb81
MD5 cddc7eeaab531baa94bb738ac946ab65
BLAKE2b-256 bba2c1b09bfc910892d6f9e9d6f458a0542b4aba29a65352222219db713e9baf

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