Skip to content

Case Studies

End-to-end, domain-framed walkthroughs in examples/case-studies/ — each takes a realistic scenario (compliance, safety, deployment) through the full discover → evaluate → intervene workflow. Unlike the numbered tutorials (which default to GPT-2 for zero-setup CPU runs), the case studies default to the model that fits their domain: an instruct model where refusal behavior matters, a tiny model where the target is edge hardware.

Every script exposes the model as a MODEL_NAME constant you can swap; each notes "gpt2" as a fast CPU smoke-test of the pipeline (which validates the plumbing, not the domain claim).

Index

# Case study Domain Default model Format
14 Faithfulness audit for compliance Regulated AI / audit reports EleutherAI/pythia-410m script
15 Compression for deployment Enterprise MLOps Qwen/Qwen2.5-0.5B-Instruct script
16 Tabular model audit Tabular foundation models (Orion-MSP) gpt2 (stand-in) script
17 Quantization unlearning Permanent knowledge removal Qwen/Qwen2.5-1.5B-Instruct script
18 Banking safety steering Chatbot safety at inference time meta-llama/Llama-3.2-1B-Instruct script
19 Trade finance document classification CPU-only on-prem deployment (Fintra) google/gemma-3-1b-it script
20 Transit edge deployment ARM edge hardware (AFC gates) Qwen/Qwen2.5-0.5B-Instruct script
21 Quantization-permanent unlearning Unlearning that survives fine-tuning Qwen/Qwen2.5-1.5B-Instruct notebook
22 Gender bias audit & mitigation Responsible AI loop Qwen/Qwen2.5-1.5B-Instruct notebook
23 Jailbreak safety steering Jailbreak defense Qwen/Qwen2.5-1.5B-Instruct notebook
24 Safety refusal on custom data Custom contrastive pairs (safety) gpt2 script

Which one should I read?

  • "Prove the model is trustworthy" → 14 (compliance audit) or 22 (bias audit & mitigation)
  • "Make it smaller / cheaper" → 15 (compression), 19 (CPU-only), 20 (edge)
  • "Make it forget something — permanently" → 17 / 21 (quantization-permanent unlearning)
  • "Make it safer at inference time, no retraining" → 18 (banking) or 23 (jailbreak steering)
  • "Use my own dataset" → 24 (explicit contrastive pairs), plus Bring Your Own Data

Hardware & access notes

  • Notebooks 21–23 and the instruct-model scripts want a GPU or Apple-Silicon MPS.
  • Llama and Gemma models are gated on Hugging Face — accept the license first, or swap MODEL_NAME for an open model (Qwen 2.5, Pythia, gpt2).
  • Studies that prune/quantize/export require a registered architecture (gpt2, Llama, Qwen, Gemma, Mistral, Phi); Pythia is discovery/eval-only — see the Architecture Registry.

Next steps