Langtrain
Langtrain Docs
DocsAPI ReferenceSDK Reference
AppChat
GitHubDiscord

Quick Start

Train and deploy your first custom AI model in under 5 minutes. No infrastructure required.

Python 3.9+
GPU Optional
100+ Models Supported

1. Install the SDK

Install the Langtrain SDK using pip. We recommend doing this inside a virtual environment.

bash
1pip install langtrain-ai

2. Prepare Your Data

Create a .jsonl file. Each line must be a JSON object with a messages array in standard OpenAI format.

json
1{"messages": [{"role": "user", "content": "What is Langtrain?"}, {"role": "assistant", "content": "It's a platform for fine-tuning LLMs."}]}
2{"messages": [{"role": "user", "content": "How do I start?"}, {"role": "assistant", "content": "Use the LoRATrainer class!"}]}

3. Train with LoRA

Use the LoRATrainer to fine-tune your model. LoRA trains only a fraction of the parameters, making it insanely fast and memory-efficient.

python
1from langtrain import LoRATrainer
2
3trainer = LoRATrainer(
4 model="meta-llama/Llama-3.3-8B",
5 output_dir="./my-model"
6)
7
8# Start training!
9trainer.train("training_data.jsonl")

4. Deploy to Cloud

Push your trained model directly to Langtrain Cloud for instant production inference.

python
1# Deploy to Langtrain Cloud
2trainer.push("my-custom-model")
3
4# Your model is now available via REST API!

Next Steps

Explore the REST API ReferenceLearn about advanced QLoRA settings