Efficient LoRA Fine-Tuning for Large Language Models - Train smarter, not harder.
Project description
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
🚀 Blazing FastTrain 7B models in under 30 minutes on a single GPU. Our optimized kernels squeeze every last FLOP. 🎯 Zero Config RequiredSmart defaults that just work. No PhD required. Start training in seconds. 💾 Memory Efficient4-bit quantization + gradient checkpointing = Train 70B models on consumer hardware. |
🔧 Production ReadyBattle-tested at scale. Used by teams fine-tuning thousands of models daily. 🌐 Any Model, Any DataWorks with Llama, Mistral, Qwen, Phi, and more. JSONL, CSV, or HuggingFace datasets. ☁️ Cloud NativeOne-click deployment to Langtrain Cloud. Or export to GGUF, ONNX, HuggingFace. |
🎯 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.
Project details
Release history Release notifications | RSS feed
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.33.tar.gz.
File metadata
- Download URL: langtune-0.1.33.tar.gz
- Upload date:
- Size: 82.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d8cfc0de5e48abe67108017ed6c341be4e76fbf2669f66b0942c47db7f8d42c
|
|
| MD5 |
27b33b7badda5aba7f4473ee55d311c1
|
|
| BLAKE2b-256 |
cd02852f35ee2eab5f728d09005a468dfd1346f6b238d6fd7c7960d0b0d4bace
|
File details
Details for the file langtune-0.1.33-py3-none-any.whl.
File metadata
- Download URL: langtune-0.1.33-py3-none-any.whl
- Upload date:
- Size: 92.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35d1a7cda9d43a96573995fa199dd8860ed4814ffb9364779a0aae9c5bdec22c
|
|
| MD5 |
a8a7dcbf71a40ea8b3ff9a68d2e3b332
|
|
| BLAKE2b-256 |
0e791fee7e693fa10a57860b5d606a3dd3767a9ddf63daada2353227caf8bcd4
|