Skip to content

Commit c25b1fb

Browse files
author
lalalune
committed
merge: CR-4 — rename milady model-tooling scripts to eliza1, consolidate HF bundle naming, plugin/dir cleanup
2 parents d0bbb23 + 7d97051 commit c25b1fb

34 files changed

Lines changed: 510 additions & 493 deletions

File tree

.github/workflows/local-inference-bench.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232
- ".github/workflows/local-inference-bench.yml"
3333
- "plugins/plugin-local-embedding/**"
3434
- "packages/app-core/scripts/build-llama-cpp-dflash.mjs"
35-
- "packages/training/scripts/publish_milady_model.py"
35+
- "packages/training/scripts/publish_eliza1_model.py"
3636
- "packages/training/scripts/sync_catalog_from_hf.py"
3737
- "scripts/verify-phone-download.mjs"
3838
workflow_dispatch:
@@ -486,7 +486,7 @@ jobs:
486486

487487
publish-models-nightly:
488488
# Weekly nightly publish to the elizaos HF org. Walks W5-Pipeline's
489-
# output, calls publish_milady_model.py for each fused-kernel GGUF,
489+
# output, calls publish_eliza1_model.py for each fused-kernel GGUF,
490490
# then runs sync_catalog_from_hf.py to produce the catalog diff and
491491
# opens a PR with the update.
492492
#
@@ -502,7 +502,7 @@ jobs:
502502
env:
503503
# W5-Pipeline drops finished checkpoints under this path. The
504504
# nightly publish step expects each subdirectory to be a complete
505-
# `<base>-milady-optimized` (or `-milady-drafter`) bundle —
505+
# `<base>-optimized` (or `-drafter`) bundle —
506506
# i.e. a single .gguf + manifest.json + README.md.
507507
W5_PIPELINE_OUTPUT_ROOT: ${{ vars.W5_PIPELINE_OUTPUT_ROOT || '/mnt/w5-pipeline-output' }}
508508
HF_TOKEN: ${{ secrets.MILADY_HF_TOKEN }}
@@ -568,15 +568,15 @@ jobs:
568568
FAILURES=0
569569
for dir in "$W5_PIPELINE_OUTPUT_ROOT"/*/; do
570570
name=$(basename "$dir")
571-
# Bundle naming: <base>-milady-optimized or <base>-milady-drafter.
571+
# Bundle naming: <base>-optimized or <base>-drafter.
572572
# Anything else is rejected — these repos are for fused builds only.
573-
if [[ "$name" != *-milady-optimized && "$name" != *-milady-drafter ]]; then
573+
if [[ "$name" != *-optimized && "$name" != *-drafter ]]; then
574574
echo "::warning ::skipping $name (not a fused-kernel bundle name)"
575575
continue
576576
fi
577577
repo_id="elizaos/$name"
578578
echo "::group::publish $repo_id"
579-
if ! python packages/training/scripts/publish_milady_model.py \
579+
if ! python packages/training/scripts/publish_eliza1_model.py \
580580
--model-dir "$dir" \
581581
--repo-id "$repo_id"; then
582582
echo "::error ::publish failed for $name"

docs/training/architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ this file, this file is the intended source of truth.
2020
`packages/training/` is the only thing in the repo that actually produces the
2121
`eliza-1` weights that ship with Milady and get downloaded onto phones.
2222

23-
- Entry point: `packages/training/scripts/optimize_for_milady.py` (full recipe
23+
- Entry point: `packages/training/scripts/optimize_for_eliza1.py` (full recipe
2424
in [`optimization-pipeline.md`](optimization-pipeline.md)).
2525
- Base model: a Qwen3 causal-LM. The **smallest target is `eliza-1-0_6b`,
2626
derived from `Qwen/Qwen3-0.6B`** (older docs called this `eliza-1-lite-0_6b`
@@ -31,7 +31,7 @@ this file, this file is the intended source of truth.
3131
spec-decode CLI surface, all of which require the
3232
`elizaOS/llama.cpp` v0.4.0-milady fork at runtime.
3333
- Publishes to `elizaos/eliza-1-<tier>` on HuggingFace, then
34-
`emit_milady_catalog.py` wires the new repo into
34+
`emit_eliza1_catalog.py` wires the new repo into
3535
`packages/app-core/src/services/local-inference/catalog.ts`.
3636
- It does **not** mount any HTTP routes. It is a CLI / cron pipeline.
3737

packages/training/docs/training/gguf-to-runtime.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ This is the handoff between this package (the offline training /
44
quantization / GGUF pipeline) and the Milady runtime
55
(`packages/app-core`, `packages/shared`). It assumes you already have a
66
freshly produced `eliza-1-<tier>.gguf` (e.g. from
7-
`scripts/optimize_for_milady.py`, which also writes a
8-
`gguf/milady_manifest.json` next to it).
7+
`scripts/optimize_for_eliza1.py`, which also writes a
8+
`gguf/eliza1_manifest.json` next to it).
99

1010
There are two ways to get the runtime to use that file as the
1111
`TEXT_LARGE` model: **point at a local file** (fast, for testing the
@@ -56,7 +56,7 @@ A catalog entry is **not required** to load a local file — the catalog
5656
(`runtime.kvCache`, `runtime.dflash`, `runtime.optimizations`). Without a
5757
catalog entry the loader falls back to plain defaults; supply the
5858
fork-only KV cache types (`qjl1_256` / `tbq3_0` / `q4_polar`) via
59-
per-load overrides if you need them and you're on the milady llama.cpp
59+
per-load overrides if you need them and you're on the elizaOS/llama.cpp
6060
fork.
6161

6262
## B. The machinery that picks it up
@@ -138,20 +138,20 @@ manifest:
138138

139139
```bash
140140
# Print the entry + where it goes (recommended):
141-
uv run python scripts/emit_milady_catalog.py \
142-
--manifest checkpoints/eliza-1-0_6b/gguf/milady_manifest.json
141+
uv run python scripts/emit_eliza1_catalog.py \
142+
--manifest checkpoints/eliza-1-0_6b/gguf/eliza1_manifest.json
143143

144144
# Or produce a unified diff against the canonical shared catalog:
145-
uv run python scripts/emit_milady_catalog.py \
146-
--manifest checkpoints/eliza-1-0_6b/gguf/milady_manifest.json \
145+
uv run python scripts/emit_eliza1_catalog.py \
146+
--manifest checkpoints/eliza-1-0_6b/gguf/eliza1_manifest.json \
147147
--catalog packages/shared/src/local-inference/catalog.ts \
148148
--output reports/training/catalog-eliza-1-0_6b.diff
149149
```
150150

151151
The canonical catalog is **`packages/shared/src/local-inference/catalog.ts`**
152152
(`@elizaos/shared/local-inference/catalog`). The
153153
`packages/app-core/src/services/local-inference/catalog.ts` path is a
154-
re-export shim — do not edit it. `emit_milady_catalog.py` does not
154+
re-export shim — do not edit it. `emit_eliza1_catalog.py` does not
155155
rewrite the file; it prints a labeled patch fragment and names the file
156156
to apply it to. If you are introducing a **new** tier id (not just
157157
refreshing `ggufFile` / `hfRepo` on an existing tier), you must also add

packages/training/scripts/HF_PUBLISHING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ tiers require it even for the 64k default.
122122
### Recording Metal verification on a hardware host
123123

124124
```bash
125-
# On an Apple Silicon Mac with the milady checkout:
125+
# On an Apple Silicon Mac with the elizaOS/llama.cpp checkout:
126126
cd packages/inference/verify
127127
make metal
128128
./metal_verify > metal_verify.txt
@@ -426,7 +426,7 @@ explicit.
426426
- **URL:** https://huggingface.co/elizaos
427427
- **Owner:** Eliza core team. Add new members via HF org settings.
428428
- **Visibility:** repos are public by default once the GGUF is real. Use
429-
`--no-public` on `publish_milady_model.py` to create a private repo
429+
`--no-public` on `publish_eliza1_model.py` to create a private repo
430430
for staging.
431431

432432
### One-time org setup
@@ -439,7 +439,7 @@ this once:
439439
`elizaos` org if it does not already exist.
440440
3. Invite the publishing service account so CI can push.
441441

442-
If the org doesn't exist yet, `publish_milady_model.py` errors out
442+
If the org doesn't exist yet, `publish_eliza1_model.py` errors out
443443
explicitly with the URL above — it does not silently create the org.
444444

445445
### Token requirements
@@ -511,7 +511,7 @@ file expects. Schema:
511511
"kvV": "TBQ4_0",
512512
"speculativeDecode": "DFlash",
513513
"kernels": ["q4_polar", "qjl1_256", "tbq3_0", "tbq4_0", "dflash"],
514-
"requiresFork": "elizaOS/llama.cpp@v0.1.0-milady"
514+
"requiresFork": "elizaOS/llama.cpp@v1.0.0-eliza"
515515
},
516516
"drafter": {
517517
"repo": "elizaos/eliza-1-1_7b",
@@ -523,7 +523,7 @@ file expects. Schema:
523523
"publishedAt": "2026-05-10T00:00:00Z",
524524
"trainedFrom": "elizaos/eliza-1-9b",
525525
"trainingPipeline": "elizaos/eliza-1-pipeline",
526-
"buildScript": "packages/training/scripts/publish_milady_model.py"
526+
"buildScript": "packages/training/scripts/publish_eliza1_model.py"
527527
}
528528
}
529529
```
@@ -537,7 +537,7 @@ catalog sync script can walk either side and reconstruct pairings.
537537
```bash
538538
# Dry-run — refuses to push anything, prints the manifest and what
539539
# would upload. No HF_TOKEN required.
540-
uv run python scripts/publish_milady_model.py \
540+
uv run python scripts/publish_eliza1_model.py \
541541
--model-dir /path/to/eliza-1-1_7b \
542542
--repo-id elizaos/eliza-1-1_7b \
543543
--dry-run
@@ -547,7 +547,7 @@ uv run python scripts/publish_milady_model.py \
547547
# `published.json` next to the GGUF with the canonical URL + sha256
548548
# + size; subsequent runs skip re-upload when the sha matches the
549549
# existing remote LFS pointer.
550-
HF_TOKEN=hf_xxx uv run python scripts/publish_milady_model.py \
550+
HF_TOKEN=hf_xxx uv run python scripts/publish_eliza1_model.py \
551551
--model-dir /path/to/eliza-1-1_7b \
552552
--repo-id elizaos/eliza-1-1_7b
553553
```

packages/training/scripts/emit_milady_catalog.py renamed to packages/training/scripts/emit_eliza1_catalog.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Emit a MODEL_CATALOG entry for a freshly-produced eliza-1-<tier> GGUF.
22
3-
After ``optimize_for_milady.py`` produces a GGUF + ``milady_manifest.json``
4-
the Milady runtime can only pick the model up once it has a catalog
3+
After ``optimize_for_eliza1.py`` produces a GGUF + ``eliza1_manifest.json``
4+
the Eliza-1 runtime can only pick the model up once it has a catalog
55
entry. The canonical catalog (``MODEL_CATALOG``, ``ELIZA_1_TIER_IDS``,
66
``DEFAULT_ELIGIBLE_MODEL_IDS``, the HuggingFace URL builders) lives in:
77
@@ -28,12 +28,12 @@
2828
Usage::
2929
3030
# Print the entry + where to put it (recommended):
31-
uv run python scripts/emit_milady_catalog.py \\
32-
--manifest checkpoints/eliza-1-0_6b/gguf/milady_manifest.json
31+
uv run python scripts/emit_eliza1_catalog.py \\
32+
--manifest checkpoints/eliza-1-0_6b/gguf/eliza1_manifest.json
3333
3434
# Also produce a unified diff against the canonical shared catalog:
35-
uv run python scripts/emit_milady_catalog.py \\
36-
--manifest checkpoints/eliza-1-0_6b/gguf/milady_manifest.json \\
35+
uv run python scripts/emit_eliza1_catalog.py \\
36+
--manifest checkpoints/eliza-1-0_6b/gguf/eliza1_manifest.json \\
3737
--catalog packages/shared/src/local-inference/catalog.ts \\
3838
--output reports/training/catalog-eliza-1-0_6b.diff
3939
@@ -67,7 +67,7 @@
6767
level=logging.INFO,
6868
format="%(asctime)s [%(levelname)s] %(message)s",
6969
)
70-
log = logging.getLogger("emit_milady_catalog")
70+
log = logging.getLogger("emit_eliza1_catalog")
7171

7272

7373
# The canonical catalog this script targets. Both the server
@@ -128,7 +128,7 @@
128128

129129

130130
@dataclass(frozen=True)
131-
class MiladyCatalogEntry:
131+
class Eliza1CatalogEntry:
132132
id: str
133133
display_name: str
134134
hf_repo: str
@@ -155,7 +155,7 @@ def to_ts_literal(self) -> str:
155155
" kvCache: {\n"
156156
f' typeK: "{self.cache_type_k}",\n'
157157
f' typeV: "{self.cache_type_v}",\n'
158-
' requiresFork: "milady-llama-cpp",\n'
158+
' requiresFork: "buun-llama-cpp",\n'
159159
" },\n"
160160
)
161161
if self.spec_type:
@@ -205,13 +205,13 @@ def _slug_from_repo(hf_repo: str) -> str:
205205
return last.lower()
206206

207207

208-
def build_catalog_entry(manifest: dict[str, object]) -> MiladyCatalogEntry:
208+
def build_catalog_entry(manifest: dict[str, object]) -> Eliza1CatalogEntry:
209209
base_model = str(manifest.get("base_model", ""))
210210
base_meta = KNOWN_BASE_MODELS.get(base_model)
211211
if base_meta is None:
212212
raise SystemExit(
213213
f"manifest's base_model {base_model!r} is not in KNOWN_BASE_MODELS; "
214-
"add it to packages/training/scripts/emit_milady_catalog.py"
214+
"add it to packages/training/scripts/emit_eliza1_catalog.py"
215215
)
216216

217217
target_repo = str(manifest.get("target_repo") or "")
@@ -248,7 +248,7 @@ def build_catalog_entry(manifest: dict[str, object]) -> MiladyCatalogEntry:
248248
) or None
249249

250250
slug = _slug_from_repo(target_repo)
251-
return MiladyCatalogEntry(
251+
return Eliza1CatalogEntry(
252252
id=slug,
253253
display_name=slug,
254254
hf_repo=target_repo,
@@ -291,7 +291,7 @@ def _find_model_catalog_close(text: str) -> int:
291291
return close
292292

293293

294-
def emit_diff(catalog_path: Path, new_entry: MiladyCatalogEntry) -> str:
294+
def emit_diff(catalog_path: Path, new_entry: Eliza1CatalogEntry) -> str:
295295
"""Build a unified diff that inserts ``new_entry`` at the end of MODEL_CATALOG."""
296296
if not catalog_path.exists():
297297
raise SystemExit(f"catalog file does not exist: {catalog_path}")
@@ -314,7 +314,7 @@ def emit_diff(catalog_path: Path, new_entry: MiladyCatalogEntry) -> str:
314314
return "".join(diff_lines)
315315

316316

317-
def _entry_with_header(entry: MiladyCatalogEntry, catalog_hint: str) -> str:
317+
def _entry_with_header(entry: Eliza1CatalogEntry, catalog_hint: str) -> str:
318318
return (
319319
f"// Add this entry to the `MODEL_CATALOG` array in:\n"
320320
f"// {catalog_hint}\n"
@@ -334,7 +334,7 @@ def main(argv: list[str] | None = None) -> int:
334334
"--manifest",
335335
type=Path,
336336
required=True,
337-
help="Path to milady_manifest.json from optimize_for_milady.py.",
337+
help="Path to eliza1_manifest.json from optimize_for_eliza1.py.",
338338
)
339339
ap.add_argument(
340340
"--catalog",

0 commit comments

Comments
 (0)