69 / 90

第69日: 微調事後評価: 差分評価、破滅的忘却の監査と完全解体

微調前後の実測改善度(デルタ)算出、破滅的忘却の監査、クラウド請求書精算と完全解体。

モデルと事前学習 480 分(8時間)
01 120 分

微調後のドメイン評価とベースライン対比の改善度(デルタ)算出

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 であることを確認せよ。

独立習得基準

微調による実効改善度を客観的数値デルタとして厳密に証明できる。

公式ソースリソースと権利証跡

linking Apache-2.0

Hugging Face LLM Course: Fine-tuning LLMs

著者・提供機関: Hugging Face course contributors | オリジナル出所URL ↗

該当セクション・タイムスタンプ: 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)
LoRA original paper ↗ compared_alternative [arXiv.org perpetual non-exclusive license / Open Access]

Retained for initialization and the low-rank method, not a beginner teaching sequence.

Hugging Face PEFT ↗ compared_alternative [Apache-2.0]

Retained for actual API and implementation defaults; reference documentation is not a complete teaching course.

linking Open Access

Training language models to follow instructions with human feedback

著者・提供機関: Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, et al. | オリジナル出所URL ↗

該当セクション・タイムスタンプ: 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.

linking Copyright Stanford CRFM (blog post; no open license stated)

Stanford Alpaca: An Instruction-following LLaMA Model

著者・提供機関: Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, Tatsunori B. Hashimoto | オリジナル出所URL ↗

該当セクション・タイムスタンプ: 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.

Databricks Dolly 15k Dataset & Training Recipe ↗ compared_alternative [CC-BY-SA 3.0]

Commercially permissive crowdsourced dataset; Alpaca established the academic instruction tuning standard.

02 120 分

破滅的忘却の監査と定性的エラー分類学(タクソノミ)の適用

独立習得チェック(AI 支援なし)

前提条件

第69日アクティビティ1およびモデル挙動安全性理論。

学習目標

一般知識タスクでの性能の退行を監査して破滅的忘却を検出し、残存する失敗モードを正式なエラー分類体系に分類するとともに、改善が見られなかった指標は誠実に記録します。

手順

1. 非対象の一般評価プロンプト(例: 一般的なコーディング、算術、創作文章)でモデルを実行します。
2. 破滅的忘却を測定します: 特化した指示データでの微調によって、モデルの一般的な推論能力が低下したかどうかを定量化します。
3. 残存するエラーを正式な分類体系に分類します:
- スキーマ違反: 必須の JSON キーの欠落、またはデータ型の誤り。
- ハルシネーション: 存在しないエンティティの捏造、または事実の誤り。
- 過剰拒否: 過度に硬直した安全性アライメントにより、無害な要求を拒否すること。
- 途中切断: max_tokens の上限により、応答が完了する前に打ち切られること。
4. 科学的誠実性を維持します: 特定の指標で統計的に有意な改善が見られなかった場合は、その旨を明示的に認めます。

演習と予測記録

不合格となった推論事例を分析し、エラー分類集計表 error_taxonomy.json を作成して一般知識の保持率を検証してください。

独立習得基準

破滅的忘却の有無を検証し、残存エラーを学術的分類学に則って誠実に分析できる。

公式ソースリソースと権利証跡

linking Open Access

Training language models to follow instructions with human feedback

著者・提供機関: Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, et al. | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 4.2 Results on public NLP datasets ('alignment tax') and Appendix E.1

検証バージョンと日付: 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.

linking arXiv non-exclusive license / Open Access

LoRA: Low-Rank Adaptation of Large Language Models

著者・提供機関: Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen | オリジナル出所URL ↗

該当セクション・タイムスタンプ: N/A

検証バージョンと日付: ICLR 2022 / arXiv:2106.09685v2 (Verified: 2026-10-30)

選定理由:

Primary literature introducing Low-Rank Adaptation, establishing parameter decomposition W = W0 + (alpha/r)*BA, initialization strategies, and zero inference latency merging.

ソース前提知識:

Matrix factorization, rank, linear layers, and transformer attention.

安全フォールバック(オフライン回復性):

Complete matrix derivations, tensor dimensions, and pure PyTorch LoRALinear modules are implemented directly in lesson code.

比較対象候補リソースと選定評価 (2)

Introduces bottleneck adapter layers in series, which introduces unavoidable inference latency overhead; LoRA's parallel formulation merges with zero latency.

Prepends virtual prompt tokens; reduces available context length, unlike LoRA which preserves full sequence capacity.

03 120 分

クラウド課金精算、Safetensorsパッケージングと完全解体

Agent支援エンジニアリングチェック

前提条件

第69日アクティビティ1〜2、Safetensors仕様、クラウド解体手順。

学習目標

10ドルの予算上限に対して実支出(約1.86ドル)を精算し、アダプタをSafetensorsでパッケージ化してローカル退避後、全クラウドリソースを物理削除する。

