Installation¶
This guide will help you install LLMBuilder and set up your environment for training and deploying language models.
System Requirements¶
Minimum Requirements¶
- Python: 3.8 or higher
- RAM: 4GB (8GB+ recommended)
- Storage: 2GB free space
- OS: Windows, macOS, or Linux
Recommended Requirements¶
- Python: 3.9 or higher
- RAM: 16GB or more
- GPU: NVIDIA GPU with 8GB+ VRAM (optional but recommended)
- Storage: 10GB+ free space for models and data
Installation Methods¶
Method 1: PyPI Installation (Recommended)¶
The easiest way to install LLMBuilder is via PyPI:
Method 2: Development Installation¶
For the latest features or if you want to contribute:
# Clone the repository
git clone https://github.com/Qubasehq/llmbuilder-package.git
cd llmbuilder-package
# Install in development mode
pip install -e .
Method 3: CPU-Only Installation¶
If you don't have a GPU or want to use CPU-only PyTorch:
# Install CPU-only PyTorch first
pip install torch --index-url https://download.pytorch.org/whl/cpu
# Then install LLMBuilder
pip install llmbuilder
Verify Installation¶
Test your installation by running:
# Check if LLMBuilder is installed
python -c "import llmbuilder; print(f'LLMBuilder {llmbuilder.__version__} installed successfully!')"
# Test the CLI
llmbuilder --version
llmbuilder info
You should see output similar to:
LLMBuilder installed successfully!
🤖 LLMBuilder version
A comprehensive toolkit for building, training, and deploying language models.
Optional Dependencies¶
For GPU Training¶
If you have an NVIDIA GPU and want to use CUDA:
# Install CUDA-enabled PyTorch (adjust version as needed)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
For Advanced Data Processing¶
For processing various document formats:
This includes:
pandas
- For data manipulationpymupdf
- For PDF processingdocx2txt
- For DOCX filespython-pptx
- For PowerPoint filesbeautifulsoup4
- For HTML processing
For Development¶
If you're contributing to LLMBuilder:
This includes:
pytest
- For running testsblack
- For code formattingruff
- For lintingmypy
- For type checking
For Model Export¶
For exporting models to different formats:
This includes:
onnx
- For ONNX exportonnxruntime
- For ONNX inference
Environment Setup¶
Virtual Environment (Recommended)¶
Create a dedicated virtual environment for LLMBuilder:
Environment Variables¶
You can set these optional environment variables:
# Enable slow tests (for development)
export RUN_SLOW=1
# Enable performance tests (for development)
export RUN_PERF=1
# Set default device
export LLMBUILDER_DEVICE=cuda # or 'cpu'
# Set cache directory
export LLMBUILDER_CACHE_DIR=/path/to/cache
Troubleshooting¶
Common Issues¶
ImportError: No module named 'torch'¶
Solution: Install PyTorch first:
CUDA out of memory¶
Solution: Use CPU-only installation or reduce batch size:
Permission denied errors¶
Solution: Use --user
flag or virtual environment:
Package conflicts¶
Solution: Create a fresh virtual environment:
python -m venv fresh-env
source fresh-env/bin/activate # or fresh-env\Scripts\activate on Windows
pip install llmbuilder
Getting Help¶
If you encounter issues:
- Check the logs: LLMBuilder provides detailed error messages
- Search existing issues: GitHub Issues
- Create a new issue: Include your system info and error messages
- Join discussions: GitHub Discussions
System Information¶
To help with troubleshooting, you can gather system information:
import llmbuilder
import torch
import sys
import platform
print(f"LLMBuilder version: {llmbuilder.__version__}")
print(f"Python version: {sys.version}")
print(f"PyTorch version: {torch.__version__}")
print(f"CUDA available: {torch.cuda.is_available()}")
if torch.cuda.is_available():
print(f"CUDA version: {torch.version.cuda}")
print(f"GPU count: {torch.cuda.device_count()}")
print(f"Platform: {platform.platform()}")
Next Steps¶
Once you have LLMBuilder installed:
- Quick Start - Get up and running in 5 minutes
- First Model - Train your first language model
- User Guide - Learn about all features
Pro Tip
For the best experience, we recommend using a virtual environment and installing the GPU version of PyTorch if you have a compatible NVIDIA GPU.