Examples Overview¶
CircuitKit ships three sets of runnable examples: Python scripts in examples/ (CI-testable, CPU-friendly tutorials on GPT-2), Jupyter notebooks in examples/notebooks/ (Colab-ready, with GPU tracks on Gemma / Qwen / Llama), and case studies in examples/case-studies/ (domain-framed end-to-end walkthroughs — compliance, safety steering, unlearning, edge deployment — on domain-appropriate models).
Quick Navigation¶
The table below maps common goals to the core workflow scripts. The examples/ directory ships 13 numbered scripts in total (01–13); the advanced ones (09–13: load-and-reuse, steering, knowledge editing, custom corruption, transfer matrix) are listed in the examples/README.md.
| Goal | Resource |
|---|---|
| First circuit in 5 minutes | examples/01-quickstart.py or Notebook 01 |
| Discover via Python API | examples/02-discover-python-api.py |
| Discover via CLI | examples/03-discover-cli.sh |
| Custom data / YAML task | examples/08-custom-data.py or Notebook 03 |
| 6-pillar evaluation | examples/05-evaluate-faithfulness.py or Notebook 04 |
| Prune / quantize / finetune | examples/06-applications.py or Notebook 06 |
| Pipeline chaining | examples/07-pipeline.py or Notebook 01 |
| Algorithm comparison | Notebook 02 |
| Visualization | Notebook 05 |
| CLI + YAML workflow | Notebook 07 or examples/03-discover-cli.sh |
| Real-world scenario (compliance, safety, unlearning, edge) | Case Studies 14–24 |
| Safety steering / jailbreak defense | Case Study 18 or 23 |
Scripts vs Notebooks¶
Scripts (examples/) |
Notebooks (examples/notebooks/) |
|
|---|---|---|
| Runtime | Python process | Colab / Jupyter |
| GPU required | No (GPT-2) | Some notebooks (T4+) |
| CI testable | Yes | No |
| Output | Terminal | Inline cells |
| Best for | Automation, scripting | Interactive exploration |
Detailed Pages¶
- Python Scripts — the example scripts with descriptions and usage
- Notebooks — all 9 Colab notebooks with badges and runtime estimates
- Case Studies — 11 domain-framed end-to-end walkthroughs (scripts 14–20, 24; notebooks 21–23)