Cloud & GPU Commands¶
Vllama integrates with Kaggle to let you offload compute-heavy tasks to their free GPU — no payment required, just a Kaggle account.
vllama login — Authenticate with Kaggle¶
Save your Kaggle credentials so Vllama can submit kernels on your behalf.
Syntax¶
How to Get Your Kaggle API Key¶
- Go to kaggle.com and log in
- Click your profile picture → Settings
- Scroll to API section → Create New Token
- A
kaggle.jsonfile downloads containing yourusernameandkey
Examples¶
# Provide credentials directly
vllama login --service kaggle --username manvith --key abcdef1234567890
# Use existing kaggle.json at ~/.kaggle/kaggle.json
vllama login --service kaggle
vllama logout — Remove Credentials¶
Removes saved Kaggle credentials from your machine.
vllama init gpu — Initialize a GPU Session¶
Prepares a GPU-enabled Kaggle kernel for use.
This is typically called automatically when you run commands with --service kaggle. You can run it manually to verify connectivity.
Using Kaggle GPU with Any Command¶
Add --service kaggle to these commands to offload to Kaggle's free T4 GPU:
# Image generation on Kaggle GPU
vllama run stabilityai/sd-turbo --service kaggle --prompt "..."
# Video generation on Kaggle GPU
vllama run_video damo-vilab/text-to-video-ms-1.7b --service kaggle --prompt "..."
# Image to 3D on Kaggle GPU
vllama image3d --path photo.jpg --service kaggle
# Video to 3D on Kaggle GPU
vllama video3d --path clip.mp4 --service kaggle
How It Works¶
When you add --service kaggle:
- Vllama creates a Kaggle notebook kernel via the Kaggle API
- The kernel runs with a free T4 GPU enabled
- Vllama installs the required dependencies inside the kernel
- The model runs and generates the output
- The output file is downloaded to your local machine automatically
Kaggle GPU limits
Kaggle provides approximately 30 GPU hours per week for free accounts. Each image generation takes a few minutes.
Environment Variables¶
Alternatively, set credentials as environment variables instead of using vllama login:
Or create a .env file in your project directory:
KAGGLE_USERNAME=your_username
KAGGLE_KEY=your_api_key
HF_HOME=/path/to/model/cache # optional: custom model cache dir
HF_TOKEN=your_huggingface_token # optional: for gated models like Llama 2
For a detailed step-by-step walkthrough, see the No GPU Guide.