AQIT 0.1.0
Loading...
Searching...
No Matches
diff_cli.py
Go to the documentation of this file.
1# Copyright (c) 2025-present Aquin Labs Private Limited. All Rights Reserved.
2"""aquin diff weight | sae | residue"""
3
4import sys
5
6
7def _print_help() -> None:
8 print("Compare base vs checkpoint after fine-tuning.")
9 print("")
10 print("Usage: aquin diff <weight|sae|residue> ...")
11 print("")
12 print(" weight Per-layer ||dW||, rank/collapse signals, merge verdict, behavioral probes")
13 print(" aquin diff weight --checkpoint <path> [--prompts <json|jsonl>] [--no-behavioral]")
14 print("")
15 print(" sae Feature-level activation deltas on probes")
16 print(" aquin diff sae --checkpoint <path> [--prompts <json|jsonl>] [--layer N]")
17 print("")
18 print(" residue Per-layer activation drift on probes (base vs checkpoint)")
19 print(" aquin diff residue --checkpoint <path> [--prompts <json|jsonl>]")
20 print("")
21 print("Docs: https://aquin.app/docs/checkpoint-sae")
22
23
24def cmd_diff(args: list[str]) -> None:
25 if not args or args[0] in ("-h", "--help", "help"):
27 return
29 sub = args[0]
30 rest = args[1:]
31
32 if sub == "weight":
33 from aquin.weight_diff_cli import cmd_weight_diff
34
35 cmd_weight_diff(rest)
36 return
37
38 if sub == "sae":
39 from aquin.sae_cli import cmd_sae_diff
40
41 cmd_sae_diff(rest)
42 return
43
44 if sub == "residue":
45 from aquin.residual_drift_cli import cmd_residual_drift
46
47 cmd_residual_drift(rest)
48 return
49
50 print(f"Unknown diff subcommand: {sub}")
51 print("Run: aquin diff --help")
52 sys.exit(1)
None cmd_diff(list[str] args)
Definition diff_cli.py:28
None _print_help()
Definition diff_cli.py:11