手順

1. 利用明細を精査します: GPU時間(例: 1.2時間 * $1.50 = $1.80)、ストレージ費($0.05)、データ転送費($0.01)。
2. 総支出が $10.00 の上限を厳格に下回っていることを確認します(実績: $1.86)。
3. 最終重みを adapter_model.safetensors と adapter_config.json の2ファイルに安全に出力します。
4. 約30MBの成果物をローカル環境へSCP転送します。
5. クラウドインスタンスの終了とボリュームの完全削除を実行し、残存資産がゼロであることを確認します。

演習と予測記録

支出精算表を作成し、予算上限の遵守とクラウドリソースの完全削除ステータスを確認してください。

独立習得基準

クラウド支出を厳格に精算し、資産の安全な退避と完全なインフラ解体を完遂できる。

公式ソースリソースと権利証跡

linking arXiv non-exclusive license / Open Access

LoRA: Low-Rank Adaptation of Large Language Models

著者・提供機関: Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen | オリジナル出所URL ↗

該当セクション・タイムスタンプ: N/A

検証バージョンと日付: ICLR 2022 / arXiv:2106.09685v2 (Verified: 2026-10-30)

選定理由:

Primary literature introducing Low-Rank Adaptation, establishing parameter decomposition W = W0 + (alpha/r)*BA, initialization strategies, and zero inference latency merging.

ソース前提知識:

Matrix factorization, rank, linear layers, and transformer attention.

安全フォールバック(オフライン回復性):

Complete matrix derivations, tensor dimensions, and pure PyTorch LoRALinear modules are implemented directly in lesson code.

比較対象候補リソースと選定評価 (2)

Introduces bottleneck adapter layers in series, which introduces unavoidable inference latency overhead; LoRA's parallel formulation merges with zero latency.

Prepends virtual prompt tokens; reduces available context length, unlike LoRA which preserves full sequence capacity.

linking Apache-2.0

PEFT: State-of-the-art Parameter-Efficient Fine-Tuning Methods

著者・提供機関: Sourab Mangrulkar, Sylvain Gugger, Lysandre Debut, Younes Belkada, Sayak Paul, Benjamin Bossan | オリジナル出所URL ↗

該当セクション・タイムスタンプ: N/A

検証バージョンと日付: PEFT 0.10.x / GitHub (Verified: 2026-10-30)

選定理由:

Widely adopted open-source library implementing LoRA configuration classes (LoraConfig), get_peft_model, and adapter serialization.

ソース前提知識:

PyTorch nn.Module, Hugging Face transformers, and LoRA equations.

安全フォールバック(オフライン回復性):

Standalone, zero-dependency PyTorch implementations of LoRALinear layers and save/reload logic are provided in curriculum scripts.

比較対象候補リソースと選定評価 (2)

Original reference code by Hu et al.; PEFT expands this to broader multi-model ecosystem integration.

Lit-GPT LoRA implementation (Lightning AI) ↗ compared_alternative [Apache 2.0]

High-performance clean implementation; compared alongside PEFT for modular code architecture.

04 120 分

評価課題: 4言語対応のLoRA微調再現実験報告書の完成

独立習得チェック(AI 支援なし)

前提条件

第69日アクティビティ1〜3の全知識。

学習目標

ベースライン対比の改善度、エラー分類、費用決算、リソース解体完了証跡をまとめた標準的な4言語技術報告書を完成させる。

手順

1. 実験の実測成果物をすべて集約します: 基準正解率(第67日)、学習損失曲線と変曲点のステップ(第68日)、事後評価の正解率デルタ(第69日)、エラー分類の内訳、および請求書。
2. 標準化された4言語のレポートテンプレートに記入します。
3. 英語、日本語、簡体字中国語、繁体字中国語の各セクションで、定量的・定性的な一致を検証します。
4. クラウドインフラの解体認定書に署名(サインオフ)します。

演習と予測記録

4言語版の LoRA 再現実験レポートを公開してください。すべての指標が実際のログの証拠と一致し、レポートが自動構造検証に合格することを確認してください。

独立習得基準

学術的厳密性と完全な財務・解体証跡を備えた4言語微調報告書を完成できる。

公式ソースリソースと権利証跡

linking Open Access

Training language models to follow instructions with human feedback

著者・提供機関: Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, et al. | オリジナル出所URL ↗

該当セクション・タイムスタンプ: 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.

linking Copyright Stanford CRFM (blog post; no open license stated)

Stanford Alpaca: An Instruction-following LLaMA Model

著者・提供機関: Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, Tatsunori B. Hashimoto | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Preliminary evaluation and Known limitations

検証バージョンと日付: 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.

Databricks Dolly 15k Dataset & Training Recipe ↗ compared_alternative [CC-BY-SA 3.0]

Commercially permissive crowdsourced dataset; Alpaca established the academic instruction tuning standard.