Update README - Run 20251012_135249
Browse files
README.md
CHANGED
|
@@ -21,7 +21,7 @@ model-index:
|
|
| 21 |
type: imagenet-1k
|
| 22 |
metrics:
|
| 23 |
- type: accuracy
|
| 24 |
-
value:
|
| 25 |
---
|
| 26 |
|
| 27 |
# David: Multi-Scale Crystal Classifier
|
|
@@ -37,12 +37,12 @@ as class prototypes with role-weighted similarity computation (Rose Loss).
|
|
| 37 |
- **Fusion Mode**: weighted_sum
|
| 38 |
- **Scales**: [256, 512]
|
| 39 |
- **Feature Dim**: 512
|
| 40 |
-
- **Parameters**:
|
| 41 |
|
| 42 |
### Training Configuration
|
| 43 |
- **Dataset**: AbstractPhil/imagenet-clip-features-orderly
|
| 44 |
- **Model Variant**: clip_vit_laion_b32
|
| 45 |
-
- **Epochs**:
|
| 46 |
- **Batch Size**: 1024
|
| 47 |
- **Learning Rate**: 0.001
|
| 48 |
- **Rose Loss Weight**: 0.1 β 0.5
|
|
@@ -51,36 +51,43 @@ as class prototypes with role-weighted similarity computation (Rose Loss).
|
|
| 51 |
## Performance
|
| 52 |
|
| 53 |
### Best Results
|
| 54 |
-
- **Validation Accuracy**:
|
| 55 |
-
- **Best Epoch**:
|
| 56 |
-
- **Final Train Accuracy**:
|
| 57 |
|
| 58 |
### Per-Scale Performance
|
| 59 |
-
- **Scale 256**:
|
| 60 |
-
- **Scale 512**:
|
| 61 |
|
| 62 |
|
| 63 |
## Usage
|
| 64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
### Repository Structure
|
| 66 |
|
| 67 |
```
|
| 68 |
AbstractPhil/gated-david/
|
|
|
|
|
|
|
|
|
|
| 69 |
βββ weights/
|
| 70 |
β βββ david_small_fast/
|
| 71 |
-
β βββ
|
| 72 |
-
β βββ
|
| 73 |
-
β βββ
|
|
|
|
|
|
|
| 74 |
β βββ final_model.safetensors
|
| 75 |
-
β βββ
|
| 76 |
β βββ david_config.json
|
| 77 |
β βββ train_config.json
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
βββ README.md
|
| 83 |
-
βββ best_model.json
|
| 84 |
```
|
| 85 |
|
| 86 |
### Loading the Model
|
|
@@ -89,9 +96,12 @@ AbstractPhil/gated-david/
|
|
| 89 |
from geovocab2.train.model.core.david import David, DavidArchitectureConfig
|
| 90 |
from huggingface_hub import hf_hub_download
|
| 91 |
|
|
|
|
|
|
|
| 92 |
# Specify model variant and run
|
| 93 |
model_name = "david_small_fast"
|
| 94 |
-
run_id = "
|
|
|
|
| 95 |
|
| 96 |
# Download config
|
| 97 |
config_path = hf_hub_download(
|
|
@@ -100,10 +110,16 @@ config_path = hf_hub_download(
|
|
| 100 |
)
|
| 101 |
config = DavidArchitectureConfig.from_json(config_path)
|
| 102 |
|
| 103 |
-
# Download weights
|
| 104 |
weights_path = hf_hub_download(
|
| 105 |
repo_id="AbstractPhil/gated-david",
|
| 106 |
-
filename=f"weights/{model_name}/{run_id}/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
)
|
| 108 |
|
| 109 |
# Load model
|
|
@@ -176,7 +192,7 @@ score = w_anchor * sim(z, anchor) + w_need * sim(z, need) + ...
|
|
| 176 |
author = {AbstractPhil},
|
| 177 |
year = {2025},
|
| 178 |
url = {https://huggingface.co/AbstractPhil/gated-david},
|
| 179 |
-
note = {Run ID:
|
| 180 |
}
|
| 181 |
```
|
| 182 |
|
|
@@ -191,4 +207,4 @@ Special thanks to Claude (Anthropic) for debugging assistance.
|
|
| 191 |
|
| 192 |
---
|
| 193 |
|
| 194 |
-
*Generated on 2025-10-12 13:
|
|
|
|
| 21 |
type: imagenet-1k
|
| 22 |
metrics:
|
| 23 |
- type: accuracy
|
| 24 |
+
value: 68.06
|
| 25 |
---
|
| 26 |
|
| 27 |
# David: Multi-Scale Crystal Classifier
|
|
|
|
| 37 |
- **Fusion Mode**: weighted_sum
|
| 38 |
- **Scales**: [256, 512]
|
| 39 |
- **Feature Dim**: 512
|
| 40 |
+
- **Parameters**: 656,898
|
| 41 |
|
| 42 |
### Training Configuration
|
| 43 |
- **Dataset**: AbstractPhil/imagenet-clip-features-orderly
|
| 44 |
- **Model Variant**: clip_vit_laion_b32
|
| 45 |
+
- **Epochs**: 10
|
| 46 |
- **Batch Size**: 1024
|
| 47 |
- **Learning Rate**: 0.001
|
| 48 |
- **Rose Loss Weight**: 0.1 β 0.5
|
|
|
|
| 51 |
## Performance
|
| 52 |
|
| 53 |
### Best Results
|
| 54 |
+
- **Validation Accuracy**: 68.06%
|
| 55 |
+
- **Best Epoch**: 0
|
| 56 |
+
- **Final Train Accuracy**: 63.40%
|
| 57 |
|
| 58 |
### Per-Scale Performance
|
| 59 |
+
- **Scale 256**: 66.92%
|
| 60 |
+
- **Scale 512**: 67.88%
|
| 61 |
|
| 62 |
|
| 63 |
## Usage
|
| 64 |
|
| 65 |
+
### Quick Model Lookup
|
| 66 |
+
|
| 67 |
+
**Check `MODELS_INDEX.json` in the repo root** - it lists all trained models sorted by accuracy with links to weights and configs.
|
| 68 |
+
|
| 69 |
### Repository Structure
|
| 70 |
|
| 71 |
```
|
| 72 |
AbstractPhil/gated-david/
|
| 73 |
+
βββ MODELS_INDEX.json # π Master index of all models (sorted by accuracy)
|
| 74 |
+
βββ README.md # This file
|
| 75 |
+
βββ best_model.json # Latest best model info
|
| 76 |
βββ weights/
|
| 77 |
β βββ david_small_fast/
|
| 78 |
+
β βββ 20251012_135249/
|
| 79 |
+
β βββ MODEL_SUMMARY.txt # π― Human-readable performance summary
|
| 80 |
+
β βββ training_history.json # π Epoch-by-epoch training curve
|
| 81 |
+
β βββ best_model_acc68.06.safetensors # β Accuracy in filename!
|
| 82 |
+
β βββ best_model_acc68.06_metadata.json
|
| 83 |
β βββ final_model.safetensors
|
| 84 |
+
β βββ checkpoint_epoch_X_accYY.YY.safetensors
|
| 85 |
β βββ david_config.json
|
| 86 |
β βββ train_config.json
|
| 87 |
+
βββ runs/
|
| 88 |
+
βββ david_small_fast/
|
| 89 |
+
βββ 20251012_135249/
|
| 90 |
+
βββ events.out.tfevents.* # TensorBoard logs
|
|
|
|
|
|
|
| 91 |
```
|
| 92 |
|
| 93 |
### Loading the Model
|
|
|
|
| 96 |
from geovocab2.train.model.core.david import David, DavidArchitectureConfig
|
| 97 |
from huggingface_hub import hf_hub_download
|
| 98 |
|
| 99 |
+
# Browse available models in MODELS_INDEX.json first!
|
| 100 |
+
|
| 101 |
# Specify model variant and run
|
| 102 |
model_name = "david_small_fast"
|
| 103 |
+
run_id = "20251012_135249"
|
| 104 |
+
accuracy = "68.06" # From MODELS_INDEX.json
|
| 105 |
|
| 106 |
# Download config
|
| 107 |
config_path = hf_hub_download(
|
|
|
|
| 110 |
)
|
| 111 |
config = DavidArchitectureConfig.from_json(config_path)
|
| 112 |
|
| 113 |
+
# Download weights (accuracy in filename!)
|
| 114 |
weights_path = hf_hub_download(
|
| 115 |
repo_id="AbstractPhil/gated-david",
|
| 116 |
+
filename=f"weights/{model_name}/{run_id}/best_model_acc{accuracy}.safetensors"
|
| 117 |
+
)
|
| 118 |
+
|
| 119 |
+
# Download training history (optional - see full training curve)
|
| 120 |
+
history_path = hf_hub_download(
|
| 121 |
+
repo_id="AbstractPhil/gated-david",
|
| 122 |
+
filename=f"weights/{model_name}/{run_id}/training_history.json"
|
| 123 |
)
|
| 124 |
|
| 125 |
# Load model
|
|
|
|
| 192 |
author = {AbstractPhil},
|
| 193 |
year = {2025},
|
| 194 |
url = {https://huggingface.co/AbstractPhil/gated-david},
|
| 195 |
+
note = {Run ID: 20251012_135249}
|
| 196 |
}
|
| 197 |
```
|
| 198 |
|
|
|
|
| 207 |
|
| 208 |
---
|
| 209 |
|
| 210 |
+
*Generated on 2025-10-12 13:54:34*
|