feat: heretic CLI — abliteration training pods with live dashboard - #30
Merged
Merged
Conversation
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
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.
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 ./...passesCHANGELOG.md## [Unreleased]has a bullet for user-visible behavior (or this PR is docs/chore-only)