Skip to main content

Level 8 project

Adapt a Small LLM

Start from the canonical project files, validate the result, and keep the evidence you need to explain what you built.

There is no upload or grading service. Run the documented validator or checks where applicable, keep the results, and score your own evidence against the rubric below. A passing check by itself does not mean the project is complete. Suggested strong-evidence target: 16/20. Critical-criterion rule: A 16/20 total is not sufficient if any criterion the rubric marks as critical scores zero.

Launch lesson: Fine-Tuning Integration Workshop

Prerequisite project: Reliable LLM Workflow

Prerequisites

Python help for this project:

Complete Level 8 through Fine-Tuning Integration Workshop. The cumulative project dependency is Reliable LLM Workflow.

Goal

Build a reproducible model-adaptation package that can answer:

Why adapt?
→ which data?
→ which split/template?
→ which base?
→ which LoRA/PEFT configuration?
→ which adapter?
→ how would RLHF-style and DPO-style preference optimization differ here?
→ which measured signals are only proxies?
→ what independent evaluation supports the claim?
→ what improved?
→ what regressed?
→ does the run meet the declared release rule?

Task

  1. lora_parameter_count
  2. group_split
  3. release_decision
  4. validate_run

Stuck on a TODO?

Choose one function at a time. Hint 1 offers direction, hint 2 offers pseudocode, and hint 3 reveals only that function's reference implementation after confirmation.

adaptation.py: lora_parameter_count()

Try the starter function and run its validator before revealing the reference.

Hints for this TODO

adaptation.py: group_split()

Try the starter function and run its validator before revealing the reference.

Hints for this TODO

adaptation.py: release_decision()

Try the starter function and run its validator before revealing the reference.

Hints for this TODO

adaptation.py: validate_run()

Try the starter function and run its validator before revealing the reference.

Hints for this TODO

Validation

Run these commands from the downloaded Project folder or the public materials repository root.

python projects/tests/l08/validate_submission.py \
projects/starters/l08/adaptation.py \
path/to/your/adaptation-run.json

Compare with a reference

First complete your own TODOs and run the submission validator above. Then open the published reference solution. Reference acceptance tests check the completed reference, not your submission:

python projects/tests/l08/test_reference.py

Rubric

Score each criterion from 0–4. A submission should score at least 16/20 overall and must not score 0 on data boundaries, adaptation lineage, or evaluation.

Criterion4 — Strong evidence3 — Meets2 — Partial1 — Weak0 — Missing
Adaptation decisionMeasured behavioral gap; prompting/retrieval/application alternatives considered; fine-tuning choice is evidence-basedClear fine-tuning rationale with small omissionsRationale exists but alternatives/evidence are shallowFine-tuning chosen mainly because it is availableNo adaptation rationale
Data and split integrityProvenance, grouping, dedup/conflict policy, formatting version, and train/eval separation are reproducibleData pipeline is reproducible with minor gapsSome provenance/split evidence missingDataset dump with weak leakage controlsNo trustworthy data boundary
PEFT/LoRA implementation and lineageRank/count/targets/base compatibility are correct and all artifacts identify their parentsCorrect adapter implementation/config with minor gapsAdapter works but identity/count evidence incompleteAdapter exists with unclear base/configNo coherent adaptation artifact
Before/after, retention, and preference-context evaluationPaired target and retention suites, predeclared thresholds, regression IDs, and release decision are supported; RLHF-style vs DPO-style routes are distinguished; preference/reward signals are explicitly separated from independent quality evidenceComplete evaluation and preference-method explanation with minor gapsTarget evaluation present but retention, route distinction, or proxy-vs-independent evidence is weakCherry-picked generations, training loss, or preference/reward score treated as sufficient quality evidenceNo held-out adaptation evaluation
Documentation and reproducibilityTraining record, model card, limitations, debug trace, commands, and optional live-run differences are explicitReproducible package with small omissionsImportant versions/limitations missingMostly screenshots or output dumpsNo reproducible package

Objective checks

The reduced validator checks:

  • LoRA parameter-count arithmetic;
  • group-safe train/validation splitting;
  • target-gain and retention-drop release rules;
  • zero critical-regression requirement;
  • base/adapter lineage;
  • required dataset/adaptation/evaluation identities;
  • a structured RLHF-style vs DPO-style route contract and selected optimization route;
  • proxy metric identity when a preference route is used;
  • independent-evaluation IDs linked to the recorded target and retention metrics and separated from the proxy metric;
  • model-card limitations;
  • intentional failure rejection.

Judgment questions

Ask yourself, and point to a record before answering yes:

  • Does the measured gap justify fine-tuning over prompting, retrieval, or application changes? If not, revisit the decision.
  • Does the target dataset represent the desired behavior? If not, document the mismatch.
  • Have you distinguished reward-model/policy optimization (RLHF-style) from direct preference optimization (DPO-style)? If not, correct the route description.
  • Have you avoided treating preference, reward, or SFT proxies as broad truth or quality? If not, narrow the claim.
  • Do measured target gains justify retention regressions under the stated release rule? If not, record a no-release decision.
  • Do the limitations mark the boundary of tested evidence? If not, add specific excluded cases.

Assessment guardrail

A live GPU fine-tune is optional for repository acceptance. If provided, it extends the evidence but does not replace the deterministic reduced path or the requirement for before/after retention evaluation.

Self-check before you call it done

  • Can you support the adaptation choice with a measured gap and alternatives to fine-tuning?
  • Can you trace data provenance, grouping/splits, LoRA configuration, and base-to-adapter lineage?
  • Can you point to paired target/retention metrics, independent evaluation IDs, critical regressions, and the release decision?
  • Can you distinguish preference/reward proxy evidence from independent quality and document a debug trace, model-card limits, and reproducibility?

← Back to all projects