louislu9911 commited on
Commit
6833d41
1 Parent(s): b2735d5

Training in progress, epoch 0

Browse files
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "MoEModelForImageClassification"
4
+ ],
5
+ "auto_map": {
6
+ "AutoConfig": "configuration_moe.MoEConfig",
7
+ "AutoModelForImageClassification": "modeling_moe.MoEModelForImageClassification"
8
+ },
9
+ "baseline_model": "louislu9911/BaseModel-leaf-disease-convnextv2-base-22k-224-0_1_2_3_4",
10
+ "expert_class_mapping": {
11
+ "0": [
12
+ 0,
13
+ 4
14
+ ],
15
+ "1": [
16
+ 1,
17
+ 2,
18
+ 3
19
+ ]
20
+ },
21
+ "experts": [
22
+ "louislu9911/Expert1-leaf-disease-convnextv2-base-22k-224-0_4",
23
+ "louislu9911/Expert2-leaf-disease-convnextv2-base-22k-224-1_2_3"
24
+ ],
25
+ "model_type": "moe",
26
+ "num_classes": 5,
27
+ "switch_gate": "louislu9911/switch_gate-leaf-disease-convnextv2-base-22k-224",
28
+ "torch_dtype": "float32",
29
+ "transformers_version": "4.39.3"
30
+ }
configuration_moe.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import PretrainedConfig
2
+ from typing import Dict, List
3
+
4
+
5
+ MOE_MODEL_TYPE = "moe"
6
+ DEFAULT_HUGGINGFACE_ACCOUNT = "louislu9911"
7
+ model_checkpoint = "convnextv2-base-22k-224"
8
+
9
+ EXPERTS = [
10
+ f"{DEFAULT_HUGGINGFACE_ACCOUNT}/Expert1-leaf-disease-{model_checkpoint}-0_4",
11
+ f"{DEFAULT_HUGGINGFACE_ACCOUNT}/Expert2-leaf-disease-{model_checkpoint}-1_2_3",
12
+ ]
13
+ SWITCH_GATE = (
14
+ f"{DEFAULT_HUGGINGFACE_ACCOUNT}/switch_gate-leaf-disease-{model_checkpoint}"
15
+ )
16
+ BASELINE_MODEL = (
17
+ f"{DEFAULT_HUGGINGFACE_ACCOUNT}/BaseModel-leaf-disease-{model_checkpoint}-0_1_2_3_4"
18
+ )
19
+
20
+
21
+ class MoEConfig(PretrainedConfig):
22
+ model_type = MOE_MODEL_TYPE
23
+
24
+ def __init__(
25
+ self,
26
+ experts: List[str] = EXPERTS,
27
+ switch_gate: str = SWITCH_GATE,
28
+ baseline_model: str = BASELINE_MODEL,
29
+ num_classes: int = 5,
30
+ expert_class_mapping: Dict[int, List[int]] = None,
31
+ **kwargs,
32
+ ):
33
+ self.experts = experts
34
+ self.switch_gate = switch_gate
35
+ self.baseline_model = baseline_model
36
+ self.num_classes = num_classes
37
+ self.expert_class_mapping = expert_class_mapping
38
+ super().__init__(**kwargs)
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:345e36ea946911363cbccd406435e8096b6ebc14164b7343361aa85731750ae8
3
+ size 2022035716
preprocessor_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_valid_processor_keys": [
3
+ "images",
4
+ "do_resize",
5
+ "size",
6
+ "crop_pct",
7
+ "resample",
8
+ "do_rescale",
9
+ "rescale_factor",
10
+ "do_normalize",
11
+ "image_mean",
12
+ "image_std",
13
+ "return_tensors",
14
+ "data_format",
15
+ "input_data_format"
16
+ ],
17
+ "crop_pct": 0.875,
18
+ "do_normalize": true,
19
+ "do_rescale": true,
20
+ "do_resize": true,
21
+ "image_mean": [
22
+ 0.485,
23
+ 0.456,
24
+ 0.406
25
+ ],
26
+ "image_processor_type": "ConvNextImageProcessor",
27
+ "image_std": [
28
+ 0.229,
29
+ 0.224,
30
+ 0.225
31
+ ],
32
+ "resample": 3,
33
+ "rescale_factor": 0.00392156862745098,
34
+ "size": {
35
+ "shortest_edge": 224
36
+ }
37
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:caacb8b84ccfb8324214a5a984a2ab7cba2a3dd9141caa0bca618f3fc94aaa8c
3
+ size 4984