Note:
langtuneis now part of the unifiedlangtrainSDK.pip install langtrain[train]includes everything from langtune plus AdaptiveRank, DatasetIntelligence, and vision LLM support. 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/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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langtune-0.1.44.tar.gz.
File metadata
- Download URL: langtune-0.1.44.tar.gz
- Upload date:
- Size: 115.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebaa31ec3cbc22d6b7ab3e6593daa379b4687126d7f309cba78f8e84f2051fb6
|
|
| MD5 |
ee0987dc780e8fc6226da2e139a2eaff
|
|
| BLAKE2b-256 |
eb776189957662dd45f038f5f6779fac6cc21963e0ec0a47c608f1b3b46e9457
|
File details
Details for the file langtune-0.1.44-py3-none-any.whl.
File metadata
- Download URL: langtune-0.1.44-py3-none-any.whl
- Upload date:
- Size: 130.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0208e81737dfd6bfd5e26bd967cf1965a4a255fdb342f78c32545f89e238c97
|
|
| MD5 |
7b4afefca1cc21d7fc13c08413e71ce5
|
|
| BLAKE2b-256 |
be05445673061f23e4ec993e5b8a1c2ed868516f3b3387e2cdcc80c3d20a1a96
|