LEM/cmd/lemcmd/score.go
Snider e3331920c4 feat: add 'lem score attention' CLI for Q/K Bone Orientation analysis
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 00:29:41 +00:00

35 lines
1.4 KiB
Go

package lemcmd
import (
"fmt"
"forge.lthn.ai/core/cli/pkg/cli"
"forge.lthn.ai/lthn/lem/pkg/lem"
)
func addScoreCommands(root *cli.Command) {
scoreGroup := cli.NewGroup("score", "Scoring commands", "Score responses, probe models, compare results.")
scoreGroup.AddCommand(passthrough("run", "Score existing response files", lem.RunScore))
scoreGroup.AddCommand(passthrough("probe", "Generate responses and score them", lem.RunProbe))
// compare has a different signature — it takes two named args, not []string.
var compareOld, compareNew string
compareCmd := cli.NewCommand("compare", "Compare two score files", "",
func(cmd *cli.Command, args []string) error {
if compareOld == "" || compareNew == "" {
return fmt.Errorf("--old and --new are required")
}
return lem.RunCompare(compareOld, compareNew)
},
)
cli.StringFlag(compareCmd, &compareOld, "old", "", "", "Old score file (required)")
cli.StringFlag(compareCmd, &compareNew, "new", "", "", "New score file (required)")
scoreGroup.AddCommand(compareCmd)
scoreGroup.AddCommand(passthrough("attention", "Q/K Bone Orientation analysis for a prompt", lem.RunAttention))
scoreGroup.AddCommand(passthrough("tier", "Score expansion responses (heuristic/judge tiers)", lem.RunTierScore))
scoreGroup.AddCommand(passthrough("agent", "ROCm scoring daemon (polls M3, scores checkpoints)", lem.RunAgent))
root.AddCommand(scoreGroup)
}