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.
Metadata
Release files for langformers 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langformers-0.5.0.tar.gz | 874.6 kB | Without provenance | Details for langformers-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langformers-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for langformers-0.5.0-py3-none-any.whl |
Total release size: 1.8 MB
Release files / langformers-0.5.0.tar.gz
| Download URL | langformers-0.5.0.tar.gz |
|---|---|
| Size | 874.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f05e2d9e5eed8739ca9648d27aa71e239f09f017b0f8adaf560dbefbaa5e468
|
|
BLAKE2b-256 checksum How to use checksums |
50a2615f9f09905b34e72d0e0c4e619ba29c285ec3eb6f1c20260d8d08a88191
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.10
|
Release files / langformers-0.5.0-py3-none-any.whl
| Download URL | langformers-0.5.0-py3-none-any.whl |
|---|---|
| Size | 896.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
439a46f0f3444d620a3bf52d19e8b1f311bb18bf15a73afac856815d53665d82
|
|
BLAKE2b-256 checksum How to use checksums |
7a5697947b17dd64bd0ad08917bd0ce6c85c185aa97ac12698e2ae9296f9cebd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.10
|
Security for langformers 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.