docs: fix stale README pipeline references, mark retired scripts
ober
5255f37aa7afab48d48d2036e61c0af7256322f7
--- a/README.md +++ b/README.md @@ -58,17 +58,27 @@ Each stage's LoRA is merged into bf16 between stages so the next stage trains on ### Run the pipeline +The active remote-training entry point is [`v6_runpod.py`](v6_runpod.py) — the only supported orchestrator (see [docs/training-security.md](docs/training-security.md)). It trains CPT → SFT → DPO as PEFT adapters and pulls the final adapter directory (it does **not** produce a fused model). Run `make security` first to validate the immutable training lock. + ```bash -# Provision pod + push configs/data + train + pull + tear down -JERBOA_MODE=pipeline .venv/bin/python runpod_train.py up -JERBOA_MODE=pipeline .venv/bin/python runpod_train.py push -JERBOA_MODE=pipeline .venv/bin/python runpod_train.py train -JERBOA_MODE=pipeline .venv/bin/python runpod_train.py eval # base vs trained, on-pod -JERBOA_MODE=pipeline .venv/bin/python runpod_train.py pull # → runpod-pipeline-final/ -JERBOA_MODE=pipeline .venv/bin/python runpod_train.py down +make security # validate security/training-lock.json + inputs + +# Full pipeline: up → push → prepare-cache → preflight → train-smoke → train → pull → down +python3 v6_runpod.py auto + +# Or drive stages individually: +python3 v6_runpod.py up +python3 v6_runpod.py push +python3 v6_runpod.py preflight +python3 v6_runpod.py train # full adapter sequence; auto-runs upload-hf +python3 v6_runpod.py pull # download adapter + logs (not a merged model) +python3 v6_runpod.py status +python3 v6_runpod.py down ``` -Pod state lives in `.runpod_state.json` (gitignored). Each stage is idempotent: rerunning `train` skips stages whose `.done` marker is `OK`. Killing the orchestrator does not kill the training — each stage runs in its own tmux session on the pod. +Pod state lives in `.runpod_state_v6.json` (gitignored). See [version-6.md](version-6.md) for the full v6 design and subcommand reference. + +> **Retired:** `runpod_train.py` (and its `.runpod_state.json`) is disabled — it predates authenticated/private services and immutable training inputs, and now exits immediately with a pointer to `v6_runpod.py`. The v3/v4/v5 runs described below used it; do not revive it. ### Build data @@ -86,14 +96,12 @@ The builders read from `~/mine/jerboa` (source, stdlib, tests, docs) and `~/mine # MLX 6-bit bundle for Mac (loads under mlx_lm or LM Studio) ./convert_to_mlx.sh runpod-pipeline-final jerboa-mlx-6bit-v3 -# GGUF for ollama -./build_ollama_gguf.sh # → gguf/jerboa-qwen-q8_0.gguf + q4_k_m -./push_ollama.sh jaimef # pushes :latest (q8_0); add --all to also push :q4_k_m - # HuggingFace ./upload_hf.sh ``` +> **Retired (GGUF/Ollama):** `build_ollama_gguf.sh` is disabled until the conversion dependencies and model artifacts have a reviewed lock — it exits non-zero on purpose. Because `push_ollama.sh` requires a locally-built GGUF tag (`jerboa-qwen:latest`), the Ollama push path currently cannot complete end-to-end. The published `jaimef/jerboa-qwen` Ollama tags predate this retirement. + ## Evaluation v3 is gated on two evals before publish; both must beat the un-fine-tuned base. @@ -163,7 +171,8 @@ v5 abliterates a different base — **Qwen3.6-35B-A3B** (`qwen3_5_moe`), a hybri | File | Purpose | |---|---| -| `runpod_train.py` | RunPod pod lifecycle + staged training (`up`/`push`/`train`/`eval`/`pull`/`down`) | +| `v6_runpod.py` | **Active** RunPod orchestrator for v6 adapter training (`up`/`push`/`preflight`/`train`/`pull`/`down`/`auto`); see [version-6.md](version-6.md) | +| `runpod_train.py` | **Retired/disabled** — old RunPod staged-training orchestrator (`up`/`push`/`train`/`eval`/`pull`/`down`); exits immediately and points to `v6_runpod.py` | | `runpod_abliterate.py` | RunPod pod lifecycle for the (abandoned) v4 Heretic abliteration | | `heretic_auto_driver.py` | Monkey-patches Heretic's TUI prompts so it runs hands-off + uploads to HF | | `direct_ablate_qwen3moe.py` | **MoE-correct** directional abliteration (Heretic skipped Qwen3-Coder's fused `experts.down_proj`) — the script that actually produced v4's base | @@ -182,8 +191,8 @@ v5 abliterates a different base — **Qwen3.6-35B-A3B** (`qwen3_5_moe`), a hybri | `eval_similarity.py` | Per-pair chosen-vs-rejected similarity eval | | `eval_on_pod.py` | Pod-side eval runner (base + trained, parallel) | | `eval_mlx.py` | MLX-side eval runner for local Mac comparison | -| `build_ollama_gguf.sh` | Convert merged model → GGUF Q8_0 + Q4_K_M | -| `push_ollama.sh` | Push to ollama.com (`:latest` = Q8_0; `--all` also pushes `:q4_k_m`) | +| `build_ollama_gguf.sh` | **Retired/disabled** — GGUF Q8_0 + Q4_K_M conversion stub; exits non-zero until conversion deps + artifacts have a reviewed lock | +| `push_ollama.sh` | Push to ollama.com (`:latest` = Q8_0; `--all` also pushes `:q4_k_m`) — currently blocked: needs a GGUF tag from the retired `build_ollama_gguf.sh` | | `upload_hf.sh` | Push merged model to HuggingFace | | `config.jerboa.v2.toml` | Heretic config for v4 abliteration | | `convert_to_mlx.sh` | mlx_lm.convert wrapper | @@ -195,6 +204,6 @@ v5 abliterates a different base — **Qwen3.6-35B-A3B** (`qwen3_5_moe`), a hybri 2. Add divergence entries to `~/mine/jerboa-mcp/divergence.json` for any new hallucinations caught 3. Rebuild data: `build_cpt_corpus_v2.py && build_sft_v3.py && build_dpo_pairs_v3.py` 4. Bump version suffix on output JSONLs and adapter dirs -5. Re-run the pipeline (`runpod_train.py up/push/train/eval/pull/down`) +5. Re-run the pipeline (`python3 v6_runpod.py auto`, or the individual `v6_runpod.py` stages) 6. Eval gate: trained must beat base on both holdout and similarity -7. Convert + push: `build_ollama_gguf.sh && push_ollama.sh && upload_hf.sh` +7. Convert + push: `upload_hf.sh` (GGUF/Ollama push is retired — `build_ollama_gguf.sh` is disabled) --- a/push_ollama.sh +++ b/push_ollama.sh @@ -11,6 +11,12 @@ # ./push_ollama.sh # pushes jaimef/jerboa-qwen:latest # ./push_ollama.sh jaimef # same # ./push_ollama.sh jaimef --all # also pushes :q4_k_m +# +# NOTE: The GGUF build path is RETIRED. This push requires a locally-built +# 'jerboa-qwen:latest' tag that used to come from ./build_ollama_gguf.sh. +# That builder is now a disabled stub (it exits non-zero until the conversion +# dependencies and model artifacts have a reviewed lock), so this script +# cannot complete end-to-end until a reviewed GGUF build is restored. set -euo pipefail @@ -53,8 +59,8 @@ for t in "${TAGS[@]}"; do if ! echo "$LOCAL_LIST" | grep -q "^${LOCAL_MODEL}:${t}[[:space:]]"; then echo "ERROR: Local tag '${LOCAL_MODEL}:${t}' not found." >&2 echo "" >&2 - echo "Build it first:" >&2 - echo " ./build_ollama_gguf.sh" >&2 + echo "Build it first (NOTE: GGUF build path is retired):" >&2 + echo " ./build_ollama_gguf.sh # currently a disabled stub; exits non-zero" >&2 exit 1 fi echo " ✓ ${LOCAL_MODEL}:${t}"