Skip to content

feat: heretic CLI — abliteration training pods with live dashboard - #30

Merged
adamsiwiec1 merged 7 commits into
mainfrom
feature/heretic-training
Sep 18, 2026
Merged

adamsiwiec1 merged 7 commits into
mainfrom
feature/heretic-training

Conversation

@adamsiwiec1

Copy link
Copy Markdown
Collaborator

runhug heretic make <org/model> provisions a RunPod GPU pod running the runhug-heretic container, streams live trial progress (refusals / KL) from the pod dashboard, and uploads the result to /heretic-. Adds heretic logs/stop/status, pod-backed registry entries for list/status/ delete, the pod API client, the GHCR image workflow, and the container (heretic run_pipeline.py + FastAPI dashboard + Chart.js frontend).

Summary

Security / privacy impact

Checklist

  • go test ./... passes
  • CHANGELOG.md ## [Unreleased] has a bullet for user-visible behavior (or this PR is docs/chore-only)
  • README / root docs are updated where behavior changed
  • No secrets, tokens, or personal data committed
  • Attribution preserved and license compatibility verified for reused code

runhug heretic make <org/model> provisions a RunPod GPU pod running the
runhug-heretic container, streams live trial progress (refusals / KL) from
the pod dashboard, and uploads the result to <hf-user>/heretic-<model>.
Adds heretic logs/stop/status, pod-backed registry entries for list/status/
delete, the pod API client, the GHCR image workflow, and the container
(heretic run_pipeline.py + FastAPI dashboard + Chart.js frontend).
- runhug start opencode: writes ~/.config/opencode/opencode.json with a
  runhug provider (@ai-sdk/openai-compatible) pointed at the local proxy
  (or direct endpoint); prefers the running proxy, merges existing config,
  dummy api key, tool_call on, slug model keys with the real id in models.<key>.id
- heretic: install from git master (PyPI 1.4.0 is interactive-only),
  RunPod container-registry credentials (--registry-user/--registry-token,
  env RUNHUG_REGISTRY_TOKEN), pod-gpu picker with out-of-stock fallback,
  billing/registry store the pod GPU id
- heretic make reuses the stored 'runhug-heretic' RunPod credential so
  private ghcr.io images pull without re-supplying flags
- images: upgrade torch stack to 2.5.1+cu124 (transformers 5.x requires
  torch>=2.5; base 2.4.1 made transformers disable torch -> NameError),
  co-install matching torchvision/torchaudio so pip stops downgrading,
  co-upgrade accelerate+peft
heretic dropped into questionary/prompt_toolkit best-trial selection after
the optuna study finished (EOFError on a non-TTY, then crash-loop). Pass
--checkpoint-action continue --trial-index 0 when building the heretic
command, and tee heretic output to the container stdout so pod logs show
the full training output. Also fix dashboard 'unhashable dict' crash: use
the modern Starlette TemplateResponse(request=... , name=...) signature.
obtain_export_strategy() prompted for settings.export_strategy (unset),
which called into questionary on a non-TTY (EPERM), silently skipping the
save. Default to exporting the merged model.
- refactor run_pipeline.main() into returnable run_main() for in-process testing
- 34 run_pipeline tests: slug/ANSI/state-parse/status-json/atomic-write/stream
  and full run_main() paths (success, failure, deadline, kill fallback,
  keep-alive, missing model) plus main() os._exit wiring via subprocess
- 13 dashboard tests; ci.yml gains heretic-container job; Makefile test-heretic
- README: test instructions + RUNHUH_ERROR_DELAY_S env var
@adamsiwiec1
adamsiwiec1 merged commit f99f219 into main Sep 18, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant