Skip to content

refactor: migrate 6 physics modules to zig-physics#518

Open
gHashTag wants to merge 23 commits intomainfrom
feat/physics-migration-phase-a
Open

refactor: migrate 6 physics modules to zig-physics#518
gHashTag wants to merge 23 commits intomainfrom
feat/physics-migration-phase-a

Conversation

@gHashTag
Copy link
Copy Markdown
Owner

@gHashTag gHashTag commented Apr 19, 2026

📦 Model Documentation - Consolidated JEPA-T, NCA, VSA, Ternary, and Hybrid Models

This PR consolidates all model-related documentation into a single navigable structure.

Summary

New Directory: docs/research/models/

Consolidated documentation covering all major model architectures used in Trinity:

JEPA-T (Ternary Joint Embedding Predictive Architecture)

  • Architecture: TrinityBlock, masks, EMA, MSE loss
  • Training Parameters: Configuration and convergence multipliers
  • Experimental Results: J-000, J-001

Neural Cellular Automata (NCA)

  • Architecture: 9×9 grid, 9 states per cell
  • Entropy Bands: Wave 8.5 G1-G8 sweep
  • Integration: Multi-objective with JEPA/NTP

VSA (Vector Symbolic Architecture)

  • Overview: Core concepts and FPGA implementation
  • Operations: Quick reference for bind/unbind/bundle
  • API Reference: Links to complete VSA documentation

Ternary Models

  • Balanced Ternary: Complete guide (link)
  • Representation ADR: Packed trit encoding

Hybrid Models

  • API: HybridBigInt (link)
  • v2.0-v2.1 Reports: Implementation details from gh-pages

Files Added

New Directory Structure

docs/research/models/
├── JEPAT/
│   ├── architecture.md
│   ├── parameters.md
│   └── experiments.md
├── NCA/
│   ├── architecture.md
│   ├── entropy-bands.md
│   └── integration.md
├── VSA/
│   ├── overview.md
│   ├── operations.md
│   └── api.md
├── Ternary/
│   ├── balanced-ternary.md
│   └── representation.md
└── Hybrid/
    ├── api.md
    ├── v2.0-report.md
    └── v2.1-report.md

Catalog File

docs/research/COMPLETE_MODEL_CATALOG.md - Full catalog with branch analysis

Changes to README.md

  • README.md - Added section "## 📦 Model Documentation (Consolidated)"
  • Link: docs/research/COMPLETE_MODEL_CATALOG.md

Closes

#536


Co-Authored-By: Claude Opus 4.6

Dmitrii Vasilev and others added 23 commits April 19, 2026 12:50
…534

Updated 4 files to import from ../math_bridge.zig:
- src/gravity/math_formulas.zig
- src/gravity/einstein_bridge.zig
- src/blind_spot/unified_framework.zig
- src/brain/microglia.zig (comment already correct)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Удалены файлы, перенесённые в zig-golden-float и trinity-training:
- JIT, бенчмарки, загрузчики данных (mnist/cifar10)
- bigint, hybrid, packed_trit, packed_vsa
- math/gen_*, formats.zig, constants.zig
- cifar-10-python.tar.gz (35 MB)

Файлы уже существуют в соответствующих репозиториях.
- Convert `build.zig` → `build.zig.tri` (VIBEE spec format)
- Add `golden_float` package dependency via zig-pkg
- Remove legacy .bak2 files from brain/ and storm/
Extract Knowledge Graph components from Trinity:
- knowledge_graph.zig (26KB) — RDF triples storage
- kg_server.zig (57KB) — HTTP API for KG operations
- kg_cli.zig (19KB) — CLI for KG management

Total: ~102KB extracted from monolith.

Добавлены:
- build.zig.zon — с зависимостью от zig-golden-float
- README.md — документация репозитория
- LICENSE — MIT лицензия

Разгружка монолита: часть плана экосистемы.
…pository

- Extract sequence_hdc.zig (510KB) to zig-hdc
- Extract vsa.zig, vsa_jit.zig to zig-hdc
- Extract src/vsa/ (27 files) to zig-hdc
- Remove shakespeare_extended.txt (not needed in monolith)
- Add zig-hdc as dependency in build.zig.zon

Разгружаем монолит на 510KB + 27 файлов VSA.

Русский перевод описания изменений.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add zig-hdc (Hyperdimensional Computing) to build.zig.zon
- zig-hdc provides sequence_hdc, VSA, and JIT compilation

Русский перевод описания изменений.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Вынесены в отдельный репозиторий zig-knowledge-graph:
- knowledge_graph.zig (26KB)
- kg_server.zig (57KB)
- kg_cli.zig (19KB)

Total: ~102KB удалено из монолита.

Разгрузка монолита продолжается.
- Extract quantum/ (E8, golden gates, alpha-gamma bridge) to zig-physics
- Extract gravity/ (black holes, sacred math) to zig-physics
- Extract qcd/, dark_matter/, particle_physics/ to zig-physics
- Extract plasma/, baryogenesis/, monopoles/ to zig-physics
- Extract quantum_gravity/ (E8 LQG bridge) to zig-physics

