Build it.
Know why it works.
Build a language model on your CPU, take a fine-tuned adapter into a running service, or deploy a named model on a GPU. Choose a path, follow its commands and check the result at each stage.
Choose your learning path
Build a tiny language model
A CPU foundation project. Learn the training loop and keep your own resumable checkpoint. This checkpoint is separate from the pretrained Qwen models below.
- Train, save and resumeFree to read
- Start with
- Python and the included synthetic text
- Keep for the next step
- tiny.pt and generated text
Fine-tune and serve with Unsloth
One incident-label task from data to adapter to HTTP. Carry prepared/ and qwen-adapter/ through the chapters. GPU steps are visibly marked as pending execution.
- 1. Prepare the datasetFree to read
- Start with
- Grouped source incidents
- Keep for the next step
- prepared/ and manifest.json
- 2. Train and reloadFree account
- Start with
- prepared/ and Qwen3-0.6B
- Keep for the next step
- qwen-adapter/ and local predictions
- 3. Serve your adapterFree account
- Start with
- The same qwen-adapter/
- Keep for the next step
- incident-labeler on localhost:8001
- 4. Check the servicePremium
- Start with
- That endpoint and the same task cases
- Keep for the next step
- Per-request evidence and a release check
Deploy on a named GPU
Start with an existing model, without training. This path uses Qwen3.5-4B on an NVIDIA L4 and its own request set.
- 1. Deploy Qwen3.5-4BFree to read
- Start with
- L4 host, Docker and pinned model files
- Keep for the next step
- hands-on-qwen on localhost:8000
- 2. Check the servicePremium
- Start with
- That endpoint and reviewed task cases
- Keep for the next step
- Per-request evidence and a release check
5 guides · Use a path above or open a standalone project below. Reading access and compute requirements are listed separately; cloud GPU charges are not included.
Train a tiny language model from scratch with PyTorch
Build a 470,528-parameter causal language model on a CPU. Train it, inspect validation loss, save a checkpoint and resume the same run.
You finish with: A trained byte-level model, a resumable checkpoint and sampled text.
CPU · Python 3.12 · no GPU required
60–90 minutes of guided workVerification: CPU workflow executed.
Prepare a JSONL dataset for small-model fine-tuning
Validate conversation records, reject conflicting duplicates, split source groups and save a data manifest before spending GPU time.
You finish with: Train, validation and test JSONL files with disjoint source groups and recorded hashes.
CPU · Python 3.12 · standard library only
45–60 minutes of guided workVerification: CPU workflow executed.
Fine-tune and serve Qwen3-0.6B with Unsloth
Train a QLoRA adapter, compare held-out labels, reload the saved files and serve the same Qwen3 adapter through a local vLLM API.
You finish with: A saved adapter, base-versus-adapter predictions and a local API comparison using that adapter.
Linux · Python 3.12 · NVIDIA GPU; serving path targets an L4 (24 GB)
2–3 hours of guided work plus setup and GPU runsVerification: GPU run pending.
Deploy Qwen3.5-4B with vLLM on an NVIDIA L4
Start a text-only Qwen3.5 API with pinned model files, a recorded container digest, bounded context, local access and a checked response.
You finish with: A locally bound chat endpoint and a release record you can reproduce.
Linux x86-64 · one NVIDIA L4 (24 GB) · Docker
60–90 minutes plus downloadsVerification: GPU run pending.
Benchmark a vLLM service and build a release gate
Run repeatable HTTP checks, retain failed requests, measure end-to-end latency and require correct, complete answers within a declared deadline.
You finish with: Per-request JSON evidence and a release command that fails when the declared threshold is missed.
Python 3.12 client · a running local vLLM endpoint
60–90 minutes plus measured runsVerification: Client tested · GPU run pending.
