Buckets:
| """TinyMind Omega++ command line interface.""" | |
| from __future__ import annotations | |
| import argparse | |
| import json | |
| from pathlib import Path | |
| import sys | |
| import time | |
| import torch | |
| ROOT = Path(__file__).resolve().parents[1] | |
| if str(ROOT) not in sys.path: | |
| sys.path.insert(0, str(ROOT)) | |
| DEFAULT_EXTERNAL_MODELS = ( | |
| "sshleifer/tiny-gpt2", | |
| "distilgpt2", | |
| "gpt2", | |
| ) | |
| from data.expert_curriculum_forge import ExpertCurriculumForge | |
| from data.claude_reasoning_bucket import ClaudeReasoningPolicy, build_claude_reasoning_dataset | |
| from data.coverage_100k_forge import build_coverage_100k_dataset | |
| from data.continuous_update_governor import build_continuous_update_manifest | |
| from data.data_greed_extractor import DataGreedExtractor | |
| from data.general_web_knowledge import write_general_web_knowledge | |
| from data.logic_agent_code_forge import build_logic_agent_code_dataset | |
| from data.alignment_tool_sft_forge import build_alignment_tool_sft_dataset | |
| from data.cve_intelligence_corpus import CVECorpusPolicy, CVEIntelligenceCorpusBuilder | |
| from data.hyper_pure_refinery import HyperPureKnowledgeRefinery | |
| from data.internet_ingestor import InternetEvidenceIngestor | |
| from data.kaggle_scicode_ingestor import SciCodeIngestPolicy, SciCodeKaggleIngestor | |
| from data.kaggle_benchmark_mix_ingestor import KaggleBenchmarkMixIngestor, KaggleBenchmarkMixPolicy | |
| from data.knowledge_essence_distiller import KnowledgeEssenceDistiller | |
| from data.lineage_weaver import build_hyper_pure_lineage, HyperPureLineageWeaver | |
| from data.native_transfer_curriculum import build_native_transfer_curriculum | |
| from data.reverse_engineering_corpus import ReverseEngineeringCorpusBuilder | |
| from data.thai_grounding_corpus import ThaiGroundingCorpusBuilder, ThaiGroundingPolicy | |
| from data.ultra_pure_audit import harden_ultra_pure_dataset | |
| from data.universal_context import UniversalContextLedger | |
| from data.world_pure_source_registry import ( | |
| build_world_pure_source_registry, | |
| build_world_pure_streaming_curriculum, | |
| ) | |
| from model.architecture import OmegaModel | |
| from model.axiom_dim import build_axiomdim_report | |
| from model.axiom_kv import build_axiomkv_report | |
| from model.axiom_lang import write_axiomlang_compile | |
| from model.config import OmegaConfig, omega_plus_config, purefield_config | |
| from model.logic_core import TinyLogicCore | |
| from model.omni_action_perception import OmniActionPerception | |
| from model.sparse_int4 import export_sparse_int4_model, prune_tensor_pairwise_4x8 | |
| from model.sparse_int6 import export_sparse_int6_model | |
| from evaluation.claims import write_claim_dossier | |
| from evaluation.code_recovery import recover_file | |
| from evaluation.compact_teacher_training import run_compact_teacher_train | |
| from evaluation.compact_intelligence import build_compact_intelligence_dossier | |
| from evaluation.command_intensity_governor import build_command_intensity_governor | |
| from evaluation.compressed_context_2m import run_compressed_context_2m_benchmark | |
| from evaluation.core_gap_closer import run_core_gap_closer | |
| from evaluation.current_model_results import build_current_model_results | |
| from evaluation.deep_research_rl import build_deep_research_rl_report | |
| from evaluation.deep_sharp_model_analyzer import build_deep_sharp_model_analysis | |
| from evaluation.deepweave_t0_candidate import build_deepweave_t0_candidate_report | |
| from evaluation.elastic_answer import write_elastic_answer | |
| from evaluation.evo_whole_body import build_evo_whole_body_report | |
| from evaluation.evo_cross_species import build_evo_cross_species_report | |
| from evaluation.evo_learning_loop import build_evo_learning_report | |
| from evaluation.extreme_memory import write_extreme_context_answer | |
| from evaluation.frontier_parity import build_frontier_parity_report | |
| from evaluation.local_evidence import run_local_train_eval_bundle | |
| from evaluation.ai_devtools import run_ai_devtools | |
| from evaluation.adaptive_alignment import run_adaptive_alignment | |
| from evaluation.adaptive_score_import import write_adaptive_import | |
| from evaluation.axiomflow_bench import run_axiomflow_bench | |
| from evaluation.arc_agi3_eval import run_arc_agi3_eval | |
| from evaluation.axiomweave_dossier import build_axiomweave_dossier | |
| from evaluation.axiom_orchestrator import build_axiom_orchestrator_report | |
| from evaluation.bitsharp_training import run_bitsharp_training | |
| from evaluation.grounded_answer import write_grounded_answer | |
| from evaluation.gguf_evo_upgrade import build_gguf_evo_upgrade | |
| from evaluation.hard_benchmark_suite import run_hard_benchmark_suite | |
| from evaluation.gateway_teacher_distill import build_gateway_teacher_distill | |
| from evaluation.hf_pure_auto_training import run_hf_pure_auto_refine_train | |
| from evaluation.int6_cuda_eval import build_int6_cuda_eval | |
| from evaluation.int6_cuda_rust_eval import run_int6_cuda_rust_eval | |
| from evaluation.int6_bridge_imma_eval import build_int6_bridge_imma_eval | |
| from evaluation.int6_precision_ladder import build_int6_precision_ladder | |
| from evaluation.int6_precision_tradeoff import build_int6_precision_tradeoff | |
| from evaluation.int6_tensorcore_bridge import build_int6_tensorcore_bridge | |
| from evaluation.logic_eval import run_logic_eval | |
| from evaluation.llm_stats_integration import build_llm_stats_report | |
| from evaluation.llm_stats_gateway import build_llm_stats_gateway_probe | |
| from evaluation.gpu_runtime_governor import build_gpu_runtime_governor | |
| from evaluation.global_leaderboards import build_global_leaderboard_cache | |
| from evaluation.model_sizing import build_4b_preflight, build_12b_preflight | |
| from evaluation.mythos_capability_forge import build_mythos_capability_forge | |
| from evaluation.mythos_purity_governor import build_mythos_purity_governor | |
| from evaluation.mythos_report_analyzer import build_mythos_report_analysis | |
| from evaluation.native_virtual_width import build_native_virtual_width_report | |
| from evaluation.native_baseline_probe import run_native_baseline_probe | |
| from evaluation.resource_optimizer import build_resource_optimizer_report | |
| from evaluation.rule_evolution import build_rule_evolution_report | |
| from evaluation.runtime_selector_report import build_runtime_selector_report | |
| from evaluation.score_import_merge import merge_score_imports | |
| from evaluation.knowledge_dashboard import run_knowledge_dashboard | |
| from evaluation.knowledge_full_cycle import run_knowledge_full_cycle | |
| from evaluation.layer_coherence import audit_axiomweave_coherence | |
| from evaluation.lmmarketcap_compare import run_lmmarketcap_compare | |
| from evaluation.official_hard_eval import run_official_hard_eval | |
| from evaluation.official_eval import build_official_eval_pack | |
| from evaluation.omni_pure_training import run_omni_pure_data_train | |
| from evaluation.perfection_gate import build_perfection_gate | |
| from evaluation.pure_lattice_cnn import build_pure_lattice_cnn_report | |
| from evaluation.pure_oracle_kernel import write_pure_oracle_answer | |
| from evaluation.raw_external_gate import build_raw_external_gate | |
| from evaluation.sandbox_tool_core_eval import build_sandbox_tool_core_eval | |
| from evaluation.self_dialogue_evidence import run_self_dialogue_train_eval_bundle | |
| from evaluation.system_auto_tuner import build_system_auto_tuner_report, promote_candidate_if_better | |
| from evaluation.system_coherence_governor import build_system_coherence_governor | |
| from evaluation.tfw_optimizer import build_tfw_optimizer | |
| from evaluation.ten_million_step_readiness import build_ten_million_step_readiness | |
| from evaluation.tensor_layer_planner import build_tensor_layer_plan | |
| from evaluation.ultra_deep_sharp_refiner import build_ultra_deep_sharp_refiner | |
| from evaluation.universal_intelligence_dossier import build_universal_intelligence_dossier | |
| from evaluation.world_model_package import build_world_model_package | |
| from evaluation.world_class_eval import build_world_class_eval | |
| from evaluation.world_quality_governor import build_world_quality_governor | |
| from hub.hf_package import build_hf_package | |
| from integrations.hf_bucket_sync import DEFAULT_BUCKET_URI, build_hf_bucket_sync_manifest | |
| from integrations.fi_gateway import write_manifest as write_fi_gateway_manifest | |
| from train.dataset_quality_governor import DatasetQualityGovernor, DatasetQualityPolicy | |
| from train.adapter_compactor import choose_lora_rank_plan, compact_lora_adapter | |
| from train.evo_continue import EvoContinuePlan, write_evo_continue_plan | |
| from train.native_micro_train import run_native_micro_train as run_native_micro_train_bundle | |
| from train.native_axiom_regenesis_train import run_native_axiom_regenesis_train as run_native_axiom_regenesis_train_bundle | |
| from train.native_axiom_scaling_ladder import run_native_axiom_scaling_ladder as run_native_axiom_scaling_ladder_bundle | |
| from train.native_scaling_ladder import run_native_scaling_ladder as run_native_scaling_ladder_bundle | |
| from train.sandbox_model_bridge import build_sandbox_model_bridge | |
| from train.trainer import TRAIN_CFG, Trainer | |
| def build_parser() -> argparse.ArgumentParser: | |
| parser = argparse.ArgumentParser(prog="tinymind", description="TinyMind local trainer and runtime") | |
| sub = parser.add_subparsers(dest="command", required=True) | |
| train = sub.add_parser("train", help="Train BF16 dense TinyMind checkpoint") | |
| train.add_argument("--architecture", choices=["omega_plus", "purefield"], default="omega_plus") | |
| train.add_argument("--size", choices=["tiny", "small", "medium", "4b", "12b"], default="small") | |
| train.add_argument("--max-steps", type=int, default=None) | |
| train.add_argument("--compile", action=argparse.BooleanOptionalAction, default=None) | |
| recover = sub.add_parser("recover-sparse", help="Apply pair-wise 4:8 pruning and save a recovery checkpoint") | |
| recover.add_argument("--checkpoint", required=True) | |
| recover.add_argument("--out", default="checkpoints/omega_sparse_recovery.pt") | |
| export = sub.add_parser("export-int4-sparse", help="Export int4_4x8_pairwise_sparse artifact") | |
| export.add_argument("--checkpoint", required=True) | |
| export.add_argument("--out", default="checkpoints/omega_int4_sparse.pt") | |
| export_int6 = sub.add_parser("export-int6-sparse", help="Export TinyMind int6_2x4_pairwise_sparse artifact") | |
| export_int6.add_argument("--checkpoint", required=True) | |
| export_int6.add_argument("--out", default="checkpoints/omega_int6_sparse.pt") | |
| int6_ladder = sub.add_parser("int6-precision-ladder", help="Measure INT6 2:4 against INT4 2:4 reference drift/size") | |
| int6_ladder.add_argument("--out-dir", default="reports/int6_precision_ladder") | |
| int6_ladder.add_argument("--seed", type=int, default=20260523) | |
| int6_tradeoff = sub.add_parser("int6-precision-tradeoff", help="Gate INT6 as a precision tradeoff winner against INT4 TF/W") | |
| int6_tradeoff.add_argument("--out-dir", default="reports/int6_precision_tradeoff") | |
| int6_tradeoff.add_argument("--precision-report", default="reports/int6_precision_ladder/int6_precision_ladder_report.json") | |
| int6_tradeoff.add_argument("--tfw-report", default="reports/tfw_optimizer_int4_vs_int6_realdata/tfw_optimizer_report.json") | |
| int6_tradeoff.add_argument("--min-mae-reduction-pct", type=float, default=25.0) | |
| int6_tradeoff.add_argument("--min-tfw-ratio-vs-int4", type=float, default=0.45) | |
| int6_cuda = sub.add_parser("int6-cuda-eval", help="Build/run INT6 CUDA kernel and sparse Tensor Core SASS boundary proof") | |
| int6_cuda.add_argument("--out-dir", default="reports/int6_cuda_eval") | |
| int6_cuda_rust = sub.add_parser("int6-cuda-rust-eval", help="Use Rust harness to compile/run INT6 CUDA kernel and SASS boundary proof") | |
| int6_cuda_rust.add_argument("--out-dir", default="reports/int6_cuda_eval_rust") | |
| tfw = sub.add_parser("tfw-optimize", help="Measure sparse kernel TF/TOPS per watt and select the best local runtime") | |
| tfw.add_argument("--out-dir", default="reports/tfw_optimizer") | |
| tfw.add_argument("--blocks", type=int, default=160) | |
| tfw.add_argument("--threads", type=int, default=256) | |
| tfw.add_argument("--iterations", type=int, default=5000) | |
| tfw.add_argument("--passes", type=int, default=3) | |
| tfw.add_argument("--skip-int4", action="store_true") | |
| tfw.add_argument("--int6-report", default="reports/int6_cuda_eval_dll/int6_cuda_eval_dll_report.json") | |
| tfw.add_argument("--int6-bridge-report", default="reports/int6_bridge_imma_eval/int6_bridge_imma_eval_report.json") | |
| int6_bridge = sub.add_parser("int6-tensorcore-bridge", help="Estimate INT6 two-pass INT4 Tensor Core bridge from measured TF/W data") | |
| int6_bridge.add_argument("--out-dir", default="reports/int6_tensorcore_bridge") | |
| int6_bridge.add_argument("--tfw-report", default="reports/tfw_optimizer/tfw_optimizer_report.json") | |
| int6_bridge.add_argument("--int6-report", default="reports/int6_cuda_eval_dll/int6_cuda_eval_dll_report.json") | |
| int6_bridge_imma = sub.add_parser("int6-bridge-imma-eval", help="Build/run fused two-pass IMMA.SP INT6 bridge benchmark") | |
| int6_bridge_imma.add_argument("--out-dir", default="reports/int6_bridge_imma_eval") | |
| int6_bridge_imma.add_argument("--blocks", type=int, default=160) | |
| int6_bridge_imma.add_argument("--threads", type=int, default=256) | |
| int6_bridge_imma.add_argument("--iterations", type=int, default=20000) | |
| int6_bridge_imma.add_argument("--passes", type=int, default=5) | |
| int6_bridge_imma.add_argument("--min-duration-s", type=float, default=0.0) | |
| int6_bridge_imma.add_argument("--mode", choices=["both", "realdata-only", "compute-only"], default="both") | |
| runtime_select = sub.add_parser("runtime-select", help="Select runtime mode from measured INT6 bridge/INT4 evidence") | |
| runtime_select.add_argument("--out-dir", default="reports/runtime_selector") | |
| runtime_select.add_argument("--int6-bridge-report", default="reports/int6_bridge_imma_eval/int6_bridge_imma_eval_report.json") | |
| sandbox_tool_core = sub.add_parser("sandbox-tool-core-eval", help="Run Sandbox Tool Core policy/audit gate") | |
| sandbox_tool_core.add_argument("--out-dir", default="reports/sandbox_tool_core") | |
| axiom_orchestrator = sub.add_parser("axiom-orchestrator", help="Run TinyMind-native orchestration/safety/multi-agent harness") | |
| axiom_orchestrator.add_argument("--out-dir", default="reports/axiom_orchestrator") | |
| axiom_orchestrator.add_argument("--mission", default="Build a verified local TinyMind workflow with sandbox evidence.") | |
| sandbox_model_bridge = sub.add_parser( | |
| "sandbox-model-bridge", | |
| help="Build Sandbox Tool Core SFT data and LoRA/continued-training bridge manifest", | |
| ) | |
| sandbox_model_bridge.add_argument("--out-dir", default="reports/sandbox_model_bridge") | |
| sandbox_model_bridge.add_argument("--sandbox-report", default="reports/sandbox_tool_core/sandbox_tool_core_eval_report.json") | |
| sandbox_model_bridge.add_argument("--active-model", default="runtime/active_best_model.json") | |
| sandbox_model_bridge.add_argument("--base-sft-dataset", default="model/tinymind-12b/data/tinymind_sft.jsonl") | |
| sandbox_model_bridge.add_argument("--qlora-script", default="model/tinymind-12b/train_12b_qlora.py") | |
| sandbox_model_bridge.add_argument("--extra-jsonl", action="append", default=None) | |
| dataset_governor = sub.add_parser("dataset-quality-governor", help="Deduplicate and balance mixed SFT JSONL before continued training") | |
| dataset_governor.add_argument("--input", default="reports/sandbox_model_bridge/tinymind_12b_sandbox_mix.jsonl") | |
| dataset_governor.add_argument("--out-dir", default="reports/dataset_quality_governor") | |
| dataset_governor.add_argument("--max-records", type=int, default=24000) | |
| dataset_governor.add_argument("--max-estimated-tokens", type=int, default=2048) | |
| dataset_governor.add_argument("--recipe-profile", choices=["default", "balanced", "frontier", "surgery", "apex"], default="default") | |
| purity_concentrator = sub.add_parser( | |
| "purity-concentrator", | |
| help="Final-pass multi-source high-density purity concentrator for SFT JSONL", | |
| ) | |
| purity_concentrator.add_argument("--inputs", nargs="+", required=True) | |
| purity_concentrator.add_argument("--out-dir", default="reports/purity_concentrator_latest") | |
| purity_concentrator.add_argument("--max-records", type=int, default=120000) | |
| purity_concentrator.add_argument("--max-estimated-tokens", type=int, default=2048) | |
| purity_concentrator.add_argument("--min-quality-score", type=float, default=0.48) | |
| purity_concentrator.add_argument("--max-domain-share", type=float, default=0.18) | |
| purity_concentrator.add_argument("--coverage-max-share", type=float, default=0.03) | |
| code_source_registry = sub.add_parser( | |
| "code-source-registry", | |
| help="Write a claim-gated Tier0 code source registry without copying external code into train data", | |
| ) | |
| code_source_registry.add_argument("--out-dir", default="reports/code_source_registry_latest") | |
| native_code_forge = sub.add_parser( | |
| "tinymind-native-code-forge", | |
| help="Generate TinyMind-created high-density code SFT data with anti-contamination metadata", | |
| ) | |
| native_code_forge.add_argument("--out-dir", default="reports/tinymind_native_code_forge_latest") | |
| native_code_forge.add_argument("--target-records", type=int, default=20000) | |
| native_code_forge.add_argument("--eval-fraction", type=float, default=0.02) | |
| coverage_100k = sub.add_parser("coverage-100k-forge", help="Build 100-axis source-grounded coverage SFT data from real local corpora") | |
| coverage_100k.add_argument("--out-dir", default="data/jsonl/coverage_100k") | |
| coverage_100k.add_argument("--target-records", type=int, default=100000) | |
| coverage_100k.add_argument("--variants-per-axis", type=int, default=None) | |
| coverage_100k.add_argument("--eval-fraction", type=float, default=0.01) | |
| coverage_100k.add_argument("--source-root", action="append", default=None) | |
| coverage_100k.add_argument("--synthetic-only", action="store_true") | |
| logic_agent_code = sub.add_parser("logic-agent-code-forge", help="Build logic/agent/code SFT data to rebalance the training recipe") | |
| logic_agent_code.add_argument("--out-dir", default="data/jsonl/logic_agent_code") | |
| logic_agent_code.add_argument("--target-records", type=int, default=50000) | |
| logic_agent_code.add_argument("--eval-fraction", type=float, default=0.02) | |
| alignment_tool_sft = sub.add_parser("alignment-tool-sft-forge", help="Build strict constraint-following and tool-calling SFT data") | |
| alignment_tool_sft.add_argument("--out-dir", default="data/jsonl/alignment_tool_sft") | |
| alignment_tool_sft.add_argument("--target-records", type=int, default=30000) | |
| alignment_tool_sft.add_argument("--eval-fraction", type=float, default=0.02) | |
| continuous_update = sub.add_parser("continuous-update-governor", help="Write a gated continuous data update/purity plan") | |
| continuous_update.add_argument("--out-dir", default="reports/continuous_update_governor") | |
| continuous_update.add_argument("--source-root", action="append", default=None) | |
| continuous_update.add_argument("--dataset-manifest", default="reports/dataset_quality_governor/dataset_quality_governor_manifest.json") | |
| continuous_update.add_argument("--cadence-hours", type=int, default=24) | |
| rule_evolution = sub.add_parser("rule-evolution-governor", help="Promote only evidence-backed self-generated rules") | |
| rule_evolution.add_argument("--out-dir", default="reports/rule_evolution_governor") | |
| evo_learning = sub.add_parser("evo-learning-loop", help="Turn failures into novel holdout challenges and promoted lessons") | |
| evo_learning.add_argument("--out-dir", default="reports/evo_learning_loop") | |
| hf_bucket_sync = sub.add_parser("hf-bucket-sync-manifest", help="Write guarded Hugging Face bucket sync scripts") | |
| hf_bucket_sync.add_argument("--out-dir", default="reports/hf_bucket_sync") | |
| hf_bucket_sync.add_argument("--bucket-uri", default=DEFAULT_BUCKET_URI) | |
| hf_bucket_sync.add_argument("--local-data-dir", default="data") | |
| hf_bucket_sync.add_argument("--local-download-dir", default="local") | |
| claude_reasoning = sub.add_parser("claude-reasoning-bucket", help="Profile or normalize the Claude Opus reasoning bucket data") | |
| claude_reasoning.add_argument("--out-dir", default="data/jsonl/claude_reasoning_bucket") | |
| claude_reasoning.add_argument("--source-dir", default=None, help="Downloaded bucket directory containing categories/*.jsonl") | |
| claude_reasoning.add_argument("--max-records", type=int, default=8706) | |
| claude_reasoning.add_argument("--max-records-per-source", type=int, default=6000) | |
| claude_reasoning.add_argument("--ingest-hf", action="store_true", help="Stream strict sources from Hugging Face using HF_TOKEN env var") | |
| claude_reasoning.add_argument("--source-repo", action="append", default=None, help="Restrict --ingest-hf to one strict source repo; repeatable") | |
| claude_reasoning.add_argument("--include-creative-roleplay", action="store_true") | |
| claude_reasoning.add_argument("--keep-reasoning-blocks", action="store_true") | |
| essence_distill = sub.add_parser("knowledge-essence-distill", help="Distill mixed JSONL into high-purity generalizable essence SFT") | |
| essence_distill.add_argument("--input", action="append", required=True) | |
| essence_distill.add_argument("--out-dir", default="data/jsonl/knowledge_essence") | |
| essence_distill.add_argument("--max-records", type=int, default=50000) | |
| anti_greed = sub.add_parser("data-greed-extract", help="Quarantine bloated/repetitive/over-dominant records before pure training") | |
| anti_greed.add_argument("--input", action="append", required=True) | |
| anti_greed.add_argument("--out-dir", default="reports/data_greed_extractor") | |
| anti_greed.add_argument("--max-chars", type=int, default=12000) | |
| anti_greed.add_argument("--max-domain-share", type=float, default=0.35) | |
| omni_perception = sub.add_parser("omni-action-perception", help="Build multimodal file/action perception registry and claim gates") | |
| omni_perception.add_argument("--out-dir", default="reports/omni_action_perception") | |
| omni_perception.add_argument("--probe", action="append", default=None) | |
| pure_lattice_cnn = sub.add_parser("pure-lattice-cnn", help="Build and verify the TinyMind PureLattice CNN core") | |
| pure_lattice_cnn.add_argument("--out-dir", default="reports/pure_lattice_cnn") | |
| pure_lattice_cnn.add_argument("--dim", type=int, default=64) | |
| pure_lattice_cnn.add_argument("--seq-len", type=int, default=33) | |
| pure_lattice_cnn.add_argument("--batch-size", type=int, default=2) | |
| mythos_purity = sub.add_parser("mythos-purity-governor", help="Raise TinyMind purity/intensity gates toward Claude Mythos-class comparison") | |
| mythos_purity.add_argument("--out-dir", default="reports/mythos_purity_governor") | |
| mythos_reports = sub.add_parser("mythos-report-analyze", help="Analyze public Mythos reports into evidence-bound lessons") | |
| mythos_reports.add_argument("--out-dir", default="reports/mythos_report_analysis") | |
| mythos_reports.add_argument("--source-path", default=None) | |
| mythos_capability = sub.add_parser("mythos-capability-forge", help="Turn Mythos-reported capabilities into TinyMind train/eval tasks") | |
| mythos_capability.add_argument("--out-dir", default="reports/mythos_capability_forge") | |
| mythos_capability.add_argument("--mythos-analysis", default="reports/mythos_report_analysis/mythos_report_analysis.json") | |
| deep_sharp = sub.add_parser("deep-sharp-model-analysis", help="Analyze TinyMind depth, density, sharpness, and claim blockers") | |
| deep_sharp.add_argument("--out-dir", default="reports/deep_sharp_model_analysis") | |
| deep_sharp.add_argument("--size", choices=["tiny", "small", "medium", "4b", "12b"], default="12b") | |
| command_intensity = sub.add_parser("command-intensity-governor", help="Build command obedience/intensity SFT and eval data") | |
| command_intensity.add_argument("--out-dir", default="reports/command_intensity_governor") | |
| ultra_deep = sub.add_parser("ultra-deep-sharp-refiner", help="Build second-order ultra-deep instruction SFT/eval/audit probes") | |
| ultra_deep.add_argument("--out-dir", default="reports/ultra_deep_sharp_refiner") | |
| evo_continue = sub.add_parser("evo-continue-plan", help="Write a claim-gated queued QLoRA Evo continued-training stage") | |
| evo_continue.add_argument("--out-dir", default="reports/evo_continue") | |
| evo_continue.add_argument("--wait-pid", type=int, required=True) | |
| evo_continue.add_argument("--base-adapter", required=True) | |
| evo_continue.add_argument("--dataset", default="reports/dataset_quality_governor/tinymind_12b_quality_governed_mix.jsonl") | |
| evo_continue.add_argument("--output-adapter", required=True) | |
| evo_continue.add_argument("--max-steps", type=int, default=400) | |
| evo_continue.add_argument("--max-seq-length", type=int, default=2048) | |
| evo_continue.add_argument("--data-manifest", default="reports/dataset_quality_governor/dataset_quality_governor_manifest.json") | |
| compact_lora = sub.add_parser("compact-lora-adapter", help="Create a smaller LoRA adapter candidate by pruning low-energy rank components") | |
| compact_lora.add_argument("--adapter", required=True) | |
| compact_lora.add_argument("--out", required=True) | |
| compact_lora.add_argument("--target-rank", type=int, default=8) | |
| compact_lora.add_argument("--auto-rank-energy", type=float, default=None) | |
| compact_lora.add_argument("--no-copy-tokenizer", action="store_true") | |
| evo_whole = sub.add_parser("evo-whole-body-report", help="Build a whole-body Evo report from data purity and model compaction evidence") | |
| evo_whole.add_argument("--out-dir", default="reports/evo_whole_body") | |
| evo_whole.add_argument("--data-manifest", default="reports/dataset_quality_governor/dataset_quality_governor_manifest.json") | |
| evo_whole.add_argument("--compaction-manifest", default=None) | |
| evo_whole.add_argument("--active-training-pid", type=int, default=None) | |
| evo_cross = sub.add_parser( | |
| "evo-cross-species", | |
| help="Build the cross-species Evo controller across adapter, data, web evidence, GGUF runtime, and compaction", | |
| ) | |
| evo_cross.add_argument("--out-dir", default="reports/evo_cross_species") | |
| evo_cross.add_argument("--adapter-manifest", default="model/tinymind-12b/adapters/tinymind-12b-raw-20of20-thaimath-lr1e5-s16-25690526_0045/tinymind_12b_manifest.json") | |
| evo_cross.add_argument("--data-manifest", default="reports/dataset_quality_governor/dataset_quality_governor_manifest.json") | |
| evo_cross.add_argument("--compaction-manifest", default=None) | |
| evo_cross.add_argument("--compaction-probe-report", default=None) | |
| evo_cross.add_argument("--gguf-manifest", default="reports/gguf_evo_upgrade/gguf_evo_upgrade_manifest.json") | |
| evo_cross.add_argument("--web-knowledge-report", default="reports/general_web_knowledge_smoke/general_web_knowledge_report.json") | |
| evo_cross.add_argument("--output-training-jsonl", default=None) | |
| gguf_evo = sub.add_parser("gguf-evo-upgrade", help="Create a GGUF Evo runtime upgrade pack with Modelfile, eval prompts, and claim gates") | |
| gguf_evo.add_argument("--out-dir", default="reports/gguf_evo_upgrade") | |
| gguf_evo.add_argument("--gguf", required=True) | |
| gguf_evo.add_argument("--base-modelfile", default=None) | |
| gguf_evo.add_argument("--adapter-manifest", default=None) | |
| gguf_evo.add_argument("--data-manifest", default=None) | |
| gguf_evo.add_argument("--training-manifest", default=None) | |
| gguf_evo.add_argument("--model-name", default="tinymind-gguf-evo") | |
| gguf_evo.add_argument("--num-ctx", type=int, default=32768) | |
| gguf_evo.add_argument("--num-predict", type=int, default=8192) | |
| gguf_evo.add_argument("--temperature", type=float, default=0.18) | |
| gguf_evo.add_argument("--top-p", type=float, default=0.82) | |
| gguf_evo.add_argument("--top-k", type=int, default=40) | |
| gguf_evo.add_argument("--repeat-penalty", type=float, default=1.17) | |
| deep_research = sub.add_parser("deep-research-rl", help="Run evidence-backed Deep Research RL retrieval/reward data generation") | |
| deep_research.add_argument("--out-dir", default="reports/deep_research_rl") | |
| deep_research.add_argument("--evidence", required=True) | |
| deep_research.add_argument("--question", action="append", required=True) | |
| deep_research.add_argument("--top-k", type=int, default=4) | |
| llm_stats = sub.add_parser("llm-stats-fetch", help="Fetch external LLM-Stats rankings/scores with an env-only API key") | |
| llm_stats.add_argument("--out-dir", default="reports/llm_stats") | |
| llm_stats.add_argument("--category", default="coding") | |
| llm_stats.add_argument("--models", nargs="*", default=None) | |
| llm_gateway = sub.add_parser("llm-stats-gateway-probe", help="Probe an OpenAI-compatible model through LLM-Stats Gateway using env-only API key") | |
| llm_gateway.add_argument("--out-dir", default="reports/llm_stats_gateway") | |
| llm_gateway.add_argument("--model", default="glm-5.1") | |
| llm_gateway.add_argument("--prompt", default="What is machine learning?") | |
| current_results = sub.add_parser("current-model-results", help="Render the current TinyMind Results dashboard JSON/Markdown/PNG") | |
| current_results.add_argument("--out-dir", default="reports/current_model_results") | |
| current_results.add_argument("--gguf-path", default="model/astraweave-fusion/artifacts/tinymind-purebase.gguf") | |
| current_results.add_argument("--train-log", default="reports/qlora_runs/sandbox_12b_25690524_133816/train.log") | |
| current_results.add_argument("--data-manifest", default="reports/dataset_quality_governor/dataset_quality_governor_manifest.json") | |
| current_results.add_argument("--evo-report", default="reports/evo_whole_body/evo_whole_body_report.json") | |
| current_results.add_argument("--llm-stats-report", default="reports/llm_stats/llm_stats_report.json") | |
| system_tuner = sub.add_parser("system-auto-tune", help="Select the best TinyMind adapter and quarantine regressions from evidence") | |
| system_tuner.add_argument("--out-dir", default="reports/system_auto_tuner") | |
| system_tuner.add_argument("--adapter-root", default="model/tinymind-12b/adapters") | |
| system_tuner.add_argument("--min-teacher-rows", type=int, default=32) | |
| promote_adapter = sub.add_parser("promote-adapter-if-better", help="Promote a candidate adapter only if held-out eval evidence beats champion") | |
| promote_adapter.add_argument("--out-dir", default="reports/promotion_gate") | |
| promote_adapter.add_argument("--candidate-manifest", required=True) | |
| promote_adapter.add_argument("--champion-path", default="reports/system_auto_tuner/champion_adapter.json") | |
| promote_adapter.add_argument("--baseline-manifest", default=None) | |
| promote_adapter.add_argument("--min-eval-records", type=int, default=16) | |
| promote_adapter.add_argument("--min-delta", type=float, default=0.0) | |
| teacher_distill = sub.add_parser("gateway-teacher-distill", help="Generate SFT rows from a LLM-Stats Gateway teacher with provenance gates") | |
| teacher_distill.add_argument("--out-dir", default="reports/gateway_teacher_distill") | |
| teacher_distill.add_argument("--prompts", required=True) | |
| teacher_distill.add_argument("--model", default="glm-5.1") | |
| teacher_distill.add_argument("--min-reward", type=float, default=0.15) | |
| fi_gateway = sub.add_parser("fi-gateway-manifest", help="Write optional FI/OpenAI-compatible gateway integration manifest") | |
| fi_gateway.add_argument("--out-dir", default="reports/fi_gateway") | |
| fi_gateway.add_argument("--port", type=int, default=7860) | |
| fi_gateway.add_argument("--host", default="127.0.0.1") | |
| re_corpus = sub.add_parser("reverse-engineering-corpus", help="Build defensive reverse-engineering learning JSONL from vendored course") | |
| re_corpus.add_argument("--out-dir", default="data/jsonl/reverse_engineering") | |
| re_corpus.add_argument("--source-root", default="third_party/z0f_reverse_engineering") | |
| re_corpus.add_argument("--source-name", default="Z0FCourse_ReverseEngineering") | |
| re_corpus.add_argument("--upstream", default="https://github.com/0xZ0F/Z0FCourse_ReverseEngineering.git") | |
| re_corpus.add_argument("--source-label", default="z0f_reverse_engineering_course") | |
| cve_corpus = sub.add_parser("cve-intelligence-corpus", help="Build defensive CVE intelligence JSONL from cvelistV5 and trickest/cve") | |
| cve_corpus.add_argument("--out-dir", default="data/jsonl/cve_intelligence") | |
| cve_corpus.add_argument("--cvelist-root", default="third_party/cvelistV5") | |
| cve_corpus.add_argument("--trickest-root", default="third_party/trickest_cve") | |
| cve_corpus.add_argument("--max-records-per-source", type=int, default=20000) | |
| cve_corpus.add_argument("--skip-records-per-source", type=int, default=0) | |
| cve_corpus.add_argument("--min-year", type=int, default=1999) | |
| cve_corpus.add_argument("--include-poc-urls", action="store_true") | |
| thai_corpus = sub.add_parser("thai-grounding-corpus", help="Build Thai grounding JSONL from Thai province, synonym, NER, MT, and code data") | |
| thai_corpus.add_argument("--out-dir", default="data/jsonl/thai_grounding") | |
| thai_corpus.add_argument("--third-party-root", default="third_party") | |
| thai_corpus.add_argument("--max-ner-sentences", type=int, default=4000) | |
| thai_corpus.add_argument("--skip-ner-sentences", type=int, default=0) | |
| bench = sub.add_parser("benchmark", help="Run a small local inference benchmark") | |
| bench.add_argument("--checkpoint", required=True) | |
| bench.add_argument("--tokens", type=int, default=16) | |
| claim = sub.add_parser("claim-dossier", help="Build a claim-readiness dossier from evidence JSON") | |
| claim.add_argument("--evidence", required=True) | |
| claim.add_argument("--out", default="reports/claim_dossier.md") | |
| local_eval = sub.add_parser("local-train-eval", help="Run real tiny PureField train/eval and write dossier evidence") | |
| local_eval.add_argument("--out-dir", default="reports/local_train_eval") | |
| local_eval.add_argument("--train-steps", type=int, default=8) | |
| local_eval.add_argument("--contexts", type=int, nargs="+", default=[32, 128, 1024]) | |
| local_eval.add_argument("--seed", type=int, default=20260522) | |
| expert_forge = sub.add_parser( | |
| "expert-curriculum-forge", | |
| help="Forge open pure expert curriculum data with junk-only filtering", | |
| ) | |
| expert_forge.add_argument("--out-dir", default="reports/expert_curriculum") | |
| expert_forge.add_argument("--records-per-domain", type=int, default=4) | |
| expert_forge.add_argument("--eval-ratio", type=float, default=0.2) | |
| hyper_pure = sub.add_parser( | |
| "hyper-pure-refine", | |
| help="Build highest-purity CEV knowledge dataset across deep AI domains", | |
| ) | |
| hyper_pure.add_argument("--out-dir", default="reports/hyper_pure_knowledge") | |
| hyper_pure.add_argument("--records-per-skill", type=int, default=2) | |
| hyper_pure.add_argument("--eval-ratio", type=float, default=0.2) | |
| lineage = sub.add_parser( | |
| "hyper-pure-lineage", | |
| help="Build fragment-to-source lineage graph for HyperPure knowledge", | |
| ) | |
| lineage.add_argument("--dataset", default="reports/hyper_pure_knowledge/hyper_pure_train.jsonl") | |
| lineage.add_argument("--out-dir", default="reports/hyper_pure_lineage") | |
| lineage.add_argument("--query", default=None) | |
| lineage.add_argument("--top-k", type=int, default=5) | |
| ultra_pure = sub.add_parser( | |
| "ultra-pure-audit", | |
| help="Strictly harden HyperPure JSONL into an ultra-pure training subset", | |
| ) | |
| ultra_pure.add_argument("--input", default="reports/hyper_pure_knowledge/hyper_pure_train.jsonl") | |
| ultra_pure.add_argument("--out-dir", default="reports/ultra_pure_knowledge") | |
| internet_update = sub.add_parser( | |
| "internet-update", | |
| help="Fetch URLs into timestamped Open Pure CEV evidence JSONL", | |
| ) | |
| internet_update.add_argument("--out-dir", default="reports/internet_update") | |
| internet_update.add_argument("--urls", nargs="+", required=True) | |
| internet_update.add_argument("--domain", default="internet_update") | |
| self_dialogue = sub.add_parser( | |
| "self-dialogue-train-eval", | |
| help="Forge oracle self-dialogue data, train TinyMind, and write evidence", | |
| ) | |
| self_dialogue.add_argument("--out-dir", default="reports/self_dialogue") | |
| self_dialogue.add_argument("--train-steps", type=int, default=12) | |
| self_dialogue.add_argument("--preference-steps", type=int, default=0) | |
| self_dialogue.add_argument("--train-size", type=int, default=48) | |
| self_dialogue.add_argument("--eval-size", type=int, default=12) | |
| self_dialogue.add_argument("--preference-eval-limit", type=int, default=6) | |
| self_dialogue.add_argument("--seed", type=int, default=20260523) | |
| external_eval = sub.add_parser( | |
| "external-model-eval", | |
| help="Run TinyMind self-dialogue eval rows against external Hugging Face models", | |
| ) | |
| external_eval.add_argument("--eval-path", default="reports/self_dialogue/self_dialogue_eval.jsonl") | |
| external_eval.add_argument("--out-dir", default="reports/external_hf_self_dialogue") | |
| external_eval.add_argument("--models", nargs="+", default=list(DEFAULT_EXTERNAL_MODELS)) | |
| external_eval.add_argument("--tinymind-checkpoint", default=None) | |
| external_eval.add_argument("--limit", type=int, default=6) | |
| external_stress = sub.add_parser( | |
| "external-stress-suite", | |
| help="Run optional external provider probes plus local AxiomKV/ReGenesis stress tests", | |
| ) | |
| external_stress.add_argument("--out-dir", default="reports/external_stress_suite") | |
| external_stress.add_argument("--provider-models", nargs="*", default=["Qwen/Qwen2.5-72B-Instruct"]) | |
| external_stress.add_argument("--run-external", action="store_true") | |
| external_stress.add_argument("--provider-kind", choices=["hf", "llm-stats"], default="hf") | |
| external_stress.add_argument("--provider", default=None) | |
| external_stress.add_argument("--timeout", type=float, default=60.0) | |
| external_stress.add_argument("--stress-seq-lengths", default="128,1024,8192,65536") | |
| external_stress.add_argument("--regenesis-loops", type=int, default=16) | |
| external_stress.add_argument("--soak-seconds", type=float, default=0.0) | |
| external_stress.add_argument("--soak-sample-interval", type=float, default=5.0) | |
| stress_provider_evidence = sub.add_parser( | |
| "stress-provider-evidence", | |
| help="Bundle provider access and stress soak reports into hash-backed evidence", | |
| ) | |
| stress_provider_evidence.add_argument("--out-dir", default="reports/stress_provider_access_evidence_latest") | |
| stress_provider_evidence.add_argument("--provider-report", required=True) | |
| stress_provider_evidence.add_argument("--soak-report", required=True) | |
| stress_provider_evidence.add_argument("--provider-command", default="") | |
| stress_provider_evidence.add_argument("--soak-command", default="") | |
| lmmarketcap = sub.add_parser( | |
| "lmmarketcap-compare", | |
| help="Fetch LM MarketCap model compare evidence using LMMARKETCAP_API_KEY", | |
| ) | |
| lmmarketcap.add_argument("--out-dir", default="reports/lmmarketcap_compare") | |
| lmmarketcap.add_argument("--models", required=True) | |
| lmmarketcap.add_argument("--category", required=True) | |
| lmmarketcap.add_argument("--dry-run", action="store_true") | |
| lmmarketcap.add_argument("--timeout", type=float, default=30.0) | |
| global_lb = sub.add_parser( | |
| "global-leaderboard-fetch", | |
| help="Fetch Arena AI snapshot and Hugging Face Open LLM leaderboard data into a local JSON cache", | |
| ) | |
| global_lb.add_argument("--out-dir", default="reports/global_leaderboards") | |
| global_lb.add_argument("--arena-names", nargs="+", default=["text", "code", "vision"]) | |
| global_lb.add_argument("--hf-limit", type=int, default=50) | |
| global_lb.add_argument("--offline", action="store_true") | |
| hub_pkg = sub.add_parser("hub-package", help="Build a local Hugging Face custom-code package") | |
| hub_pkg.add_argument("--checkpoint", required=True) | |
| hub_pkg.add_argument("--out-dir", default="reports/hf_package") | |
| hub_pkg.add_argument("--model-id", default="bang/TinyMind-ReGenesisKV-local") | |
| hub_pkg.add_argument("--evidence", nargs="*", default=[]) | |
| official = sub.add_parser( | |
| "official-eval-pack", | |
| help="Build readiness packets for LMArena, Artificial Analysis, and HF Open LLM Leaderboard", | |
| ) | |
| official.add_argument("--out-dir", default="reports/official_eval") | |
| official.add_argument("--model-id", required=True) | |
| official.add_argument("--hub-dir", default="reports/hf_tinymind_regenesis_kv") | |
| official.add_argument("--public-api-url", default=None) | |
| official.add_argument("--evidence", nargs="*", default=[]) | |
| official_hard = sub.add_parser( | |
| "official-hard-eval", | |
| help="Run accessible official/public hard benchmark harnesses and write measured evidence", | |
| ) | |
| official_hard.add_argument("--checkpoint", required=True) | |
| official_hard.add_argument("--out-dir", default="reports/official_hard_eval") | |
| official_hard.add_argument("--mmlu-limit", type=int, default=20) | |
| official_hard.add_argument("--safetensors", default=None) | |
| official_hard.add_argument("--int4-artifact", default=None) | |
| hard_suite = sub.add_parser( | |
| "hard-benchmark-suite", | |
| help="Run/aggregate hard local-public benchmarks: MMLU-Pro, IFEval-style, ARC, long-context, and blockers", | |
| ) | |
| hard_suite.add_argument("--checkpoint", required=True) | |
| hard_suite.add_argument("--out-dir", default="reports/hard_benchmark_suite") | |
| hard_suite.add_argument("--mmlu-limit", type=int, default=20) | |
| hard_suite.add_argument("--memory-report", default="reports/extreme_memory_10m/extreme_memory_report.json") | |
| hard_suite.add_argument("--safetensors", default=None) | |
| hard_suite.add_argument("--int4-artifact", default=None) | |
| hard_suite.add_argument("--skip-mmlu", action="store_true") | |
| hard_suite.add_argument("--skip-logic", action="store_true") | |
| arc_agi3 = sub.add_parser( | |
| "arc-agi3-eval", | |
| help="Run a measured ARC-AGI-3 public toolkit scorecard with a deterministic baseline agent", | |
| ) | |
| arc_agi3.add_argument("--out-dir", default="reports/arc_agi3_eval") | |
| arc_agi3.add_argument("--games", nargs="*", default=None) | |
| arc_agi3.add_argument("--all-available", action="store_true") | |
| arc_agi3.add_argument("--max-steps", type=int, default=128) | |
| arc_agi3.add_argument("--seed", type=int, default=20260523) | |
| knowledge_dash = sub.add_parser( | |
| "knowledge-dashboard", | |
| help="Build report-style knowledge/instruction/translation dashboard with size comparisons", | |
| ) | |
| knowledge_dash.add_argument("--checkpoint", required=True) | |
| knowledge_dash.add_argument("--out-dir", default="reports/knowledge_dashboard") | |
| knowledge_dash.add_argument("--mmlu-limit", type=int, default=20) | |
| knowledge_dash.add_argument("--safetensors", default=None) | |
| knowledge_dash.add_argument("--int4-artifact", default=None) | |
| knowledge_full = sub.add_parser( | |
| "knowledge-full-cycle", | |
| help="Forge pure CEV knowledge, audit it, train/eval, and build full-cycle evidence", | |
| ) | |
| knowledge_full.add_argument("--out-dir", default="reports/knowledge_full_cycle") | |
| knowledge_full.add_argument("--records-per-domain", type=int, default=4) | |
| knowledge_full.add_argument("--train-steps", type=int, default=12) | |
| knowledge_full.add_argument("--mmlu-limit", type=int, default=20) | |
| knowledge_full.add_argument("--seed", type=int, default=20260523) | |
| knowledge_full.add_argument("--skip-dashboard", action="store_true") | |
| omni_pure = sub.add_parser( | |
| "omni-pure-data-train", | |
| help="Forge diverse OmniPure CEV data and run real TinyMind local train/eval", | |
| ) | |
| omni_pure.add_argument("--out-dir", default="reports/omni_pure_training") | |
| omni_pure.add_argument("--records-per-domain", type=int, default=4) | |
| omni_pure.add_argument("--train-steps", type=int, default=12) | |
| omni_pure.add_argument("--seed", type=int, default=20260523) | |
| hf_pure = sub.add_parser( | |
| "hf-pure-auto-refine-train", | |
| help="Fetch allowlisted Hugging Face rows, purity-filter them, and run local TinyMind train/eval", | |
| ) | |
| hf_pure.add_argument("--out-dir", default="reports/hf_pure_auto_refinery") | |
| hf_pure.add_argument("--preset", choices=["default", "thai-code", "all"], default="default") | |
| hf_pure.add_argument("--sources", nargs="*", default=None, help="dataset[:config[:split[:domain]]] overrides") | |
| hf_pure.add_argument("--rows-per-source", type=int, default=20) | |
| hf_pure.add_argument("--train-steps", type=int, default=16) | |
| hf_pure.add_argument("--seed", type=int, default=20260523) | |
| hf_pure.add_argument("--offline", action="store_true", help="Use deterministic HF-shaped rows for offline smoke tests") | |
| scicode = sub.add_parser( | |
| "kaggle-scicode-ingest", | |
| help="Load Kaggle SciCode, normalize dev solutions into SFT JSONL, and quarantine test prompts", | |
| ) | |
| scicode.add_argument("--out-dir", default="data/jsonl/kaggle_scicode") | |
| scicode.add_argument("--dataset-slug", default="open-benchmarks/scicode") | |
| scicode.add_argument("--file-path", default="", help="Optional Kaggle file path; empty downloads dataset and uses problems_dev.jsonl") | |
| scicode.add_argument("--max-records", type=int, default=512) | |
| scicode.add_argument("--no-problem-level", action="store_true") | |
| scicode.add_argument("--no-sub-steps", action="store_true") | |
| scicode.add_argument("--no-quarantine-test", action="store_true") | |
| scicode.add_argument("--loss-weight", type=float, default=1.18) | |
| kaggle_mix = sub.add_parser( | |
| "kaggle-benchmark-mix-ingest", | |
| help="Ingest ParseBench, SimpleQA Verified, and MultiLoko as capped supplemental SFT data", | |
| ) | |
| kaggle_mix.add_argument("--out-dir", default="data/jsonl/kaggle_benchmark_mix") | |
| kaggle_mix.add_argument("--max-parsebench", type=int, default=400) | |
| kaggle_mix.add_argument("--max-simpleqa", type=int, default=400) | |
| kaggle_mix.add_argument("--max-multiloko", type=int, default=800) | |
| kaggle_mix.add_argument("--max-mgsm", type=int, default=400) | |
| kaggle_mix.add_argument("--max-livecodebench", type=int, default=400) | |
| kaggle_mix.add_argument("--multiloko-languages", nargs="*", default=None) | |
| compact_teacher = sub.add_parser( | |
| "compact-teacher-train", | |
| help="Train 100-step compact curriculum from HF-pure rows plus verified local teacher seeds", | |
| ) | |
| compact_teacher.add_argument("--out-dir", default="reports/compact_teacher_training") | |
| compact_teacher.add_argument("--hf-train", required=True) | |
| compact_teacher.add_argument("--hf-eval", required=True) | |
| compact_teacher.add_argument("--teacher-jsonl", required=True) | |
| compact_teacher.add_argument("--train-steps", type=int, default=100) | |
| compact_teacher.add_argument("--seed", type=int, default=20260523) | |
| ten_million = sub.add_parser( | |
| "ten-million-step-readiness", | |
| help="Write evidence-gated readiness report for a real long-step run", | |
| ) | |
| ten_million.add_argument("--out-dir", default="reports/ten_million_step_readiness") | |
| ten_million.add_argument("--baseline-report", default="reports/hf_pure_thai_code_smoke_steps256/hf_pure_auto_training_report.json") | |
| ten_million.add_argument("--target-steps", type=int, default=10_000_000) | |
| ten_million.add_argument("--calibration-steps", type=int, default=256) | |
| ten_million.add_argument("--calibration-seconds", type=float, default=181.6) | |
| ten_million.add_argument("--checkpoint-every", type=int, default=10_000) | |
| ten_million.add_argument("--eval-every", type=int, default=5_000) | |
| context_ingest = sub.add_parser( | |
| "context-ingest", | |
| help="Ingest files/folders/code/media into an exact hashed universal context ledger", | |
| ) | |
| context_ingest.add_argument("--out-dir", default="reports/context_ledger") | |
| context_ingest.add_argument("--paths", nargs="+", required=True) | |
| context_ingest.add_argument("--chunk-chars", type=int, default=4096) | |
| context_ingest.add_argument("--query", default=None) | |
| context_10m = sub.add_parser( | |
| "context10m-answer", | |
| help="Answer exact 10M-token archive questions only through hash-verified context recall", | |
| ) | |
| context_10m.add_argument("--archive-root", default="reports/extreme_memory_10m/archive") | |
| context_10m.add_argument("--question", required=True) | |
| context_10m.add_argument("--out", default="reports/extreme_memory_10m/context10m_answer.json") | |
| compressed_2m = sub.add_parser( | |
| "compressed-context-2m", | |
| help="Measure 2M-token exact context through ledger-backed compressed retrieval evidence", | |
| ) | |
| compressed_2m.add_argument("--out-dir", default="reports/compressed_context_2m") | |
| compressed_2m.add_argument("--token-count", type=int, default=2_000_000) | |
| compressed_2m.add_argument("--chunk-tokens", type=int, default=8192) | |
| compressed_2m.add_argument("--anchor-stride-chunks", type=int, default=8) | |
| grounded = sub.add_parser( | |
| "grounded-answer", | |
| help="Answer through source ledger retrieval and refuse unsupported facts", | |
| ) | |
| grounded.add_argument("--ledger-dir", required=True) | |
| grounded.add_argument("--question", required=True) | |
| grounded.add_argument("--out", default="reports/grounded_answer.json") | |
| grounded.add_argument("--top-k", type=int, default=3) | |
| grounded.add_argument("--external-research", choices=["always", "when_missing", "never"], default="when_missing") | |
| grounded.add_argument("--research-dir", default=None) | |
| general_web = sub.add_parser( | |
| "general-web-knowledge", | |
| help="Search/fetch/hash live web evidence and answer in ordinary language with citations", | |
| ) | |
| general_web.add_argument("--question", required=True) | |
| general_web.add_argument("--out-dir", default="reports/general_web_knowledge") | |
| general_web.add_argument("--max-results", type=int, default=6) | |
| general_web.add_argument("--top-k", type=int, default=4) | |
| general_web.add_argument("--language", choices=["auto", "th", "en"], default="auto") | |
| pure_oracle = sub.add_parser( | |
| "pure-oracle", | |
| help="Run the deterministic TinyMind tool/retrieval/logic/grounding kernel", | |
| ) | |
| pure_oracle.add_argument("--ledger-dir", required=True) | |
| pure_oracle.add_argument("--question", required=True) | |
| pure_oracle.add_argument("--out", default="reports/pure_oracle/pure_oracle_answer.json") | |
| pure_oracle.add_argument("--top-k", type=int, default=5) | |
| elastic = sub.add_parser( | |
| "elastic-answer", | |
| help="Compose short or exhaustive grounded answers through the TinyMind answer-lattice protocol", | |
| ) | |
| elastic.add_argument("--ledger-dir", required=True) | |
| elastic.add_argument("--question", required=True) | |
| elastic.add_argument("--out", default="reports/elastic_answer/elastic_answer.json") | |
| elastic.add_argument("--mode", choices=["auto", "brief", "standard", "deep", "exhaustive", "fluid"], default="auto") | |
| elastic.add_argument("--top-k", type=int, default=8) | |
| devtools = sub.add_parser( | |
| "ai-devtools", | |
| help="Run TinyMind AI-native DevTools scan/readiness/smoke report", | |
| ) | |
| devtools.add_argument("--root", default=str(ROOT)) | |
| devtools.add_argument("--out-dir", default="reports/ai_devtools") | |
| devtools.add_argument("--run-smoke", action="store_true") | |
| adaptive = sub.add_parser( | |
| "adaptive-alignment", | |
| help="Run grammar-constrained instruction/tool/code alignment protocol eval", | |
| ) | |
| adaptive.add_argument("--out-dir", default="reports/adaptive_alignment") | |
| adaptive_import = sub.add_parser( | |
| "adaptive-score-import", | |
| help="Convert adaptive alignment report into imported frontier parity scores", | |
| ) | |
| adaptive_import.add_argument("--adaptive-report", default="reports/adaptive_alignment/adaptive_alignment_report.json") | |
| adaptive_import.add_argument("--out", default="reports/adaptive_alignment/adaptive_scores_import.json") | |
| core_gap = sub.add_parser( | |
| "core-gap-closer", | |
| help="Run deterministic protocol checks for knowledge, translation, and bit-exactness gaps", | |
| ) | |
| core_gap.add_argument("--out-dir", default="reports/core_gap_closer") | |
| merge_imports = sub.add_parser( | |
| "merge-score-imports", | |
| help="Merge adaptive/core score imports for the frontier parity gate", | |
| ) | |
| merge_imports.add_argument("--inputs", nargs="+", required=True) | |
| merge_imports.add_argument("--out", default="reports/frontier_score_imports/merged_scores.json") | |
| code_recover = sub.add_parser( | |
| "code-recover", | |
| help="Recover owned reversible encoded/compressed code or documents with layer hashes", | |
| ) | |
| code_recover.add_argument("--input", required=True) | |
| code_recover.add_argument("--out-dir", default="reports/code_recovery") | |
| bitsharp = sub.add_parser( | |
| "bitsharp-train", | |
| help="Fine-tune with Pure Bit-Margin Sharpening against corrupted targets", | |
| ) | |
| bitsharp.add_argument("--checkpoint", required=True) | |
| bitsharp.add_argument("--datasets", nargs="+", required=True) | |
| bitsharp.add_argument("--out-dir", default="reports/bitsharp") | |
| bitsharp.add_argument("--steps", type=int, default=128) | |
| bitsharp.add_argument("--margin", type=float, default=0.15) | |
| logic_eval = sub.add_parser("logic-eval", help="Run TinyMind logic-focused evaluation") | |
| logic_eval.add_argument("--checkpoint", required=True) | |
| logic_eval.add_argument("--out-dir", default="reports/logic_eval") | |
| logic_solve = sub.add_parser("logic-solve", help="Solve a logic question with deterministic TinyLogicCore") | |
| logic_solve.add_argument("--question", required=True) | |
| preflight_4b = sub.add_parser("preflight-4b", help="Write RTX 3090 sizing/preflight report for TinyMind 4B") | |
| preflight_4b.add_argument("--out-dir", default="reports/tinymind_4b_preflight") | |
| preflight_12b = sub.add_parser("preflight-12b", help="Write RTX 3090 sizing/preflight report for TinyMind 12B") | |
| preflight_12b.add_argument("--out-dir", default="reports/tinymind_12b_preflight") | |
| gpu_governor = sub.add_parser( | |
| "rtx3090-runtime-governor", | |
| help="Build 12B compressed runtime guard report from RTX 3090 telemetry", | |
| ) | |
| gpu_governor.add_argument("--out-dir", default="reports/rtx3090_runtime_governor") | |
| gpu_governor.add_argument("--preflight", default="reports/tinymind_12b_preflight/tinymind_12b_preflight.json") | |
| gpu_governor.add_argument("--max-temp-c", type=float, default=82.0) | |
| gpu_governor.add_argument("--min-free-vram-gb", type=float, default=None) | |
| axiomweave = sub.add_parser( | |
| "axiomweave-dossier", | |
| help="Build AxiomWeave architecture smoke dossier with routed synthesis evidence", | |
| ) | |
| axiomweave.add_argument("--out-dir", default="reports/axiomweave") | |
| axiomweave.add_argument("--size", choices=["tiny", "small", "medium", "4b", "12b"], default="tiny") | |
| axiomweave.add_argument("--seq-len", type=int, default=16) | |
| axiomflow = sub.add_parser( | |
| "axiomflow-bench", | |
| help="Run AxiomFlow HyperWeave bounded-memory reference benchmark", | |
| ) | |
| axiomflow.add_argument("--out-dir", default="reports/axiomflow") | |
| axiomflow.add_argument("--dim", type=int, default=128) | |
| axiomflow.add_argument("--seq-len", type=int, default=64) | |
| axiomflow.add_argument("--batch-size", type=int, default=1) | |
| axiomflow.add_argument("--local-window", type=int, default=16) | |
| axiomflow.add_argument("--memory-slots", type=int, default=8) | |
| axiomflow.add_argument("--memory-rank", type=int, default=16) | |
| axiomflow.add_argument("--retrieval-top-k", type=int, default=4) | |
| axiomflow.add_argument("--retrieved-chunk-tokens", type=int, default=32) | |
| axiomflow.add_argument("--seed", type=int, default=20260525) | |
| tensor_layer_plan = sub.add_parser( | |
| "tensor-layer-plan", | |
| help="Plan exact virtual Total Layers Tensor depth without physical-layer explosion", | |
| ) | |
| tensor_layer_plan.add_argument("--out-dir", default="reports/tensor_layer_plan_1803") | |
| tensor_layer_plan.add_argument("--target-layers-tensor", type=int, default=1803) | |
| tensor_layer_plan.add_argument("--physical-layers", type=int, default=41) | |
| tensor_layer_plan.add_argument("--hidden-dim", type=int, default=5120) | |
| tensor_layer_plan.add_argument("--local-window", type=int, default=2048) | |
| system_coherence = sub.add_parser( | |
| "system-coherence-governor", | |
| help="Aggregate subsystem gates into one no-zero-work coherence governor", | |
| ) | |
| system_coherence.add_argument("--out-dir", default="reports/system_coherence_governor") | |
| system_coherence.add_argument("--dataset-report", default="reports/dataset_quality_governor_apex/dataset_quality_governor_manifest.json") | |
| system_coherence.add_argument("--axiomflow-report", default="reports/axiomflow/axiomflow_bench_report.json") | |
| system_coherence.add_argument("--tensor-layer-report", default="reports/tensor_layer_plan_1803/tensor_layer_plan.json") | |
| system_coherence.add_argument("--champion-report", default="reports/system_auto_tuner/champion_adapter.json") | |
| system_coherence.add_argument("--runtime-report", default="reports/runtime_selector/runtime_selector_report.json") | |
| axiomlang = sub.add_parser( | |
| "axiomlang-compile", | |
| help="Compile AxiomLang AI-native model language into TinyMind config and growth plan", | |
| ) | |
| axiomlang.add_argument("--source", required=True) | |
| axiomlang.add_argument("--out", default="reports/axiomlang/compiled.json") | |
| coherence = sub.add_parser( | |
| "axiomweave-coherence", | |
| help="Audit AxiomWeave layers for no-zero-work coordinated routing", | |
| ) | |
| coherence.add_argument("--out-dir", default="reports/axiomweave_coherence") | |
| coherence.add_argument("--size", choices=["tiny", "small", "medium", "4b", "12b"], default="tiny") | |
| coherence.add_argument("--seq-len", type=int, default=16) | |
| world_eval = sub.add_parser( | |
| "world-class-eval", | |
| help="Build broad intelligence eval packet for comparing TinyMind against world-class model targets", | |
| ) | |
| world_eval.add_argument("--out-dir", default="reports/world_class_eval") | |
| world_eval.add_argument("--knowledge-report", default="reports/knowledge_full_cycle_pursuit_512/knowledge_full_cycle_report.json") | |
| world_eval.add_argument("--compact-report", default="reports/compact_intelligence/compact_intelligence_dossier.json") | |
| world_eval.add_argument("--coherence-report", default="reports/axiomweave_coherence/layer_coherence_report.json") | |
| world_eval.add_argument("--memory-report", default="reports/extreme_memory_10m/extreme_memory_report.json") | |
| world_eval.add_argument("--external-results", default=None) | |
| perfection = sub.add_parser( | |
| "system-perfection-gate", | |
| help="Run strict local system integrity gate and block unsupported 100%% perfection claims", | |
| ) | |
| perfection.add_argument("--out-dir", default="reports/system_perfection_gate") | |
| perfection.add_argument("--skip-tests", action="store_true") | |
| frontier = sub.add_parser( | |
| "gpt55-pro-parity", | |
| help="Build GPT-5.5 Pro class parity gate from TinyMind world-class evidence", | |
| ) | |
| frontier.add_argument("--out-dir", default="reports/gpt55_pro_parity") | |
| frontier.add_argument("--world-report", default="reports/world_class_eval/world_class_eval_report.json") | |
| frontier.add_argument("--imported-scores", default=None) | |
| raw_external = sub.add_parser( | |
| "raw-external-gate", | |
| help="Validate raw model scores and official external results before frontier claims", | |
| ) | |
| raw_external.add_argument("--out-dir", default="reports/raw_external_gate") | |
| raw_external.add_argument("--raw-world-report", default="reports/world_class_eval/world_class_eval_report.json") | |
| raw_external.add_argument("--external-results", default=None) | |
| world_quality = sub.add_parser( | |
| "world-quality-governor", | |
| help="Aggregate purity, protocol, raw, external, and claim gates into one quality control report", | |
| ) | |
| world_quality.add_argument("--out-dir", default="reports/world_quality_governor") | |
| world_pure_sources = sub.add_parser( | |
| "world-pure-sources", | |
| help="Build high-provenance world data source registry and bounded streaming curriculum", | |
| ) | |
| world_pure_sources.add_argument("--out-dir", default="reports/world_pure_source_registry") | |
| world_pure_sources.add_argument("--token-budget", type=int, default=10_000_000) | |
| deepweave_t0 = sub.add_parser( | |
| "deepweave-t0-candidate", | |
| help="Build TinyMind-native DeepWeave-T0 candidate report with virtual tensor depth and FFI artifacts", | |
| ) | |
| deepweave_t0.add_argument("--out-dir", default="reports/deepweave_t0_candidate") | |
| deepweave_t0.add_argument("--physical-layers", type=int, default=96) | |
| deepweave_t0.add_argument("--virtual-lanes", type=int, default=64) | |
| deepweave_t0.add_argument("--smoke-layers", type=int, default=4) | |
| deepweave_t0.add_argument("--smoke-dim", type=int, default=256) | |
| deepweave_t0.add_argument("--smoke-seq-len", type=int, default=16) | |
| native_transfer = sub.add_parser( | |
| "native-transfer-curriculum", | |
| help="Build staged TinyMind-native transfer SFT from Mistral+LoRA runtime repair events", | |
| ) | |
| native_transfer.add_argument("--out-dir", default="reports/native_transfer_curriculum") | |
| native_transfer.add_argument( | |
| "--probe-report", | |
| default="reports/broad_probe_surgical_constrained_25690527_153701/broad_480b_eval_report.json", | |
| ) | |
| native_transfer.add_argument("--variants-per-event", type=int, default=4) | |
| native_micro = sub.add_parser( | |
| "native-micro-train", | |
| help="Run a tiny OmegaModel micro train/eval loop on native transfer curriculum", | |
| ) | |
| native_micro.add_argument("--out-dir", default="reports/native_micro_train") | |
| native_micro.add_argument("--dataset", default="reports/native_transfer_curriculum_latest/native_transfer_curriculum.jsonl") | |
| native_micro.add_argument("--max-steps", type=int, default=12) | |
| native_micro.add_argument("--eval-records", type=int, default=16) | |
| native_micro.add_argument("--limit-records", type=int, default=None) | |
| native_micro.add_argument("--dim", type=int, default=128) | |
| native_micro.add_argument("--layers", type=int, default=3) | |
| native_micro.add_argument("--seq-len", type=int, default=128) | |
| native_micro.add_argument("--vocab-size", type=int, default=512) | |
| native_micro.add_argument("--learning-rate", type=float, default=3e-4) | |
| native_axiom_regenesis = sub.add_parser( | |
| "native-axiom-regenesis-train", | |
| help="Train/eval the independent TinyMind AxiomReGenesis native architecture", | |
| ) | |
| native_axiom_regenesis.add_argument( | |
| "--out-dir", | |
| default="reports/native_axiom_regenesis_smoke", | |
| ) | |
| native_axiom_regenesis.add_argument( | |
| "--dataset", | |
| default="reports/purity_concentrator_code_puremax_latest/tinymind_puremax_concentrated_mix.jsonl", | |
| ) | |
| native_axiom_regenesis.add_argument("--max-steps", type=int, default=16) | |
| native_axiom_regenesis.add_argument("--eval-records", type=int, default=16) | |
| native_axiom_regenesis.add_argument("--limit-records", type=int, default=256) | |
| native_axiom_regenesis.add_argument("--dim", type=int, default=128) | |
| native_axiom_regenesis.add_argument("--layers", type=int, default=3) | |
| native_axiom_regenesis.add_argument("--lanes", type=int, default=8) | |
| native_axiom_regenesis.add_argument("--seq-len", type=int, default=128) | |
| native_axiom_regenesis.add_argument("--vocab-size", type=int, default=512) | |
| native_axiom_regenesis.add_argument("--virtual-dim", type=int, default=20_480) | |
| native_axiom_regenesis.add_argument("--basis-rank", type=int, default=32) | |
| native_axiom_regenesis.add_argument("--facets", type=int, default=8) | |
| native_axiom_regenesis.add_argument("--learning-rate", type=float, default=3e-4) | |
| native_axiom_regenesis.add_argument("--train-batch-size", type=int, default=1) | |
| native_axiom_regenesis.add_argument("--seed", type=int, default=20260528) | |
| native_axiom_regenesis.add_argument("--device", default=None) | |
| native_axiom_regenesis.add_argument("--resume-checkpoint", default=None) | |
| native_baseline_probe = sub.add_parser( | |
| "native-baseline-probe", | |
| help="Compare AxiomReGenesis native checkpoint against champion adapter evidence on five probes", | |
| ) | |
| native_baseline_probe.add_argument("--out-dir", default="reports/native_baseline_probe") | |
| native_baseline_probe.add_argument( | |
| "--native-checkpoint", | |
| default="reports/native_axiom_regenesis_smoke_latest/checkpoint.pt", | |
| ) | |
| native_baseline_probe.add_argument( | |
| "--baseline-report", | |
| default="reports/deep_core_probe_deepsharp_command_mythos_20260526_2320/deep_core_probe_report.json", | |
| ) | |
| native_baseline_probe.add_argument("--baseline-adapter-name", default=None) | |
| native_baseline_probe.add_argument("--max-new-tokens", type=int, default=96) | |
| native_baseline_probe.add_argument("--device", default=None) | |
| native_axiom_ladder = sub.add_parser( | |
| "native-axiom-scaling-ladder", | |
| help="Scale AxiomReGenesis native smoke training through layer counts such as 6,12,24", | |
| ) | |
| native_axiom_ladder.add_argument("--out-dir", default="reports/native_axiom_scaling_ladder") | |
| native_axiom_ladder.add_argument( | |
| "--dataset", | |
| default="reports/purity_concentrator_code_puremax_latest/tinymind_puremax_concentrated_mix.jsonl", | |
| ) | |
| native_axiom_ladder.add_argument("--layers", default="6,12,24") | |
| native_axiom_ladder.add_argument("--dim", type=int, default=128) | |
| native_axiom_ladder.add_argument("--lanes", type=int, default=8) | |
| native_axiom_ladder.add_argument("--seq-len", type=int, default=96) | |
| native_axiom_ladder.add_argument("--max-steps", type=int, default=4) | |
| native_axiom_ladder.add_argument("--eval-records", type=int, default=12) | |
| native_axiom_ladder.add_argument("--limit-records", type=int, default=10000) | |
| native_axiom_ladder.add_argument("--vocab-size", type=int, default=512) | |
| native_axiom_ladder.add_argument("--virtual-dim", type=int, default=20480) | |
| native_axiom_ladder.add_argument("--basis-rank", type=int, default=32) | |
| native_axiom_ladder.add_argument("--facets", type=int, default=8) | |
| native_axiom_ladder.add_argument("--learning-rate", type=float, default=3e-4) | |
| native_axiom_ladder.add_argument("--local-layer-limit", type=int, default=24) | |
| native_axiom_ladder.add_argument("--local-param-limit", type=int, default=25_000_000) | |
| native_ladder = sub.add_parser( | |
| "native-scaling-ladder", | |
| help="Run staged OmegaModel native micro-train ladder and create Colab handoff for stages above local limit", | |
| ) | |
| native_ladder.add_argument("--out-dir", default="reports/native_scaling_ladder") | |
| native_ladder.add_argument("--dataset", default="reports/native_transfer_curriculum_latest/native_transfer_curriculum.jsonl") | |
| native_ladder.add_argument("--layers", default="6,12,24") | |
| native_ladder.add_argument("--dim", type=int, default=128) | |
| native_ladder.add_argument("--dims", default=None) | |
| native_ladder.add_argument("--seq-len", type=int, default=128) | |
| native_ladder.add_argument("--max-steps", type=int, default=8) | |
| native_ladder.add_argument("--eval-records", type=int, default=16) | |
| native_ladder.add_argument("--vocab-size", type=int, default=512) | |
| native_ladder.add_argument("--learning-rate", type=float, default=3e-4) | |
| native_ladder.add_argument("--local-layer-limit", type=int, default=24) | |
| native_ladder.add_argument("--local-dim-limit", type=int, default=256) | |
| native_virtual_width = sub.add_parser( | |
| "native-virtual-width", | |
| help="Plan and smoke-test factorized virtual hidden widths such as 20480 without dense activation blowup", | |
| ) | |
| native_virtual_width.add_argument("--out-dir", default="reports/native_virtual_width") | |
| native_virtual_width.add_argument("--virtual-dim", type=int, default=20480) | |
| native_virtual_width.add_argument("--physical-dims", default="512,768,1024") | |
| native_virtual_width.add_argument("--layers", default="6,12,24") | |
| native_virtual_width.add_argument("--ranks", default="64,96,128,192") | |
| native_virtual_width.add_argument("--lanes", type=int, default=64) | |
| axiomdim = sub.add_parser( | |
| "axiomdim", | |
| help="Design and smoke-test TinyMind AxiomDim procedural dimensions such as effective_dim 20480", | |
| ) | |
| axiomdim.add_argument("--out-dir", default="reports/axiomdim") | |
| axiomdim.add_argument("--effective-dim", type=int, default=20480) | |
| axiomdim.add_argument("--physical-dims", default="128,256,512") | |
| axiomdim.add_argument("--basis-ranks", default="32,64,96,128") | |
| axiomdim.add_argument("--facets", default="8,16,32") | |
| axiomkv = sub.add_parser( | |
| "axiomkv", | |
| help="Smoke-test bounded KV memory for AxiomDim without KV growth by sequence length", | |
| ) | |
| axiomkv.add_argument("--out-dir", default="reports/axiomkv") | |
| axiomkv.add_argument("--effective-dim", type=int, default=20480) | |
| axiomkv.add_argument("--physical-dim", type=int, default=128) | |
| axiomkv.add_argument("--seq-lengths", default="128,1024,8192") | |
| axiomkv.add_argument("--local-window", type=int, default=64) | |
| axiomkv.add_argument("--anchor-slots", type=int, default=32) | |
| axiomkv.add_argument("--anchor-rank", type=int, default=64) | |
| resource_opt = sub.add_parser("resource-optimize", help="Select highest quality-per-resource TinyMind runtime profile") | |
| resource_opt.add_argument("--out-dir", default="reports/resource_optimizer") | |
| resource_opt.add_argument("--bitsharp-report", default="reports/bitsharp_256/bitsharp_report.json") | |
| resource_opt.add_argument("--preflight-4b", default="reports/tinymind_4b_preflight/tinymind_4b_preflight.json") | |
| compact = sub.add_parser( | |
| "compact-intelligence", | |
| help="Build a multi-axis compact-intelligence dossier against larger model size classes", | |
| ) | |
| compact.add_argument("--out-dir", default="reports/compact_intelligence") | |
| compact.add_argument( | |
| "--knowledge-report", | |
| default="reports/knowledge_full_cycle_pursuit_512/knowledge_full_cycle_report.json", | |
| ) | |
| compact.add_argument("--bitsharp-report", default="reports/bitsharp_256/bitsharp_report.json") | |
| compact.add_argument("--logic-report", default="reports/logic_eval_pursuit_512/logic_eval_report.json") | |
| compact.add_argument( | |
| "--official-report", | |
| default="reports/official_hard_eval_pursuit_512/official_hard_eval_report.json", | |
| ) | |
| world_pack = sub.add_parser( | |
| "world-model-pack", | |
| help="Bundle checkpoint, AXON knowledge, evidence, and claim gates into a world-facing package", | |
| ) | |
| world_pack.add_argument("--out-dir", default="reports/world_model_package") | |
| world_pack.add_argument("--model-name", required=True) | |
| world_pack.add_argument("--checkpoint", required=True) | |
| world_pack.add_argument("--axon-capsule", required=True) | |
| world_pack.add_argument("--evidence", nargs="*", default=[]) | |
| universal = sub.add_parser( | |
| "universal-intelligence-dossier", | |
| help="Build a hardest-benchmark coverage dossier across intelligence dimensions", | |
| ) | |
| universal.add_argument("--out-dir", default="reports/universal_intelligence") | |
| universal.add_argument("--model-id", required=True) | |
| universal.add_argument("--evidence", nargs="*", default=[]) | |
| serve = sub.add_parser("serve", help="Start FastAPI server") | |
| serve.add_argument("--host", default="0.0.0.0") | |
| serve.add_argument("--port", type=int, default=8000) | |
| return parser | |
| def _load_model(checkpoint: str) -> tuple[OmegaModel, dict]: | |
| ckpt = torch.load(checkpoint, map_location="cpu", weights_only=False) | |
| cfg: OmegaConfig = ckpt["model_cfg"] | |
| model = OmegaModel(cfg) | |
| model.load_state_dict(ckpt["model_state"]) | |
| model.eval() | |
| return model, ckpt | |
| def build_model_config(args: argparse.Namespace) -> OmegaConfig: | |
| architecture = getattr(args, "architecture", "omega_plus") | |
| if architecture == "purefield": | |
| return purefield_config(args.size) | |
| if architecture == "omega_plus": | |
| return omega_plus_config(args.size) | |
| raise ValueError(f"unknown architecture '{architecture}'") | |
| def run_train(args: argparse.Namespace) -> None: | |
| cfg = build_model_config(args) | |
| train_cfg = dict(TRAIN_CFG) | |
| if args.max_steps is not None: | |
| train_cfg["max_steps"] = args.max_steps | |
| if args.compile is not None: | |
| train_cfg["compile"] = args.compile | |
| trainer = Trainer(train_cfg=train_cfg, model_cfg=cfg) | |
| trainer.train() | |
| def run_recover_sparse(args: argparse.Namespace) -> None: | |
| model, ckpt = _load_model(args.checkpoint) | |
| with torch.no_grad(): | |
| for module in model.modules(): | |
| if isinstance(module, torch.nn.Linear) and module.in_features >= 64: | |
| module.weight.copy_(prune_tensor_pairwise_4x8(module.weight)) | |
| ckpt["model_state"] = model.state_dict() | |
| ckpt["sparsity_mode"] = "int4_4x8_pairwise_sparse" | |
| out = Path(args.out) | |
| out.parent.mkdir(parents=True, exist_ok=True) | |
| torch.save(ckpt, out) | |
| print(f"sparse recovery checkpoint saved: {out}") | |
| def run_export_int4_sparse(args: argparse.Namespace) -> None: | |
| model, ckpt = _load_model(args.checkpoint) | |
| artifact = export_sparse_int4_model(model, quality_gate_delta=getattr(ckpt["model_cfg"], "quality_gate_delta", 0.05)) | |
| out = Path(args.out) | |
| out.parent.mkdir(parents=True, exist_ok=True) | |
| torch.save(artifact, out) | |
| print(f"INT4 sparse artifact saved: {out} ({len(artifact['layers'])} layers)") | |
| def run_export_int6_sparse(args: argparse.Namespace) -> None: | |
| model, ckpt = _load_model(args.checkpoint) | |
| delta = min(getattr(ckpt["model_cfg"], "quality_gate_delta", 0.05), 0.025) | |
| artifact = export_sparse_int6_model(model, quality_gate_delta=delta) | |
| out = Path(args.out) | |
| out.parent.mkdir(parents=True, exist_ok=True) | |
| torch.save(artifact, out) | |
| print(f"INT6 sparse artifact saved: {out} ({len(artifact['layers'])} layers)") | |
| def run_int6_precision_ladder(args: argparse.Namespace) -> None: | |
| report = build_int6_precision_ladder(args.out_dir, seed=args.seed) | |
| i4 = report["formats"]["int4"] | |
| i6 = report["formats"]["int6"] | |
| print(f"INT6 precision ladder report: {report['json_path']}") | |
| print(f"int4_mae: {i4['error']['mean_abs_error']:.6f}") | |
| print(f"int6_mae: {i6['error']['mean_abs_error']:.6f}") | |
| print(f"int6_wins_drift_over_int4: {report['decision']['int6_wins_drift_over_int4']}") | |
| print(f"world_best_precision_claim_allowed: {report['claim_gate']['world_best_precision_claim_allowed']}") | |
| def run_int6_precision_tradeoff(args: argparse.Namespace) -> None: | |
| report = build_int6_precision_tradeoff( | |
| out_dir=args.out_dir, | |
| precision_report=args.precision_report, | |
| tfw_report=args.tfw_report, | |
| min_mae_reduction_pct=args.min_mae_reduction_pct, | |
| min_tfw_ratio_vs_int4=args.min_tfw_ratio_vs_int4, | |
| ) | |
| decision = report["decision"] | |
| precision = report["precision"] | |
| runtime = report["runtime"] | |
| print(f"INT6 precision tradeoff report: {report['json_path']}") | |
| print(f"int6_precision_tradeoff_winner: {decision['int6_precision_tradeoff_winner']}") | |
| print(f"mae_reduction_pct: {precision['mae_reduction_pct']:.4f}") | |
| print(f"int6_vs_int4_tfw_ratio: {runtime['int6_vs_int4_tfw_ratio']:.4f}") | |
| print(f"tradeoff_score: {decision['tradeoff_score']:.6f}") | |
| print(f"world_best_precision_or_tfw_claim_allowed: {report['claim_gate']['world_best_precision_or_tfw_claim_allowed']}") | |
| def run_int6_cuda_eval(args: argparse.Namespace) -> None: | |
| report = build_int6_cuda_eval(args.out_dir) | |
| print(f"INT6 CUDA eval report: {report['json_path']}") | |
| print(f"int6_cuda_kernel_passed: {report['int6_cuda_kernel']['passed']}") | |
| print(f"int6_max_abs_error: {report['int6_cuda_kernel']['max_abs_error']}") | |
| print(f"int6_actual_sparse_tops: {report['int6_cuda_kernel']['throughput']['actual_sparse_tops']}") | |
| print(f"int6_dense_equivalent_tops: {report['int6_cuda_kernel']['throughput']['dense_equivalent_tops']}") | |
| print(f"sparse_tensor_core_sass_observed: {report['tensor_core_sparse_ptx_boundary']['passed']}") | |
| print(f"int6_native_tensor_core_claim_allowed: {report['claim_gate']['int6_native_tensor_core_claim_allowed']}") | |
| def run_int6_cuda_rust_eval_cli(args: argparse.Namespace) -> None: | |
| report = run_int6_cuda_rust_eval(args.out_dir) | |
| print(f"INT6 CUDA Rust eval report: {report.get('json_path')}") | |
| print(f"int6_cuda_kernel_passed: {report.get('int6_cuda_kernel', {}).get('passed')}") | |
| print(f"int6_max_abs_error: {report.get('int6_cuda_kernel', {}).get('max_abs_error')}") | |
| print(f"sparse_tensor_core_sass_observed: {report.get('tensor_core_sparse_ptx_boundary', {}).get('passed')}") | |
| print(f"rust_harness_exit_code: {report.get('rust_harness_invocation', {}).get('exit_code')}") | |
| def run_tfw_optimize(args: argparse.Namespace) -> None: | |
| report = build_tfw_optimizer( | |
| out_dir=args.out_dir, | |
| run_int4=not args.skip_int4, | |
| blocks=args.blocks, | |
| threads=args.threads, | |
| iterations=args.iterations, | |
| passes=args.passes, | |
| int6_report=args.int6_report, | |
| int6_bridge_report=args.int6_bridge_report, | |
| ) | |
| selected = report.get("selected") or {} | |
| print(f"TF/W optimizer report: {report['json_path']}") | |
| print(f"selected: {selected.get('name')}") | |
| print(f"format: {selected.get('format')}") | |
| print(f"avg_effective_tops: {selected.get('avg_effective_tops')}") | |
| print(f"avg_power_w: {selected.get('avg_power_w')}") | |
| print(f"avg_effective_tops_per_watt: {selected.get('avg_effective_tops_per_watt')}") | |
| print(f"world_highest_tfw_claim_allowed: {report['claim_gate']['world_highest_tfw_claim_allowed']}") | |
| def run_int6_tensorcore_bridge(args: argparse.Namespace) -> None: | |
| report = build_int6_tensorcore_bridge(args.out_dir, tfw_report=args.tfw_report, int6_report=args.int6_report) | |
| bridge = report["bridge_estimate"] | |
| print(f"INT6 Tensor Core bridge report: {report['json_path']}") | |
| print(f"estimated_dense_equivalent_tops: {bridge['estimated_dense_equivalent_tops']:.6f}") | |
| print(f"estimated_tops_per_watt: {bridge['estimated_tops_per_watt']:.6f}") | |
| print(f"estimated_speedup_vs_int6_reference: {bridge['estimated_speedup_vs_int6_reference']:.2f}x") | |
| print(f"int6_bottleneck_removed: {report['claim_gate']['int6_bottleneck_removed']}") | |
| def run_int6_bridge_imma_eval(args: argparse.Namespace) -> None: | |
| report = build_int6_bridge_imma_eval( | |
| args.out_dir, | |
| blocks=args.blocks, | |
| threads=args.threads, | |
| iterations=args.iterations, | |
| passes=args.passes, | |
| min_duration_s=args.min_duration_s, | |
| mode=args.mode, | |
| ) | |
| metrics = report["metrics"]["compute_peak"] | |
| real = report["metrics"]["real_data"] | |
| print(f"INT6 bridge IMMA eval report: {report['json_path']}") | |
| print(f"avg_logical_int6_tops: {metrics['avg_logical_int6_tops']:.6f}") | |
| print(f"avg_hardware_imma_tops: {metrics['avg_hardware_imma_tops']:.6f}") | |
| print(f"avg_logical_int6_tops_per_watt: {metrics['avg_logical_int6_tops_per_watt']:.6f}") | |
| print(f"real_data_logical_int6_tops: {real['avg_logical_int6_tops']:.6f}") | |
| print(f"real_data_movement_measured: {report['claim_gate']['real_data_movement_measured']}") | |
| print(f"imma_sp_sass_observed: {report['claim_gate']['imma_sp_sass_observed']}") | |
| print(f"int6_bottleneck_removed: {report['claim_gate']['int6_bottleneck_removed']}") | |
| def run_sandbox_tool_core_eval(args: argparse.Namespace) -> None: | |
| report = build_sandbox_tool_core_eval(args.out_dir) | |
| print(f"Sandbox Tool Core eval report: {report['json_path']}") | |
| print(f"sandbox_tool_core_ready: {report['claim_gate']['sandbox_tool_core_ready']}") | |
| print(f"ledger_path: {report['ledger_path']}") | |
| print(f"host_unrestricted_execution_claim_allowed: {report['claim_gate']['host_unrestricted_execution_claim_allowed']}") | |
| def run_axiom_orchestrator(args: argparse.Namespace) -> None: | |
| report = build_axiom_orchestrator_report(args.out_dir, mission=args.mission) | |
| print(f"Axiom Orchestrator report: {report['json_path']}") | |
| print(f"axiom_orchestrator_ready: {report['claim_gate']['axiom_orchestrator_ready']}") | |
| print(f"sft_path: {report['sft_path']}") | |
| print(f"steps_passed: {report['metrics']['steps_passed']}/{report['metrics']['steps_total']}") | |
| print(f"world_best_orchestration_claim_allowed: {report['claim_gate']['world_best_orchestration_claim_allowed']}") | |
| def run_sandbox_model_bridge(args: argparse.Namespace) -> None: | |
| report = build_sandbox_model_bridge( | |
| args.out_dir, | |
| sandbox_report=args.sandbox_report, | |
| active_model=args.active_model, | |
| qlora_script=args.qlora_script, | |
| base_sft_dataset=args.base_sft_dataset, | |
| extra_jsonl=args.extra_jsonl, | |
| ) | |
| print(f"Sandbox model bridge manifest: {report['json_path']}") | |
| print(f"sandbox_tool_records: {report['sft_outputs']['sandbox_tool_records']}") | |
| print(f"mixed_sft_dataset: {report['sft_outputs']['mixed_sft_dataset']}") | |
| print(f"sandbox_model_bridge_ready: {report['claim_gate']['sandbox_model_bridge_ready']}") | |
| print(f"trained_adapter_exists: {report['claim_gate']['trained_adapter_exists']}") | |
| print("qlora_command: " + " ".join(report["continued_training"]["command"])) | |
| def run_dataset_quality_governor(args: argparse.Namespace) -> None: | |
| policy = DatasetQualityPolicy.for_profile( | |
| args.recipe_profile, | |
| max_records=args.max_records, | |
| max_estimated_tokens=args.max_estimated_tokens, | |
| ) | |
| report = DatasetQualityGovernor(policy).build(args.input, args.out_dir) | |
| print(f"dataset quality manifest: {report['manifest_path']}") | |
| print(f"optimized_jsonl: {report['optimized_jsonl']}") | |
| print(f"kept_records: {report['kept_records']}") | |
| print(f"rejected_records: {report['rejected_records']}") | |
| print(f"domain_counts: {json.dumps(report['domain_counts'], sort_keys=True)}") | |
| print(f"recipe_profile: {report['policy']['recipe_profile']}") | |
| print(f"balanced_recipe_ready: {report['claim_gate']['balanced_recipe_ready']}") | |
| print(f"train_allowed: {report['claim_gate']['train_allowed']}") | |
| print(f"quality_governed_dataset_ready: {report['claim_gate']['quality_governed_dataset_ready']}") | |
| def run_purity_concentrator(args: argparse.Namespace) -> None: | |
| from data.purity_concentrator import PurityConcentratorPolicy, build_purity_concentrator | |
| policy = PurityConcentratorPolicy( | |
| max_records=args.max_records, | |
| max_estimated_tokens=args.max_estimated_tokens, | |
| min_quality_score=args.min_quality_score, | |
| max_domain_share=args.max_domain_share, | |
| coverage_max_share=args.coverage_max_share, | |
| ) | |
| report = build_purity_concentrator(args.inputs, args.out_dir, policy=policy) | |
| print(f"purity concentrator manifest: {report['manifest_path']}") | |
| print(f"output_jsonl: {report['output_jsonl']}") | |
| print(f"kept_records: {report['kept_records']}") | |
| print(f"avg_purity_density_score: {report['metrics']['avg_purity_density_score']:.4f}") | |
| print(f"dominant_domain_share: {report['metrics']['dominant_domain_share']:.4f}") | |
| print(f"puremax_dataset_ready: {report['claim_gate']['puremax_dataset_ready']}") | |
| def run_code_source_registry_cli(args: argparse.Namespace) -> None: | |
| from data.code_source_registry import build_code_source_registry | |
| report = build_code_source_registry(args.out_dir) | |
| summary = report["summary"] | |
| gate = report["claim_gate"] | |
| print(f"code source registry: {report['json_path']}") | |
| print(f"markdown: {report['markdown_path']}") | |
| print(f"sources_total: {summary['sources_total']}") | |
| print(f"trainable_after_gates: {summary['trainable_after_gates']}") | |
| print(f"eval_only_sources: {summary['eval_only_sources']}") | |
| print(f"code_training_allowed_without_gates: {gate['code_training_allowed_without_gates']}") | |
| print(f"world_rare_code_complete_claim_allowed: {gate['world_rare_code_complete_claim_allowed']}") | |
| def run_tinymind_native_code_forge_cli(args: argparse.Namespace) -> None: | |
| from data.tinymind_native_code_forge import NativeCodeForgePolicy, build_tinymind_native_code_forge | |
| policy = NativeCodeForgePolicy( | |
| target_records=args.target_records, | |
| eval_fraction=args.eval_fraction, | |
| ) | |
| report = build_tinymind_native_code_forge(args.out_dir, policy=policy) | |
| summary = report["summary"] | |
| gate = report["claim_gate"] | |
| print(f"native code forge manifest: {report['manifest_path']}") | |
| print(f"train_jsonl: {report['outputs']['train_jsonl']}") | |
| print(f"eval_jsonl: {report['outputs']['eval_jsonl']}") | |
| print(f"train_records: {summary['train_records']}") | |
| print(f"eval_records: {summary['eval_records']}") | |
| print(f"languages: {','.join(summary['languages'])}") | |
| print(f"tinymind_created_code_data_ready: {gate['tinymind_created_code_data_ready']}") | |
| print(f"external_code_copied: {gate['external_code_copied']}") | |
| print(f"world_best_code_data_claim_allowed: {gate['world_best_code_data_claim_allowed']}") | |
| def run_coverage_100k_forge(args: argparse.Namespace) -> None: | |
| report = build_coverage_100k_dataset( | |
| args.out_dir, | |
| target_records=args.target_records, | |
| variants_per_axis=args.variants_per_axis, | |
| eval_fraction=args.eval_fraction, | |
| source_roots=args.source_root, | |
| source_grounded=not args.synthetic_only, | |
| ) | |
| print(f"coverage 100k manifest: {report['manifest_path']}") | |
| print(f"train_jsonl: {report['outputs']['train_jsonl']}") | |
| print(f"eval_jsonl: {report['outputs']['eval_jsonl']}") | |
| print(f"records_written: {report['summary']['records_written']}") | |
| print(f"source_grounded: {report['summary']['source_grounded']}") | |
| print(f"source_files_used: {report['summary']['source_files_used']}") | |
| print(f"coverage_100k_ready: {report['claim_gate']['coverage_100k_ready']}") | |
| print(f"world_best_claim_allowed: {report['claim_gate']['world_best_claim_allowed']}") | |
| def run_logic_agent_code_forge(args: argparse.Namespace) -> None: | |
| report = build_logic_agent_code_dataset( | |
| args.out_dir, | |
| target_records=args.target_records, | |
| eval_fraction=args.eval_fraction, | |
| ) | |
| print(f"logic/agent/code manifest: {report['manifest_path']}") | |
| print(f"train_jsonl: {report['outputs']['train_jsonl']}") | |
| print(f"eval_jsonl: {report['outputs']['eval_jsonl']}") | |
| print(f"records_written: {report['summary']['records_written']}") | |
| print(f"logic_agent_code_ready: {report['claim_gate']['logic_agent_code_ready']}") | |
| def run_alignment_tool_sft_forge(args: argparse.Namespace) -> None: | |
| report = build_alignment_tool_sft_dataset(args.out_dir, target_records=args.target_records, eval_fraction=args.eval_fraction) | |
| print(f"alignment/tool SFT manifest: {report['manifest_path']}") | |
| print(f"train_jsonl: {report['outputs']['train_jsonl']}") | |
| print(f"eval_jsonl: {report['outputs']['eval_jsonl']}") | |
| print(f"records_written: {report['summary']['records_written']}") | |
| print(f"alignment_tool_sft_ready: {report['claim_gate']['alignment_tool_sft_ready']}") | |
| def run_continuous_update_governor(args: argparse.Namespace) -> None: | |
| report = build_continuous_update_manifest( | |
| args.out_dir, | |
| source_roots=args.source_root, | |
| dataset_manifest=args.dataset_manifest, | |
| cadence_hours=args.cadence_hours, | |
| ) | |
| print(f"continuous update manifest: {report['manifest_path']}") | |
| print(f"candidate_files: {report['sources']['candidate_files']}") | |
| print(f"kept_records: {report['current_dataset']['kept_records']}") | |
| print(f"auto_absorb_without_filter_allowed: {report['claim_gate']['auto_absorb_without_filter_allowed']}") | |
| print(f"always_up_to_date_claim_allowed: {report['claim_gate']['always_up_to_date_claim_allowed']}") | |
| def run_hf_bucket_sync_manifest(args: argparse.Namespace) -> None: | |
| report = build_hf_bucket_sync_manifest( | |
| args.out_dir, | |
| bucket_uri=args.bucket_uri, | |
| local_data_dir=args.local_data_dir, | |
| local_download_dir=args.local_download_dir, | |
| ) | |
| print(f"HF bucket sync manifest: {report['manifest_path']}") | |
| print(f"bucket_uri: {report['bucket_uri']}") | |
| print(f"upload_dry_run: {report['scripts']['upload_dry_run']}") | |
| print(f"upload_apply: {report['scripts']['upload_apply']}") | |
| print(f"token_printed_or_stored: {report['auth']['token_printed_or_stored']}") | |
| print(f"upload_performed: {report['claim_gate']['upload_performed']}") | |
| def run_claude_reasoning_bucket(args: argparse.Namespace) -> None: | |
| report = build_claude_reasoning_dataset( | |
| args.out_dir, | |
| source_dir=args.source_dir, | |
| policy=ClaudeReasoningPolicy( | |
| include_creative_roleplay=args.include_creative_roleplay, | |
| keep_reasoning_blocks=args.keep_reasoning_blocks, | |
| max_records=args.max_records, | |
| max_records_per_source=args.max_records_per_source, | |
| ), | |
| ingest_hf=args.ingest_hf, | |
| source_repo=args.source_repo, | |
| ) | |
| print(f"Claude reasoning bucket manifest: {report['manifest_path']}") | |
| print(f"bucket_uri: {report['bucket_uri']}") | |
| print(f"local_rows_normalized: {report['claim_gate'].get('local_rows_normalized')}") | |
| print(f"training_ready: {report['claim_gate'].get('training_ready')}") | |
| print(f"main_training_allowed: {report['claim_gate'].get('main_training_allowed')}") | |
| if report.get("outputs", {}).get("train_jsonl"): | |
| print(f"train_jsonl: {report['outputs']['train_jsonl']}") | |
| print(f"quarantine_jsonl: {report['outputs']['quarantine_jsonl']}") | |
| print(f"records_written: {report['summary']['records_written']}") | |
| def run_knowledge_essence_distill_cli(args: argparse.Namespace) -> None: | |
| report = KnowledgeEssenceDistiller(max_records=args.max_records).distill(args.input, args.out_dir) | |
| print(f"knowledge essence manifest: {report['manifest_path']}") | |
| print(f"knowledge essence sft: {report['output_jsonl']}") | |
| print(f"kept_records: {report['kept_records']}") | |
| print(f"rejected_records: {report['rejected_records']}") | |
| print(f"trainable_sft_ready: {report['claim_gate']['trainable_sft_ready']}") | |
| print(f"raw_memory_replay_allowed: {report['claim_gate']['raw_memory_replay_allowed']}") | |
| def run_data_greed_extract_cli(args: argparse.Namespace) -> None: | |
| report = DataGreedExtractor(max_chars=args.max_chars, max_domain_share=args.max_domain_share).filter(args.input, args.out_dir) | |
| print(f"data greed manifest: {report['manifest_path']}") | |
| print(f"pure output: {report['pure_output_jsonl']}") | |
| print(f"greed quarantine: {report['greed_quarantine_jsonl']}") | |
| print(f"kept_records: {report['kept_records']}") | |
| print(f"greedy_records: {report['greedy_records']}") | |
| print(f"pure_training_input_ready: {report['claim_gate']['pure_training_input_ready']}") | |
| print(f"raw_memory_replay_allowed: {report['claim_gate']['raw_memory_replay_allowed']}") | |
| def run_omni_action_perception_cli(args: argparse.Namespace) -> None: | |
| router = OmniActionPerception() | |
| report = router.write_manifest(args.out_dir) | |
| print(f"omni action perception manifest: {report['manifest_path']}") | |
| print(f"family_count: {report['coverage']['family_count']}") | |
| print(f"extension_count: {report['coverage']['extension_count']}") | |
| print(f"extensible_omni_perception_ready: {report['claim_gate']['extensible_omni_perception_ready']}") | |
| print(f"supports_all_world_formats_claim_allowed: {report['claim_gate']['supports_all_world_formats_claim_allowed']}") | |
| for item in args.probe or []: | |
| plan = router.plan_input(item) | |
| print(json.dumps({"probe": item, "plan": plan}, ensure_ascii=False)) | |
| def run_pure_lattice_cnn_cli(args: argparse.Namespace) -> None: | |
| report = build_pure_lattice_cnn_report( | |
| args.out_dir, | |
| dim=args.dim, | |
| seq_len=args.seq_len, | |
| batch_size=args.batch_size, | |
| ) | |
| print(f"pure lattice cnn report: {report['report_path']}") | |
| print(f"parameter_count: {report['parameter_count']}") | |
| print(f"receptive_field: {report['config']['receptive_field']}") | |
| print(f"forward_finite: {report['forward_finite']}") | |
| print(f"backward_finite: {report['backward_finite']}") | |
| print(f"cnn_core_ready: {report['claim_gate']['cnn_core_ready']}") | |
| print(f"integrated_into_omega_model: {report['claim_gate']['integrated_into_omega_model']}") | |
| print(f"world_best_cnn_claim_allowed: {report['claim_gate']['world_best_cnn_claim_allowed']}") | |
| def run_mythos_purity_governor_cli(args: argparse.Namespace) -> None: | |
| report = build_mythos_purity_governor(args.out_dir) | |
| print(f"mythos purity governor: {report['json_path']}") | |
| print(f"purity_intensity_score: {report['scores']['purity_intensity_score']:.2f}") | |
| print(f"mythos_grade_readiness_score: {report['scores']['mythos_grade_readiness_score']:.2f}") | |
| print(f"mythos_grade_local_stack_ready: {report['claim_gate']['mythos_grade_local_stack_ready']}") | |
| print(f"external_frontier_evidence_ready: {report['claim_gate']['external_frontier_evidence_ready']}") | |
| print(f"can_claim_above_claude_mythos: {report['claim_gate']['can_claim_above_claude_mythos']}") | |
| def run_mythos_report_analyze_cli(args: argparse.Namespace) -> None: | |
| report = build_mythos_report_analysis(args.out_dir, source_path=args.source_path) | |
| print(f"mythos report analysis: {report['json_path']}") | |
| print(f"sources: {report['source_count']}") | |
| print(f"benchmark_claims: {len(report['benchmark_claims'])}") | |
| print(f"analysis_depth_score: {report['scores']['analysis_depth_score']:.2f}") | |
| print(f"claim_sharpness_score: {report['scores']['claim_sharpness_score']:.2f}") | |
| print(f"can_claim_mythos_scores_as_tinymind_scores: {report['claim_gate']['can_claim_mythos_scores_as_tinymind_scores']}") | |
| def run_mythos_capability_forge_cli(args: argparse.Namespace) -> None: | |
| report = build_mythos_capability_forge(args.out_dir, mythos_analysis_path=args.mythos_analysis) | |
| print(f"mythos capability forge: {report['json_path']}") | |
| print(f"task_count: {report['task_count']}") | |
| print(f"sft_jsonl: {report['sft_jsonl']}") | |
| print(f"eval_jsonl: {report['eval_jsonl']}") | |
| print(f"ready_to_train_capability_ladder: {report['claim_gate']['ready_to_train_capability_ladder']}") | |
| print(f"tinymind_can_claim_more_than_mythos: {report['claim_gate']['tinymind_can_claim_more_than_mythos']}") | |
| def run_deep_sharp_model_analysis_cli(args: argparse.Namespace) -> None: | |
| cfg = purefield_config(args.size) | |
| cfg.cnn_core_enabled = True | |
| report = build_deep_sharp_model_analysis(args.out_dir, cfg=cfg) | |
| print(f"deep sharp model analysis: {report['json_path']}") | |
| print(f"deep_sharp_local_score: {report['scores']['deep_sharp_local_score']:.2f}") | |
| print(f"deep_sharp_total_score: {report['scores']['deep_sharp_total_score']:.2f}") | |
| print(f"deep_sharp_local_ready: {report['claim_gate']['deep_sharp_local_ready']}") | |
| print(f"frontier_or_mythos_superiority_claim_allowed: {report['claim_gate']['frontier_or_mythos_superiority_claim_allowed']}") | |
| def run_command_intensity_governor_cli(args: argparse.Namespace) -> None: | |
| report = build_command_intensity_governor(args.out_dir) | |
| print(f"command intensity governor: {report['json_path']}") | |
| print(f"overall: {report['scores']['overall']:.2f}") | |
| print(f"sft_jsonl: {report['sft_jsonl']}") | |
| print(f"eval_jsonl: {report['eval_jsonl']}") | |
| print(f"command_intensity_ready: {report['claim_gate']['command_intensity_ready']}") | |
| print(f"perfect_instruction_following_claim_allowed: {report['claim_gate']['perfect_instruction_following_claim_allowed']}") | |
| def run_ultra_deep_sharp_refiner_cli(args: argparse.Namespace) -> None: | |
| report = build_ultra_deep_sharp_refiner(args.out_dir) | |
| print(f"ultra deep sharp refiner: {report['json_path']}") | |
| print(f"ultra_deep_sharpness_score: {report['scores']['ultra_deep_sharpness_score']:.2f}") | |
| print(f"sft_jsonl: {report['sft_jsonl']}") | |
| print(f"eval_jsonl: {report['eval_jsonl']}") | |
| print(f"audit_jsonl: {report['audit_jsonl']}") | |
| print(f"ultra_deep_local_ready: {report['claim_gate']['ultra_deep_local_ready']}") | |
| print(f"flawless_or_frontier_claim_allowed: {report['claim_gate']['flawless_or_frontier_claim_allowed']}") | |
| def run_evo_continue_plan(args: argparse.Namespace) -> None: | |
| report = write_evo_continue_plan( | |
| EvoContinuePlan( | |
| wait_pid=args.wait_pid, | |
| base_adapter=Path(args.base_adapter), | |
| dataset=Path(args.dataset), | |
| output_adapter=Path(args.output_adapter), | |
| max_steps=args.max_steps, | |
| max_seq_length=args.max_seq_length, | |
| data_manifest=Path(args.data_manifest), | |
| ), | |
| args.out_dir, | |
| ) | |
| print(f"evo continue plan: {report['plan_path']}") | |
| print(f"script_path: {report['script_path']}") | |
| print(f"planned_run_manifest: {report['planned_run_manifest']}") | |
| print(f"kept_records: {report['data_purity']['kept_records']}") | |
| print(f"rejected_records: {report['data_purity']['rejected_records']}") | |
| print(f"world_best_claim_allowed: {report['claim_gate']['external_rank1_claim_allowed']}") | |
| def run_compact_lora_adapter(args: argparse.Namespace) -> None: | |
| rank_plan = None | |
| target_rank = args.target_rank | |
| if args.auto_rank_energy is not None: | |
| rank_plan = choose_lora_rank_plan(args.adapter, min_energy_retained=args.auto_rank_energy) | |
| target_rank = int(rank_plan["recommended_rank"]) | |
| report = compact_lora_adapter( | |
| adapter_dir=args.adapter, | |
| out_dir=args.out, | |
| target_rank=target_rank, | |
| copy_tokenizer=not args.no_copy_tokenizer, | |
| ) | |
| if rank_plan is not None: | |
| plan_path = Path(args.out) / "rank_plan.json" | |
| plan_path.write_text(json.dumps(rank_plan, ensure_ascii=False, indent=2, sort_keys=True), encoding="utf-8") | |
| report["rank_plan_path"] = str(plan_path) | |
| manifest_path = Path(report["manifest_path"]) | |
| manifest_path.write_text(json.dumps(report, ensure_ascii=False, indent=2, sort_keys=True), encoding="utf-8") | |
| print(f"rank_plan: {plan_path}") | |
| print(f"auto_selected_rank: {target_rank}") | |
| print(f"adapter compaction manifest: {report['manifest_path']}") | |
| print(f"source_mb: {report['size']['source_mb']:.4f}") | |
| print(f"output_mb: {report['size']['output_mb']:.4f}") | |
| print(f"reduction_ratio: {report['size']['reduction_ratio']:.4f}") | |
| print(f"quality_preserved_claim_allowed: {report['claim_gate']['quality_preserved_claim_allowed']}") | |
| def run_evo_whole_body_report(args: argparse.Namespace) -> None: | |
| report = build_evo_whole_body_report( | |
| args.out_dir, | |
| data_manifest=args.data_manifest, | |
| compaction_manifest=args.compaction_manifest, | |
| active_training_pid=args.active_training_pid, | |
| ) | |
| print(f"evo whole-body report: {report['json_path']}") | |
| print(f"whole_body_evo_score: {report['scores']['whole_body_evo_score']:.6f}") | |
| print(f"size_reduction_ratio: {report['scores']['size_reduction_ratio']:.6f}") | |
| print(f"promote_compacted_adapter_allowed: {report['claim_gate']['promote_compacted_adapter_allowed']}") | |
| def run_evo_cross_species_report(args: argparse.Namespace) -> None: | |
| report = build_evo_cross_species_report( | |
| args.out_dir, | |
| adapter_manifest=args.adapter_manifest, | |
| data_manifest=args.data_manifest, | |
| compaction_manifest=args.compaction_manifest, | |
| compaction_probe_report=args.compaction_probe_report, | |
| gguf_manifest=args.gguf_manifest, | |
| web_knowledge_report=args.web_knowledge_report, | |
| output_training_jsonl=args.output_training_jsonl, | |
| ) | |
| print(f"evo cross-species report: {report['json_path']}") | |
| print(f"evo_cross_species_score: {report['scores']['evo_cross_species_score']:.3f}") | |
| print(f"pipeline_ready: {report['claim_gate']['evo_cross_species_pipeline_ready']}") | |
| print(f"can_continue_training: {report['claim_gate']['can_continue_training']}") | |
| print(f"species_jump_claim: {report['claim_gate']['can_claim_species_jump']}") | |
| print(f"training_jsonl: {report['training_jsonl']}") | |
| def run_gguf_evo_upgrade(args: argparse.Namespace) -> None: | |
| report = build_gguf_evo_upgrade( | |
| args.out_dir, | |
| gguf_path=args.gguf, | |
| base_modelfile=args.base_modelfile, | |
| adapter_manifest=args.adapter_manifest, | |
| data_manifest=args.data_manifest, | |
| training_manifest=args.training_manifest, | |
| model_name=args.model_name, | |
| num_ctx=args.num_ctx, | |
| num_predict=args.num_predict, | |
| temperature=args.temperature, | |
| top_p=args.top_p, | |
| top_k=args.top_k, | |
| repeat_penalty=args.repeat_penalty, | |
| ) | |
| print(f"GGUF Evo upgrade manifest: {report['manifest_path']}") | |
| print(f"evo_modelfile: {report['evo_modelfile']}") | |
| print(f"ggufx_spec: {report['ggufx_spec']}") | |
| print(f"eval_prompts: {report['eval_prompts']}") | |
| print(f"source_gguf_size_gb: {report['source_gguf_size_gb']:.4f}") | |
| print(f"can_claim_runtime_quality_upgrade: {report['promotion_gate']['can_claim_runtime_quality_upgrade']}") | |
| print(f"can_claim_weights_better_than_source: {report['promotion_gate']['can_claim_weights_better_than_source']}") | |
| print(f"can_claim_better_than_v3: {report['promotion_gate']['can_claim_better_than_v3']}") | |
| def run_deep_research_rl_cli(args: argparse.Namespace) -> None: | |
| report = build_deep_research_rl_report( | |
| args.out_dir, | |
| questions=args.question, | |
| evidence_path=args.evidence, | |
| top_k=args.top_k, | |
| ) | |
| print(f"deep research RL report: {report['json_path']}") | |
| print(f"sft_path: {report['sft_path']}") | |
| print(f"avg_reward: {report['avg_reward']:.6f}") | |
| print(f"beats_frontier_research_claim_allowed: {report['claim_gate']['beats_frontier_research_claim_allowed']}") | |
| def run_llm_stats_fetch_cli(args: argparse.Namespace) -> None: | |
| report = build_llm_stats_report( | |
| args.out_dir, | |
| category=args.category, | |
| model_ids=args.models, | |
| ) | |
| print(f"LLM-Stats report: {report['json_path']}") | |
| print(f"category: {report['category']}") | |
| print(f"api_key_redacted: {report['api_key_redacted']}") | |
| print(f"tiny_model_rank_claim_allowed: {report['claim_gate']['tiny_model_rank_claim_allowed']}") | |
| def run_llm_stats_gateway_probe_cli(args: argparse.Namespace) -> None: | |
| report = build_llm_stats_gateway_probe( | |
| args.out_dir, | |
| model=args.model, | |
| prompt=args.prompt, | |
| ) | |
| print(f"LLM-Stats gateway probe: {report['json_path']}") | |
| print(f"model: {report['model']}") | |
| print(f"api_key_redacted: {report['api_key_redacted']}") | |
| print(f"gateway_probe_completed: {report['claim_gate']['gateway_probe_completed']}") | |
| def run_current_model_results_cli(args: argparse.Namespace) -> None: | |
| report = build_current_model_results( | |
| args.out_dir, | |
| gguf_path=args.gguf_path, | |
| train_log=args.train_log, | |
| data_manifest=args.data_manifest, | |
| evo_report=args.evo_report, | |
| llm_stats_report=args.llm_stats_report, | |
| ) | |
| print(f"current model results: {report['json_path']}") | |
| print(f"markdown: {report['markdown_path']}") | |
| print(f"png: {report['png_path']}") | |
| print(f"gguf_size_gb: {report['model']['gguf_size_gb']:.4f}") | |
| print(f"world_best_claim_allowed: {report['claim_gate']['world_best_claim_allowed']}") | |
| def run_system_auto_tune_cli(args: argparse.Namespace) -> None: | |
| report = build_system_auto_tuner_report( | |
| args.out_dir, | |
| adapter_root=args.adapter_root, | |
| min_teacher_rows=args.min_teacher_rows, | |
| ) | |
| champion = report["champion"] or {} | |
| print(f"system auto tuner: {report['json_path']}") | |
| print(f"champion: {champion.get('adapter', '')}") | |
| print(f"champion_eval_loss: {champion.get('eval_loss', '')}") | |
| print(f"champion_perplexity: {champion.get('perplexity', '')}") | |
| print(f"quarantined: {len(report['quarantined'])}") | |
| print(f"world_best_claim_allowed: {report['claim_gate']['world_best_claim_allowed']}") | |
| def run_promote_adapter_if_better_cli(args: argparse.Namespace) -> None: | |
| report = promote_candidate_if_better( | |
| args.out_dir, | |
| candidate_manifest=args.candidate_manifest, | |
| champion_path=args.champion_path, | |
| baseline_manifest=args.baseline_manifest, | |
| min_eval_records=args.min_eval_records, | |
| min_delta=args.min_delta, | |
| ) | |
| print(f"promotion gate: {report['json_path']}") | |
| print(f"promoted: {report['promoted']}") | |
| print(f"reject_reason: {report['reject_reason']}") | |
| print(f"world_best_claim_allowed: {report['claim_gate']['world_best_claim_allowed']}") | |
| def run_gateway_teacher_distill_cli(args: argparse.Namespace) -> None: | |
| report = build_gateway_teacher_distill( | |
| args.out_dir, | |
| prompts_path=args.prompts, | |
| model=args.model, | |
| min_reward=args.min_reward, | |
| ) | |
| print(f"gateway teacher distill report: {report['json_path']}") | |
| print(f"sft_path: {report['sft_path']}") | |
| print(f"records_written: {report['records_written']}") | |
| print(f"avg_reward: {report['avg_reward']:.6f}") | |
| print(f"all_knowledge_extracted_claim_allowed: {report['claim_gate']['all_knowledge_extracted_claim_allowed']}") | |
| def run_fi_gateway_manifest(args: argparse.Namespace) -> None: | |
| from integrations.fi_gateway import FIGatewayConfig | |
| report = write_fi_gateway_manifest(args.out_dir, FIGatewayConfig(host=args.host, port=args.port)) | |
| print(f"FI gateway manifest: {report['json_path']}") | |
| print(f"vendored_source: {report['vendored_source']}") | |
| print(f"go_file_count: {report['source_inventory']['go_file_count']}") | |
| print(f"enabled_by_default: {report['claim_gate']['enabled_by_default']}") | |
| print(f"official_rank_claim_allowed: {report['claim_gate']['official_rank_claim_allowed']}") | |
| def run_reverse_engineering_corpus(args: argparse.Namespace) -> None: | |
| report = ReverseEngineeringCorpusBuilder( | |
| args.source_root, | |
| source_name=args.source_name, | |
| upstream=args.upstream, | |
| source_label=args.source_label, | |
| ).build(args.out_dir) | |
| print(f"Reverse engineering corpus manifest: {report['manifest_path']}") | |
| print(f"records_written: {report['records_written']}") | |
| print(f"binary_files_indexed: {report['binary_files_indexed']}") | |
| print(f"safe_learning_corpus_ready: {report['claim_gate']['safe_learning_corpus_ready']}") | |
| print(f"malware_execution_or_bypass_training_allowed: {report['claim_gate']['malware_execution_or_bypass_training_allowed']}") | |
| def run_cve_intelligence_corpus(args: argparse.Namespace) -> None: | |
| policy = CVECorpusPolicy( | |
| max_records_per_source=args.max_records_per_source, | |
| skip_records_per_source=args.skip_records_per_source, | |
| min_year=args.min_year, | |
| include_poc_urls=args.include_poc_urls, | |
| ) | |
| report = CVEIntelligenceCorpusBuilder(args.cvelist_root, args.trickest_root, policy=policy).build(args.out_dir) | |
| print(f"CVE intelligence corpus manifest: {report['manifest_path']}") | |
| print(f"records_written: {report['records_written']}") | |
| print(f"source_counts: {json.dumps(report['source_counts'], sort_keys=True)}") | |
| print(f"defensive_cve_corpus_ready: {report['claim_gate']['defensive_cve_corpus_ready']}") | |
| print(f"exploit_payload_training_allowed: {report['claim_gate']['exploit_payload_training_allowed']}") | |
| def run_thai_grounding_corpus(args: argparse.Namespace) -> None: | |
| policy = ThaiGroundingPolicy(max_ner_sentences=args.max_ner_sentences, skip_ner_sentences=args.skip_ner_sentences) | |
| report = ThaiGroundingCorpusBuilder(args.third_party_root, policy=policy).build(args.out_dir) | |
| print(f"Thai grounding corpus manifest: {report['manifest_path']}") | |
| print(f"records_written: {report['records_written']}") | |
| print(f"source_counts: {json.dumps(report['source_counts'], sort_keys=True, ensure_ascii=False)}") | |
| print(f"thai_grounding_corpus_ready: {report['claim_gate']['thai_grounding_corpus_ready']}") | |
| print(f"private_identity_data_included: {report['claim_gate']['private_identity_data_included']}") | |
| def run_runtime_select(args: argparse.Namespace) -> None: | |
| report = build_runtime_selector_report(args.out_dir, int6_bridge_report=args.int6_bridge_report) | |
| print(f"runtime selector report: {report['json_path']}") | |
| print(f"selected_runtime: {report['selected_runtime']}") | |
| print(f"avg_hardware_imma_tops: {report['selected_evidence']['avg_hardware_imma_tops']}") | |
| print(f"uses_measured_801_imma_tops_path: {report['claim_gate']['uses_measured_801_imma_tops_path']}") | |
| def run_benchmark(args: argparse.Namespace) -> None: | |
| model, _ = _load_model(args.checkpoint) | |
| input_ids = torch.randint(4, model.cfg.vocab_size, (1, 16)) | |
| t0 = time.time() | |
| with torch.no_grad(): | |
| _ = model.generate(input_ids, max_new_tokens=args.tokens) | |
| dt = max(time.time() - t0, 1e-6) | |
| print(f"generated_tokens={args.tokens} elapsed_s={dt:.3f} tok_per_s={args.tokens / dt:.2f}") | |
| def run_claim_dossier(args: argparse.Namespace) -> None: | |
| dossier = write_claim_dossier(args.evidence, args.out) | |
| status = "allowed" if dossier["verdict"]["world_best_claim_allowed"] else "blocked" | |
| print(f"claim dossier saved: {args.out} (world_best={status})") | |
| def run_local_train_eval(args: argparse.Namespace) -> None: | |
| evidence = run_local_train_eval_bundle( | |
| args.out_dir, | |
| train_steps=args.train_steps, | |
| context_lengths=args.contexts, | |
| seed=args.seed, | |
| ) | |
| print(f"local train/eval evidence saved: {evidence['evidence_path']}") | |
| print(f"checkpoint: {evidence['artifacts']['checkpoint']}") | |
| print(f"int4_artifact: {evidence['artifacts']['int4_artifact']}") | |
| def run_expert_curriculum_forge(args: argparse.Namespace) -> None: | |
| manifest = ExpertCurriculumForge( | |
| records_per_domain=args.records_per_domain, | |
| eval_ratio=args.eval_ratio, | |
| ).write_jsonl(args.out_dir) | |
| print(f"expert curriculum manifest: {manifest['manifest_path']}") | |
| print(f"records_written: {manifest['records_written']}") | |
| print(f"blocked_records: {manifest['blocked_records']}") | |
| def run_hyper_pure_refine(args: argparse.Namespace) -> None: | |
| manifest = HyperPureKnowledgeRefinery( | |
| records_per_skill=args.records_per_skill, | |
| eval_ratio=args.eval_ratio, | |
| ).write_dataset(args.out_dir) | |
| print(f"hyper pure manifest: {manifest['manifest_path']}") | |
| print(f"train_path: {manifest['train_path']}") | |
| print(f"eval_path: {manifest['eval_path']}") | |
| print(f"records_written: {manifest['records_written']}") | |
| print(f"gate_passed: {manifest['gate']['passed']}") | |
| print(f"purity: {manifest['scores']['purity']:.4f}") | |
| print("world_best_claim_allowed: false") | |
| def run_hyper_pure_lineage(args: argparse.Namespace) -> None: | |
| graph = build_hyper_pure_lineage(args.dataset, args.out_dir) | |
| print(f"lineage graph: {graph['graph_path']}") | |
| print(f"fragment_index: {graph['fragment_index_path']}") | |
| print(f"fragments: {graph['fragment_count']}") | |
| print(f"gate_passed: {graph['gate']['passed']}") | |
| if args.query: | |
| hits = HyperPureLineageWeaver(args.dataset).trace(args.query, graph["graph_path"], top_k=args.top_k) | |
| print(f"trace_hits: {len(hits)}") | |
| for hit in hits: | |
| print(f"- score={hit['score']:.3f} domain={hit['domain']} skill={hit['skill']} source={hit['source_sha256'][:12]}") | |
| def run_ultra_pure_audit(args: argparse.Namespace) -> None: | |
| manifest = harden_ultra_pure_dataset(args.input, args.out_dir) | |
| print(f"ultra pure manifest: {manifest['manifest_path']}") | |
| print(f"hardened_path: {manifest['hardened_path']}") | |
| print(f"kept_rows: {manifest['kept_rows']}") | |
| print(f"blocked_rows: {manifest['blocked_rows']}") | |
| print(f"gate_passed: {manifest['gate']['passed']}") | |
| print("world_best_claim_allowed: false") | |
| def run_internet_update(args: argparse.Namespace) -> None: | |
| manifest = InternetEvidenceIngestor().ingest_urls(args.urls, args.out_dir, domain=args.domain) | |
| print(f"internet evidence manifest: {manifest['manifest_path']}") | |
| print(f"records_written: {manifest['records_written']}") | |
| print(f"blocked_records: {manifest['blocked_records']}") | |
| def run_self_dialogue_train_eval(args: argparse.Namespace) -> None: | |
| evidence = run_self_dialogue_train_eval_bundle( | |
| args.out_dir, | |
| train_steps=args.train_steps, | |
| preference_steps=args.preference_steps, | |
| train_size=args.train_size, | |
| eval_size=args.eval_size, | |
| preference_eval_limit=args.preference_eval_limit, | |
| seed=args.seed, | |
| ) | |
| print(f"self-dialogue evidence saved: {evidence['evidence_path']}") | |
| print(f"checkpoint: {evidence['artifacts']['checkpoint']}") | |
| print(f"eval_loss: {evidence['train_eval']['eval_loss']:.4f}") | |
| print(f"perplexity: {evidence['train_eval']['perplexity']:.2f}") | |
| print(f"oracle_preference: {evidence['candidate_preference']['oracle_preference_accuracy']:.3f}") | |
| def run_external_eval(args: argparse.Namespace) -> None: | |
| from evaluation.external_model_eval import run_external_model_eval | |
| report = run_external_model_eval( | |
| eval_path=args.eval_path, | |
| out_dir=args.out_dir, | |
| model_ids=args.models, | |
| tinymind_checkpoint=args.tinymind_checkpoint, | |
| limit=args.limit, | |
| ) | |
| print(f"external HF eval saved: {args.out_dir}") | |
| for row in report["models"]: | |
| print( | |
| f"{row['model_id']}: " | |
| f"oracle_preference={row['oracle_preference_accuracy']:.3f}, " | |
| f"loss={row['native_avg_oracle_loss']:.4f}, " | |
| f"ppl={row['native_avg_oracle_perplexity']:.2f}" | |
| ) | |
| def run_external_stress_suite_cli(args: argparse.Namespace) -> None: | |
| from evaluation.external_stress_suite import build_external_stress_suite | |
| seq_lengths = [int(chunk.strip()) for chunk in str(args.stress_seq_lengths).split(",") if chunk.strip()] | |
| report = build_external_stress_suite( | |
| args.out_dir, | |
| provider_models=args.provider_models, | |
| run_external=args.run_external, | |
| provider=args.provider, | |
| provider_kind=args.provider_kind, | |
| timeout=args.timeout, | |
| stress_seq_lengths=seq_lengths, | |
| regenesis_loops=args.regenesis_loops, | |
| soak_seconds=args.soak_seconds, | |
| soak_sample_interval=args.soak_sample_interval, | |
| ) | |
| print(f"external stress suite report: {report['json_path']}") | |
| print(f"external_status: {report['external_eval']['status']}") | |
| print(f"local_stress_passed: {report['claim_gate']['local_stress_passed']}") | |
| print(f"official_external_claim_allowed: {report['claim_gate']['official_external_claim_allowed']}") | |
| def run_stress_provider_evidence_cli(args: argparse.Namespace) -> None: | |
| from evaluation.stress_provider_evidence import build_stress_provider_evidence | |
| report = build_stress_provider_evidence( | |
| args.out_dir, | |
| provider_report_path=args.provider_report, | |
| soak_report_path=args.soak_report, | |
| provider_command=args.provider_command, | |
| soak_command=args.soak_command, | |
| ) | |
| print(f"stress/provider evidence: {report['json_path']}") | |
| print(f"markdown: {report['markdown_path']}") | |
| print(f"provider_access_evidence_ready: {report['evidence_gate']['provider_access_evidence_ready']}") | |
| print(f"stress_soak_evidence_ready: {report['evidence_gate']['stress_soak_evidence_ready']}") | |
| print(f"world_best_claim_allowed: {report['evidence_gate']['world_best_claim_allowed']}") | |
| def run_lmmarketcap_compare_cli(args: argparse.Namespace) -> None: | |
| report = run_lmmarketcap_compare( | |
| out_dir=args.out_dir, | |
| models=args.models, | |
| category=args.category, | |
| execute=not args.dry_run, | |
| timeout=args.timeout, | |
| ) | |
| print(f"lmmarketcap compare report: {report['json_path']}") | |
| print(f"status: {report['status']}") | |
| print(f"status_code: {report['status_code']}") | |
| print(f"models: {', '.join(report['request']['models'])}") | |
| print(f"category: {report['request']['category']}") | |
| print(f"api_key_present: {report['api_key_present']}") | |
| print("api_key_saved: false") | |
| print("rank_claim_allowed: false") | |
| def run_global_leaderboard_fetch_cli(args: argparse.Namespace) -> None: | |
| report = build_global_leaderboard_cache( | |
| out_dir=args.out_dir, | |
| arena_names=args.arena_names, | |
| hf_limit=args.hf_limit, | |
| offline=args.offline, | |
| ) | |
| print(f"global leaderboard report: {report['json_path']}") | |
| print(f"cache: {report['cache_path']}") | |
| print(f"cache_gate: {report['cache_gate']['passed']}") | |
| for name, payload in report["arena"].items(): | |
| print(f"arena_{name}: {payload['status']} rows={len(payload.get('rows', []))}") | |
| print(f"hf_open_llm: {report['huggingface']['status']} rows={len(report['huggingface'].get('rows', []))}") | |
| print("world_rank_claim_allowed: false") | |
| def run_hub_package(args: argparse.Namespace) -> None: | |
| package = build_hf_package( | |
| out_dir=args.out_dir, | |
| checkpoint_path=args.checkpoint, | |
| evidence_paths=args.evidence, | |
| model_id=args.model_id, | |
| ) | |
| print(f"HF package saved: {package['out_dir']}") | |
| print(f"official_open_llm_leaderboard_ready={package['official_open_llm_leaderboard_ready']}") | |
| def run_official_eval_pack(args: argparse.Namespace) -> None: | |
| report = build_official_eval_pack( | |
| out_dir=args.out_dir, | |
| model_id=args.model_id, | |
| hub_dir=args.hub_dir, | |
| public_api_url=args.public_api_url, | |
| evidence_paths=args.evidence, | |
| ) | |
| print(f"official eval readiness saved: {report['report_path']}") | |
| for name, target in report["targets"].items(): | |
| print(f"{name}: status={target['status']}, can_submit_immediately={target['can_submit_immediately']}") | |
| def run_official_hard_eval_cli(args: argparse.Namespace) -> None: | |
| report = run_official_hard_eval( | |
| checkpoint_path=args.checkpoint, | |
| out_dir=args.out_dir, | |
| mmlu_limit=args.mmlu_limit, | |
| safetensors_path=args.safetensors, | |
| int4_artifact_path=args.int4_artifact, | |
| ) | |
| size = report["size"] | |
| mmlu = report["results"]["mmlu_pro"] | |
| print(f"official hard eval saved: {report['json_path']}") | |
| print(f"params: {size['total_params']} ({size['million_params']:.6f}M)") | |
| print(f"checkpoint_mb: {size['checkpoint_mb']}") | |
| print(f"safetensors_mb: {size['safetensors_mb']}") | |
| print(f"int4_artifact_mb: {size['int4_artifact_mb']}") | |
| print(f"mmlu_pro_accuracy: {mmlu['accuracy']:.4f} ({mmlu['correct']}/{mmlu['samples']})") | |
| print("official_rank_claimed: false") | |
| def run_knowledge_dashboard_cli(args: argparse.Namespace) -> None: | |
| report = run_knowledge_dashboard( | |
| checkpoint_path=args.checkpoint, | |
| out_dir=args.out_dir, | |
| mmlu_limit=args.mmlu_limit, | |
| safetensors_path=args.safetensors, | |
| int4_artifact_path=args.int4_artifact, | |
| ) | |
| s = report["summary_scores"] | |
| print(f"knowledge dashboard saved: {report['json_path']}") | |
| print(f"png: {report['png_path']}") | |
| print(f"knowledge_mmlu_pro: {s['knowledge']:.2f}") | |
| print(f"instruction_ifeval_style: {s['instruction']:.2f}") | |
| print(f"translation_flores_style: {s['translation']:.2f}") | |
| print("official_rank_claimed: false") | |
| def run_hard_benchmark_suite_cli(args: argparse.Namespace) -> None: | |
| report = run_hard_benchmark_suite( | |
| checkpoint_path=args.checkpoint, | |
| out_dir=args.out_dir, | |
| mmlu_limit=args.mmlu_limit, | |
| memory_report=args.memory_report, | |
| safetensors_path=args.safetensors, | |
| int4_artifact_path=args.int4_artifact, | |
| skip_mmlu=args.skip_mmlu, | |
| skip_logic=args.skip_logic, | |
| ) | |
| print(f"hard benchmark suite report: {report['json_path']}") | |
| print(f"average_score: {report['summary']['average_score']:.2f}") | |
| print(f"measured_axes: {report['summary']['measured_axes']}/{report['summary']['axis_count']}") | |
| print(f"hard_blockers: {', '.join(report['summary']['hard_blockers'])}") | |
| print("world_best_claim_allowed: false") | |
| def run_arc_agi3_eval_cli(args: argparse.Namespace) -> None: | |
| report = run_arc_agi3_eval( | |
| out_dir=args.out_dir, | |
| games=args.games, | |
| max_steps=args.max_steps, | |
| seed=args.seed, | |
| use_all_available=args.all_available, | |
| ) | |
| print(f"arc agi3 eval report: {report['json_path']}") | |
| print(f"score: {report['score']}") | |
| print(f"levels_completed: {report['total_levels_completed']}/{report['total_levels']}") | |
| print(f"total_actions: {report['total_actions']}") | |
| print(f"games: {', '.join(report['selected_games'])}") | |
| print("api_key_saved: false") | |
| print("official_external_rank_claim_allowed: false") | |
| def run_knowledge_full_cycle_cli(args: argparse.Namespace) -> None: | |
| report = run_knowledge_full_cycle( | |
| out_dir=args.out_dir, | |
| records_per_domain=args.records_per_domain, | |
| train_steps=args.train_steps, | |
| mmlu_limit=args.mmlu_limit, | |
| seed=args.seed, | |
| skip_dashboard=args.skip_dashboard, | |
| ) | |
| print(f"knowledge full-cycle report: {report['json_path']}") | |
| print(f"pure_gate: {report['pure_gate']['passed']} purity={report['pure_gate']['purity_score']:.2%}") | |
| print(f"coverage_gate: {report['coverage_gate']['passed']} coverage={report['coverage_gate']['coverage_percent']:.1f}%") | |
| print(f"full_cycle_gate: {report['full_cycle_gate']['passed']}") | |
| print(f"eval_loss: {report['train_eval'].get('eval_loss')}") | |
| print(f"perplexity: {report['train_eval'].get('perplexity')}") | |
| print("world_best_claim_allowed: false") | |
| def run_omni_pure_data_train_cli(args: argparse.Namespace) -> None: | |
| report = run_omni_pure_data_train( | |
| out_dir=args.out_dir, | |
| records_per_domain=args.records_per_domain, | |
| train_steps=args.train_steps, | |
| seed=args.seed, | |
| ) | |
| print(f"omni pure training report: {report['json_path']}") | |
| print(f"omni_pure_gate: {report['omni_pure_gate']['passed']}") | |
| print(f"pure_gate: {report['pure_gate']['passed']} purity={report['pure_gate']['purity_score']:.2%}") | |
| print(f"coverage_gate: {report['coverage_gate']['passed']} coverage={report['coverage_gate']['coverage_percent']:.1f}%") | |
| print(f"natural_gate: {report['natural_gate']['passed']} score={report['natural_gate']['score']:.2%}") | |
| print(f"records: {report['dataset_manifest']['records_written']}") | |
| print(f"eval_loss: {report['train_eval'].get('eval_loss')}") | |
| print(f"perplexity: {report['train_eval'].get('perplexity')}") | |
| print("world_best_claim_allowed: false") | |
| def run_hf_pure_auto_refine_train_cli(args: argparse.Namespace) -> None: | |
| report = run_hf_pure_auto_refine_train( | |
| out_dir=args.out_dir, | |
| sources=args.sources, | |
| preset=args.preset, | |
| rows_per_source=args.rows_per_source, | |
| train_steps=args.train_steps, | |
| seed=args.seed, | |
| offline=args.offline, | |
| ) | |
| print(f"HF pure auto training report: {report['json_path']}") | |
| print(f"records: {report['dataset_manifest']['records_written']}") | |
| print(f"blocked_records: {report['dataset_manifest']['blocked_records']}") | |
| print(f"hf_pure_gate: {report['hf_pure_gate']['passed']}") | |
| print(f"eval_loss: {report['train_eval'].get('eval_loss')}") | |
| print(f"perplexity: {report['train_eval'].get('perplexity')}") | |
| print(f"api_key_saved: {report['security']['api_key_saved']}") | |
| print(f"world_best_claim_allowed: {report['claim_gate']['world_best_claim_allowed']}") | |
| def run_kaggle_scicode_ingest_cli(args: argparse.Namespace) -> None: | |
| manifest = SciCodeKaggleIngestor( | |
| SciCodeIngestPolicy( | |
| dataset_slug=args.dataset_slug, | |
| file_path=args.file_path, | |
| max_records=args.max_records, | |
| include_problem_level=not args.no_problem_level, | |
| include_sub_steps=not args.no_sub_steps, | |
| quarantine_test_split=not args.no_quarantine_test, | |
| loss_weight=args.loss_weight, | |
| ) | |
| ).write_jsonl(args.out_dir) | |
| print(f"SciCode ingest manifest: {manifest['manifest_path']}") | |
| print(f"train_jsonl: {manifest['train_jsonl']}") | |
| print(f"quarantine_jsonl: {manifest['quarantine_jsonl']}") | |
| print(f"train_records: {manifest['train_records']}") | |
| print(f"blocked_records: {manifest['blocked_records']}") | |
| print(f"quarantine_records: {manifest['quarantine_records']}") | |
| print(f"main_training_allowed: {manifest['claim_gate']['main_training_allowed']}") | |
| print(f"external_benchmark_claim_allowed: {manifest['claim_gate']['external_benchmark_claim_allowed']}") | |
| def run_kaggle_benchmark_mix_ingest_cli(args: argparse.Namespace) -> None: | |
| policy = KaggleBenchmarkMixPolicy( | |
| max_parsebench=args.max_parsebench, | |
| max_simpleqa=args.max_simpleqa, | |
| max_multiloko=args.max_multiloko, | |
| max_mgsm=args.max_mgsm, | |
| max_livecodebench=args.max_livecodebench, | |
| multiloko_languages=tuple(args.multiloko_languages) if args.multiloko_languages else KaggleBenchmarkMixPolicy().multiloko_languages, | |
| ) | |
| manifest = KaggleBenchmarkMixIngestor(policy).write_jsonl(args.out_dir) | |
| print(f"Kaggle benchmark mix manifest: {manifest['manifest_path']}") | |
| print(f"train_jsonl: {manifest['train_jsonl']}") | |
| print(f"records_written: {manifest['records_written']}") | |
| print(f"source_counts: {json.dumps(manifest['source_counts'], sort_keys=True)}") | |
| print(f"main_training_allowed: {manifest['claim_gate']['main_training_allowed']}") | |
| print(f"official_benchmark_claim_allowed: {manifest['claim_gate']['official_benchmark_claim_allowed']}") | |
| def run_compact_teacher_train_cli(args: argparse.Namespace) -> None: | |
| report = run_compact_teacher_train( | |
| out_dir=args.out_dir, | |
| hf_train_path=args.hf_train, | |
| hf_eval_path=args.hf_eval, | |
| teacher_jsonl_path=args.teacher_jsonl, | |
| train_steps=args.train_steps, | |
| seed=args.seed, | |
| ) | |
| print(f"compact teacher training report: {report['json_path']}") | |
| print(f"compact_teacher_gate: {report['compact_teacher_gate']['passed']}") | |
| print(f"records: {report['records']['total_records']}") | |
| print(f"eval_loss: {report['train_eval'].get('eval_loss')}") | |
| print(f"perplexity: {report['train_eval'].get('perplexity')}") | |
| print(f"world_best_claim_allowed: {report['compact_teacher_gate']['world_best_claim_allowed']}") | |
| def run_ten_million_step_readiness_cli(args: argparse.Namespace) -> None: | |
| report = build_ten_million_step_readiness( | |
| out_dir=args.out_dir, | |
| baseline_report=args.baseline_report, | |
| target_steps=args.target_steps, | |
| calibration_steps=args.calibration_steps, | |
| calibration_seconds=args.calibration_seconds, | |
| checkpoint_every=args.checkpoint_every, | |
| eval_every=args.eval_every, | |
| ) | |
| print(f"10M-step readiness report: {report['json_path']}") | |
| print(f"target_steps: {report['target_steps']}") | |
| print(f"estimated_days: {report['estimate']['estimated_total_days']:.2f}") | |
| print(f"target_steps_completed: {report['claim_gate']['target_steps_completed']}") | |
| print(f"world_best_claim_allowed: {report['claim_gate']['world_best_claim_allowed']}") | |
| def run_context_ingest(args: argparse.Namespace) -> None: | |
| ledger = UniversalContextLedger(args.out_dir, chunk_chars=args.chunk_chars) | |
| manifest = ledger.ingest_paths(args.paths) | |
| print(f"context manifest: {manifest['manifest_path']}") | |
| print(f"files: {manifest['file_count']}") | |
| print(f"chunks: {manifest['chunk_count']}") | |
| print(f"text_or_code_files: {manifest['text_or_code_files']}") | |
| print(f"media_files: {manifest['media_files']}") | |
| print(f"blocked_junk_chunks: {manifest['blocked_junk_chunks']}") | |
| print(f"compressed_bytes: {manifest['compression']['compressed_bytes']}") | |
| print(f"compression_ratio: {manifest['compression']['ratio']:.4f}") | |
| print("hidden_state_tokens_stored: 0") | |
| if args.query: | |
| hits = ledger.query(args.query, top_k=5) | |
| print(f"query_hits: {len(hits)}") | |
| for hit in hits: | |
| print(f"- score={hit['score']:.3f} path={hit['path']} sha={hit['chunk_sha256'][:12]}") | |
| def run_context10m_answer(args: argparse.Namespace) -> None: | |
| result = write_extreme_context_answer(args.archive_root, args.question, args.out) | |
| print(f"10M context answer: {result['out_path']}") | |
| print(f"status: {result['status']}") | |
| print(f"hallucination_gate: {result['hallucination_gate']['passed']}") | |
| print(result["answer"]) | |
| def run_compressed_context_2m(args: argparse.Namespace) -> None: | |
| report = run_compressed_context_2m_benchmark( | |
| args.out_dir, | |
| token_count=args.token_count, | |
| chunk_tokens=args.chunk_tokens, | |
| anchor_stride_chunks=args.anchor_stride_chunks, | |
| ) | |
| measurements = report["measurements"] | |
| gate = report["claim_gate"] | |
| print(f"2M compressed context report: {report['json_path']}") | |
| print(f"measured_tokens: {measurements['measured_tokens']}") | |
| print(f"archive_bytes_per_token: {measurements['archive_bytes_per_token']:.4f}") | |
| print(f"index_bytes_per_token: {measurements['index_bytes_per_token']:.8f}") | |
| print(f"kv_tokens_stored: {measurements['kv_tokens_stored']}") | |
| print(f"passkey_recall_passed: {measurements['passkey_recall_passed']}") | |
| print(f"semantic_recall_passed: {measurements['semantic_recall_passed']}") | |
| print(f"compressed_2m_context_ready: {gate['compressed_2m_context_ready']}") | |
| print(f"full_kv_2m_claim_allowed: {gate['full_kv_2m_claim_allowed']}") | |
| def run_grounded_answer(args: argparse.Namespace) -> None: | |
| result = write_grounded_answer( | |
| args.question, | |
| args.ledger_dir, | |
| args.out, | |
| top_k=args.top_k, | |
| external_research=args.external_research, | |
| research_dir=args.research_dir, | |
| ) | |
| print(f"grounded answer: {result['out_path']}") | |
| print(f"status: {result['status']}") | |
| print(f"hallucination_gate: {result['hallucination_gate']['passed']}") | |
| print(f"evidence_count: {len(result['evidence'])}") | |
| print(result["answer"]) | |
| def run_general_web_knowledge(args: argparse.Namespace) -> None: | |
| result = write_general_web_knowledge( | |
| args.question, | |
| args.out_dir, | |
| max_results=args.max_results, | |
| top_k=args.top_k, | |
| language=args.language, | |
| ) | |
| print(f"general web knowledge report: {result['report_path']}") | |
| print(f"sft record: {result['sft_path']}") | |
| print(f"status: {result['status']}") | |
| print(f"evidence_count: {len(result['evidence'])}") | |
| print(f"answer_grounded: {result['claim_gate']['answer_grounded']}") | |
| print(result["answer"]) | |
| def run_pure_oracle(args: argparse.Namespace) -> None: | |
| result = write_pure_oracle_answer( | |
| ledger_dir=args.ledger_dir, | |
| question=args.question, | |
| out_path=args.out, | |
| top_k=args.top_k, | |
| ) | |
| print(f"pure oracle answer: {result['out_path']}") | |
| print(f"route: {result['route']}") | |
| print(f"status: {result['status']}") | |
| print(f"grounding_gate: {result['grounding_gate']['passed']}") | |
| print(f"evidence_count: {len(result['evidence'])}") | |
| print(result["answer"]) | |
| def run_elastic_answer(args: argparse.Namespace) -> None: | |
| result = write_elastic_answer( | |
| ledger_dir=args.ledger_dir, | |
| question=args.question, | |
| out_path=args.out, | |
| mode=args.mode, | |
| top_k=args.top_k, | |
| ) | |
| print(f"elastic answer: {result['out_path']}") | |
| print(f"mode: {result['mode']}") | |
| print(f"route: {result['route']}") | |
| print(f"status: {result['status']}") | |
| print(f"parts: {len(result['parts'])}") | |
| print(f"continuation_allowed: {result['length_policy']['continuation_allowed']}") | |
| print(result["answer"]) | |
| def run_ai_devtools_cli(args: argparse.Namespace) -> None: | |
| report = run_ai_devtools(args.root, args.out_dir, run_smoke=args.run_smoke) | |
| print(f"ai devtools report: {report['json_path']}") | |
| print(f"files_scanned: {report['scan']['file_count']}") | |
| print(f"training_readiness: {report['training_readiness']['coverage_percent']:.1f}%") | |
| print(f"command_gate: {report['command_gate']['passed']}") | |
| print(f"devtools_gate: {report['devtools_gate']['passed']}") | |
| print("world_best_claim_allowed: false") | |
| def run_adaptive_alignment_cli(args: argparse.Namespace) -> None: | |
| report = run_adaptive_alignment(args.out_dir) | |
| print(f"adaptive alignment report: {report['json_path']}") | |
| print(f"instruction_following: {report['scores']['instruction_following']:.2f}") | |
| print(f"tool_grounding_reliability: {report['scores']['tool_grounding_reliability']:.2f}") | |
| print(f"coding_project_agent: {report['scores']['coding_project_agent']:.2f}") | |
| print(f"system_protocol_alignment_claim_allowed: {report['claim_gate']['system_protocol_alignment_claim_allowed']}") | |
| def run_adaptive_score_import_cli(args: argparse.Namespace) -> None: | |
| payload = write_adaptive_import(args.adaptive_report, args.out) | |
| print(f"adaptive score import: {payload['out_path']}") | |
| print(f"scope: {payload['scope']}") | |
| print(f"scores: {', '.join(sorted(payload['scores']))}") | |
| def run_core_gap_closer_cli(args: argparse.Namespace) -> None: | |
| report = run_core_gap_closer(args.out_dir) | |
| print(f"core gap closer report: {report['json_path']}") | |
| print(f"import_path: {report['import_path']}") | |
| print(f"knowledge_mmlu_pro: {report['scores']['knowledge_mmlu_pro']:.2f}") | |
| print(f"translation_th_en: {report['scores']['translation_th_en']:.2f}") | |
| print(f"bit_exactness: {report['scores']['bit_exactness']:.2f}") | |
| print(f"system_protocol_gap_claim_allowed: {report['claim_gate']['system_protocol_gap_claim_allowed']}") | |
| def run_merge_score_imports_cli(args: argparse.Namespace) -> None: | |
| result = merge_score_imports(args.inputs, args.out) | |
| print(f"merged score import: {result['out_path']}") | |
| print(f"sources: {len(result['sources'])}") | |
| print(f"scores: {', '.join(sorted(result['scores']))}") | |
| def run_code_recover(args: argparse.Namespace) -> None: | |
| report = recover_file(args.input, args.out_dir) | |
| print(f"code recovery report: {report['report_path']}") | |
| print(f"recovered: {report['recovered_path']}") | |
| print(f"layers: {report['layer_count']}") | |
| print(f"input_sha256: {report['input_sha256']}") | |
| print(f"output_sha256: {report['output_sha256']}") | |
| print("world_best_claim_allowed: false") | |
| def run_bitsharp_train_cli(args: argparse.Namespace) -> None: | |
| report = run_bitsharp_training( | |
| checkpoint_path=args.checkpoint, | |
| dataset_paths=args.datasets, | |
| out_dir=args.out_dir, | |
| steps=args.steps, | |
| margin=args.margin, | |
| ) | |
| print(f"bitsharp report: {report['report_path']}") | |
| print(f"checkpoint: {report['checkpoint']}") | |
| print(f"before_loss: {report['before']['loss']:.4f}") | |
| print(f"after_loss: {report['after']['loss']:.4f}") | |
| print(f"after_next_token_accuracy: {report['after']['next_token_accuracy']:.4f}") | |
| print(f"after_bit_error_proxy: {report['after']['bit_error_proxy']:.4f}") | |
| print(f"improved: {report['improved']}") | |
| print("world_best_claim_allowed: false") | |
| def run_logic_eval_cli(args: argparse.Namespace) -> None: | |
| report = run_logic_eval(args.checkpoint, args.out_dir) | |
| print(f"logic eval report: {report['report_path']}") | |
| print(f"accuracy: {report['accuracy']:.4f} ({report['correct']}/{report['samples']})") | |
| print("world_best_claim_allowed: false") | |
| def run_logic_solve_cli(args: argparse.Namespace) -> None: | |
| result = TinyLogicCore().solve(args.question) | |
| print(json.dumps(result, ensure_ascii=False, indent=2, sort_keys=True)) | |
| def run_preflight_4b(args: argparse.Namespace) -> None: | |
| report = build_4b_preflight(args.out_dir) | |
| print(f"4B preflight report: {report['report_path']}") | |
| print(f"dense_class_params: {report['dense_class_params']}") | |
| print(f"purefield_estimated_params: {report['purefield_estimated_params']}") | |
| print(f"dense_full_train_on_3090: {report['dense_class_vram']['rtx_3090_24gb_dense_full_train_feasible']}") | |
| print(f"int4_or_adapter_on_3090: {report['purefield_vram']['rtx_3090_24gb_int4_or_adapter_feasible']}") | |
| def run_preflight_12b(args: argparse.Namespace) -> None: | |
| report = build_12b_preflight(args.out_dir) | |
| print(f"12B preflight report: {report['report_path']}") | |
| print(f"dense_class_params: {report['dense_class_params']}") | |
| print(f"purefield_estimated_params: {report['purefield_estimated_params']}") | |
| print(f"dense_full_train_on_3090: {report['dense_class_vram']['rtx_3090_24gb_dense_full_train_feasible']}") | |
| print(f"int4_or_adapter_on_3090: {report['purefield_vram']['rtx_3090_24gb_int4_or_adapter_feasible']}") | |
| def run_rtx3090_runtime_governor(args: argparse.Namespace) -> None: | |
| report = build_gpu_runtime_governor( | |
| out_dir=args.out_dir, | |
| preflight_path=args.preflight, | |
| max_temp_c=args.max_temp_c, | |
| min_free_vram_gb=args.min_free_vram_gb, | |
| ) | |
| decision = report["decision"] | |
| gpu = report["gpu"] | |
| print(f"RTX 3090 runtime governor: {report['json_path']}") | |
| print(f"gpu: {gpu.get('name', 'unavailable')}") | |
| print(f"risk_level: {decision['risk_level']}") | |
| print(f"run_12b_compressed_on_3090_allowed: {decision['run_12b_compressed_on_3090_allowed']}") | |
| print(f"dense_12b_full_train_on_3090_allowed: {decision['dense_12b_full_train_on_3090_allowed']}") | |
| print(f"no_bottleneck_forever_claim_allowed: {report['claim_gate']['no_bottleneck_forever_claim_allowed']}") | |
| def run_axiomweave_dossier(args: argparse.Namespace) -> None: | |
| report = build_axiomweave_dossier(args.out_dir, size=args.size, seq_len=args.seq_len) | |
| print(f"AxiomWeave dossier: {report['json_path']}") | |
| print(f"params: {report['params']}") | |
| print(f"forward_finite: {report['forward_finite']}") | |
| print(f"route_entropy_mean: {report['route_entropy_mean']:.4f}") | |
| print(f"world_best_claim_allowed: {report['claim_gate']['world_best_claim_allowed']}") | |
| def run_axiomflow_bench_cli(args: argparse.Namespace) -> None: | |
| report = run_axiomflow_bench( | |
| args.out_dir, | |
| dim=args.dim, | |
| seq_len=args.seq_len, | |
| batch_size=args.batch_size, | |
| local_window=args.local_window, | |
| memory_slots=args.memory_slots, | |
| memory_rank=args.memory_rank, | |
| retrieval_top_k=args.retrieval_top_k, | |
| retrieved_chunk_tokens=args.retrieved_chunk_tokens, | |
| seed=args.seed, | |
| ) | |
| print(f"AxiomFlow HyperWeave bench: {report['json_path']}") | |
| print(f"forward_finite: {report['forward_finite']}") | |
| print(f"backward_finite: {report['backward_finite']}") | |
| print(f"cached_token_capacity: {report['bounded_memory_gate']['cached_token_capacity']}") | |
| print(f"long_context_kv_tokens_stored: {report['long_context_kv_tokens_stored']}") | |
| print(f"beats_flashattention3_claim_allowed: {report['claim_gate']['beats_flashattention3_claim_allowed']}") | |
| def run_tensor_layer_plan_cli(args: argparse.Namespace) -> None: | |
| report = build_tensor_layer_plan( | |
| args.out_dir, | |
| target_layers_tensor=args.target_layers_tensor, | |
| physical_layers=args.physical_layers, | |
| hidden_dim=args.hidden_dim, | |
| local_window=args.local_window, | |
| ) | |
| print(f"tensor layer plan: {report['json_path']}") | |
| print(f"Total Layers Tensor: {report['active_layers_tensor']}") | |
| print(f"physical_layers: {report['physical_layers']}") | |
| print(f"tensor_depth_per_physical_layer: {report['tensor_depth_per_physical_layer']}") | |
| print(f"masked_layers_tensor: {report['masked_layers_tensor']}") | |
| print(f"physical_1803_layers_claim_allowed: {report['claim_gate']['physical_1803_layers_claim_allowed']}") | |
| def run_system_coherence_governor_cli(args: argparse.Namespace) -> None: | |
| report = build_system_coherence_governor( | |
| args.out_dir, | |
| inputs={ | |
| "dataset": args.dataset_report, | |
| "axiomflow": args.axiomflow_report, | |
| "tensor_layer": args.tensor_layer_report, | |
| "champion": args.champion_report, | |
| "runtime": args.runtime_report, | |
| }, | |
| ) | |
| print(f"system coherence governor: {report['json_path']}") | |
| print(f"system_coherence_ready: {report['coherence_gate']['system_coherence_ready']}") | |
| print(f"no_zero_work_passed: {report['coherence_gate']['no_zero_work_passed']}") | |
| print(f"flexibility_gate: {report['flexibility_gate']['passed']}") | |
| print(f"stability_gate: {report['stability_gate']['passed']}") | |
| print(f"precision_gate: {report['precision_gate']['passed']}") | |
| print(f"world_best_claim_allowed: {report['claim_gate']['world_best_claim_allowed']}") | |
| def run_axiomlang_compile(args: argparse.Namespace) -> None: | |
| compiled = write_axiomlang_compile(args.source, args.out) | |
| cfg = compiled["config"] | |
| print(f"AxiomLang compiled: {compiled['out_path']}") | |
| print(f"name: {compiled['spec']['name']}") | |
| print(f"architecture_mode: {cfg['architecture_mode']}") | |
| print(f"dim: {cfg['dim']}") | |
| print(f"layers: {cfg['n_layers']}") | |
| print(f"growth_rules: {len(compiled['growth_plan'])}") | |
| print(f"world_best_model_claim_allowed: {compiled['claim_gate']['world_best_model_claim_allowed']}") | |
| def run_axiomweave_coherence(args: argparse.Namespace) -> None: | |
| report = audit_axiomweave_coherence(args.out_dir, size=args.size, seq_len=args.seq_len) | |
| print(f"AxiomWeave coherence report: {report['json_path']}") | |
| print(f"no_zero_work_gate: {report['no_zero_work_gate']['passed']}") | |
| print(f"alive_layer_ratio: {report['no_zero_work_gate']['alive_layer_ratio']:.2%}") | |
| print(f"harmony_score: {report['harmony_score']:.2f}") | |
| print("world_best_claim_allowed: false") | |
| def run_world_class_eval(args: argparse.Namespace) -> None: | |
| report = build_world_class_eval( | |
| out_dir=args.out_dir, | |
| knowledge_report=args.knowledge_report, | |
| compact_report=args.compact_report, | |
| coherence_report=args.coherence_report, | |
| memory_report=args.memory_report, | |
| external_results=args.external_results, | |
| ) | |
| print(f"world-class eval report: {report['json_path']}") | |
| print(f"balanced_score: {report['summary']['balanced_score']:.2f}") | |
| print(f"measured_axes: {report['summary']['measured_axis_count']}/{report['summary']['axis_count']}") | |
| print(f"ready_for_world_top_comparison: {report['claim_gate']['ready_for_world_top_comparison']}") | |
| print(f"can_claim_better_than_top_world_models: {report['claim_gate']['can_claim_better_than_top_world_models']}") | |
| def run_system_perfection_gate(args: argparse.Namespace) -> None: | |
| report = build_perfection_gate(args.out_dir, run_tests=not args.skip_tests) | |
| print(f"system perfection gate: {report['json_path']}") | |
| print(f"operational_integrity: {report['operational_integrity']['passed']}") | |
| print(f"local_research_release_ready: {report['release_readiness']['local_research_release_ready']}") | |
| print(f"absolute_100_percent_error_free_allowed: {report['perfection_claim']['absolute_100_percent_error_free_allowed']}") | |
| print(f"world_best_or_flawless_claim_allowed: {report['perfection_claim']['world_best_or_flawless_claim_allowed']}") | |
| def run_gpt55_pro_parity(args: argparse.Namespace) -> None: | |
| report = build_frontier_parity_report( | |
| out_dir=args.out_dir, | |
| world_report=args.world_report, | |
| imported_scores=args.imported_scores, | |
| ) | |
| print(f"GPT-5.5 Pro parity report: {report['json_path']}") | |
| print(f"parity_percent: {report['summary']['parity_percent']:.2f}") | |
| print(f"frontier_plus_percent: {report['summary']['frontier_plus_percent']:.2f}") | |
| print(f"passed_axes: {report['summary']['passed_axes']}/{report['summary']['axis_count']}") | |
| print(f"can_claim_gpt55_pro_equivalent: {report['claim_gate']['can_claim_gpt55_pro_equivalent']}") | |
| print(f"can_claim_beyond_frontier: {report['claim_gate']['can_claim_beyond_frontier']}") | |
| print(f"critical_gaps: {', '.join(report['summary']['critical_gaps'])}") | |
| def run_raw_external_gate(args: argparse.Namespace) -> None: | |
| report = build_raw_external_gate( | |
| out_dir=args.out_dir, | |
| raw_world_report=args.raw_world_report, | |
| external_results=args.external_results, | |
| ) | |
| print(f"raw/external gate report: {report['json_path']}") | |
| print(f"raw_gate_passed: {report['claim_gate']['raw_gate_passed']}") | |
| print(f"external_gate_passed: {report['claim_gate']['external_gate_passed']}") | |
| print(f"raw_external_gate_complete: {report['claim_gate']['raw_external_gate_complete']}") | |
| print(f"template: {report['external']['template_path']}") | |
| def run_world_quality_governor(args: argparse.Namespace) -> None: | |
| report = build_world_quality_governor(args.out_dir) | |
| scores = report["scores"] | |
| print(f"world quality governor: {report['json_path']}") | |
| print(f"local_system_quality_score: {scores['local_system_quality_score']:.2f}") | |
| print(f"frontier_readiness_score: {scores['frontier_readiness_score']:.2f}") | |
| print(f"raw_quality_score: {scores['raw_quality_score']:.2f}") | |
| print(f"external_quality_score: {scores['external_quality_score']:.2f}") | |
| print(f"local_quality_stack_ready: {report['claim_gate']['local_quality_stack_ready']}") | |
| print(f"world_current_quality_claim_allowed: {report['claim_gate']['world_current_quality_claim_allowed']}") | |
| def run_world_pure_sources(args: argparse.Namespace) -> None: | |
| registry = build_world_pure_source_registry(args.out_dir) | |
| curriculum = build_world_pure_streaming_curriculum(args.out_dir, token_budget=args.token_budget) | |
| print(f"world pure registry: {Path(args.out_dir) / 'world_pure_source_registry.json'}") | |
| print(f"world pure curriculum: {Path(args.out_dir) / 'world_pure_streaming_curriculum.json'}") | |
| print(f"sources: {registry['summary']['source_count']}") | |
| print(f"train_streams: {curriculum['summary']['train_source_count']}") | |
| print(f"eval_reserves: {curriculum['summary']['eval_source_count']}") | |
| print(f"largest_domain_share: {curriculum['summary']['largest_domain_share']:.4f}") | |
| print(f"world_best_claim_allowed: {curriculum['claim_gate']['world_best_claim_allowed']}") | |
| def run_deepweave_t0_candidate(args: argparse.Namespace) -> None: | |
| report = build_deepweave_t0_candidate_report( | |
| args.out_dir, | |
| physical_layers=args.physical_layers, | |
| virtual_lanes=args.virtual_lanes, | |
| smoke_layers=args.smoke_layers, | |
| smoke_dim=args.smoke_dim, | |
| smoke_seq_len=args.smoke_seq_len, | |
| ) | |
| target = report["target_spec"] | |
| smoke = report["smoke_evidence"] | |
| print(f"deepweave t0 report: {report['json_path']}") | |
| print(f"physical_layers: {target['physical_layers']}") | |
| print(f"virtual_lanes: {target['virtual_lanes']}") | |
| print(f"virtual_tensor_depth: {target['virtual_tensor_depth']}") | |
| print(f"smoke_forward_finite: {smoke['forward_finite']}") | |
| print(f"smoke_backward_finite: {smoke['backward_finite']}") | |
| print(f"ffi_abi: {report['ffi_bridge']['abi_name']}") | |
| print(f"tier0_claim_allowed: {report['claim_gate']['tier0_claim_allowed']}") | |
| def run_native_transfer_curriculum(args: argparse.Namespace) -> None: | |
| report = build_native_transfer_curriculum( | |
| args.out_dir, | |
| probe_report=args.probe_report, | |
| variants_per_event=args.variants_per_event, | |
| ) | |
| summary = report["summary"] | |
| print(f"native transfer report: {report['json_path']}") | |
| print(f"sft_path: {report['sft_path']}") | |
| print(f"event_sample_count: {summary['event_sample_count']}") | |
| print(f"stage_count: {summary['stage_count']}") | |
| print(f"sft_rows: {summary['sft_rows']}") | |
| print(f"axes: {', '.join(summary['axes'])}") | |
| print(f"raw_native_claim_allowed: {report['claim_gate']['raw_native_claim_allowed']}") | |
| def run_native_micro_train_cli(args: argparse.Namespace) -> None: | |
| report = run_native_micro_train_bundle( | |
| args.out_dir, | |
| dataset=args.dataset, | |
| max_steps=args.max_steps, | |
| eval_records=args.eval_records, | |
| limit_records=args.limit_records, | |
| dim=args.dim, | |
| layers=args.layers, | |
| seq_len=args.seq_len, | |
| vocab_size=args.vocab_size, | |
| learning_rate=args.learning_rate, | |
| ) | |
| metrics = report["metrics"] | |
| print(f"native micro train report: {report['json_path']}") | |
| print(f"pre_eval_loss: {metrics['pre_eval_loss']:.6f}") | |
| print(f"post_eval_loss: {metrics['post_eval_loss']:.6f}") | |
| print(f"post_minus_pre_eval_loss: {metrics['post_minus_pre_eval_loss']:.6f}") | |
| print(f"train_steps_completed: {metrics['train_steps_completed']}") | |
| print(f"native_training_proven: {report['claim_gate']['native_training_proven']}") | |
| print(f"tier0_claim_allowed: {report['claim_gate']['tier0_claim_allowed']}") | |
| def run_native_axiom_regenesis_train_cli(args: argparse.Namespace) -> None: | |
| report = run_native_axiom_regenesis_train_bundle( | |
| args.out_dir, | |
| dataset=args.dataset, | |
| max_steps=args.max_steps, | |
| eval_records=args.eval_records, | |
| limit_records=args.limit_records, | |
| dim=args.dim, | |
| layers=args.layers, | |
| lanes=args.lanes, | |
| seq_len=args.seq_len, | |
| vocab_size=args.vocab_size, | |
| virtual_dim=args.virtual_dim, | |
| basis_rank=args.basis_rank, | |
| facets=args.facets, | |
| learning_rate=args.learning_rate, | |
| train_batch_size=args.train_batch_size, | |
| seed=args.seed, | |
| device=args.device, | |
| resume_checkpoint=args.resume_checkpoint, | |
| ) | |
| metrics = report["metrics"] | |
| print(f"native AxiomReGenesis report: {report['json_path']}") | |
| print(f"checkpoint: {report['artifacts']['checkpoint_path']}") | |
| print(f"runtime_metadata: {report['artifacts']['runtime_metadata_path']}") | |
| print(f"params: {report['summary']['parameter_count']}") | |
| print(f"pre_eval_loss: {metrics['pre_eval_loss']:.6f}") | |
| print(f"post_eval_loss: {metrics['post_eval_loss']:.6f}") | |
| print(f"eval_loss_improved: {metrics['eval_loss_improved']}") | |
| print(f"memory_bounded: {report['claim_gate']['memory_bounded']}") | |
| print(f"native_checkpoint_infer_ready: {report['claim_gate']['native_checkpoint_infer_ready']}") | |
| print("world_best_claim_allowed: false") | |
| def run_native_baseline_probe_cli(args: argparse.Namespace) -> None: | |
| report = run_native_baseline_probe( | |
| args.out_dir, | |
| native_checkpoint=args.native_checkpoint, | |
| baseline_report=args.baseline_report, | |
| baseline_adapter_name=args.baseline_adapter_name, | |
| device=args.device, | |
| max_new_tokens=args.max_new_tokens, | |
| ) | |
| summary = report["summary"] | |
| print(f"native baseline probe report: {report['json_path']}") | |
| print(f"baseline_score: {summary['baseline_score']}/{summary['max_score']}") | |
| print(f"native_score: {summary['native_score']}/{summary['max_score']}") | |
| print(f"native_wins: {summary['native_wins']}") | |
| print(f"baseline_wins: {summary['baseline_wins']}") | |
| print(f"ties: {summary['ties']}") | |
| print(f"scale_allowed_by_probe: {report['claim_gate']['scale_allowed_by_probe']}") | |
| print("world_best_claim_allowed: false") | |
| def run_native_axiom_scaling_ladder_cli(args: argparse.Namespace) -> None: | |
| layers = [int(chunk.strip()) for chunk in str(args.layers).split(",") if chunk.strip()] | |
| report = run_native_axiom_scaling_ladder_bundle( | |
| args.out_dir, | |
| dataset=args.dataset, | |
| layers=layers, | |
| dim=args.dim, | |
| lanes=args.lanes, | |
| seq_len=args.seq_len, | |
| max_steps=args.max_steps, | |
| eval_records=args.eval_records, | |
| limit_records=args.limit_records, | |
| vocab_size=args.vocab_size, | |
| virtual_dim=args.virtual_dim, | |
| basis_rank=args.basis_rank, | |
| facets=args.facets, | |
| learning_rate=args.learning_rate, | |
| local_layer_limit=args.local_layer_limit, | |
| local_param_limit=args.local_param_limit, | |
| ) | |
| print(f"native AxiomReGenesis scaling ladder report: {report['json_path']}") | |
| print(f"completed_count: {report['summary']['completed_count']}") | |
| print(f"eval_improved_count: {report['summary']['eval_improved_count']}") | |
| print(f"colab_handoff_count: {report['summary']['colab_handoff_count']}") | |
| print(f"scaling_point_claim_allowed: {report['claim_gate']['scaling_point_claim_allowed']}") | |
| print("world_best_claim_allowed: false") | |
| def run_native_scaling_ladder_cli(args: argparse.Namespace) -> None: | |
| layers = [int(chunk.strip()) for chunk in str(args.layers).split(",") if chunk.strip()] | |
| dims = [int(chunk.strip()) for chunk in str(args.dims).split(",") if chunk.strip()] if args.dims else None | |
| report = run_native_scaling_ladder_bundle( | |
| args.out_dir, | |
| dataset=args.dataset, | |
| layers=layers, | |
| dims=dims, | |
| dim=args.dim, | |
| seq_len=args.seq_len, | |
| max_steps=args.max_steps, | |
| eval_records=args.eval_records, | |
| vocab_size=args.vocab_size, | |
| learning_rate=args.learning_rate, | |
| local_layer_limit=args.local_layer_limit, | |
| local_dim_limit=args.local_dim_limit, | |
| ) | |
| print(f"native scaling ladder report: {report['json_path']}") | |
| print(f"completed_count: {report['summary']['completed_count']}") | |
| print(f"colab_handoff_count: {report['summary']['colab_handoff_count']}") | |
| for stage in report["stages"]: | |
| if stage["status"] == "completed": | |
| metrics = stage["metrics"] | |
| print( | |
| f"dim={stage['dim']} layers={stage['layers']} status=completed " | |
| f"pre={metrics['pre_eval_loss']:.6f} post={metrics['post_eval_loss']:.6f} " | |
| f"delta={metrics['post_minus_pre_eval_loss']:.6f}" | |
| ) | |
| else: | |
| print(f"dim={stage['dim']} layers={stage['layers']} status={stage['status']} reason={stage.get('reason')}") | |
| if report.get("colab_handoff"): | |
| print(f"colab_notebook: {report['colab_handoff']['notebook']}") | |
| def run_native_virtual_width_cli(args: argparse.Namespace) -> None: | |
| physical_dims = [int(chunk.strip()) for chunk in str(args.physical_dims).split(",") if chunk.strip()] | |
| layers = [int(chunk.strip()) for chunk in str(args.layers).split(",") if chunk.strip()] | |
| ranks = [int(chunk.strip()) for chunk in str(args.ranks).split(",") if chunk.strip()] | |
| report = build_native_virtual_width_report( | |
| args.out_dir, | |
| virtual_dim=args.virtual_dim, | |
| physical_dims=physical_dims, | |
| layers=layers, | |
| ranks=ranks, | |
| lanes=args.lanes, | |
| ) | |
| best = report["best_candidate"] | |
| print(f"native virtual width report: {report['json_path']}") | |
| print(f"virtual_dim: {report['target']['virtual_dim']}") | |
| print( | |
| "best: " | |
| f"physical_dim={best['physical_dim']} layers={best['layers']} rank={best['rank']} " | |
| f"compression={best['compression_vs_dense_virtual']:.2f}x " | |
| f"forward_finite={best['smoke']['forward_finite']} backward_finite={best['smoke']['backward_finite']}" | |
| ) | |
| print(f"dense_20480_claim_allowed: {report['claim_gate']['dense_20480_claim_allowed']}") | |
| def run_axiomdim_cli(args: argparse.Namespace) -> None: | |
| physical_dims = [int(chunk.strip()) for chunk in str(args.physical_dims).split(",") if chunk.strip()] | |
| basis_ranks = [int(chunk.strip()) for chunk in str(args.basis_ranks).split(",") if chunk.strip()] | |
| facets = [int(chunk.strip()) for chunk in str(args.facets).split(",") if chunk.strip()] | |
| report = build_axiomdim_report( | |
| args.out_dir, | |
| effective_dim=args.effective_dim, | |
| physical_dims=physical_dims, | |
| basis_ranks=basis_ranks, | |
| facets=facets, | |
| ) | |
| best = report["best_candidate"] | |
| print(f"axiomdim report: {report['json_path']}") | |
| print(f"effective_dim: {report['target']['effective_dim']}") | |
| print( | |
| "best: " | |
| f"physical_dim={best['physical_dim']} basis_rank={best['basis_rank']} facets={best['facets']} " | |
| f"params={best['parameter_count']} compression={best['compression_vs_dense_dim']:.2f}x " | |
| f"forward_finite={best['smoke']['forward_finite']} backward_finite={best['smoke']['backward_finite']}" | |
| ) | |
| print(f"dense_dim_claim_allowed: {report['claim_gate']['dense_dim_claim_allowed']}") | |
| def run_axiomkv_cli(args: argparse.Namespace) -> None: | |
| seq_lengths = [int(chunk.strip()) for chunk in str(args.seq_lengths).split(",") if chunk.strip()] | |
| report = build_axiomkv_report( | |
| args.out_dir, | |
| effective_dim=args.effective_dim, | |
| physical_dim=args.physical_dim, | |
| seq_lengths=seq_lengths, | |
| local_window=args.local_window, | |
| anchor_slots=args.anchor_slots, | |
| anchor_rank=args.anchor_rank, | |
| ) | |
| gate = report["bounded_kv_gate"] | |
| print(f"axiomkv report: {report['json_path']}") | |
| print(f"effective_dim: {report['target']['effective_dim']}") | |
| print(f"bounded_capacity: {gate['cached_token_capacity']}") | |
| print(f"capacity_constant_across_lengths: {gate['capacity_constant_across_lengths']}") | |
| print(f"long_context_kv_tokens_stored: {gate['long_context_kv_tokens_stored']}") | |
| print(f"bounded_kv_passed: {gate['passed']}") | |
| def run_resource_optimize(args: argparse.Namespace) -> None: | |
| report = build_resource_optimizer_report(args.out_dir, args.bitsharp_report, args.preflight_4b) | |
| sel = report["selected"] | |
| print(f"resource optimizer report: {report['report_path']}") | |
| print(f"selected: {sel['name']}") | |
| print(f"score: {sel['quality_per_resource_score']:.6f}") | |
| print(f"mode: {sel['mode']}") | |
| print(f"estimated_vram_gb: {sel['estimated_vram_gb']:.4f}") | |
| print("world_best_claim_allowed: false") | |
| def run_rule_evolution_governor(args: argparse.Namespace) -> None: | |
| report = build_rule_evolution_report(args.out_dir) | |
| print(f"rule evolution report: {report['report_path']}") | |
| print(f"active self-rules: {report['active_manifest_path']}") | |
| print(f"accepted_rules: {report['accepted_count']}") | |
| print(f"blocked_rules: {report['blocked_count']}") | |
| print(f"self_evolution_ready: {report['self_evolution_ready']}") | |
| print(f"world_best_claim_allowed: {report['world_best_claim_allowed']}") | |
| def run_evo_learning_loop(args: argparse.Namespace) -> None: | |
| report = build_evo_learning_report(args.out_dir) | |
| print(f"evo learning report: {report['report_path']}") | |
| print(f"lesson manifest: {report['lesson_manifest_path']}") | |
| print(f"promoted_lessons: {report['promoted_count']}") | |
| print(f"blocked_lessons: {report['blocked_count']}") | |
| print(f"self_learning_real: {report['claim_gate']['self_learning_real']}") | |
| print(f"memory_replay_rejected: {report['claim_gate']['memory_replay_rejected']}") | |
| print(f"world_best_claim_allowed: {report['claim_gate']['world_best_claim_allowed']}") | |
| def run_compact_intelligence(args: argparse.Namespace) -> None: | |
| dossier = build_compact_intelligence_dossier( | |
| out_dir=args.out_dir, | |
| knowledge_report=args.knowledge_report, | |
| bitsharp_report=args.bitsharp_report, | |
| logic_report=args.logic_report, | |
| official_report=args.official_report, | |
| ) | |
| print(f"compact intelligence dossier: {dossier['json_path']}") | |
| print(f"params: {dossier['params']}") | |
| print(f"holistic_score: {dossier['holistic_score']:.2f}") | |
| print(f"score_per_million_params: {dossier['score_per_million_params']:.2f}") | |
| print(f"can_claim_smarter_than_larger_models: {dossier['claim_gate']['can_claim_smarter_than_larger_models']}") | |
| print(f"must_improve: {', '.join(dossier['claim_gate']['must_improve'])}") | |
| def run_world_model_pack(args: argparse.Namespace) -> None: | |
| package = build_world_model_package( | |
| out_dir=args.out_dir, | |
| model_name=args.model_name, | |
| checkpoint_path=args.checkpoint, | |
| axon_capsule_path=args.axon_capsule, | |
| evidence_paths=args.evidence, | |
| ) | |
| print(f"world model package manifest: {package['manifest_path']}") | |
| print(f"axon_records: {package['axon_records']}") | |
| print(f"axon_verified: {package['axon_verified']}") | |
| print(f"world_best_claim_allowed: {package['claim_gate']['world_best_claim_allowed']}") | |
| def run_universal_intelligence_dossier(args: argparse.Namespace) -> None: | |
| dossier = build_universal_intelligence_dossier( | |
| out_dir=args.out_dir, | |
| model_id=args.model_id, | |
| evidence_paths=args.evidence, | |
| ) | |
| print(f"universal intelligence dossier: {dossier['json_path']}") | |
| print(f"dimension_coverage: {dossier['coverage']['dimension_coverage']:.0%}") | |
| print(f"world_best_claim_allowed: {dossier['claim_gate']['world_best_claim_allowed']}") | |
| def run_serve(args: argparse.Namespace) -> None: | |
| import uvicorn | |
| uvicorn.run("serve.api:app", host=args.host, port=args.port, reload=False) | |
| def main(argv: list[str] | None = None) -> None: | |
| parser = build_parser() | |
| args = parser.parse_args(argv) | |
| dispatch = { | |
| "train": run_train, | |
| "recover-sparse": run_recover_sparse, | |
| "export-int4-sparse": run_export_int4_sparse, | |
| "export-int6-sparse": run_export_int6_sparse, | |
| "int6-precision-ladder": run_int6_precision_ladder, | |
| "int6-precision-tradeoff": run_int6_precision_tradeoff, | |
| "int6-cuda-eval": run_int6_cuda_eval, | |
| "int6-cuda-rust-eval": run_int6_cuda_rust_eval_cli, | |
| "tfw-optimize": run_tfw_optimize, | |
| "int6-tensorcore-bridge": run_int6_tensorcore_bridge, | |
| "int6-bridge-imma-eval": run_int6_bridge_imma_eval, | |
| "sandbox-tool-core-eval": run_sandbox_tool_core_eval, | |
| "axiom-orchestrator": run_axiom_orchestrator, | |
| "sandbox-model-bridge": run_sandbox_model_bridge, | |
| "dataset-quality-governor": run_dataset_quality_governor, | |
| "code-source-registry": run_code_source_registry_cli, | |
| "tinymind-native-code-forge": run_tinymind_native_code_forge_cli, | |
| "coverage-100k-forge": run_coverage_100k_forge, | |
| "logic-agent-code-forge": run_logic_agent_code_forge, | |
| "alignment-tool-sft-forge": run_alignment_tool_sft_forge, | |
| "continuous-update-governor": run_continuous_update_governor, | |
| "rule-evolution-governor": run_rule_evolution_governor, | |
| "evo-learning-loop": run_evo_learning_loop, | |
| "hf-bucket-sync-manifest": run_hf_bucket_sync_manifest, | |
| "claude-reasoning-bucket": run_claude_reasoning_bucket, | |
| "knowledge-essence-distill": run_knowledge_essence_distill_cli, | |
| "data-greed-extract": run_data_greed_extract_cli, | |
| "omni-action-perception": run_omni_action_perception_cli, | |
| "pure-lattice-cnn": run_pure_lattice_cnn_cli, | |
| "mythos-purity-governor": run_mythos_purity_governor_cli, | |
| "mythos-report-analyze": run_mythos_report_analyze_cli, | |
| "mythos-capability-forge": run_mythos_capability_forge_cli, | |
| "deep-sharp-model-analysis": run_deep_sharp_model_analysis_cli, | |
| "command-intensity-governor": run_command_intensity_governor_cli, | |
| "ultra-deep-sharp-refiner": run_ultra_deep_sharp_refiner_cli, | |
| "evo-continue-plan": run_evo_continue_plan, | |
| "compact-lora-adapter": run_compact_lora_adapter, | |
| "evo-whole-body-report": run_evo_whole_body_report, | |
| "evo-cross-species": run_evo_cross_species_report, | |
| "gguf-evo-upgrade": run_gguf_evo_upgrade, | |
| "deep-research-rl": run_deep_research_rl_cli, | |
| "llm-stats-fetch": run_llm_stats_fetch_cli, | |
| "llm-stats-gateway-probe": run_llm_stats_gateway_probe_cli, | |
| "current-model-results": run_current_model_results_cli, | |
| "system-auto-tune": run_system_auto_tune_cli, | |
| "promote-adapter-if-better": run_promote_adapter_if_better_cli, | |
| "gateway-teacher-distill": run_gateway_teacher_distill_cli, | |
| "fi-gateway-manifest": run_fi_gateway_manifest, | |
| "reverse-engineering-corpus": run_reverse_engineering_corpus, | |
| "cve-intelligence-corpus": run_cve_intelligence_corpus, | |
| "thai-grounding-corpus": run_thai_grounding_corpus, | |
| "runtime-select": run_runtime_select, | |
| "benchmark": run_benchmark, | |
| "claim-dossier": run_claim_dossier, | |
| "local-train-eval": run_local_train_eval, | |
| "purity-concentrator": run_purity_concentrator, | |
| "expert-curriculum-forge": run_expert_curriculum_forge, | |
| "hyper-pure-refine": run_hyper_pure_refine, | |
| "hyper-pure-lineage": run_hyper_pure_lineage, | |
| "ultra-pure-audit": run_ultra_pure_audit, | |
| "internet-update": run_internet_update, | |
| "self-dialogue-train-eval": run_self_dialogue_train_eval, | |
| "external-model-eval": run_external_eval, | |
| "external-stress-suite": run_external_stress_suite_cli, | |
| "stress-provider-evidence": run_stress_provider_evidence_cli, | |
| "lmmarketcap-compare": run_lmmarketcap_compare_cli, | |
| "global-leaderboard-fetch": run_global_leaderboard_fetch_cli, | |
| "hub-package": run_hub_package, | |
| "official-eval-pack": run_official_eval_pack, | |
| "official-hard-eval": run_official_hard_eval_cli, | |
| "hard-benchmark-suite": run_hard_benchmark_suite_cli, | |
| "arc-agi3-eval": run_arc_agi3_eval_cli, | |
| "knowledge-dashboard": run_knowledge_dashboard_cli, | |
| "knowledge-full-cycle": run_knowledge_full_cycle_cli, | |
| "omni-pure-data-train": run_omni_pure_data_train_cli, | |
| "hf-pure-auto-refine-train": run_hf_pure_auto_refine_train_cli, | |
| "kaggle-scicode-ingest": run_kaggle_scicode_ingest_cli, | |
| "kaggle-benchmark-mix-ingest": run_kaggle_benchmark_mix_ingest_cli, | |
| "compact-teacher-train": run_compact_teacher_train_cli, | |
| "ten-million-step-readiness": run_ten_million_step_readiness_cli, | |
| "context-ingest": run_context_ingest, | |
| "context10m-answer": run_context10m_answer, | |
| "compressed-context-2m": run_compressed_context_2m, | |
| "grounded-answer": run_grounded_answer, | |
| "general-web-knowledge": run_general_web_knowledge, | |
| "pure-oracle": run_pure_oracle, | |
| "elastic-answer": run_elastic_answer, | |
| "ai-devtools": run_ai_devtools_cli, | |
| "adaptive-alignment": run_adaptive_alignment_cli, | |
| "adaptive-score-import": run_adaptive_score_import_cli, | |
| "core-gap-closer": run_core_gap_closer_cli, | |
| "merge-score-imports": run_merge_score_imports_cli, | |
| "code-recover": run_code_recover, | |
| "bitsharp-train": run_bitsharp_train_cli, | |
| "logic-eval": run_logic_eval_cli, | |
| "logic-solve": run_logic_solve_cli, | |
| "preflight-4b": run_preflight_4b, | |
| "preflight-12b": run_preflight_12b, | |
| "rtx3090-runtime-governor": run_rtx3090_runtime_governor, | |
| "axiomweave-dossier": run_axiomweave_dossier, | |
| "axiomflow-bench": run_axiomflow_bench_cli, | |
| "tensor-layer-plan": run_tensor_layer_plan_cli, | |
| "system-coherence-governor": run_system_coherence_governor_cli, | |
| "axiomlang-compile": run_axiomlang_compile, | |
| "axiomweave-coherence": run_axiomweave_coherence, | |
| "world-class-eval": run_world_class_eval, | |
| "system-perfection-gate": run_system_perfection_gate, | |
| "gpt55-pro-parity": run_gpt55_pro_parity, | |
| "raw-external-gate": run_raw_external_gate, | |
| "world-quality-governor": run_world_quality_governor, | |
| "world-pure-sources": run_world_pure_sources, | |
| "deepweave-t0-candidate": run_deepweave_t0_candidate, | |
| "native-transfer-curriculum": run_native_transfer_curriculum, | |
| "native-micro-train": run_native_micro_train_cli, | |
| "native-axiom-regenesis-train": run_native_axiom_regenesis_train_cli, | |
| "native-baseline-probe": run_native_baseline_probe_cli, | |
| "native-axiom-scaling-ladder": run_native_axiom_scaling_ladder_cli, | |
| "native-scaling-ladder": run_native_scaling_ladder_cli, | |
| "native-virtual-width": run_native_virtual_width_cli, | |
| "axiomdim": run_axiomdim_cli, | |
| "axiomkv": run_axiomkv_cli, | |
| "resource-optimize": run_resource_optimize, | |
| "compact-intelligence": run_compact_intelligence, | |
| "world-model-pack": run_world_model_pack, | |
| "universal-intelligence-dossier": run_universal_intelligence_dossier, | |
| "serve": run_serve, | |
| } | |
| dispatch[args.command](args) | |
| if __name__ == "__main__": | |
| main() | |
Xet Storage Details
- Size:
- 168 kB
- Xet hash:
- 7d32c5644278c5ab311ec122234ce7b12c65225b185cb23bff6f39ff1dc823f3
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.