微調後のドメイン評価とベースライン対比の改善度(デルタ)算出
Agent支援エンジニアリングチェック
前提条件
第68日LoRA学習および第67日ベースライン結果。
学習目標
微調済みアダプタを第67日と同一の評価プロンプトで検証し、正解率の差分(デルタ)、書式適合率の向上、およびベースライン対比の勝率を算出する。
手順
参照資料: この活動に割り当てられた既存の読解・練習時間内で、Hugging Face LLM Course: Fine-tuning LLMs の Chapter 11.5: Custom Evaluation; Example Evaluation Pipeline を参照し、ローカル課題とのつながりを一つ自分の言葉で説明する。既存の演習と合格基準は維持し、外部資料が開けない場合は本コース独自の説明を使う。1. 凍結元モデルに微調済みLoRAアダプタを装着します。
2. Day 67 で記録したものと同一のデコードパラメータ(例: temperature=0.1, max_new_tokens=256)で、同じ 50 件の保留評価プロンプトを実行せよ。
3. 微調後の指標を測定します: 正解率(例: 75% 対 基準15%)、JSON書式適合率(例: 96% 対 基準30%)。
4. 絶対改善量と相対向上率を数理的に算出します: Delta_acc = Acc_post - Acc_baseline。
5. 雑談的な冗長出力の抑制と事実整合性の向上をプロンプトごとに比較対照します。
演習と予測記録
post_eval.py を実行せよ。ファインチューニング済みアダプタが Day 67 のベースラインに対して達成した正確な精度差分(+XX%)とフォーマット遵守率の差分(+YY%)を計算し、delta_acc > 0.30 であることを確認せよ。
delta = post_acc - base_acc を計算し正の値であることを確認します。
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
微調による実効改善度を客観的数値デルタとして厳密に証明できる。
公式ソースリソースと権利証跡
Hugging Face LLM Course: Fine-tuning LLMs
該当セクション・タイムスタンプ: Chapter 11.5: Custom Evaluation; Example Evaluation Pipeline
検証バージョンと日付: 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.
比較対象候補リソースと選定評価 (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
該当セクション・タイムスタンプ: Section 3.6 Evaluation and Section 4.1 Results on the API distribution
検証バージョンと日付: 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.
比較対象候補リソースと選定評価 (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
該当セクション・タイムスタンプ: Preliminary evaluation
検証バージョンと日付: 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.
比較対象候補リソースと選定評価 (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.