Post-Fine-Tuning Domain Evaluation and Delta Metric Computation
Agent-Assisted Engineering Check
Prerequisites
Day 68 LoRA training and Day 67 baseline results.
Learning Objective
Evaluate the fine-tuned adapter on the exact prompt suite from Day 67, computing accuracy delta, format compliance improvements, and pairwise win rate.
Instructions
Study source: within this activity's existing reading/practice time, use Hugging Face LLM Course: Fine-tuning LLMs, Chapter 11.5: Custom Evaluation; Example Evaluation Pipeline, then explain one connection to the local task in your own words. Keep the local exercise and acceptance checks; use its original explanation if the external source is unavailable. 1. Load the fine-tuned LoRA adapter onto the frozen base model.
2. Run the identical decoding parameters recorded on Day 67 (e.g. temperature=0.1, max_new_tokens=256) on the same 50 held-out evaluation prompts.
3. Compute post-finetuning metrics: target task accuracy (e.g. 75% vs baseline 15%), format compliance rate (e.g. 96% vs baseline 30%).
4. Calculate absolute and relative deltas: Delta_acc = Acc_finetuned - Acc_baseline.
5. Perform pairwise qualitative comparison: compare prompt-by-prompt completions side-by-side to verify elimination of filler and hallucination.
Practice & Prediction Log
Run post_eval.py. Compute the exact accuracy delta (+XX%) and formatting compliance delta (+YY%) achieved by the fine-tuned adapter over the Day 67 baseline, and verify that delta_acc > 0.30.
delta_acc = post_results.accuracy - baseline_results.accuracy.
import json
post_res = evaluate_prompts(finetuned_model, test_prompts)
with open('baseline_results.json') as f:
baseline = json.load(f)
delta_acc = post_res.accuracy - baseline['accuracy']
delta_format = post_res.format_compliance - baseline['format_compliance']
print(f'Accuracy delta: {delta_acc:+.1%}, format compliance delta: {delta_format:+.1%}')
assert delta_acc > 0.30
Quantify empirical performance deltas achieved by LoRA instruction tuning over baseline.
Authoritative Source Resources & Provenance
Hugging Face LLM Course: Fine-tuning LLMs
Relevant Section / Range: Chapter 11.5: Custom Evaluation; Example Evaluation Pipeline
Verified Version & Date: Public edition checked 2026-11-01; moving pages may change
Sequenced templates, supervised fine-tuning and evaluation teaching with exercises/quizzes. LoRA method and memory claims are checked against the original paper, PEFT and the local parameter ledger, not accepted wholesale from Chapter 11.4.
Python, PyTorch, language-model training and the preceding chat-format lessons.
Use the original localized explanations, exercises and checks already present in this activity; no external account or purchase is required for that fallback.
Compared Candidate Sources & Selection Analysis (2)
Retained for initialization and the low-rank method, not a beginner teaching sequence.
Retained for actual API and implementation defaults; reference documentation is not a complete teaching course.
Training language models to follow instructions with human feedback
Relevant Section / Range: Section 3.6 Evaluation and Section 4.1 Results on the API distribution
Verified Version & Date: arXiv:2203.02155v1 (Verified: 2026-10-30)
Foundational InstructGPT paper defining the SFT objective: maximizing log-likelihood of demonstrator completions conditioned on prompts.
Supervised fine-tuning, conditional autoregressive generation.
The conditional likelihood objective and prompt-conditioning derivations are completely formulated in the review.
Compared Candidate Sources & Selection Analysis (2)
Earlier RLHF formulation on summarization; InstructGPT standardizes the prompt-response SFT training phase.
Focuses on massive multi-task scaling; InstructGPT details the exact prompt-conditioned loss setup.
Stanford Alpaca: An Instruction-following LLaMA Model
Relevant Section / Range: Preliminary evaluation
Verified Version & Date: Stanford CRFM Release (Verified: 2026-10-30)
Original open recipe demonstrating lightweight instruction fine-tuning of open models, establishing prompt/response templates, batch scheduling, and learning rate ranges.
Supervised fine-tuning, instruction formatting, and LoRA fundamentals.
Complete instruction templates, JSONL formatting scripts, and learning rate schedules are self-contained in curriculum materials.
Compared Candidate Sources & Selection Analysis (2)
Multi-turn ShareGPT tuning recipe; Alpaca provides simpler, single-turn clarity ideal for foundational instruction tuning study.
Commercially permissive crowdsourced dataset; Alpaca established the academic instruction tuning standard.