mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-08-30 06:30:37 +02:00
fix: make KL optimization measured and reversible (#182)
This commit is contained in:
@@ -1240,8 +1240,10 @@ def _format_obliteration_metrics(
|
||||
icon = "🟢" if ppl < 12 else "🟡" if ppl < 20 else "🔴"
|
||||
parts.append(f"| Perplexity | **{ppl:.2f}** | {icon} |")
|
||||
if kl is not None:
|
||||
icon = "🟢" if kl < 0.05 else "🟡" if kl < 0.1 else "🔴"
|
||||
parts.append(f"| KL Divergence | **{kl:.4f}** | {icon} |")
|
||||
kl_budget = metrics.get("kl_budget", getattr(pipeline, "kl_budget", None))
|
||||
icon = "🟢" if kl_budget is not None and kl <= kl_budget else "🔴"
|
||||
budget_note = f" / {kl_budget:.4f}" if kl_budget is not None else ""
|
||||
parts.append(f"| Token KL / Budget | **{kl:.4f}{budget_note}** | {icon} |")
|
||||
if n_layers > 0:
|
||||
parts.append(f"| Layers Modified | **{n_layers}** | |")
|
||||
if load_settings is not None:
|
||||
|
||||
Reference in New Issue
Block a user