Skip to main content

Efficient LoRA Fine-Tuning for Vision LLMs with advanced CLI and model zoo

Project description

Note: langvision is now part of the unified langtrain SDK. pip install langtrain[vision] includes everything from langvision plus AdaptiveRank, DatasetIntelligence, and text LLM support. langvision continues to receive updates and remains fully supported.


Langvision

Fine-tune Vision LLMs with ease

Train LLaVA, Qwen-VL, and other vision models in minutes.
The simplest way to create custom multimodal AI.

Product Hunt

PyPI Downloads License

Quick StartFeaturesModelsDocs


⚡ Quick Start

1-Click Install (Recommended)

The fastest way to get started. Installs Langvision in an isolated environment.

curl -fsSL https://raw.githubusercontent.com/langtrain-ai/langvision/main/scripts/install.sh | bash

Or using pip

pip install langvision

Fine-tune a vision model in 3 lines:

from langvision import LoRATrainer

trainer = LoRATrainer(model_name="llava-hf/llava-1.5-7b-hf")
trainer.train_from_file("image_data.jsonl")

Your custom vision model is ready.


✨ Features

🖼️ Multimodal Training

Train on images + text together. Perfect for VQA, image captioning, and visual reasoning.

🎯 Smart Defaults

Optimized configurations for each model architecture. Just point and train.

💾 Efficient Memory

LoRA + 4-bit quantization = Train 13B vision models on a single 24GB GPU.

🔧 Battle-Tested

Production-ready code used by teams building real-world vision applications.

🌐 All Major Models

LLaVA, Qwen-VL, CogVLM, InternVL, and more. Full compatibility.

☁️ Deploy Anywhere

Export to GGUF, ONNX, or deploy directly to Langtrain Cloud.


🤖 Supported Models

Model Parameters Memory Required
LLaVA 1.5 7B, 13B 8GB, 16GB
Qwen-VL 7B 8GB
CogVLM 17B 24GB
InternVL 6B, 26B 8GB, 32GB
Phi-3 Vision 4.2B 6GB

📖 Full Example

from langvision import LoRATrainer
from langvision.config import TrainingConfig, LoRAConfig

# Configure training
config = TrainingConfig(
    num_epochs=3,
    batch_size=2,
    learning_rate=2e-4,
    lora=LoRAConfig(rank=16, alpha=32)
)

# Initialize trainer
trainer = LoRATrainer(
    model_name="llava-hf/llava-1.5-7b-hf",
    output_dir="./my-vision-model",
    config=config
)

# Train on image-text data
trainer.train_from_file("training_data.jsonl")

📝 Data Format

{"image": "path/to/image1.jpg", "conversations": [{"from": "human", "value": "What's in this image?"}, {"from": "assistant", "value": "A cat sitting on a couch."}]}

🤝 Community

DiscordTwitterWebsite


Built with ❤️ by Langtrain AI

Making vision AI accessible to everyone.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langvision-0.1.59.tar.gz (139.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

langvision-0.1.59-py3-none-any.whl (171.0 kB view details)

Uploaded Python 3

File details

Details for the file langvision-0.1.59.tar.gz.

File metadata

  • Download URL: langvision-0.1.59.tar.gz
  • Upload date:
  • Size: 139.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for langvision-0.1.59.tar.gz
Algorithm Hash digest
SHA256 39cf42df78dbb2f653b8f5916e363caedf18f94a735312dd3e11682ed5270679
MD5 c48774dcab651fc3dc9fbb7256ef3a70
BLAKE2b-256 6b24da54fa221e6c162cfce406e41427143efbc713a0ef1e36630f0d82e6d6e9

See more details on using hashes here.

File details

Details for the file langvision-0.1.59-py3-none-any.whl.

File metadata

  • Download URL: langvision-0.1.59-py3-none-any.whl
  • Upload date:
  • Size: 171.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for langvision-0.1.59-py3-none-any.whl
Algorithm Hash digest
SHA256 1106ddb4ba6f9c70c03d49d1c9c736d9518234d1805c385981b32b432f566455
MD5 461e317e915bae33f7d151823f3bd3f5
BLAKE2b-256 07c48a04387dbd2cfc4eb6188553151ff821cf92d50746191d727ba1813cc6b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page