create-llm simplifies the complex task of training language models by providing production-ready templates and tools in a single command. Support for various architectures and optimization for different use cases ensure rapid development, making it possible to go from concept to deployment seamlessly.
create-llm
The fastest way to start training your own Language Model
Create production-ready LLM training projects in seconds. This tool functions like create-next-app, but for training custom language models, simplifying the complex process of setting up an LLM training environment.
📦 npm Package • 📖 Documentation • 🐛 Report Bug • 💡 Request Feature
npx @theanikrtgiri/create-llm my-awesome-llm
cd my-awesome-llm
pip install -r requirements.txt
python training/train.py
Training a language model from scratch can be a daunting task, requiring knowledge of several components, including:
create-llm streamlines this by providing all necessary tools in one command.
Choose from four templates optimized for various use cases:
Includes everything needed out of the box:
Features intelligent configuration that:
Optional integrations include:
# Using npx (recommended - no installation needed)
npx @theanikrtgiri/create-llm my-llm
# Or install globally
npm install -g @theanikrtgiri/create-llm
create-llm my-llm
npx @theanikrtgiri/create-llm
You will be prompted for:
# Specify everything upfront
npx create-llm my-llm --template tiny --tokenizer bpe --skip-install
my-llm/
├── 📁 data/
│ ├── raw/ # Your training data goes here
│ ├── processed/ # Tokenized data (auto-generated)
│ ├── dataset.py # PyTorch dataset classes
│ └── prepare.py # Data preprocessing script
│
├── 📁 models/
│ ├── architectures/ # Model implementations
│ ├── __init__.py
│ └── config.py # Configuration loader
│
├── 📁 tokenizer/
│ ├── train.py # Tokenizer training script
│ └── tokenizer.json # Trained tokenizer (auto-generated)
│
├── 📁 training/
│ ├── train.py # Main training script
│ ├── trainer.py # Trainer class
│ └── dashboard/ # Live training dashboard
│
├── 📁 evaluation/
│ ├── evaluate.py # Model evaluation
│ └── generate.py # Text generation
│
├── 📁 plugins/ # Optional integrations
│
├── 📁 checkpoints/ # Saved models (auto-generated)
│
├── 📄 llm.config.js # Main configuration file
├── 📄 requirements.txt # Python dependencies
├── 📄 chat.py # Interactive chat interface
├── 📄 deploy.py # Deployment script
└── 📄 README.md # Project documentation
1️⃣ Create Your Project
npx @theanikrtgiri/create-llm my-llm --template tiny --tokenizer bpe
cd my-llm
2️⃣ Install Dependencies
pip install -r requirements.txt
3️⃣ Add Your Data
Place your text files in data/raw/:
# Example: Download Shakespeare
curl https://www.gutenberg.org/files/100/100-0.txt > data/raw/shakespeare.txt
# Or add your own files
cp /path/to/your/data.txt data/raw/
4️⃣ Train Tokenizer
python tokenizer/train.py --data data/raw/
5️⃣ Prepare Dataset
python data/prepare.py
6️⃣ Start Training
# Basic training
python training/train.py
# With live dashboard (recommended!)
python training/train.py --dashboard
# Then open http://localhost:5000
# Resume from checkpoint
python training/train.py --resume checkpoints/checkpoint-1000.pt
7️⃣ Evaluate Your Model
python evaluation/evaluate.py --checkpoint checkpoints/checkpoint-best.pt
8️⃣ Generate Text
python evaluation/generate.py \
--checkpoint checkpoints/checkpoint-best.pt \
--prompt "Once upon a time" \
--temperature 0.8
9️⃣ Interactive Chat
python chat.py --checkpoint checkpoints/checkpoint-best.pt
🔟 Deploy
# To Hugging Face
python deploy.py --to huggingface --repo-id username/my-model
# To Replicate
python deploy.py --to replicate --model-name my-model
Monitor training in real-time with a web interface, providing insights into loss curves, learning rate schedules, and resource usage.
Start the dashboard using:
python training/train.py --dashboard
Quickly compare multiple trained models for performance and metrics:
python compare.py checkpoints/model-v1/ checkpoints/model-v2/
Utilizes automatic checkpoint management to save the best model based on validation loss, maintain configurable checkpoints, and resume training from any checkpoint.
Create custom plugins to extend functionality, enhancing the training experience or integrating with other services.
Common issues may arise, such as vocabulary size mismatches or memory errors. Refer to detailed guidance in the documentation for resolution strategies.
Future releases aim to include additional model architectures, distributed training support, model quantization tools, and a web UI for easier project management, along with more deployment targets.
Utilizes contributions from numerous open-source tools and the LLM community, enhancing usability and functionality.
GitHub • npm • Issues • [Twitter](https://twitter.
No comments yet.
Sign in to be the first to comment.