Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- geofractal-router
|
| 5 |
+
- collective-intelligence
|
| 6 |
+
- math-reasoning
|
| 7 |
+
- multi-stream
|
| 8 |
+
- emergence
|
| 9 |
+
- routing
|
| 10 |
+
datasets:
|
| 11 |
+
- openai/gsm8k
|
| 12 |
+
base_model:
|
| 13 |
+
- tbs17/MathBERT
|
| 14 |
+
- google-t5/t5-base
|
| 15 |
+
pipeline_tag: text-classification
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# Math Collective - Galaxy Brain Router
|
| 19 |
+
|
| 20 |
+
**6-stream collective intelligence system for mathematical reasoning.**
|
| 21 |
+
|
| 22 |
+
## Architecture
|
| 23 |
+
```
|
| 24 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 25 |
+
β GALAXY BRAIN COLLECTIVE β
|
| 26 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
| 27 |
+
β FUZZY STREAMS (learned representations) β
|
| 28 |
+
β βββ MathBERT (frozen) β Head A β "symbolic understanding" β
|
| 29 |
+
β βββ T5-base (frozen) β Head B β "linguistic reasoning" β
|
| 30 |
+
β β
|
| 31 |
+
β DETERMINISTIC STREAMS (pure computation) β
|
| 32 |
+
β βββ Eigenspectrum β Head C β "covariance geometry" β
|
| 33 |
+
β βββ Cayley-Menger β Head D β "distance geometry" β
|
| 34 |
+
β βββ Symbolic Calc β Head E β "actual arithmetic" β
|
| 35 |
+
β βββ Fractal Dim β Head F β "complexity measure" β
|
| 36 |
+
β β
|
| 37 |
+
β All 6 streams β Fusion β Classifier β
|
| 38 |
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
## Key Innovation
|
| 42 |
+
|
| 43 |
+
**Fuzzy + Deterministic Routing**
|
| 44 |
+
|
| 45 |
+
The router learns WHEN to trust each stream:
|
| 46 |
+
- Simple arithmetic? Trust the Symbolic Calculator (deterministic)
|
| 47 |
+
- Complex word problem? Trust MathBERT/T5 (semantic)
|
| 48 |
+
- Ambiguous? Triangulate across all 6 perspectives
|
| 49 |
+
|
| 50 |
+
## Streams
|
| 51 |
+
|
| 52 |
+
| Stream | Type | Source | Purpose |
|
| 53 |
+
|--------|------|--------|---------|
|
| 54 |
+
| MathBERT | Fuzzy | tbs17/MathBERT (frozen) | Mathematical notation understanding |
|
| 55 |
+
| T5-base | Fuzzy | t5-base (frozen) | General language reasoning |
|
| 56 |
+
| Eigenspectrum | Deterministic | Covariance eigenvalues | Geometric structure of embeddings |
|
| 57 |
+
| Cayley-Menger | Deterministic | Distance matrix geometry | Simplex volume features |
|
| 58 |
+
| Symbolic | Deterministic | Regex + arithmetic | Actual number extraction & computation |
|
| 59 |
+
| Fractal | Deterministic | Correlation dimension | Problem complexity measure |
|
| 60 |
+
|
| 61 |
+
## Training
|
| 62 |
+
|
| 63 |
+
- **Dataset**: GSM8K (Grade School Math 8K)
|
| 64 |
+
- **Task**: Answer magnitude bucket prediction (20 buckets)
|
| 65 |
+
- **Frozen params**: ~330M (MathBERT + T5)
|
| 66 |
+
- **Trainable params**: ~15M (routing heads, fusion, projections)
|
| 67 |
+
|
| 68 |
+
## Emergence Metric (Ο)
|
| 69 |
+
```
|
| 70 |
+
Ο = collective_accuracy / max(individual_accuracies)
|
| 71 |
+
|
| 72 |
+
Ο > 1.0 = emergence (collective outperforms best individual)
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
## Usage
|
| 76 |
+
```python
|
| 77 |
+
from huggingface_hub import hf_hub_download
|
| 78 |
+
import torch
|
| 79 |
+
|
| 80 |
+
# Download checkpoint
|
| 81 |
+
checkpoint_path = hf_hub_download(
|
| 82 |
+
repo_id="AbstractPhil/math_collective",
|
| 83 |
+
filename="checkpoints/checkpoint_epoch_5.pt"
|
| 84 |
+
)
|
| 85 |
+
|
| 86 |
+
# Load and use (see geofractal-router for full implementation)
|
| 87 |
+
checkpoint = torch.load(checkpoint_path)
|
| 88 |
+
print(f"Epoch: {checkpoint['epoch']}")
|
| 89 |
+
print(f"Metrics: {checkpoint['metrics']}")
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
## Related
|
| 93 |
+
|
| 94 |
+
- **Framework**: [AbstractPhil/geofractal_router](https://huggingface.co/AbstractPhil/geofractal_router)
|
| 95 |
+
- **Paper**: Coming soon
|
| 96 |
+
- **Code**: [GitHub - geofractal](https://github.com/AbstractEyes/geofractal)
|
| 97 |
+
|
| 98 |
+
## Citation
|
| 99 |
+
```bibtex
|
| 100 |
+
@misc{abstractphil2025mathcollective,
|
| 101 |
+
title={Math Collective: Galaxy Brain Routing for Mathematical Reasoning},
|
| 102 |
+
author={AbstractPhil},
|
| 103 |
+
year={2025},
|
| 104 |
+
publisher={Hugging Face},
|
| 105 |
+
url={https://huggingface.co/AbstractPhil/math_collective}
|
| 106 |
+
}
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## License
|
| 110 |
+
|
| 111 |
+
Apache 2.0
|