Note:
langtuneis now part of the unifiedlangtrainSDK.pip install "langtrain-ai[train]"adds AdaptiveRank and DatasetIntelligence on top of langtune. langtune continues to receive updates and remains fully supported.
The fastest way to fine-tune LLMs
Production-ready LoRA fine-tuning in minutes, not days.
Built for ML engineers who need results, not complexity.
Quick Start • Features • Why Langtune • Docs
⚡ Quick Start
1-Click Install (Recommended)
The fastest way to get started. Installs Langtune in an isolated environment.
curl -fsSL https://raw.githubusercontent.com/langtrain-ai/langtrain_langtune/main/scripts/install.sh | bash
Or using pip
pip install langtune
Fine-tune your first model in 3 lines of code:
from langtune import LoRATrainer
trainer = LoRATrainer(model_name="meta-llama/Llama-2-7b-hf")
trainer.train_from_file("data.jsonl")
That's it. Your fine-tuned model is ready.
✨ Features
🎯 Why Langtune?
| Langtune | Others | |
|---|---|---|
| Time to first training | 30 seconds | 2+ hours |
| Lines of code | 3 | 100+ |
| Memory usage | 8GB | 24GB+ |
| Learning curve | Minutes | Days |
📖 Full Example
from langtune import LoRATrainer
from langtune.config import TrainingConfig, LoRAConfig
# Configure your training
config = TrainingConfig(
num_epochs=3,
batch_size=4,
learning_rate=2e-4,
lora=LoRAConfig(rank=16, alpha=32)
)
# Initialize and train
trainer = LoRATrainer(
model_name="mistralai/Mistral-7B-v0.1",
output_dir="./my-model",
config=config
)
# Train on your data
trainer.train_from_file("training_data.jsonl")
# Push to Hub (optional)
trainer.push_to_hub("my-username/my-fine-tuned-model")
🛠️ Advanced Usage
Custom Dataset Format
# JSONL format (recommended)
{"text": "Your training example here"}
{"text": "Another example"}
# Or instruction format
{"instruction": "Summarize this:", "input": "Long text...", "output": "Summary"}
Distributed Training
trainer = LoRATrainer(
model_name="meta-llama/Llama-2-70b-hf",
device_map="auto", # Automatic multi-GPU
)
Export Formats
# Export to different formats
trainer.export("gguf") # For llama.cpp
trainer.export("onnx") # For ONNX Runtime
trainer.export("hf") # HuggingFace format
🤝 Community
Built with ❤️ by Langtrain AI
Making LLM fine-tuning accessible to everyone.
Metadata
Release files for langtune 0.1.49
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 |
|---|---|---|---|---|
| langtune-0.1.49.tar.gz | 119.9 kB | Without provenance | Details for langtune-0.1.49.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langtune-0.1.49-py3-none-any.whl | Python 3 | none | any | Details for langtune-0.1.49-py3-none-any.whl |
Total release size: 253.7 kB
Release files / langtune-0.1.49.tar.gz
| Download URL | langtune-0.1.49.tar.gz |
|---|---|
| Size | 119.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74f4d2502a383a978aac93841784dc5e1d8196a47fdd524646c7f0a039fa0d2d
|
|
BLAKE2b-256 checksum How to use checksums |
f73dc924054f8de10e757324bc508a1995d4adf7acda08c25f059badecf58c75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / langtune-0.1.49-py3-none-any.whl
| Download URL | langtune-0.1.49-py3-none-any.whl |
|---|---|
| Size | 133.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3eac7f3e4befe610ea7124259dea9b71ba6f276761afb58098a111a680fc020a
|
|
BLAKE2b-256 checksum How to use checksums |
62ca802c5ee68a3c98e2b1dfa10a2dcdbd97b1c81cb0f346fef352c2cbad7c5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Security for langtune 0.1.49
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.