NOEON: capability-slot rename (vision/computer_use/generation) + provenance; migrate weights
b871251 verified Download scripts/build_model.py from Frankenstein-Labs/NOEON: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/Frankenstein-Labs/NOEON/resolve/main/scripts/build_model.py
- Command line
-
hf download hf://Frankenstein-Labs/NOEON/scripts/build_model.py
-
curl -L -o build_model.py https://huggingface.co/Frankenstein-Labs/NOEON/resolve/main/scripts/build_model.py
1.97 kB
| #!/usr/bin/env python3 | |
| """Build NOEON and report its real parameter budget. | |
| Constructs the architecture from ``configs/noeon.yaml`` (or defaults), prints | |
| the trainable-parameter count versus the frozen source budget, and optionally | |
| writes the initial (untrained) NOEON checkpoint. No source weights are touched. | |
| Usage: | |
| python scripts/build_model.py | |
| python scripts/build_model.py --save checkpoints/init | |
| """ | |
| from __future__ import annotations | |
| import argparse | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) | |
| from noeon.architecture.model import Noeon | |
| from noeon.core.config import BridgeConfig, NoeonConfig, FusionConfig | |
| from noeon.core.registry import SOURCE_MODELS | |
| def build_default() -> NoeonConfig: | |
| return NoeonConfig() | |
| def main() -> int: | |
| ap = argparse.ArgumentParser() | |
| ap.add_argument("--save", default=None) | |
| args = ap.parse_args() | |
| model = Noeon(build_default()) | |
| trainable = model.trainable_parameters() | |
| frozen = sum(s.param_count for s in SOURCE_MODELS.values()) | |
| print("NOEON") | |
| print(f" shared dimension : {model.config.shared_dim}") | |
| print(f" fusion depth : {model.config.fusion.depth} " | |
| f"(heads={model.config.fusion.heads})") | |
| print(f" bridges : {[b.source for b in model.config.bridges]}") | |
| print() | |
| print(f" trainable params : {trainable:,} ({trainable/1e6:.2f} M)") | |
| print(f" frozen params : {frozen:,} ({frozen/1e9:.3f} B) <- never modified") | |
| print() | |
| for k, s in SOURCE_MODELS.items(): | |
| print(f" {k:16s} {s.repo:38s} {s.params_b:6.3f} B {s.license:11s} {s.access}") | |
| if args.save: | |
| from noeon.training.checkpoint import save_checkpoint | |
| d = save_checkpoint(model, None, 0, args.save, | |
| extra={"stage": "initial-untrained"}) | |
| print(f"\nwrote initial checkpoint -> {d}") | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |