LangDrive is an open-source JavaScript library that enables developers to train, deploy, and query open-source large language models using private data through a unified interface. The project is hosted at langdrive.ai and provides multiple access methods including a command-line interface, YAML configuration files, and REST APIs, making it accessible to developers with varying levels of technical expertise.
The core functionality centers on simplifying the machine learning workflow for LLMs. Users can ingest data from multiple sources including Firebase Firestore, Google Drive, CSV files, website URLs, and email via SMTP. Once data is ingested, LangDrive handles fine-tuning of open-source models by formatting data into input-output completion pairs. After training, models can be deployed directly to the Hugging Face Hub using user-provided access tokens, and inference endpoints are generated for querying the trained models.
The library supports a two-step workflow for Node developers. The simplest approach involves installing the npm package and running a single command like langdrive train with a CSV file path and Hugging Face token, optionally adding a deploy flag. This command orchestrates the entire pipeline from data retrieval through model training to hosting weights and returning an inference endpoint. The CLI accepts arguments for specifying YAML configuration documents, CSV training data paths, Hugging Face API tokens with write permissions, base model selection, and deployment preferences.
LangDrive's use cases span question-answering systems over internal documents, chatbot development, AI agent creation, and content generation applications. The library includes built-in data utilities for CRUD operations across different data connectors, reducing boilerplate code for common data management tasks. The project exposes two primary API endpoints: a completions API at api.langdrive.ai/v1/chat/completions for inference and a training API at api.langdrive.ai/train for programmatic model training.
According to GitGenius activity tracking, the repository shows rapid issue and pull request response times with a median latency of 0.0 hours and mean latency of 14.8 hours across tracked items, indicating active maintenance. The most active contributors tracked include BDL-LTD, MichaelVandi, and ThatGuySam. The repository shares contributor overlap with acornjs/acorn, suggesting cross-project collaboration within the developer community.
The project is classified across multiple AI and machine learning domains including AI training, language model development, Llama-based LLM work, natural language processing, dataset management, and neural networks. This broad classification reflects the library's position as a comprehensive tool for the full lifecycle of LLM development with private data. The project welcomes community contributions through the standard fork and pull request process and maintains an active Discord community for updates and roadmap discussions.