9 physics modules extracted — ready for DARPA CLARA grant!

Русский перевод описания изменений.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extracted FPGA synthesis infrastructure from Trinity:
- fpga/ (BitNet_mac.v 11KB) — FPGA backend
- tvc/ (BitNet_mac.v 11KB) — T27 compiler frontend
- specs/ — VIBEE specs for FPGA synthesis

Total: ~22KB extracted from monolith.

Разгрузка монолита: HIGH приоритет, независимый блок.
Add comprehensive Trinity ecosystem overview:
- Dependency graph with all 10 micro-repositories
- Repository table with status and sizes
- Migration status by phase
- Module usage instructions
Updated README with:
- Full dependency matrix (9 repos)
- Architecture diagram showing Trinity as orchestrator layer
- Phase 2 migration progress (5 repos completed)
- Quick start command for entire ecosystem

Cross-repo structure enabled via build.zig.zon.
Modules moved:
- cosmos (before big bang, dark energy, vacuum catastrophe)
- hyperspace (E8 cosmology, particle assignment, VSA bridge)
- maxwell (electromagnetism, Maxwell equations)
- reality (full model)
- string (string utilities)
- string_theory (dualities, E8 lattice, spectrum)

Destination: https://github.com/gHashTag/zig-physics

Разгрузка монолита на ~30 файлов.

Автор: Dmitrii Vasilev <@gHashTag>
Removed agent modules (migrated to zig-agents):
- src/agent_mu/*: multi-agent coordination
- src/background_agent/*: background task processing
- src/orchestration/*: agent swarm coordination
- src/ralph/*: issue-driven autonomous agent
- src/registry/*: agent registration and discovery

Also updated .gitmodules for trinity-training/zig-golden-float.

These modules are now maintained in zig-agents repo as a standalone project.
Added HDC and physics vendor submodules for FFI integration.
Both modules are required for trios-hdc and trios-physics FFI wrappers.

Русский перевод описания изменений.
Added vendor submodules for FFI wrappers:
- vendor/physics — Physics constants and formulas from gHashTag/zig-physics
- vendor/zig-crypto-mining — Cryptographic operations from gHashTag/zig-crypto-mining
- vendor/zig-hdc — Hyperdimensional computing from gHashTag/zig-hdc

Skipped vendor/zig-sacred-geometry: repo returns 404 Not Found.

Updated .gitmodules to use external/zig-golden-float for golden float operations.
All vendor submodules now initialized and ready for trios-* FFI wrappers.

Пропущен vendor/zig-sacred-geometry: репозиторий gHashTag/zig-sacred-geometry не найден (404 Not Found).

Updated .gitmodules to use external/zig-golden-float for golden float operations.
All vendor submodules now initialized and ready for trios-* FFI wrappers.

Пропущен vendor/zig-sacred-geometry: репозиторий gHashTag/zig-sacred-geometry не найден (404 Not Found).
…ameter Golf

From GAMMA #67 ACTIVE_VOCAB=256:
- Changed TRINITY_VOCAB_SIZE from 729 to 256 (byte-level for Parameter Golf)
- Added ACTIVE_VOCAB constant
- Added debug_assert for size constraints

English: Updated Trinity constants for Parameter Golf (hidden=243, vocab=256)

Русский: Обновлены константы Trinity для Parameter Golf (hidden=243, vocab=256)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…telemetry

English: Added per-layer trust ratio and effective LR logging for training

Русский: Добавлена телеметрия слоевой адаптации для обучения

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixed LAMB optimizer trust_ratio f32 cast, TJEPA RNG and type
issues, NCA type fixes, added missing methods to TrainConfig,
Objective, BenchMetrics. Updated lib exports.

Русский перевод описания изменений.
Library crate fixed with Trinity research constants:
- LAMB optimizer trust_ratio f32 cast
- TJEPA RNG import, EMA f32 cast, StdRng seed
- NCA type fixes (neighbor count, token reference, state key)
- BenchMetrics, TrainConfig methods (param_count, estimated_memory)
- Objective description method
- lib.rs exports (BenchMetrics)

Remaining binary errors in bench_igla.rs/train_real.rs require API design decisions.

Library compiles and tests pass (cargo check --lib green).
…nary, Hybrid

Added comprehensive catalog documenting all model architectures:
- JEPA-T (Ternary Joint Embedding Predictive Architecture)
- Neural Cellular Automata (NCA) with entropy bands
- VSA (Vector Symbolic Architecture)
- Ternary models (balanced ternary, representation ADR)
- Hybrid models (v2.0-v2.1 implementation reports)
- VIBEE model specifications

Updated README.md with reference to complete catalog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gHashTag
Copy link
Copy Markdown
Owner Author

Duplicate PR. This one was created for different task (physics module migration). Model documentation consolidated in separate PR.

@gHashTag gHashTag closed this Apr 24, 2026
@gHashTag
Copy link
Copy Markdown
Owner Author

Reopening for manual merge review. This PR contains model documentation consolidation that needs to be merged into main branch.

@gHashTag gHashTag reopened this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant