N
Neural Forge
Setup

Get your workshop ready.

Most of Module 1's labs run in your browser — no install needed. But by Module 6 you'll want a real local toolchain. This page is your one-stop installer guide. Pick a language tab, then your OS, then copy-paste. Each section ends with a one-line verification snippet so you know the install worked.

Recommended editor: VS Code with the Python, Pylance, rust-analyzer, and clangd extensions. code.visualstudio.com — works on every OS. If you prefer Vim / Neovim / Emacs / Cursor / Zed, all of them work; the course doesn't care. Just have something that gives you syntax highlighting and a debugger.

01Your operating system

All command blocks on this page switch to your OS.

macOS
Linux (Ubuntu/Debian)
Windows (PowerShell)

02How the in-browser runtime works

Every code lab has a small tier chip in its header — T0, T1, T2, T3, or T4. The chip tells you what the lab's Run ▶ button actually does for that language. Click any tier chip in a lab to jump back to this section.

Tier Languages Where Run goes First-load wait How you verify
T0 JavaScript In your browser, in a sandboxed Function. ~0 ms. Test pill shows ✓ / ✗ live.
T1 Python (CPython 3.11 via Pyodide) In your browser, in a Wasm Python. ~6 MB · ~10 s the first time, then cached. Test pill shows ✓ / ✗ live.
T2 C, Rust, CUDA Opens an external sandbox (Godbolt, Rust Playground) and copies your code to clipboard. Run locally for full features. External page load. Run the binary locally (see install steps below). Compare your stdout to the expected block in the lab.
T3 Any language — always available via Download. Saves the snippet as a file you can run on your own machine. Instant. Local toolchain (this page tells you how to install each one).
T4 JAX, Mojo, Triton Opens Colab / Modular Playground (typically needs an account — free tier OK). External page load. Run remotely; paste your output into the local verifier (coming in a later release) or compare by eye against the expected block in the lab.
First Python lab: a small pause is normal. The first time you hit Run ▶ on a Python tab anywhere in the course, the browser downloads CPython-as-WebAssembly (~6 MB) and the standard library. That takes about 10 seconds on a typical connection. Subsequent runs are instant. If the Run button looks "stuck" on the first Python lab, give it that one-time warmup before assuming something's broken.
About the test pill. A lab that prints a line like "All seven tests passed" will show a green ✓ 7 tests passed pill in the lab footer after a successful run. A run that throws an exception (failed assert, dim mismatch, etc.) shows a red ✗ failed pill. The hub remembers per-lab status, so labs you've passed stay marked green between visits.

03Languages

Python + PyTorch
JAX
Node.js
C (gcc/clang)
Rust
CUDA
Triton
Mojo

Python 3.11 + PyTorch + Jupyter

The workhorse. Required for every module.

brew install python@3.11
python3.11 -m venv ~/.venvs/forge
source ~/.venvs/forge/bin/activate
pip install --upgrade pip
pip install torch torchvision numpy jupyterlab matplotlib pandas datasets transformers
sudo apt update && sudo apt install -y python3.11 python3.11-venv
python3.11 -m venv ~/.venvs/forge
source ~/.venvs/forge/bin/activate
pip install --upgrade pip
pip install torch torchvision numpy jupyterlab matplotlib pandas datasets transformers
winget install -e --id Python.Python.3.11
py -3.11 -m venv $HOME\.venvs\forge
$HOME\.venvs\forge\Scripts\Activate.ps1
pip install --upgrade pip
pip install torch torchvision numpy jupyterlab matplotlib pandas datasets transformers

Verify:

python -c "import torch; print(torch.__version__, torch.cuda.is_available())"
Expected: a version string and True if you have a GPU, False if not. CPU is fine through Module 12.

04The AI Tutor

The tutor on every page talks to an LLM endpoint you control. We do not ship an API key. Pick a provider, run the proxy, paste your key. Three options:

Option A · Anthropic (recommended)

pip install anthropic flask flask-cors
export ANTHROPIC_API_KEY=sk-ant-...
python server/tutor-proxy.py --provider anthropic --port 8787

Option B · OpenAI

pip install openai flask flask-cors
export OPENAI_API_KEY=sk-...
python server/tutor-proxy.py --provider openai --port 8787

Option C · Local (Ollama — offline)

curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3.1:8b
python server/tutor-proxy.py --provider ollama --model llama3.1:8b --port 8787

On thorntonstatistical.com/nnc you don't need to run a proxy. The course pages auto-detect production and POST to the hosted serverless function at /nnc/api/tutor. The three options above are for local development when running the course off your own machine (file:// or localhost): in that case the pages POST to http://localhost:8787/tutor. If you want a different endpoint, override it once in devtools (the override survives reloads):

// in browser devtools, once:
localStorage.setItem('forge.tutor.endpoint', 'https://my.custom/endpoint');

05Get the course locally

git clone https://github.com/<you>/neural-forge.git
cd neural-forge
# Open index.html in your browser, or serve it:
python -m http.server 8080
# then visit http://localhost:8080
If you can see the hub, you're ready to forge.

← Back to the hub, traveller.