DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to train a LoRA on a rented GPU with Modal with AI Toolkit

Use the README's Modal path to run a training config on a cloud A100 and download the result from a Modal volume.

Short answer: Set up AI Toolkit locally, then run pip install modal and modal setup to authenticate; then run huggingface-cli login with a READ token and request access to FLUX.1-dev; copy an example config from config/examples/modal, edit run_modal.py with your local path, GPU and timeout, then run modal run run_modal.py --config-file-list-str=/root/ai-toolkit/config/whatever_you_want.yml. All steps.

  • Content
  • Advanced
  • half a day
  • From the README
  • Claude Code
  • Codex
  • Cursor
  • Gemini CLI

cost. Modal bills GPU time; the README default is an A100 40GB with a 2 hour timeout.

Credentials. You authenticate Modal and Hugging Face on your machine; never paste those tokens into configs you share.

Who it is forA creator without a big local GPU.

The problemConsumer laptops cannot train FLUX LoRAs.

The outcomeA LoRA trained in the cloud and downloaded to your machine.

What you need first

  • Python >= 3.10 (3.12 recommended), git and a Python venv
  • An Nvidia GPU with enough memory for the model you train (example configs target 24GB)
  • Node.js > 20 for the web UI, and a Hugging Face token for gated models such as FLUX.1-dev

Steps

  1. Set up AI Toolkit locally, then run pip install modal and modal setup to authenticate
  2. Run huggingface-cli login with a READ token and request access to FLUX.1-dev
  3. Copy an example config from config/examples/modal, edit run_modal.py with your local path, GPU and timeout, then run modal run run_modal.py --config-file-list-str=/root/ai-toolkit/config/whatever_you_want.yml
  4. Check results with modal volume ls flux-lora-models and download with modal volume get flux-lora-models your-model-name

Prompt for your agent

Using ostris/ai-toolkit's Modal guide, prepare a config from config/examples/modal for <my dataset>, update run_modal.py, and give me the exact modal run command and the volume commands to fetch the LoRA.

Caveat. Follow the example /root/ai-toolkit paths in the Modal config exactly, as the README stresses.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for ostris/ai-toolkit and "Train a LoRA on a rented GPU with Modal"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer