asdf98 commited on
Commit
f742b0a
·
verified ·
1 Parent(s): 88e5d09

Upload iris/configs.py

Browse files
Files changed (1) hide show
  1. iris/configs.py +18 -0
iris/configs.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """IRIS model configurations. Each config is tested and has known parameter count."""
2
+
3
+ CONFIGS = {
4
+ "iris-tiny": {"latent_channels": 32, "dim": 256, "patch_size": 4, "num_blocks": 6, "num_heads": 4, "max_iterations": 8, "ffn_expansion": 2, "params_M": 10.3, "tokens": 16, "description": "Ultra-mobile, 10M params, 16 tokens, trains on Colab free tier"},
5
+ "iris-small": {"latent_channels": 32, "dim": 512, "patch_size": 4, "num_blocks": 6, "num_heads": 8, "max_iterations": 8, "ffn_expansion": 2, "params_M": 40.0, "tokens": 16, "description": "Mobile, 40M params, 16 tokens, trains on 16GB GPU"},
6
+ "iris-base": {"latent_channels": 32, "dim": 512, "patch_size": 2, "num_blocks": 8, "num_heads": 8, "max_iterations": 8, "ffn_expansion": 2, "params_M": 53.4, "tokens": 64, "description": "Base quality, 53M params, 64 tokens, trains on 16GB GPU"},
7
+ "iris-medium": {"latent_channels": 32, "dim": 768, "patch_size": 2, "num_blocks": 12, "num_heads": 12, "max_iterations": 8, "ffn_expansion": 2, "params_M": 181.2, "tokens": 64, "description": "Full quality, 181M params, 64 tokens, needs 24GB GPU"},
8
+ "iris-large": {"latent_channels": 32, "dim": 1024, "patch_size": 2, "num_blocks": 16, "num_heads": 16, "max_iterations": 8, "ffn_expansion": 2, "params_M": 430.9, "tokens": 64, "description": "Maximum quality, 431M params, 64 tokens, needs 40GB+ GPU"},
9
+ }
10
+
11
+
12
+ def get_model_config(name: str) -> dict:
13
+ if name not in CONFIGS:
14
+ raise ValueError(f"Unknown config: {name}. Available: {list(CONFIGS.keys())}")
15
+ cfg = CONFIGS[name].copy()
16
+ for k in ["params_M", "tokens", "description"]:
17
+ cfg.pop(k, None)
18
+ return cfg