🫘💎 DavidBeans: Unified Vision-to-Crystal Architecture
This repository contains training runs for DavidBeans - a unified geometric deep learning architecture combining:
- BEANS (ViT Backbone): Cantor-routed sparse attention
- DAVID (Classifier): Multi-scale crystal projection with Cayley-Menger geometric regularization
Repository Structure
AbstractPhil/geovit-david-beans/
├── README.md (this file)
└── weights/
├── run_001_baseline_YYYYMMDD_HHMMSS/
│ ├── best.safetensors
│ ├── epoch_010.safetensors
│ ├── config.json
│ ├── training_config.json
│ └── tensorboard/
├── run_002_5expert_5scale_YYYYMMDD_HHMMSS/
│ └── ...
└── ...
Usage
from safetensors.torch import load_file
from david_beans import DavidBeans, DavidBeansConfig
import json
# Pick a run
run_path = "weights/run_002_5expert_5scale_20251129_171229"
# Load config
with open(f"{run_path}/config.json") as f:
config_dict = json.load(f)
config = DavidBeansConfig(**config_dict)
# Load model
model = DavidBeans(config)
state_dict = load_file(f"{run_path}/best.safetensors")
model.load_state_dict(state_dict)
# Inference
model.eval()
with torch.no_grad():
output = model(images)
predictions = output['logits'].argmax(dim=-1)
Training Runs
| Run | Name | Accuracy | Notes |
|---|---|---|---|
| 001 | baseline | 70.05% | Initial CIFAR-100 run |
| 002 | 5expert_5scale | 68.34% | 5 experts, 5 scales |
Architecture
Image [B, 3, 32, 32]
│
▼
┌─────────────────────────────────────────┐
│ BEANS BACKBONE │
│ ├─ Patch Embed → [64 patches, dim] │
│ ├─ Hybrid Cantor Router │
│ ├─ N × Attention Blocks │
│ └─ N × Pentachoron Expert Layers │
└─────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ DAVID HEAD │
│ ├─ Multi-scale projection │
│ ├─ Per-scale Crystal Heads │
│ └─ Geometric Fusion │
└─────────────────────────────────────────┘
│
▼
[num_classes]
License
Apache 2.0
- Downloads last month
- 732