Instructions to use tanganke/convnext-base-224_food101_sgd_batch-size-64_lr-0.01_steps-4000 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tanganke/convnext-base-224_food101_sgd_batch-size-64_lr-0.01_steps-4000 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="tanganke/convnext-base-224_food101_sgd_batch-size-64_lr-0.01_steps-4000") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("tanganke/convnext-base-224_food101_sgd_batch-size-64_lr-0.01_steps-4000") model = AutoModelForImageClassification.from_pretrained("tanganke/convnext-base-224_food101_sgd_batch-size-64_lr-0.01_steps-4000", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- README.md +77 -0
- cli.log +26 -0
- config.json +248 -0
- config.yaml +58 -0
- events.out.tfevents.1767894281.pt-b7552130803b44b59bdfb04f6bb732f9-worker-0.98954.0 +3 -0
- hparams.yaml +1 -0
- hydra.yaml +208 -0
- model.safetensors +3 -0
- overrides.yaml +15 -0
- preprocessor_config.json +22 -0
- program_report.json +1 -0
README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model:
|
| 3 |
+
- facebook/convnext-base-224
|
| 4 |
+
library_name: transformers
|
| 5 |
+
tags:
|
| 6 |
+
- fusion-bench
|
| 7 |
+
- merge
|
| 8 |
+
---
|
| 9 |
+
# Deep Model Fusion
|
| 10 |
+
|
| 11 |
+
Fine-tuned ResNet model on dataset food101.
|
| 12 |
+
|
| 13 |
+
## Models Merged
|
| 14 |
+
|
| 15 |
+
This is a merged model created using [fusion-bench](https://github.com/tanganke/fusion_bench).
|
| 16 |
+
|
| 17 |
+
The following models were included in the merge:
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
- base model: facebook/convnext-base-224
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
## Configuration
|
| 24 |
+
|
| 25 |
+
The following YAML configuration was used to produce this model:
|
| 26 |
+
|
| 27 |
+
### Algorithm Configuration
|
| 28 |
+
|
| 29 |
+
```yaml
|
| 30 |
+
_recursive_: false
|
| 31 |
+
_target_: fusion_bench.method.classification.image_classification_finetune.ImageClassificationFineTuning
|
| 32 |
+
_usage_: null
|
| 33 |
+
_version_: 0.2.31.dev0
|
| 34 |
+
dataloader_kwargs:
|
| 35 |
+
batch_size: 64
|
| 36 |
+
num_workers: 8
|
| 37 |
+
pin_memory: true
|
| 38 |
+
label_smoothing: 0
|
| 39 |
+
lr_scheduler: null
|
| 40 |
+
max_epochs: -1
|
| 41 |
+
max_steps: 4000
|
| 42 |
+
optimizer:
|
| 43 |
+
_target_: torch.optim.SGD
|
| 44 |
+
lr: 0.01
|
| 45 |
+
momentum: 0.9
|
| 46 |
+
weight_decay: 0.0001
|
| 47 |
+
save_interval: 1000
|
| 48 |
+
save_on_train_epoch_end: false
|
| 49 |
+
save_top_k: -1
|
| 50 |
+
training_data_ratio: null
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
### Model Pool Configuration
|
| 54 |
+
|
| 55 |
+
```yaml
|
| 56 |
+
_recursive_: false
|
| 57 |
+
_target_: fusion_bench.modelpool.convnext_for_image_classification.ConvNextForImageClassificationPool
|
| 58 |
+
_usage_: null
|
| 59 |
+
_version_: 0.2.31.dev0
|
| 60 |
+
models:
|
| 61 |
+
_pretrained_:
|
| 62 |
+
config_path: facebook/convnext-base-224
|
| 63 |
+
dataset_name: food101
|
| 64 |
+
pretrained: true
|
| 65 |
+
test_datasets: null
|
| 66 |
+
train_datasets:
|
| 67 |
+
food101:
|
| 68 |
+
_target_: datasets.load_dataset
|
| 69 |
+
path: ethz/food101
|
| 70 |
+
split: train
|
| 71 |
+
val_datasets:
|
| 72 |
+
food101:
|
| 73 |
+
_target_: datasets.load_dataset
|
| 74 |
+
path: ethz/food101
|
| 75 |
+
split: validation
|
| 76 |
+
```
|
| 77 |
+
|
cli.log
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[2026-01-08 17:44:35,634][fusion_bench.programs.fusion_program][INFO] - Running the model fusion program.
|
| 2 |
+
[2026-01-08 17:44:35,637][fusion_bench.programs.fusion_program][INFO] - loading model pool
|
| 3 |
+
[2026-01-08 17:44:38,371][fusion_bench.programs.fusion_program][INFO] - loading method
|
| 4 |
+
[2026-01-08 17:44:38,436][fusion_bench.method.classification.image_classification_finetune][INFO] - Training interval: step
|
| 5 |
+
[2026-01-08 17:44:38,436][fusion_bench.method.classification.image_classification_finetune][INFO] - Max epochs: -1, max steps: 4000
|
| 6 |
+
[2026-01-08 17:44:38,437][fusion_bench.programs.fusion_program][INFO] - loading task pool
|
| 7 |
+
[2026-01-08 17:44:40,070][fusion_bench.method.classification.image_classification_finetune][INFO] - Number of classes for dataset food101: 101
|
| 8 |
+
[2026-01-08 17:44:40,085][datasets.load][WARNING] - Using the latest cached version of the dataset since ethz/food101 couldn't be found on the Hugging Face Hub (offline mode is enabled).
|
| 9 |
+
[2026-01-08 17:44:40,096][datasets.packaged_modules.cache.cache][WARNING] - Found the latest cached dataset configuration 'default' at /data/dataset/datasets/ethz___food101/default/0.0.0/e06acf2a88084f04bce4d4a525165d68e0a36c38 (last modified on Mon Jan 5 04:57:40 2026).
|
| 10 |
+
[2026-01-08 17:44:40,394][fusion_bench.method.classification.image_classification_finetune][INFO] - Training dataset size: 75750
|
| 11 |
+
[2026-01-08 17:44:40,426][datasets.load][WARNING] - Using the latest cached version of the dataset since ethz/food101 couldn't be found on the Hugging Face Hub (offline mode is enabled).
|
| 12 |
+
[2026-01-08 17:44:40,435][datasets.packaged_modules.cache.cache][WARNING] - Found the latest cached dataset configuration 'default' at /data/dataset/datasets/ethz___food101/default/0.0.0/e06acf2a88084f04bce4d4a525165d68e0a36c38 (last modified on Mon Jan 5 04:57:40 2026).
|
| 13 |
+
[2026-01-08 17:44:40,617][fusion_bench.method.classification.image_classification_finetune][INFO] - optimizer:
|
| 14 |
+
SGD (
|
| 15 |
+
Parameter Group 0
|
| 16 |
+
dampening: 0
|
| 17 |
+
differentiable: False
|
| 18 |
+
foreach: None
|
| 19 |
+
fused: None
|
| 20 |
+
lr: 0.01
|
| 21 |
+
maximize: False
|
| 22 |
+
momentum: 0.9
|
| 23 |
+
nesterov: False
|
| 24 |
+
weight_decay: 0.0001
|
| 25 |
+
)
|
| 26 |
+
[2026-01-08 18:08:24,319][fusion_bench.method.classification.image_classification_finetune][INFO] - Saving the final model to outputs/convnext-base-224/food101/batch_size=64,lr=0.01/raw_checkpoints/final
|
config.json
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ConvNextForImageClassification"
|
| 4 |
+
],
|
| 5 |
+
"depths": [
|
| 6 |
+
3,
|
| 7 |
+
3,
|
| 8 |
+
27,
|
| 9 |
+
3
|
| 10 |
+
],
|
| 11 |
+
"drop_path_rate": 0.0,
|
| 12 |
+
"dtype": "float32",
|
| 13 |
+
"hidden_act": "gelu",
|
| 14 |
+
"hidden_sizes": [
|
| 15 |
+
128,
|
| 16 |
+
256,
|
| 17 |
+
512,
|
| 18 |
+
1024
|
| 19 |
+
],
|
| 20 |
+
"id2label": {
|
| 21 |
+
"0": "apple pie",
|
| 22 |
+
"1": "baby back ribs",
|
| 23 |
+
"2": "baklava",
|
| 24 |
+
"3": "beef carpaccio",
|
| 25 |
+
"4": "beef tartare",
|
| 26 |
+
"5": "beet salad",
|
| 27 |
+
"6": "beignets",
|
| 28 |
+
"7": "bibimbap",
|
| 29 |
+
"8": "bread pudding",
|
| 30 |
+
"9": "breakfast burrito",
|
| 31 |
+
"10": "bruschetta",
|
| 32 |
+
"11": "caesar salad",
|
| 33 |
+
"12": "cannoli",
|
| 34 |
+
"13": "caprese salad",
|
| 35 |
+
"14": "carrot cake",
|
| 36 |
+
"15": "ceviche",
|
| 37 |
+
"16": "cheese plate",
|
| 38 |
+
"17": "cheesecake",
|
| 39 |
+
"18": "chicken curry",
|
| 40 |
+
"19": "chicken quesadilla",
|
| 41 |
+
"20": "chicken wings",
|
| 42 |
+
"21": "chocolate cake",
|
| 43 |
+
"22": "chocolate mousse",
|
| 44 |
+
"23": "churros",
|
| 45 |
+
"24": "clam chowder",
|
| 46 |
+
"25": "club sandwich",
|
| 47 |
+
"26": "crab cakes",
|
| 48 |
+
"27": "creme brulee",
|
| 49 |
+
"28": "croque madame",
|
| 50 |
+
"29": "cup cakes",
|
| 51 |
+
"30": "deviled eggs",
|
| 52 |
+
"31": "donuts",
|
| 53 |
+
"32": "dumplings",
|
| 54 |
+
"33": "edamame",
|
| 55 |
+
"34": "eggs benedict",
|
| 56 |
+
"35": "escargots",
|
| 57 |
+
"36": "falafel",
|
| 58 |
+
"37": "filet mignon",
|
| 59 |
+
"38": "fish and chips",
|
| 60 |
+
"39": "foie gras",
|
| 61 |
+
"40": "french fries",
|
| 62 |
+
"41": "french onion soup",
|
| 63 |
+
"42": "french toast",
|
| 64 |
+
"43": "fried calamari",
|
| 65 |
+
"44": "fried rice",
|
| 66 |
+
"45": "frozen yogurt",
|
| 67 |
+
"46": "garlic bread",
|
| 68 |
+
"47": "gnocchi",
|
| 69 |
+
"48": "greek salad",
|
| 70 |
+
"49": "grilled cheese sandwich",
|
| 71 |
+
"50": "grilled salmon",
|
| 72 |
+
"51": "guacamole",
|
| 73 |
+
"52": "gyoza",
|
| 74 |
+
"53": "hamburger",
|
| 75 |
+
"54": "hot and sour soup",
|
| 76 |
+
"55": "hot dog",
|
| 77 |
+
"56": "huevos rancheros",
|
| 78 |
+
"57": "hummus",
|
| 79 |
+
"58": "ice cream",
|
| 80 |
+
"59": "lasagna",
|
| 81 |
+
"60": "lobster bisque",
|
| 82 |
+
"61": "lobster roll sandwich",
|
| 83 |
+
"62": "macaroni and cheese",
|
| 84 |
+
"63": "macarons",
|
| 85 |
+
"64": "miso soup",
|
| 86 |
+
"65": "mussels",
|
| 87 |
+
"66": "nachos",
|
| 88 |
+
"67": "omelette",
|
| 89 |
+
"68": "onion rings",
|
| 90 |
+
"69": "oysters",
|
| 91 |
+
"70": "pad thai",
|
| 92 |
+
"71": "paella",
|
| 93 |
+
"72": "pancakes",
|
| 94 |
+
"73": "panna cotta",
|
| 95 |
+
"74": "peking duck",
|
| 96 |
+
"75": "pho",
|
| 97 |
+
"76": "pizza",
|
| 98 |
+
"77": "pork chop",
|
| 99 |
+
"78": "poutine",
|
| 100 |
+
"79": "prime rib",
|
| 101 |
+
"80": "pulled pork sandwich",
|
| 102 |
+
"81": "ramen",
|
| 103 |
+
"82": "ravioli",
|
| 104 |
+
"83": "red velvet cake",
|
| 105 |
+
"84": "risotto",
|
| 106 |
+
"85": "samosa",
|
| 107 |
+
"86": "sashimi",
|
| 108 |
+
"87": "scallops",
|
| 109 |
+
"88": "seaweed salad",
|
| 110 |
+
"89": "shrimp and grits",
|
| 111 |
+
"90": "spaghetti bolognese",
|
| 112 |
+
"91": "spaghetti carbonara",
|
| 113 |
+
"92": "spring rolls",
|
| 114 |
+
"93": "steak",
|
| 115 |
+
"94": "strawberry shortcake",
|
| 116 |
+
"95": "sushi",
|
| 117 |
+
"96": "tacos",
|
| 118 |
+
"97": "takoyaki",
|
| 119 |
+
"98": "tiramisu",
|
| 120 |
+
"99": "tuna tartare",
|
| 121 |
+
"100": "waffles"
|
| 122 |
+
},
|
| 123 |
+
"image_size": 224,
|
| 124 |
+
"initializer_range": 0.02,
|
| 125 |
+
"label2id": {
|
| 126 |
+
"apple pie": 0,
|
| 127 |
+
"baby back ribs": 1,
|
| 128 |
+
"baklava": 2,
|
| 129 |
+
"beef carpaccio": 3,
|
| 130 |
+
"beef tartare": 4,
|
| 131 |
+
"beet salad": 5,
|
| 132 |
+
"beignets": 6,
|
| 133 |
+
"bibimbap": 7,
|
| 134 |
+
"bread pudding": 8,
|
| 135 |
+
"breakfast burrito": 9,
|
| 136 |
+
"bruschetta": 10,
|
| 137 |
+
"caesar salad": 11,
|
| 138 |
+
"cannoli": 12,
|
| 139 |
+
"caprese salad": 13,
|
| 140 |
+
"carrot cake": 14,
|
| 141 |
+
"ceviche": 15,
|
| 142 |
+
"cheese plate": 16,
|
| 143 |
+
"cheesecake": 17,
|
| 144 |
+
"chicken curry": 18,
|
| 145 |
+
"chicken quesadilla": 19,
|
| 146 |
+
"chicken wings": 20,
|
| 147 |
+
"chocolate cake": 21,
|
| 148 |
+
"chocolate mousse": 22,
|
| 149 |
+
"churros": 23,
|
| 150 |
+
"clam chowder": 24,
|
| 151 |
+
"club sandwich": 25,
|
| 152 |
+
"crab cakes": 26,
|
| 153 |
+
"creme brulee": 27,
|
| 154 |
+
"croque madame": 28,
|
| 155 |
+
"cup cakes": 29,
|
| 156 |
+
"deviled eggs": 30,
|
| 157 |
+
"donuts": 31,
|
| 158 |
+
"dumplings": 32,
|
| 159 |
+
"edamame": 33,
|
| 160 |
+
"eggs benedict": 34,
|
| 161 |
+
"escargots": 35,
|
| 162 |
+
"falafel": 36,
|
| 163 |
+
"filet mignon": 37,
|
| 164 |
+
"fish and chips": 38,
|
| 165 |
+
"foie gras": 39,
|
| 166 |
+
"french fries": 40,
|
| 167 |
+
"french onion soup": 41,
|
| 168 |
+
"french toast": 42,
|
| 169 |
+
"fried calamari": 43,
|
| 170 |
+
"fried rice": 44,
|
| 171 |
+
"frozen yogurt": 45,
|
| 172 |
+
"garlic bread": 46,
|
| 173 |
+
"gnocchi": 47,
|
| 174 |
+
"greek salad": 48,
|
| 175 |
+
"grilled cheese sandwich": 49,
|
| 176 |
+
"grilled salmon": 50,
|
| 177 |
+
"guacamole": 51,
|
| 178 |
+
"gyoza": 52,
|
| 179 |
+
"hamburger": 53,
|
| 180 |
+
"hot and sour soup": 54,
|
| 181 |
+
"hot dog": 55,
|
| 182 |
+
"huevos rancheros": 56,
|
| 183 |
+
"hummus": 57,
|
| 184 |
+
"ice cream": 58,
|
| 185 |
+
"lasagna": 59,
|
| 186 |
+
"lobster bisque": 60,
|
| 187 |
+
"lobster roll sandwich": 61,
|
| 188 |
+
"macaroni and cheese": 62,
|
| 189 |
+
"macarons": 63,
|
| 190 |
+
"miso soup": 64,
|
| 191 |
+
"mussels": 65,
|
| 192 |
+
"nachos": 66,
|
| 193 |
+
"omelette": 67,
|
| 194 |
+
"onion rings": 68,
|
| 195 |
+
"oysters": 69,
|
| 196 |
+
"pad thai": 70,
|
| 197 |
+
"paella": 71,
|
| 198 |
+
"pancakes": 72,
|
| 199 |
+
"panna cotta": 73,
|
| 200 |
+
"peking duck": 74,
|
| 201 |
+
"pho": 75,
|
| 202 |
+
"pizza": 76,
|
| 203 |
+
"pork chop": 77,
|
| 204 |
+
"poutine": 78,
|
| 205 |
+
"prime rib": 79,
|
| 206 |
+
"pulled pork sandwich": 80,
|
| 207 |
+
"ramen": 81,
|
| 208 |
+
"ravioli": 82,
|
| 209 |
+
"red velvet cake": 83,
|
| 210 |
+
"risotto": 84,
|
| 211 |
+
"samosa": 85,
|
| 212 |
+
"sashimi": 86,
|
| 213 |
+
"scallops": 87,
|
| 214 |
+
"seaweed salad": 88,
|
| 215 |
+
"shrimp and grits": 89,
|
| 216 |
+
"spaghetti bolognese": 90,
|
| 217 |
+
"spaghetti carbonara": 91,
|
| 218 |
+
"spring rolls": 92,
|
| 219 |
+
"steak": 93,
|
| 220 |
+
"strawberry shortcake": 94,
|
| 221 |
+
"sushi": 95,
|
| 222 |
+
"tacos": 96,
|
| 223 |
+
"takoyaki": 97,
|
| 224 |
+
"tiramisu": 98,
|
| 225 |
+
"tuna tartare": 99,
|
| 226 |
+
"waffles": 100
|
| 227 |
+
},
|
| 228 |
+
"layer_norm_eps": 1e-12,
|
| 229 |
+
"layer_scale_init_value": 1e-06,
|
| 230 |
+
"model_type": "convnext",
|
| 231 |
+
"num_channels": 3,
|
| 232 |
+
"num_stages": 4,
|
| 233 |
+
"out_features": [
|
| 234 |
+
"stage4"
|
| 235 |
+
],
|
| 236 |
+
"out_indices": [
|
| 237 |
+
4
|
| 238 |
+
],
|
| 239 |
+
"patch_size": 4,
|
| 240 |
+
"stage_names": [
|
| 241 |
+
"stem",
|
| 242 |
+
"stage1",
|
| 243 |
+
"stage2",
|
| 244 |
+
"stage3",
|
| 245 |
+
"stage4"
|
| 246 |
+
],
|
| 247 |
+
"transformers_version": "4.57.3"
|
| 248 |
+
}
|
config.yaml
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
path:
|
| 2 |
+
root_dir: ${oc.env:FUSION_BENCH_PROJECT_ROOT,"."}
|
| 3 |
+
output_dir: ${.root_dir}/outputs
|
| 4 |
+
data_dir: ${oc.env:FUSION_BENCH_DATA_DIR,${.root_dir}/data}
|
| 5 |
+
cache_dir: ${oc.env:FUSION_BENCH_CACHE_DIR,${.output_dir}/cache}
|
| 6 |
+
log_dir: outputs/convnext-base-224/food101/batch_size=64,lr=0.01
|
| 7 |
+
work_dir: ${hydra:runtime.cwd}
|
| 8 |
+
modelpool:
|
| 9 |
+
_target_: fusion_bench.modelpool.ConvNextForImageClassificationPool
|
| 10 |
+
_recursive_: false
|
| 11 |
+
models:
|
| 12 |
+
_pretrained_:
|
| 13 |
+
config_path: facebook/convnext-base-224
|
| 14 |
+
pretrained: true
|
| 15 |
+
dataset_name: food101
|
| 16 |
+
train_datasets:
|
| 17 |
+
food101:
|
| 18 |
+
_target_: datasets.load_dataset
|
| 19 |
+
path: ethz/food101
|
| 20 |
+
split: train
|
| 21 |
+
val_datasets:
|
| 22 |
+
food101:
|
| 23 |
+
_target_: datasets.load_dataset
|
| 24 |
+
path: ethz/food101
|
| 25 |
+
split: validation
|
| 26 |
+
test_datasets: null
|
| 27 |
+
method:
|
| 28 |
+
_target_: fusion_bench.method.classification.ImageClassificationFineTuning
|
| 29 |
+
max_epochs: -1
|
| 30 |
+
max_steps: 4000
|
| 31 |
+
save_top_k: -1
|
| 32 |
+
save_interval: 1000
|
| 33 |
+
save_on_train_epoch_end: false
|
| 34 |
+
training_data_ratio: null
|
| 35 |
+
label_smoothing: 0
|
| 36 |
+
optimizer:
|
| 37 |
+
_target_: torch.optim.SGD
|
| 38 |
+
lr: 0.01
|
| 39 |
+
momentum: 0.9
|
| 40 |
+
weight_decay: 0.0001
|
| 41 |
+
lr_scheduler: null
|
| 42 |
+
dataloader_kwargs:
|
| 43 |
+
batch_size: 64
|
| 44 |
+
num_workers: 8
|
| 45 |
+
pin_memory: true
|
| 46 |
+
taskpool:
|
| 47 |
+
_target_: fusion_bench.taskpool.DummyTaskPool
|
| 48 |
+
model_save_path: null
|
| 49 |
+
_target_: fusion_bench.programs.ModelFusionProgram
|
| 50 |
+
_recursive_: false
|
| 51 |
+
seed: 0
|
| 52 |
+
fast_dev_run: false
|
| 53 |
+
dry_run: false
|
| 54 |
+
print_config: true
|
| 55 |
+
print_function_call: true
|
| 56 |
+
merged_model_save_path: null
|
| 57 |
+
merged_model_save_kwargs: null
|
| 58 |
+
report_save_path: '{log_dir}/program_report.json'
|
events.out.tfevents.1767894281.pt-b7552130803b44b59bdfb04f6bb732f9-worker-0.98954.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
hydra:
|
| 2 |
+
run:
|
| 3 |
+
dir: ${path.log_dir}
|
| 4 |
+
sweep:
|
| 5 |
+
dir: ${oc.env:FUSION_BENCH_PROJECT_ROOT,"."}/outputs/multirun/${hydra.job.config_name}/${now:%Y-%m-%d_%H-%M-%S}
|
| 6 |
+
subdir: ${hydra.job.num}
|
| 7 |
+
launcher:
|
| 8 |
+
_target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
|
| 9 |
+
sweeper:
|
| 10 |
+
_target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
|
| 11 |
+
max_batch_size: null
|
| 12 |
+
params: null
|
| 13 |
+
help:
|
| 14 |
+
app_name: fusion_bench
|
| 15 |
+
header: == ${hydra.help.app_name} ==
|
| 16 |
+
footer: 'Powered by Hydra (https://hydra.cc)
|
| 17 |
+
|
| 18 |
+
Use --hydra-help to view Hydra specific help'
|
| 19 |
+
template: '${hydra.help.header}
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
fusion_bench is the command line interface for running model fusion benchmarks
|
| 23 |
+
in the FusionBench project.
|
| 24 |
+
|
| 25 |
+
It provides a flexible way to configure and execute various fusion algorithms
|
| 26 |
+
on different model pools and evaluate them across multiple tasks.
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
== Configuration groups ==
|
| 30 |
+
|
| 31 |
+
Compose your configuration from these groups (method, modelpool, taskpool are
|
| 32 |
+
the most important):
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
$APP_CONFIG_GROUPS
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
== Config ==
|
| 39 |
+
|
| 40 |
+
You can override options, for example:
|
| 41 |
+
|
| 42 |
+
fusion_bench method=task_arithmetic modelpool=clip-vit-base-patch32_svhn_and_mnist
|
| 43 |
+
taskpool=clip-vit-base-patch32_svhn_and_mnist
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
== Basic usage ==
|
| 47 |
+
|
| 48 |
+
fusion_bench [--config-path CONFIG_PATH] [--config-name CONFIG_NAME] OPTION_1=VALUE_1
|
| 49 |
+
OPTION_2=VALUE_2 ...
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
== Key options ==
|
| 53 |
+
|
| 54 |
+
--help, -h : Print this help message and exit
|
| 55 |
+
|
| 56 |
+
--hydra-help : Hydra''s help
|
| 57 |
+
|
| 58 |
+
--cfg, -c : Show config instead of running [job|hydra|all]
|
| 59 |
+
|
| 60 |
+
--config-path, -cp : Overrides the config_path
|
| 61 |
+
|
| 62 |
+
--config-name, -cn : Overrides the config_name
|
| 63 |
+
|
| 64 |
+
--shell-completion, -sc : Install or Uninstall shell completion
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
For more detailed information on options and usage, please refer to the online
|
| 68 |
+
documentation:
|
| 69 |
+
|
| 70 |
+
https://tanganke.github.io/fusion_bench/cli/fusion_bench/
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
${hydra.help.footer}'
|
| 74 |
+
hydra_help:
|
| 75 |
+
template: 'Hydra (${hydra.runtime.version})
|
| 76 |
+
|
| 77 |
+
See https://hydra.cc for more info.
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
== Flags ==
|
| 81 |
+
|
| 82 |
+
$FLAGS_HELP
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
== Configuration groups ==
|
| 86 |
+
|
| 87 |
+
Compose your configuration from those groups (For example, append hydra/job_logging=disabled
|
| 88 |
+
to command line)
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
$HYDRA_CONFIG_GROUPS
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
Use ''--cfg hydra'' to Show the Hydra config.
|
| 95 |
+
|
| 96 |
+
'
|
| 97 |
+
hydra_help: ???
|
| 98 |
+
hydra_logging:
|
| 99 |
+
version: 1
|
| 100 |
+
formatters:
|
| 101 |
+
simple:
|
| 102 |
+
format: '[%(asctime)s][HYDRA] %(message)s'
|
| 103 |
+
handlers:
|
| 104 |
+
console:
|
| 105 |
+
class: logging.StreamHandler
|
| 106 |
+
formatter: simple
|
| 107 |
+
stream: ext://sys.stdout
|
| 108 |
+
root:
|
| 109 |
+
level: INFO
|
| 110 |
+
handlers:
|
| 111 |
+
- console
|
| 112 |
+
loggers:
|
| 113 |
+
logging_example:
|
| 114 |
+
level: DEBUG
|
| 115 |
+
disable_existing_loggers: false
|
| 116 |
+
job_logging:
|
| 117 |
+
version: 1
|
| 118 |
+
formatters:
|
| 119 |
+
simple:
|
| 120 |
+
format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
|
| 121 |
+
rich_handler:
|
| 122 |
+
format: '%(message)s'
|
| 123 |
+
handlers:
|
| 124 |
+
console:
|
| 125 |
+
class: rich.logging.RichHandler
|
| 126 |
+
formatter: rich_handler
|
| 127 |
+
file:
|
| 128 |
+
class: logging.FileHandler
|
| 129 |
+
formatter: simple
|
| 130 |
+
filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
|
| 131 |
+
root:
|
| 132 |
+
level: INFO
|
| 133 |
+
handlers:
|
| 134 |
+
- console
|
| 135 |
+
- file
|
| 136 |
+
disable_existing_loggers: false
|
| 137 |
+
env: {}
|
| 138 |
+
mode: RUN
|
| 139 |
+
searchpath: []
|
| 140 |
+
callbacks: {}
|
| 141 |
+
output_subdir: ''
|
| 142 |
+
overrides:
|
| 143 |
+
hydra:
|
| 144 |
+
- hydra.mode=RUN
|
| 145 |
+
task:
|
| 146 |
+
- path.log_dir="outputs/convnext-base-224/food101/batch_size=64,lr=0.01"
|
| 147 |
+
- seed=0
|
| 148 |
+
- method=classification/image_classification_finetune
|
| 149 |
+
- method.max_epochs=-1
|
| 150 |
+
- method.max_steps=4000
|
| 151 |
+
- method.save_top_k=-1
|
| 152 |
+
- method.save_interval=1000
|
| 153 |
+
- method.save_on_train_epoch_end=false
|
| 154 |
+
- method.optimizer.lr=0.01
|
| 155 |
+
- method.lr_scheduler=null
|
| 156 |
+
- method.dataloader_kwargs.batch_size=64
|
| 157 |
+
- modelpool=ConvNextForImageClassification/convnext-base-224
|
| 158 |
+
- modelpool.models._pretrained_.dataset_name=food101
|
| 159 |
+
- +dataset/image_classification/train@modelpool.train_datasets=food101
|
| 160 |
+
- +dataset/image_classification/test@modelpool.val_datasets=food101
|
| 161 |
+
job:
|
| 162 |
+
name: cli
|
| 163 |
+
chdir: null
|
| 164 |
+
override_dirname: +dataset/image_classification/test@modelpool.val_datasets=food101,+dataset/image_classification/train@modelpool.train_datasets=food101,method.dataloader_kwargs.batch_size=64,method.lr_scheduler=null,method.max_epochs=-1,method.max_steps=4000,method.optimizer.lr=0.01,method.save_interval=1000,method.save_on_train_epoch_end=false,method.save_top_k=-1,method=classification/image_classification_finetune,modelpool.models._pretrained_.dataset_name=food101,modelpool=ConvNextForImageClassification/convnext-base-224,path.log_dir="outputs/convnext-base-224/food101/batch_size=64,lr=0.01",seed=0
|
| 165 |
+
id: ???
|
| 166 |
+
num: ???
|
| 167 |
+
config_name: model_fusion
|
| 168 |
+
env_set:
|
| 169 |
+
HYDRA_FULL_ERROR: ${oc.env:HYDRA_FULL_ERROR,1}
|
| 170 |
+
env_copy: []
|
| 171 |
+
config:
|
| 172 |
+
override_dirname:
|
| 173 |
+
kv_sep: '='
|
| 174 |
+
item_sep: ','
|
| 175 |
+
exclude_keys: []
|
| 176 |
+
runtime:
|
| 177 |
+
version: 1.3.2
|
| 178 |
+
version_base: '1.3'
|
| 179 |
+
cwd: /data/users/anke/fusion_bench
|
| 180 |
+
config_sources:
|
| 181 |
+
- path: hydra.conf
|
| 182 |
+
schema: pkg
|
| 183 |
+
provider: hydra
|
| 184 |
+
- path: /data/users/anke/fusion_bench/config
|
| 185 |
+
schema: file
|
| 186 |
+
provider: main
|
| 187 |
+
- path: ''
|
| 188 |
+
schema: structured
|
| 189 |
+
provider: schema
|
| 190 |
+
output_dir: /data/users/anke/fusion_bench/outputs/convnext-base-224/food101/batch_size=64,lr=0.01
|
| 191 |
+
choices:
|
| 192 |
+
dataset/image_classification/test@modelpool.val_datasets: food101
|
| 193 |
+
dataset/image_classification/train@modelpool.train_datasets: food101
|
| 194 |
+
taskpool: dummy
|
| 195 |
+
method: classification/image_classification_finetune
|
| 196 |
+
modelpool: ConvNextForImageClassification/convnext-base-224
|
| 197 |
+
path: default
|
| 198 |
+
hydra: default
|
| 199 |
+
hydra/env: default
|
| 200 |
+
hydra/callbacks: null
|
| 201 |
+
hydra/job_logging: rich_logging
|
| 202 |
+
hydra/hydra_logging: default
|
| 203 |
+
hydra/hydra_help: default
|
| 204 |
+
hydra/help: fusion_bench_help
|
| 205 |
+
hydra/sweeper: basic
|
| 206 |
+
hydra/launcher: basic
|
| 207 |
+
hydra/output: default
|
| 208 |
+
verbose: false
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a5f6e8a076020d28ff0f5ce2f3fc689866414c03f674b1742ae0adea5e24b5e
|
| 3 |
+
size 350721164
|
overrides.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- path.log_dir="outputs/convnext-base-224/food101/batch_size=64,lr=0.01"
|
| 2 |
+
- seed=0
|
| 3 |
+
- method=classification/image_classification_finetune
|
| 4 |
+
- method.max_epochs=-1
|
| 5 |
+
- method.max_steps=4000
|
| 6 |
+
- method.save_top_k=-1
|
| 7 |
+
- method.save_interval=1000
|
| 8 |
+
- method.save_on_train_epoch_end=false
|
| 9 |
+
- method.optimizer.lr=0.01
|
| 10 |
+
- method.lr_scheduler=null
|
| 11 |
+
- method.dataloader_kwargs.batch_size=64
|
| 12 |
+
- modelpool=ConvNextForImageClassification/convnext-base-224
|
| 13 |
+
- modelpool.models._pretrained_.dataset_name=food101
|
| 14 |
+
- +dataset/image_classification/train@modelpool.train_datasets=food101
|
| 15 |
+
- +dataset/image_classification/test@modelpool.val_datasets=food101
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_pct": 0.875,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_rescale": true,
|
| 5 |
+
"do_resize": true,
|
| 6 |
+
"image_mean": [
|
| 7 |
+
0.485,
|
| 8 |
+
0.456,
|
| 9 |
+
0.406
|
| 10 |
+
],
|
| 11 |
+
"image_processor_type": "ConvNextImageProcessor",
|
| 12 |
+
"image_std": [
|
| 13 |
+
0.229,
|
| 14 |
+
0.224,
|
| 15 |
+
0.225
|
| 16 |
+
],
|
| 17 |
+
"resample": 3,
|
| 18 |
+
"rescale_factor": 0.00392156862745098,
|
| 19 |
+
"size": {
|
| 20 |
+
"shortest_edge": 224
|
| 21 |
+
}
|
| 22 |
+
}
|
program_report.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"model_info": {"trainable_params": 87669989, "all_params": 87669989, "trainable_percentage": 1.0}}
|