ask-language-model-training

Guides running and debugging the Tinygrad GPT training package across local, pipeline, API, and Vast.ai modes.

74|11|Updated Jul 4, 2024
One-click install
npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-language-model-training-opensourceagi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ask-language-model-training
Source: https://github.com/OpenSourceAGI/qwksearch-research-agent/tree/main/skills/ask-language-model-training
Command: npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-language-model-training-opensourceagi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? The language-model-training package has stale README paths, multiple run modes, and failure points (missing tools, OOM, SSH, container limits) that make it hard to run or debug without deep knowledge of the tree. ## Core Features & Use Cases - Run mode guidance: Covers the local demo, the full Wikipedia pipeline (aria2c + dumpster-dive + MongoDB), the FastAPI control API, and the Next.js dashboard. - Vast.ai GPU backend: Explains the env vars and per-request overrides for renting marketplace GPUs to run training remotely. - Troubleshooting table: Maps symptoms like ImportError, aria2c not found, OOM, and Cloudflare Container limits to concrete fixes. - Use Case: A developer's training job dies on a Cloudflare Container; the Skill explains the ~20 GB dump exceeds container RAM/disk and directs them to a VM or the Vast.ai backend. ## Quick Start Ask how to start the Wikipedia training pipeline or why a training job failed, and follow the guidance for the relevant run mode.

Frequently Asked Questions about ask-language-model-training

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I train a GPT from scratch on Wikipedia with Tinygrad?

Install dependencies with pip install -r requirements.txt at the package root, then run python -m wikipedia.pipeline or src/training/wikipedia_transformer.py. The full pipeline downloads the ~20 GB Wikipedia dump via aria2c and loads it into MongoDB with dumpster-dive.

How do I run training on a rented Vast.ai GPU?

Set VAST_API_KEY and ensure the public half of VAST_SSH_KEY_PATH is registered on your Vast.ai account, then call POST /api/jobs/train/start. The service rents an offer under VAST_MAX_HOURLY, uploads the package over SSH, trains, and destroys the instance.

Why does the Wikipedia training pipeline fail on a Cloudflare Container?

Cloudflare dev and standard containers have only a few GB of RAM and disk, far below the ~20 GB compressed and ~100 GB uncompressed dump plus MongoDB. Run the pipeline on a VM or bare metal and use the container only as a control surface.

Why do I get ImportError: No module named 'tinygrad'?

The README points to config/requirements.txt, which does not exist. Run pip install -r requirements.txt from the package root instead, since the package is Python-only with its own pyproject.toml and pytest setup.

What can I do when training runs out of memory?

Lower BATCH_SIZE, raise GRADIENT_ACCUMULATION_STEPS, or set USE_DEMO_MODE=true to fall back to small demo text. The pipeline also falls back to demo text automatically when dumpster-dive or MongoDB is unavailable.