Update best model - Epoch 0 - Acc: 0.1099
Browse files- README.md +78 -0
- config.json +43 -0
- model.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- vision
|
| 4 |
+
- image-classification
|
| 5 |
+
- fractal-positional-encoding
|
| 6 |
+
- geometric-deep-learning
|
| 7 |
+
- devil-staircase
|
| 8 |
+
- simplex-geometry
|
| 9 |
+
license: mit
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# ViT-Beatrix: Fractal PE + Geometric Simplex Vision Transformer
|
| 13 |
+
|
| 14 |
+
This model integrates Devil's Staircase positional encoding with geometric simplex features
|
| 15 |
+
for vision tasks. Trained on CIFAR-10.
|
| 16 |
+
|
| 17 |
+
## Model Details
|
| 18 |
+
|
| 19 |
+
- **Architecture**: Vision Transformer with fractal positional encoding
|
| 20 |
+
- **Dataset**: CIFAR-100 (100 classes)
|
| 21 |
+
- **Embedding Dimension**: 512
|
| 22 |
+
- **Depth**: 4 layers
|
| 23 |
+
- **Patch Size**: 4x4
|
| 24 |
+
- **PE Levels**: 12
|
| 25 |
+
- **Simplex Dimension**: 5-simplex
|
| 26 |
+
|
| 27 |
+
## Training
|
| 28 |
+
|
| 29 |
+
- **Dataset**: CIFAR-100
|
| 30 |
+
- **Epochs**: 0
|
| 31 |
+
- **Best Accuracy**: 0.1099
|
| 32 |
+
- **Batch Size**: 512
|
| 33 |
+
- **Learning Rate**: 0.001
|
| 34 |
+
|
| 35 |
+
## Loss Components
|
| 36 |
+
|
| 37 |
+
- Task Loss Weight: 1.0
|
| 38 |
+
- Flow Alignment Weight: 0.5
|
| 39 |
+
- Coherence Weight: 0.3
|
| 40 |
+
- Multi-Scale Weight: 0.2
|
| 41 |
+
|
| 42 |
+
## Usage
|
| 43 |
+
|
| 44 |
+
```python
|
| 45 |
+
from geovocab2.train.model.vit_beatrix import SimplifiedGeometricClassifier
|
| 46 |
+
from safetensors.torch import load_file
|
| 47 |
+
|
| 48 |
+
# Load model
|
| 49 |
+
model = SimplifiedGeometricClassifier(
|
| 50 |
+
num_classes=100, # CIFAR-100
|
| 51 |
+
img_size=32,
|
| 52 |
+
embed_dim=512,
|
| 53 |
+
depth=4
|
| 54 |
+
)
|
| 55 |
+
|
| 56 |
+
# Load weights (renamed from model_best.safetensors to model.safetensors in Hub)
|
| 57 |
+
state_dict = load_file("model.safetensors")
|
| 58 |
+
model.load_state_dict(state_dict)
|
| 59 |
+
model.eval()
|
| 60 |
+
|
| 61 |
+
# Inference
|
| 62 |
+
output = model(images)
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
## Citation
|
| 66 |
+
|
| 67 |
+
```bibtex
|
| 68 |
+
@misc{vit-beatrix,
|
| 69 |
+
author = {AbstractPhil},
|
| 70 |
+
title = {ViT-Beatrix: Fractal Positional Encoding with Geometric Simplices},
|
| 71 |
+
year = {2025},
|
| 72 |
+
url = {https://github.com/AbstractEyes/lattice_vocabulary}
|
| 73 |
+
}
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
## License
|
| 77 |
+
|
| 78 |
+
MIT License
|
config.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"num_classes": 100,
|
| 3 |
+
"img_size": 32,
|
| 4 |
+
"patch_size": 4,
|
| 5 |
+
"embed_dim": 512,
|
| 6 |
+
"k_simplex": 5,
|
| 7 |
+
"depth": 4,
|
| 8 |
+
"num_heads": 8,
|
| 9 |
+
"mlp_ratio": 4.0,
|
| 10 |
+
"dropout": 0.0,
|
| 11 |
+
"pe_levels": 12,
|
| 12 |
+
"pe_features_per_level": 2,
|
| 13 |
+
"pe_smooth_tau": 0.25,
|
| 14 |
+
"simplex_feature_weight": 0.2,
|
| 15 |
+
"batch_size": 512,
|
| 16 |
+
"num_epochs": 50,
|
| 17 |
+
"learning_rate": 0.001,
|
| 18 |
+
"weight_decay": 0.005,
|
| 19 |
+
"warmup_epochs": 10,
|
| 20 |
+
"task_loss_weight": 1.0,
|
| 21 |
+
"flow_loss_weight": 0.5,
|
| 22 |
+
"coherence_loss_weight": 0.3,
|
| 23 |
+
"multiscale_loss_weight": 0.2,
|
| 24 |
+
"volume_reg_weight": 0.1,
|
| 25 |
+
"use_augmentation": true,
|
| 26 |
+
"mixup_alpha": 0.2,
|
| 27 |
+
"cutmix_alpha": 1.0,
|
| 28 |
+
"device": "cuda",
|
| 29 |
+
"num_workers": 2,
|
| 30 |
+
"pin_memory": true,
|
| 31 |
+
"save_dir": "./checkpoints",
|
| 32 |
+
"save_every": 10,
|
| 33 |
+
"use_safetensors": true,
|
| 34 |
+
"timestamp_dirs": true,
|
| 35 |
+
"push_to_hub": true,
|
| 36 |
+
"hub_model_id": "AbstractPhil/vit-beatrix",
|
| 37 |
+
"hub_upload_best_only": true,
|
| 38 |
+
"use_tensorboard": true,
|
| 39 |
+
"log_dir": "./logs",
|
| 40 |
+
"log_every": 50,
|
| 41 |
+
"train_baseline": false,
|
| 42 |
+
"hub_token": null
|
| 43 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe1e10a0a0c80c671a546fb82bc663d8754fe57e9fc1457f0c4f2da12c41f607
|
| 3 |
+
size 50831604
|