feat: Blue Agent LoRA 微調學習機制 (Issue #46) - #48
Open
timwei0801 wants to merge 1 commit into
Open
Conversation
新增 LoRA 微調 pipeline(Unsloth + TRL SFTTrainer),讓 Blue Agent 的 LLM backbone 在對抗訓練中真正從 TP/TN/FP/FN 案例學習,解決 accuracy ~56% 問題。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EpisodeCollector:滑動窗口收集 TP/TN/FP/FN 案例,轉 ChatML JSONL 格式LoRAFineTuner:Unsloth + TRL SFTTrainer 完整 pipeline(LoRA → merge → GGUF → ollama create)AdversarialTrainer:每 N epochs 自動觸發微調並切換 Blue Agent 模型Motivation
Issue #41 實驗揭示 accuracy ~56%(接近隨機猜測),根因是 LLM backbone 權重從未更新。此 PR 加入 LoRA 微調讓 Blue Agent 真正從對抗經驗學習。
Test plan
Closes #46
🤖 Generated with Claude Code