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

This installs the latest version with core dependencies.

Optional Dependencies

Langformers includes optional integrations you can install depending on your use case:

  • For FAISS support: pip install -U langformers[faiss]

  • For ChromaDB support: pip install -U langformers[chromadb]

  • For Pinecone support: pip install -U langformers[pinecone]

  • To install all optional features: pip install -U langformers[all]

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.5.0.tar.gz (874.6 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.5.0-py3-none-any.whl (896.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for langformers-0.5.0.tar.gz
Algorithm Hash digest
SHA256 9f05e2d9e5eed8739ca9648d27aa71e239f09f017b0f8adaf560dbefbaa5e468
MD5 68e704507669c17610ec46e34fb20025
BLAKE2b-256 50a2615f9f09905b34e72d0e0c4e619ba29c285ec3eb6f1c20260d8d08a88191

See more details on using hashes here.

File details

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

File metadata

  • Download URL: langformers-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 896.1 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 439a46f0f3444d620a3bf52d19e8b1f311bb18bf15a73afac856815d53665d82
MD5 9616e6e4761ce0c56f5ec4463f2acfde
BLAKE2b-256 7a5697947b17dd64bd0ad08917bd0ce6c85c185aa97ac12698e2ae9296f9cebd

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