pip install langtrain-ai # cloud API + dataset intelligence
pip install langtrain-ai[train] # + local GPU training (text LLMs)
pip install langtrain-ai[vision] # + vision LLMs (LLaVA, Qwen-VL, …)
pip install langtrain-ai[all] # everything
What's inside
| Module | What it does |
|---|---|
FastLanguageModel |
Unsloth-style API for text LLMs — local or cloud |
FastVisionModel |
Same API for vision LLMs (LLaVA, Qwen-VL, InternVL, …) |
AdaptiveRankTrainer |
Novel algorithm: SpectralLoRA + dynamic rank + TurboQuant |
DatasetIntelligence |
Drop any file → auto model + training config |
LangtrainClient |
Cloud API: fine-tune, deploy, chat, GPU, models |
lt CLI |
lt login, lt fine-tune, lt analyze, lt gpu |
Quick start
Drop any dataset — get a training config
from langtrain import DatasetIntelligence
report = DatasetIntelligence.analyze("my_data.jsonl")
report.print_summary()
# ┌─────────────────────────────────────────────┐
# │ Task type instruction (87% confidence) │
# │ Domain medical │
# │ Samples 2,400 │
# │ Model meta-llama/Llama-3.1-8B │
# │ Method adaptive_rank rank=16 │
# │ TurboQuant ✓ polar_quant+qjl │
# └─────────────────────────────────────────────┘
Local training with AdaptiveRank
from langtrain import FastLanguageModel, AdaptiveRankConfig
config = AdaptiveRankConfig(
initial_rank=16,
max_rank=64, # grows/shrinks based on gradient variance
use_turboquant_kv=True # PolarQuant 3-bit KV cache
)
model, tokenizer = FastLanguageModel.from_pretrained(
"meta-llama/Llama-3.1-8B",
load_in_4bit=True,
)
model = FastLanguageModel.get_peft_model(model, method="adaptive_rank", config=config)
FastLanguageModel.train(model, tokenizer, dataset, output_dir="./output")
Cloud API
from langtrain import LangtrainClient
client = LangtrainClient(api_key="lt_...")
# Check account + GPU options
print(client.me())
print(client.gpu.available())
# Fine-tune
job = client.fine_tune(
model="meta-llama/Llama-3.1-8B",
dataset_id="ds_xyz",
method="adaptive_rank",
)
for step in job.stream():
print(step)
CLI
lt login # authenticate
lt whoami # account + GPU availability
lt gpu # list GPU options
lt analyze my_data.jsonl # dataset intelligence
lt fine-tune llama-3.1-8b data.jsonl # launch training
lt jobs # list jobs
lt models # list models
Why Langtrain vs Unsloth?
| Unsloth | Langtrain | |
|---|---|---|
| Text LLMs | ✓ | ✓ FastLanguageModel |
| Vision LLMs | ✗ | ✓ FastVisionModel |
| Training algorithm | vanilla QLoRA | AdaptiveRank (SpectralLoRA + dynamic rank) |
| Dataset analysis | ✗ | ✓ DatasetIntelligence (7-pass, auto model pick) |
| KV cache compression | ✗ | ✓ TurboQuant (6× memory, 8× speed) |
| Cloud training | ✗ | ✓ langtrain-server (A100/H100) |
| RL alignment | ✗ | ✓ DPO / GRPO / PPO / Constitutional AI |
| CLI | ✗ | ✓ lt fine-tune, lt analyze, lt gpu |
Made by Langtrain AI · Docs · Discord
Metadata
Release files for langtrain-ai 1.0.4
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 |
|---|---|---|---|---|
| langtrain_ai-1.0.4.tar.gz | 30.5 kB | Without provenance | Details for langtrain_ai-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langtrain_ai-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for langtrain_ai-1.0.4-py3-none-any.whl |
Total release size: 63.6 kB
Release files / langtrain_ai-1.0.4.tar.gz
| Download URL | langtrain_ai-1.0.4.tar.gz |
|---|---|
| Size | 30.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad1dd647b094b70c84c109b450d804a2d00b9345679d68ee63e53ab770f91c57
|
|
BLAKE2b-256 checksum How to use checksums |
4354f3e63a0526dd36d8fdb88749757a26097bc857dcfa100d9f5ca54c401eb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / langtrain_ai-1.0.4-py3-none-any.whl
| Download URL | langtrain_ai-1.0.4-py3-none-any.whl |
|---|---|
| Size | 33.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2c554dd6072cb888b386ed5404d3a6e4091d8a031b98c47fedc488963d9ac90
|
|
BLAKE2b-256 checksum How to use checksums |
9fa7e222a2b2f7e2f16dfc081b40a8a273f76271b06f08c3afcedc8e4a4270bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for langtrain-ai 1.0.4
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.