Add files using upload-large-folder tool
Browse files- LTA_openwebtext_dualt/logs/build_owt_gpt2_len1024_train_minus_100k_cache_fast.log +82 -0
- LTA_openwebtext_dualt/logs/cmp_owt100k_dirichlet_wrongfix_ddit_6x384_len256_gbs256_steps10000_parallel.log +216 -0
- LTA_openwebtext_dualt/logs/genppl_lm1b_latest_dirichlet_sweep.log +312 -0
- LTA_openwebtext_dualt/logs/lm1b_dirichlet_len1024_Cv_to_2v_gumbel_sde_watch/infer_lta_lm1b_dirichlet_len1024_Cv_to_2v_gbs512_4gpu_20k_save1k_gumbelwatch_20260524_step_0007000.log +132 -0
- LTA_openwebtext_dualt/logs/lm1b_dirichlet_len1024_Cv_to_2v_gumbel_sde_watch/processed_lta_lm1b_dirichlet_len1024_Cv_to_2v_gbs512_8gpu_20k_save1k_gumbelwatch_20260524_steps128_c30522_61044_gumbel_t1p45_n128.txt +0 -0
- LTA_openwebtext_dualt/logs/lta_lm1b_classic_len128_lognormalatoms_4gpu_driver.log +0 -0
- LTA_openwebtext_dualt/logs/rollin_focused_4gpu/20260517_1733focused.log +823 -0
- LTA_openwebtext_dualt/logs/rollin_focused_4gpu/current.nohup +2095 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/chmv2/configuration_chmv2.py +117 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/chmv2/image_processing_chmv2.py +405 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/chmv2/modeling_chmv2.py +434 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/clipseg/configuration_clipseg.py +262 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/clipseg/modular_clipseg.py +681 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/clipseg/processing_clipseg.py +88 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/ernie4_5_vl_moe/image_processing_pil_ernie4_5_vl_moe.py +245 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/sam3_tracker/__init__.py +29 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/sam3_tracker/configuration_sam3_tracker.py +164 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/sam3_tracker/modeling_sam3_tracker.py +1106 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/sam3_tracker/modular_sam3_tracker.py +233 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/logs/debug_langflowalg_learnedembed_single_gpu_20260530_213823.log +56 -0
LTA_openwebtext_dualt/logs/build_owt_gpt2_len1024_train_minus_100k_cache_fast.log
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[fast-cache] start data=/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext split=train_minus_100k max_len=1024 cache=/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len1024_train_minus_100k
|
| 2 |
+
[fast-cache] batch_records=8192 write_batch=8192 detokenizer=None
|
| 3 |
+
[fast-cache] records=100000 chunks=110531 tmp=0.41GB rate=561.6 rec/s dt=178.0s
|
| 4 |
+
[fast-cache] records=200000 chunks=221984 tmp=0.14GB rate=573.0 rec/s dt=171.0s
|
| 5 |
+
[fast-cache] records=300000 chunks=333067 tmp=0.47GB rate=577.8 rec/s dt=170.2s
|
| 6 |
+
[fast-cache] records=400000 chunks=444201 tmp=0.80GB rate=580.0 rec/s dt=170.4s
|
| 7 |
+
[fast-cache] records=500000 chunks=554143 tmp=1.14GB rate=574.2 rec/s dt=181.2s
|
| 8 |
+
[fast-cache] records=600000 chunks=664175 tmp=1.16GB rate=562.6 rec/s dt=195.7s
|
| 9 |
+
[fast-cache] records=700000 chunks=775113 tmp=1.16GB rate=566.4 rec/s dt=169.4s
|
| 10 |
+
[fast-cache] records=800000 chunks=884668 tmp=0.28GB rate=570.0 rec/s dt=167.8s
|
| 11 |
+
[fast-cache] records=900000 chunks=994931 tmp=0.62GB rate=572.0 rec/s dt=169.9s
|
| 12 |
+
[fast-cache] records=1000000 chunks=1105352 tmp=0.97GB rate=569.7 rec/s dt=181.8s
|
| 13 |
+
[fast-cache] records=1100000 chunks=1215581 tmp=1.17GB rate=571.6 rec/s dt=169.3s
|
| 14 |
+
[fast-cache] records=1200000 chunks=1326186 tmp=0.25GB rate=573.2 rec/s dt=169.0s
|
| 15 |
+
[fast-cache] records=1300000 chunks=1436243 tmp=0.58GB rate=575.1 rec/s dt=167.0s
|
| 16 |
+
[fast-cache] records=1400000 chunks=1546223 tmp=0.89GB rate=577.7 rec/s dt=162.6s
|
| 17 |
+
[fast-cache] records=1500000 chunks=1657123 tmp=1.17GB rate=575.6 rec/s dt=182.6s
|
| 18 |
+
[fast-cache] records=1600000 chunks=1767742 tmp=0.19GB rate=576.7 rec/s dt=168.6s
|
| 19 |
+
[fast-cache] records=1700000 chunks=1878959 tmp=0.52GB rate=577.6 rec/s dt=168.9s
|
| 20 |
+
[fast-cache] records=1800000 chunks=1988825 tmp=0.84GB rate=578.6 rec/s dt=167.8s
|
| 21 |
+
[fast-cache] records=1900000 chunks=2098555 tmp=1.16GB rate=579.4 rec/s dt=168.3s
|
| 22 |
+
[fast-cache] records=2000000 chunks=2208500 tmp=1.16GB rate=578.1 rec/s dt=180.0s
|
| 23 |
+
[fast-cache] records=2100000 chunks=2319549 tmp=1.16GB rate=578.8 rec/s dt=169.1s
|
| 24 |
+
[fast-cache] records=2200000 chunks=2430443 tmp=0.28GB rate=579.5 rec/s dt=168.2s
|
| 25 |
+
[fast-cache] records=2300000 chunks=2541342 tmp=0.61GB rate=580.0 rec/s dt=169.1s
|
| 26 |
+
[fast-cache] records=2400000 chunks=2652688 tmp=0.95GB rate=580.3 rec/s dt=170.0s
|
| 27 |
+
[fast-cache] records=2500000 chunks=2762560 tmp=1.17GB rate=579.1 rec/s dt=181.1s
|
| 28 |
+
[fast-cache] records=2600000 chunks=2873567 tmp=0.25GB rate=579.6 rec/s dt=169.0s
|
| 29 |
+
[fast-cache] records=2700000 chunks=2983083 tmp=0.58GB rate=580.2 rec/s dt=167.6s
|
| 30 |
+
[fast-cache] records=2800000 chunks=3093194 tmp=0.91GB rate=580.8 rec/s dt=167.5s
|
| 31 |
+
[fast-cache] records=2900000 chunks=3203699 tmp=1.17GB rate=579.7 rec/s dt=181.7s
|
| 32 |
+
[fast-cache] records=3000000 chunks=3313755 tmp=0.20GB rate=580.2 rec/s dt=167.9s
|
| 33 |
+
[fast-cache] records=3100000 chunks=3423161 tmp=0.53GB rate=580.9 rec/s dt=166.3s
|
| 34 |
+
[fast-cache] records=3200000 chunks=3533464 tmp=0.86GB rate=581.2 rec/s dt=168.6s
|
| 35 |
+
[fast-cache] records=3300000 chunks=3644326 tmp=1.17GB rate=581.6 rec/s dt=168.9s
|
| 36 |
+
[fast-cache] records=3400000 chunks=3754158 tmp=1.17GB rate=580.6 rec/s dt=181.3s
|
| 37 |
+
[fast-cache] records=3500000 chunks=3864926 tmp=1.17GB rate=581.0 rec/s dt=168.4s
|
| 38 |
+
[fast-cache] records=3600000 chunks=3975286 tmp=0.09GB rate=581.5 rec/s dt=167.1s
|
| 39 |
+
[fast-cache] records=3700000 chunks=4085755 tmp=0.42GB rate=581.9 rec/s dt=167.0s
|
| 40 |
+
[fast-cache] records=3800000 chunks=4195623 tmp=0.75GB rate=582.3 rec/s dt=167.8s
|
| 41 |
+
[fast-cache] records=3900000 chunks=4306405 tmp=1.11GB rate=581.4 rec/s dt=181.6s
|
| 42 |
+
[fast-cache] records=4000000 chunks=4416413 tmp=1.17GB rate=581.8 rec/s dt=167.8s
|
| 43 |
+
[fast-cache] records=4100000 chunks=4527089 tmp=1.17GB rate=582.2 rec/s dt=167.0s
|
| 44 |
+
[fast-cache] records=4200000 chunks=4638228 tmp=1.17GB rate=582.5 rec/s dt=167.5s
|
| 45 |
+
[fast-cache] records=4300000 chunks=4748237 tmp=1.17GB rate=582.9 rec/s dt=166.5s
|
| 46 |
+
[fast-cache] records=4400000 chunks=4859560 tmp=1.17GB rate=582.1 rec/s dt=182.8s
|
| 47 |
+
[fast-cache] records=4500000 chunks=4970270 tmp=1.17GB rate=582.4 rec/s dt=167.7s
|
| 48 |
+
[fast-cache] records=4600000 chunks=5080968 tmp=1.17GB rate=582.6 rec/s dt=168.6s
|
| 49 |
+
[fast-cache] records=4700000 chunks=5191426 tmp=1.17GB rate=582.8 rec/s dt=168.1s
|
| 50 |
+
[fast-cache] records=4800000 chunks=5301202 tmp=1.17GB rate=583.2 rec/s dt=167.0s
|
| 51 |
+
[fast-cache] records=4900000 chunks=5412403 tmp=1.17GB rate=582.4 rec/s dt=182.1s
|
| 52 |
+
[fast-cache] records=5000000 chunks=5522299 tmp=1.17GB rate=582.6 rec/s dt=168.6s
|
| 53 |
+
[fast-cache] records=5100000 chunks=5633519 tmp=1.17GB rate=582.8 rec/s dt=168.6s
|
| 54 |
+
[fast-cache] records=5200000 chunks=5744407 tmp=1.17GB rate=583.1 rec/s dt=168.1s
|
| 55 |
+
[fast-cache] records=5300000 chunks=5855652 tmp=1.17GB rate=583.4 rec/s dt=166.4s
|
| 56 |
+
[fast-cache] records=5400000 chunks=5965114 tmp=1.17GB rate=583.0 rec/s dt=177.4s
|
| 57 |
+
[fast-cache] records=5500000 chunks=6076031 tmp=1.17GB rate=583.3 rec/s dt=166.2s
|
| 58 |
+
[fast-cache] records=5600000 chunks=6186495 tmp=1.17GB rate=583.7 rec/s dt=166.3s
|
| 59 |
+
[fast-cache] records=5700000 chunks=6297525 tmp=1.17GB rate=583.9 rec/s dt=167.2s
|
| 60 |
+
[fast-cache] records=5800000 chunks=6407324 tmp=1.17GB rate=583.4 rec/s dt=179.1s
|
| 61 |
+
[fast-cache] records=5900000 chunks=6518060 tmp=1.17GB rate=583.8 rec/s dt=165.2s
|
| 62 |
+
[fast-cache] records=6000000 chunks=6628110 tmp=1.17GB rate=584.1 rec/s dt=166.2s
|
| 63 |
+
[fast-cache] records=6100000 chunks=6738088 tmp=1.17GB rate=584.4 rec/s dt=165.8s
|
| 64 |
+
[fast-cache] records=6200000 chunks=6848287 tmp=1.17GB rate=584.7 rec/s dt=165.8s
|
| 65 |
+
[fast-cache] records=6300000 chunks=6958445 tmp=1.17GB rate=584.2 rec/s dt=180.2s
|
| 66 |
+
[fast-cache] records=6400000 chunks=7068420 tmp=1.17GB rate=584.5 rec/s dt=165.8s
|
| 67 |
+
[fast-cache] records=6500000 chunks=7179301 tmp=1.17GB rate=584.6 rec/s dt=168.4s
|
| 68 |
+
[fast-cache] records=6600000 chunks=7288969 tmp=1.17GB rate=584.9 rec/s dt=165.7s
|
| 69 |
+
[fast-cache] records=6700000 chunks=7398234 tmp=1.17GB rate=585.2 rec/s dt=165.7s
|
| 70 |
+
[fast-cache] records=6800000 chunks=7508294 tmp=1.17GB rate=584.8 rec/s dt=179.0s
|
| 71 |
+
[fast-cache] records=6900000 chunks=7618742 tmp=1.17GB rate=584.9 rec/s dt=167.6s
|
| 72 |
+
[fast-cache] records=7000000 chunks=7728620 tmp=1.17GB rate=585.1 rec/s dt=166.9s
|
| 73 |
+
[fast-cache] records=7100000 chunks=7838485 tmp=1.17GB rate=585.4 rec/s dt=165.6s
|
| 74 |
+
[fast-cache] records=7200000 chunks=7948428 tmp=1.17GB rate=585.6 rec/s dt=167.0s
|
| 75 |
+
[fast-cache] records=7300000 chunks=8058799 tmp=1.17GB rate=585.2 rec/s dt=179.4s
|
| 76 |
+
[fast-cache] records=7400000 chunks=8168253 tmp=1.17GB rate=585.4 rec/s dt=166.5s
|
| 77 |
+
[fast-cache] records=7500000 chunks=8278051 tmp=1.17GB rate=585.6 rec/s dt=166.3s
|
| 78 |
+
[fast-cache] records=7600000 chunks=8388185 tmp=1.17GB rate=585.7 rec/s dt=167.5s
|
| 79 |
+
[fast-cache] records=7700000 chunks=8499029 tmp=1.17GB rate=585.8 rec/s dt=168.7s
|
| 80 |
+
[fast-cache] records=7800000 chunks=8609940 tmp=1.17GB rate=585.4 rec/s dt=181.1s
|
| 81 |
+
[fast-cache] records=7900000 chunks=8719806 tmp=1.17GB rate=585.6 rec/s dt=166.0s
|
| 82 |
+
[fast-cache] done records=7913769 chunks=8734897 elapsed=13506.9s size=1.17GB
|
LTA_openwebtext_dualt/logs/cmp_owt100k_dirichlet_wrongfix_ddit_6x384_len256_gbs256_steps10000_parallel.log
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"device": "cuda",
|
| 3 |
+
"samples": "wrapped_streaming",
|
| 4 |
+
"vocab_size": 50257,
|
| 5 |
+
"save_dir": "runs/cmp_owt100k_dirichlet_wrongfix_ddit_6x384_len256_gbs256_steps10000_parallel",
|
| 6 |
+
"batch_size": 16,
|
| 7 |
+
"grad_accum": 16,
|
| 8 |
+
"effective_batch_size": 256,
|
| 9 |
+
"global_batch_size": 256,
|
| 10 |
+
"lr_schedule": "constant_warmup",
|
| 11 |
+
"warmup_steps": 500,
|
| 12 |
+
"model_type": "ddit",
|
| 13 |
+
"state_format": "prob",
|
| 14 |
+
"wrap": true,
|
| 15 |
+
"num_workers": 0
|
| 16 |
+
}
|
| 17 |
+
step=50 micro_steps=800 elapsed=134.1s lr=3.060000e-05 loss_all=10.7668 acc_all=0.4461 loss_corrupt=10.7770 acc_corrupt=0.1881 corrupt_frac=0.5511 loss=10.7770 mean_t=0.5018 wrong_frac=0.6995 init_acc_corrupt=0.2278 init_gold_top10=0.2755 init_gold_top100=0.3117
|
| 18 |
+
step=100 micro_steps=1600 elapsed=105.5s lr=6.060000e-05 loss_all=9.9349 acc_all=0.0696 loss_corrupt=9.9394 acc_corrupt=0.0454 corrupt_frac=0.5497 loss=9.9394 mean_t=0.5014 wrong_frac=0.7002 init_acc_corrupt=0.2272 init_gold_top10=0.2754 init_gold_top100=0.3112
|
| 19 |
+
step=150 micro_steps=2400 elapsed=96.7s lr=9.060000e-05 loss_all=8.0411 acc_all=0.0373 loss_corrupt=8.0409 acc_corrupt=0.0371 corrupt_frac=0.5496 loss=8.0409 mean_t=0.4970 wrong_frac=0.7000 init_acc_corrupt=0.2264 init_gold_top10=0.2745 init_gold_top100=0.3117
|
| 20 |
+
step=200 micro_steps=3200 elapsed=105.6s lr=1.206000e-04 loss_all=7.5220 acc_all=0.0378 loss_corrupt=7.5876 acc_corrupt=0.0377 corrupt_frac=0.5551 loss=7.5876 mean_t=0.5036 wrong_frac=0.6998 init_acc_corrupt=0.2278 init_gold_top10=0.2758 init_gold_top100=0.3123
|
| 21 |
+
step=250 micro_steps=4000 elapsed=105.5s lr=1.506000e-04 loss_all=7.3699 acc_all=0.0383 loss_corrupt=7.5160 acc_corrupt=0.0378 corrupt_frac=0.5472 loss=7.5160 mean_t=0.4968 wrong_frac=0.6995 init_acc_corrupt=0.2265 init_gold_top10=0.2752 init_gold_top100=0.3124
|
| 22 |
+
step=300 micro_steps=4800 elapsed=105.3s lr=1.806000e-04 loss_all=7.2481 acc_all=0.0548 loss_corrupt=7.4411 acc_corrupt=0.0474 corrupt_frac=0.5513 loss=7.4411 mean_t=0.4996 wrong_frac=0.6999 init_acc_corrupt=0.2264 init_gold_top10=0.2741 init_gold_top100=0.3108
|
| 23 |
+
step=350 micro_steps=5600 elapsed=105.3s lr=2.106000e-04 loss_all=6.5422 acc_all=0.1604 loss_corrupt=6.9923 acc_corrupt=0.1073 corrupt_frac=0.5538 loss=6.9923 mean_t=0.4988 wrong_frac=0.7000 init_acc_corrupt=0.2265 init_gold_top10=0.2748 init_gold_top100=0.3114
|
| 24 |
+
step=400 micro_steps=6400 elapsed=105.5s lr=2.406000e-04 loss_all=5.7315 acc_all=0.2843 loss_corrupt=6.5090 acc_corrupt=0.1724 corrupt_frac=0.5480 loss=6.5090 mean_t=0.5017 wrong_frac=0.6997 init_acc_corrupt=0.2280 init_gold_top10=0.2758 init_gold_top100=0.3119
|
| 25 |
+
step=450 micro_steps=7200 elapsed=105.5s lr=2.706000e-04 loss_all=5.0510 acc_all=0.3733 loss_corrupt=6.1205 acc_corrupt=0.2183 corrupt_frac=0.5456 loss=6.1205 mean_t=0.4970 wrong_frac=0.6998 init_acc_corrupt=0.2260 init_gold_top10=0.2740 init_gold_top100=0.3110
|
| 26 |
+
step=500 micro_steps=8000 elapsed=105.3s lr=3.000000e-04 loss_all=4.4190 acc_all=0.4552 loss_corrupt=5.7779 acc_corrupt=0.2573 corrupt_frac=0.5551 loss=5.7779 mean_t=0.4987 wrong_frac=0.7003 init_acc_corrupt=0.2256 init_gold_top10=0.2747 init_gold_top100=0.3121
|
| 27 |
+
step=550 micro_steps=8800 elapsed=105.2s lr=3.000000e-04 loss_all=4.0293 acc_all=0.4992 loss_corrupt=5.5551 acc_corrupt=0.2792 corrupt_frac=0.5499 loss=5.5551 mean_t=0.4975 wrong_frac=0.7006 init_acc_corrupt=0.2256 init_gold_top10=0.2736 init_gold_top100=0.3103
|
| 28 |
+
step=600 micro_steps=9600 elapsed=105.2s lr=3.000000e-04 loss_all=3.7658 acc_all=0.5238 loss_corrupt=5.3635 acc_corrupt=0.2938 corrupt_frac=0.5479 loss=5.3635 mean_t=0.5009 wrong_frac=0.6998 init_acc_corrupt=0.2274 init_gold_top10=0.2757 init_gold_top100=0.3116
|
| 29 |
+
step=650 micro_steps=10400 elapsed=105.5s lr=3.000000e-04 loss_all=3.5808 acc_all=0.5396 loss_corrupt=5.2251 acc_corrupt=0.3033 corrupt_frac=0.5490 loss=5.2251 mean_t=0.5004 wrong_frac=0.6996 init_acc_corrupt=0.2287 init_gold_top10=0.2759 init_gold_top100=0.3117
|
| 30 |
+
step=700 micro_steps=11200 elapsed=104.4s lr=3.000000e-04 loss_all=3.4302 acc_all=0.5522 loss_corrupt=5.1098 acc_corrupt=0.3107 corrupt_frac=0.5498 loss=5.1098 mean_t=0.5028 wrong_frac=0.6998 init_acc_corrupt=0.2264 init_gold_top10=0.2756 init_gold_top100=0.3124
|
| 31 |
+
step=750 micro_steps=12000 elapsed=98.3s lr=3.000000e-04 loss_all=3.3181 acc_all=0.5611 loss_corrupt=5.0145 acc_corrupt=0.3168 corrupt_frac=0.5486 loss=5.0145 mean_t=0.4957 wrong_frac=0.6994 init_acc_corrupt=0.2256 init_gold_top10=0.2746 init_gold_top100=0.3126
|
| 32 |
+
step=800 micro_steps=12800 elapsed=105.4s lr=3.000000e-04 loss_all=3.2271 acc_all=0.5678 loss_corrupt=4.9277 acc_corrupt=0.3232 corrupt_frac=0.5518 loss=4.9277 mean_t=0.5007 wrong_frac=0.6994 init_acc_corrupt=0.2272 init_gold_top10=0.2748 init_gold_top100=0.3117
|
| 33 |
+
step=850 micro_steps=13600 elapsed=105.6s lr=3.000000e-04 loss_all=3.1430 acc_all=0.5748 loss_corrupt=4.8527 acc_corrupt=0.3284 corrupt_frac=0.5521 loss=4.8527 mean_t=0.4987 wrong_frac=0.6998 init_acc_corrupt=0.2261 init_gold_top10=0.2747 init_gold_top100=0.3119
|
| 34 |
+
step=900 micro_steps=14400 elapsed=106.1s lr=3.000000e-04 loss_all=3.0449 acc_all=0.5835 loss_corrupt=4.7593 acc_corrupt=0.3351 corrupt_frac=0.5495 loss=4.7593 mean_t=0.5035 wrong_frac=0.7004 init_acc_corrupt=0.2282 init_gold_top10=0.2758 init_gold_top100=0.3116
|
| 35 |
+
step=950 micro_steps=15200 elapsed=105.5s lr=3.000000e-04 loss_all=2.9813 acc_all=0.5878 loss_corrupt=4.7023 acc_corrupt=0.3375 corrupt_frac=0.5498 loss=4.7023 mean_t=0.4980 wrong_frac=0.6995 init_acc_corrupt=0.2257 init_gold_top10=0.2749 init_gold_top100=0.3120
|
| 36 |
+
step=1000 micro_steps=16000 elapsed=105.3s lr=3.000000e-04 loss_all=2.9095 acc_all=0.5938 loss_corrupt=4.6192 acc_corrupt=0.3444 corrupt_frac=0.5513 loss=4.6192 mean_t=0.5036 wrong_frac=0.6999 init_acc_corrupt=0.2281 init_gold_top10=0.2754 init_gold_top100=0.3108
|
| 37 |
+
step=1050 micro_steps=16800 elapsed=121.6s lr=3.000000e-04 loss_all=2.8622 acc_all=0.5968 loss_corrupt=4.5656 acc_corrupt=0.3470 corrupt_frac=0.5527 loss=4.5656 mean_t=0.4998 wrong_frac=0.7003 init_acc_corrupt=0.2263 init_gold_top10=0.2743 init_gold_top100=0.3113
|
| 38 |
+
step=1100 micro_steps=17600 elapsed=105.6s lr=3.000000e-04 loss_all=2.8087 acc_all=0.6021 loss_corrupt=4.5162 acc_corrupt=0.3513 corrupt_frac=0.5507 loss=4.5162 mean_t=0.4990 wrong_frac=0.7001 init_acc_corrupt=0.2272 init_gold_top10=0.2756 init_gold_top100=0.3118
|
| 39 |
+
step=1150 micro_steps=18400 elapsed=105.6s lr=3.000000e-04 loss_all=2.7695 acc_all=0.6050 loss_corrupt=4.4690 acc_corrupt=0.3540 corrupt_frac=0.5516 loss=4.4690 mean_t=0.5016 wrong_frac=0.6994 init_acc_corrupt=0.2277 init_gold_top10=0.2753 init_gold_top100=0.3121
|
| 40 |
+
step=1200 micro_steps=19200 elapsed=105.5s lr=3.000000e-04 loss_all=2.6982 acc_all=0.6121 loss_corrupt=4.4015 acc_corrupt=0.3594 corrupt_frac=0.5478 loss=4.4015 mean_t=0.5038 wrong_frac=0.7001 init_acc_corrupt=0.2284 init_gold_top10=0.2756 init_gold_top100=0.3115
|
| 41 |
+
step=1250 micro_steps=20000 elapsed=105.7s lr=3.000000e-04 loss_all=2.6762 acc_all=0.6137 loss_corrupt=4.3900 acc_corrupt=0.3595 corrupt_frac=0.5484 loss=4.3900 mean_t=0.4944 wrong_frac=0.7001 init_acc_corrupt=0.2255 init_gold_top10=0.2750 init_gold_top100=0.3123
|
| 42 |
+
step=1300 micro_steps=20800 elapsed=63.9s lr=3.000000e-04 loss_all=2.6480 acc_all=0.6150 loss_corrupt=4.3416 acc_corrupt=0.3625 corrupt_frac=0.5514 loss=4.3416 mean_t=0.4941 wrong_frac=0.6998 init_acc_corrupt=0.2252 init_gold_top10=0.2739 init_gold_top100=0.3114
|
| 43 |
+
step=1350 micro_steps=21600 elapsed=54.5s lr=3.000000e-04 loss_all=2.6112 acc_all=0.6185 loss_corrupt=4.2952 acc_corrupt=0.3662 corrupt_frac=0.5515 loss=4.2952 mean_t=0.4995 wrong_frac=0.7003 init_acc_corrupt=0.2258 init_gold_top10=0.2736 init_gold_top100=0.3105
|
| 44 |
+
step=1400 micro_steps=22400 elapsed=54.4s lr=3.000000e-04 loss_all=2.5706 acc_all=0.6222 loss_corrupt=4.2506 acc_corrupt=0.3693 corrupt_frac=0.5501 loss=4.2506 mean_t=0.4997 wrong_frac=0.7008 init_acc_corrupt=0.2263 init_gold_top10=0.2741 init_gold_top100=0.3111
|
| 45 |
+
step=1450 micro_steps=23200 elapsed=54.6s lr=3.000000e-04 loss_all=2.5276 acc_all=0.6266 loss_corrupt=4.1992 acc_corrupt=0.3740 corrupt_frac=0.5494 loss=4.1992 mean_t=0.5023 wrong_frac=0.6996 init_acc_corrupt=0.2276 init_gold_top10=0.2756 init_gold_top100=0.3122
|
| 46 |
+
step=1500 micro_steps=24000 elapsed=54.5s lr=3.000000e-04 loss_all=2.5249 acc_all=0.6263 loss_corrupt=4.1886 acc_corrupt=0.3746 corrupt_frac=0.5514 loss=4.1886 mean_t=0.5000 wrong_frac=0.6998 init_acc_corrupt=0.2260 init_gold_top10=0.2746 init_gold_top100=0.3121
|
| 47 |
+
step=1550 micro_steps=24800 elapsed=54.4s lr=3.000000e-04 loss_all=2.4652 acc_all=0.6327 loss_corrupt=4.1304 acc_corrupt=0.3791 corrupt_frac=0.5470 loss=4.1304 mean_t=0.5033 wrong_frac=0.7003 init_acc_corrupt=0.2276 init_gold_top10=0.2749 init_gold_top100=0.3108
|
| 48 |
+
step=1600 micro_steps=25600 elapsed=54.5s lr=3.000000e-04 loss_all=2.4779 acc_all=0.6298 loss_corrupt=4.1169 acc_corrupt=0.3796 corrupt_frac=0.5528 loss=4.1169 mean_t=0.4998 wrong_frac=0.6993 init_acc_corrupt=0.2268 init_gold_top10=0.2753 init_gold_top100=0.3118
|
| 49 |
+
step=1650 micro_steps=26400 elapsed=54.3s lr=3.000000e-04 loss_all=2.4167 acc_all=0.6368 loss_corrupt=4.0626 acc_corrupt=0.3843 corrupt_frac=0.5483 loss=4.0626 mean_t=0.4984 wrong_frac=0.6996 init_acc_corrupt=0.2269 init_gold_top10=0.2749 init_gold_top100=0.3113
|
| 50 |
+
step=1700 micro_steps=27200 elapsed=54.7s lr=3.000000e-04 loss_all=2.4076 acc_all=0.6371 loss_corrupt=4.0415 acc_corrupt=0.3859 corrupt_frac=0.5506 loss=4.0415 mean_t=0.5023 wrong_frac=0.6999 init_acc_corrupt=0.2283 init_gold_top10=0.2748 init_gold_top100=0.3112
|
| 51 |
+
step=1750 micro_steps=28000 elapsed=54.7s lr=3.000000e-04 loss_all=2.3943 acc_all=0.6380 loss_corrupt=4.0269 acc_corrupt=0.3861 corrupt_frac=0.5506 loss=4.0269 mean_t=0.4983 wrong_frac=0.7001 init_acc_corrupt=0.2255 init_gold_top10=0.2742 init_gold_top100=0.3113
|
| 52 |
+
step=1800 micro_steps=28800 elapsed=55.0s lr=3.000000e-04 loss_all=2.3673 acc_all=0.6404 loss_corrupt=3.9861 acc_corrupt=0.3894 corrupt_frac=0.5508 loss=3.9861 mean_t=0.4983 wrong_frac=0.7003 init_acc_corrupt=0.2263 init_gold_top10=0.2738 init_gold_top100=0.3112
|
| 53 |
+
step=1850 micro_steps=29600 elapsed=54.5s lr=3.000000e-04 loss_all=2.3550 acc_all=0.6412 loss_corrupt=3.9643 acc_corrupt=0.3911 corrupt_frac=0.5527 loss=3.9643 mean_t=0.5022 wrong_frac=0.7001 init_acc_corrupt=0.2268 init_gold_top10=0.2749 init_gold_top100=0.3113
|
| 54 |
+
step=1900 micro_steps=30400 elapsed=54.4s lr=3.000000e-04 loss_all=2.3276 acc_all=0.6436 loss_corrupt=3.9319 acc_corrupt=0.3931 corrupt_frac=0.5513 loss=3.9319 mean_t=0.5002 wrong_frac=0.7001 init_acc_corrupt=0.2263 init_gold_top10=0.2747 init_gold_top100=0.3116
|
| 55 |
+
step=1950 micro_steps=31200 elapsed=54.3s lr=3.000000e-04 loss_all=2.2978 acc_all=0.6467 loss_corrupt=3.8819 acc_corrupt=0.3981 corrupt_frac=0.5524 loss=3.8819 mean_t=0.5036 wrong_frac=0.6995 init_acc_corrupt=0.2284 init_gold_top10=0.2759 init_gold_top100=0.3117
|
| 56 |
+
step=2000 micro_steps=32000 elapsed=54.8s lr=3.000000e-04 loss_all=2.3150 acc_all=0.6440 loss_corrupt=3.8932 acc_corrupt=0.3965 corrupt_frac=0.5565 loss=3.8932 mean_t=0.4972 wrong_frac=0.7002 init_acc_corrupt=0.2263 init_gold_top10=0.2746 init_gold_top100=0.3110
|
| 57 |
+
step=2050 micro_steps=32800 elapsed=57.2s lr=3.000000e-04 loss_all=2.2709 acc_all=0.6500 loss_corrupt=3.8538 acc_corrupt=0.4010 corrupt_frac=0.5517 loss=3.8538 mean_t=0.5019 wrong_frac=0.7000 init_acc_corrupt=0.2272 init_gold_top10=0.2757 init_gold_top100=0.3123
|
| 58 |
+
step=2100 micro_steps=33600 elapsed=67.2s lr=3.000000e-04 loss_all=2.2463 acc_all=0.6523 loss_corrupt=3.8198 acc_corrupt=0.4039 corrupt_frac=0.5510 loss=3.8198 mean_t=0.5022 wrong_frac=0.7001 init_acc_corrupt=0.2274 init_gold_top10=0.2751 init_gold_top100=0.3116
|
| 59 |
+
step=2150 micro_steps=34400 elapsed=54.1s lr=3.000000e-04 loss_all=2.2359 acc_all=0.6528 loss_corrupt=3.8069 acc_corrupt=0.4038 corrupt_frac=0.5512 loss=3.8069 mean_t=0.4990 wrong_frac=0.7001 init_acc_corrupt=0.2273 init_gold_top10=0.2751 init_gold_top100=0.3114
|
| 60 |
+
step=2200 micro_steps=35200 elapsed=53.8s lr=3.000000e-04 loss_all=2.2087 acc_all=0.6565 loss_corrupt=3.7870 acc_corrupt=0.4057 corrupt_frac=0.5482 loss=3.7870 mean_t=0.5005 wrong_frac=0.7003 init_acc_corrupt=0.2268 init_gold_top10=0.2742 init_gold_top100=0.3106
|
| 61 |
+
step=2250 micro_steps=36000 elapsed=54.1s lr=3.000000e-04 loss_all=2.2056 acc_all=0.6558 loss_corrupt=3.7660 acc_corrupt=0.4072 corrupt_frac=0.5515 loss=3.7660 mean_t=0.4998 wrong_frac=0.7002 init_acc_corrupt=0.2257 init_gold_top10=0.2747 init_gold_top100=0.3118
|
| 62 |
+
step=2300 micro_steps=36800 elapsed=53.8s lr=3.000000e-04 loss_all=2.1810 acc_all=0.6587 loss_corrupt=3.7337 acc_corrupt=0.4103 corrupt_frac=0.5509 loss=3.7337 mean_t=0.5017 wrong_frac=0.6998 init_acc_corrupt=0.2272 init_gold_top10=0.2747 init_gold_top100=0.3112
|
| 63 |
+
step=2350 micro_steps=37600 elapsed=54.2s lr=3.000000e-04 loss_all=2.1618 acc_all=0.6606 loss_corrupt=3.7090 acc_corrupt=0.4121 corrupt_frac=0.5500 loss=3.7090 mean_t=0.4987 wrong_frac=0.6994 init_acc_corrupt=0.2256 init_gold_top10=0.2752 init_gold_top100=0.3126
|
| 64 |
+
step=2400 micro_steps=38400 elapsed=53.8s lr=3.000000e-04 loss_all=2.1462 acc_all=0.6630 loss_corrupt=3.6985 acc_corrupt=0.4137 corrupt_frac=0.5483 loss=3.6985 mean_t=0.4981 wrong_frac=0.7001 init_acc_corrupt=0.2267 init_gold_top10=0.2750 init_gold_top100=0.3114
|
| 65 |
+
step=2450 micro_steps=39200 elapsed=53.8s lr=3.000000e-04 loss_all=2.1166 acc_all=0.6657 loss_corrupt=3.6661 acc_corrupt=0.4157 corrupt_frac=0.5460 loss=3.6661 mean_t=0.5003 wrong_frac=0.7000 init_acc_corrupt=0.2263 init_gold_top10=0.2749 init_gold_top100=0.3124
|
| 66 |
+
step=2500 micro_steps=40000 elapsed=53.8s lr=3.000000e-04 loss_all=2.1221 acc_all=0.6653 loss_corrupt=3.6571 acc_corrupt=0.4176 corrupt_frac=0.5496 loss=3.6571 mean_t=0.5030 wrong_frac=0.6999 init_acc_corrupt=0.2276 init_gold_top10=0.2756 init_gold_top100=0.3119
|
| 67 |
+
step=2550 micro_steps=40800 elapsed=53.8s lr=3.000000e-04 loss_all=2.1060 acc_all=0.6663 loss_corrupt=3.6349 acc_corrupt=0.4185 corrupt_frac=0.5495 loss=3.6349 mean_t=0.4972 wrong_frac=0.7001 init_acc_corrupt=0.2267 init_gold_top10=0.2748 init_gold_top100=0.3110
|
| 68 |
+
step=2600 micro_steps=41600 elapsed=53.8s lr=3.000000e-04 loss_all=2.0740 acc_all=0.6704 loss_corrupt=3.6028 acc_corrupt=0.4217 corrupt_frac=0.5468 loss=3.6028 mean_t=0.4999 wrong_frac=0.7003 init_acc_corrupt=0.2268 init_gold_top10=0.2752 init_gold_top100=0.3115
|
| 69 |
+
step=2650 micro_steps=42400 elapsed=53.8s lr=3.000000e-04 loss_all=2.0886 acc_all=0.6676 loss_corrupt=3.5986 acc_corrupt=0.4217 corrupt_frac=0.5527 loss=3.5986 mean_t=0.5050 wrong_frac=0.6998 init_acc_corrupt=0.2282 init_gold_top10=0.2758 init_gold_top100=0.3117
|
| 70 |
+
step=2700 micro_steps=43200 elapsed=53.9s lr=3.000000e-04 loss_all=2.0636 acc_all=0.6711 loss_corrupt=3.5799 acc_corrupt=0.4237 corrupt_frac=0.5489 loss=3.5799 mean_t=0.5010 wrong_frac=0.6998 init_acc_corrupt=0.2267 init_gold_top10=0.2748 init_gold_top100=0.3117
|
| 71 |
+
step=2750 micro_steps=44000 elapsed=54.2s lr=3.000000e-04 loss_all=2.0399 acc_all=0.6734 loss_corrupt=3.5460 acc_corrupt=0.4266 corrupt_frac=0.5476 loss=3.5460 mean_t=0.5011 wrong_frac=0.7003 init_acc_corrupt=0.2266 init_gold_top10=0.2743 init_gold_top100=0.3115
|
| 72 |
+
step=2800 micro_steps=44800 elapsed=53.7s lr=3.000000e-04 loss_all=2.0597 acc_all=0.6706 loss_corrupt=3.5543 acc_corrupt=0.4261 corrupt_frac=0.5530 loss=3.5543 mean_t=0.5017 wrong_frac=0.6999 init_acc_corrupt=0.2282 init_gold_top10=0.2748 init_gold_top100=0.3106
|
| 73 |
+
step=2850 micro_steps=45600 elapsed=57.3s lr=3.000000e-04 loss_all=2.0211 acc_all=0.6754 loss_corrupt=3.5283 acc_corrupt=0.4278 corrupt_frac=0.5470 loss=3.5283 mean_t=0.5007 wrong_frac=0.6999 init_acc_corrupt=0.2270 init_gold_top10=0.2754 init_gold_top100=0.3119
|
| 74 |
+
step=2900 micro_steps=46400 elapsed=53.5s lr=3.000000e-04 loss_all=2.0404 acc_all=0.6722 loss_corrupt=3.5336 acc_corrupt=0.4267 corrupt_frac=0.5522 loss=3.5336 mean_t=0.4984 wrong_frac=0.7005 init_acc_corrupt=0.2262 init_gold_top10=0.2740 init_gold_top100=0.3105
|
| 75 |
+
step=2950 micro_steps=47200 elapsed=53.5s lr=3.000000e-04 loss_all=2.0138 acc_all=0.6758 loss_corrupt=3.5003 acc_corrupt=0.4308 corrupt_frac=0.5505 loss=3.5003 mean_t=0.4977 wrong_frac=0.7002 init_acc_corrupt=0.2267 init_gold_top10=0.2743 init_gold_top100=0.3106
|
| 76 |
+
step=3000 micro_steps=48000 elapsed=55.7s lr=3.000000e-04 loss_all=1.9832 acc_all=0.6794 loss_corrupt=3.4830 acc_corrupt=0.4313 corrupt_frac=0.5447 loss=3.4830 mean_t=0.4954 wrong_frac=0.7000 init_acc_corrupt=0.2251 init_gold_top10=0.2740 init_gold_top100=0.3119
|
| 77 |
+
step=3050 micro_steps=48800 elapsed=70.1s lr=3.000000e-04 loss_all=1.9915 acc_all=0.6781 loss_corrupt=3.4697 acc_corrupt=0.4334 corrupt_frac=0.5496 loss=3.4697 mean_t=0.4977 wrong_frac=0.6995 init_acc_corrupt=0.2261 init_gold_top10=0.2753 init_gold_top100=0.3126
|
| 78 |
+
step=3100 micro_steps=49600 elapsed=53.8s lr=3.000000e-04 loss_all=2.0096 acc_all=0.6751 loss_corrupt=3.4741 acc_corrupt=0.4327 corrupt_frac=0.5551 loss=3.4741 mean_t=0.4970 wrong_frac=0.6998 init_acc_corrupt=0.2262 init_gold_top10=0.2745 init_gold_top100=0.3117
|
| 79 |
+
step=3150 micro_steps=50400 elapsed=53.9s lr=3.000000e-04 loss_all=1.9817 acc_all=0.6792 loss_corrupt=3.4595 acc_corrupt=0.4344 corrupt_frac=0.5497 loss=3.4595 mean_t=0.4988 wrong_frac=0.6994 init_acc_corrupt=0.2255 init_gold_top10=0.2752 init_gold_top100=0.3127
|
| 80 |
+
step=3200 micro_steps=51200 elapsed=53.8s lr=3.000000e-04 loss_all=1.9751 acc_all=0.6791 loss_corrupt=3.4341 acc_corrupt=0.4362 corrupt_frac=0.5515 loss=3.4341 mean_t=0.4982 wrong_frac=0.6994 init_acc_corrupt=0.2269 init_gold_top10=0.2755 init_gold_top100=0.3118
|
| 81 |
+
step=3250 micro_steps=52000 elapsed=53.8s lr=3.000000e-04 loss_all=1.9645 acc_all=0.6805 loss_corrupt=3.4289 acc_corrupt=0.4364 corrupt_frac=0.5500 loss=3.4289 mean_t=0.4992 wrong_frac=0.7001 init_acc_corrupt=0.2263 init_gold_top10=0.2741 init_gold_top100=0.3115
|
| 82 |
+
step=3300 micro_steps=52800 elapsed=53.9s lr=3.000000e-04 loss_all=1.9566 acc_all=0.6811 loss_corrupt=3.4048 acc_corrupt=0.4393 corrupt_frac=0.5521 loss=3.4048 mean_t=0.5028 wrong_frac=0.6997 init_acc_corrupt=0.2272 init_gold_top10=0.2758 init_gold_top100=0.3123
|
| 83 |
+
step=3350 micro_steps=53600 elapsed=53.9s lr=3.000000e-04 loss_all=1.9507 acc_all=0.6817 loss_corrupt=3.4046 acc_corrupt=0.4389 corrupt_frac=0.5513 loss=3.4046 mean_t=0.5000 wrong_frac=0.7002 init_acc_corrupt=0.2253 init_gold_top10=0.2744 init_gold_top100=0.3116
|
| 84 |
+
step=3400 micro_steps=54400 elapsed=53.8s lr=3.000000e-04 loss_all=1.9368 acc_all=0.6832 loss_corrupt=3.3804 acc_corrupt=0.4411 corrupt_frac=0.5502 loss=3.3804 mean_t=0.5012 wrong_frac=0.7006 init_acc_corrupt=0.2259 init_gold_top10=0.2742 init_gold_top100=0.3116
|
| 85 |
+
step=3450 micro_steps=55200 elapsed=53.9s lr=3.000000e-04 loss_all=1.9260 acc_all=0.6844 loss_corrupt=3.3673 acc_corrupt=0.4426 corrupt_frac=0.5503 loss=3.3673 mean_t=0.5011 wrong_frac=0.6997 init_acc_corrupt=0.2273 init_gold_top10=0.2761 init_gold_top100=0.3121
|
| 86 |
+
step=3500 micro_steps=56000 elapsed=53.6s lr=3.000000e-04 loss_all=1.9521 acc_all=0.6803 loss_corrupt=3.3866 acc_corrupt=0.4396 corrupt_frac=0.5555 loss=3.3866 mean_t=0.4953 wrong_frac=0.7003 init_acc_corrupt=0.2246 init_gold_top10=0.2731 init_gold_top100=0.3108
|
| 87 |
+
step=3550 micro_steps=56800 elapsed=54.2s lr=3.000000e-04 loss_all=1.8994 acc_all=0.6876 loss_corrupt=3.3391 acc_corrupt=0.4449 corrupt_frac=0.5479 loss=3.3391 mean_t=0.4982 wrong_frac=0.6995 init_acc_corrupt=0.2274 init_gold_top10=0.2751 init_gold_top100=0.3118
|
| 88 |
+
step=3600 micro_steps=57600 elapsed=53.9s lr=3.000000e-04 loss_all=1.9192 acc_all=0.6846 loss_corrupt=3.3538 acc_corrupt=0.4433 corrupt_frac=0.5523 loss=3.3538 mean_t=0.4988 wrong_frac=0.7000 init_acc_corrupt=0.2251 init_gold_top10=0.2736 init_gold_top100=0.3110
|
| 89 |
+
step=3650 micro_steps=58400 elapsed=54.4s lr=3.000000e-04 loss_all=1.8857 acc_all=0.6891 loss_corrupt=3.3195 acc_corrupt=0.4471 corrupt_frac=0.5471 loss=3.3195 mean_t=0.5037 wrong_frac=0.6999 init_acc_corrupt=0.2270 init_gold_top10=0.2743 init_gold_top100=0.3108
|
| 90 |
+
step=3700 micro_steps=59200 elapsed=54.2s lr=3.000000e-04 loss_all=1.8729 acc_all=0.6907 loss_corrupt=3.2987 acc_corrupt=0.4496 corrupt_frac=0.5478 loss=3.2987 mean_t=0.5001 wrong_frac=0.6998 init_acc_corrupt=0.2279 init_gold_top10=0.2759 init_gold_top100=0.3118
|
| 91 |
+
step=3750 micro_steps=60000 elapsed=54.2s lr=3.000000e-04 loss_all=1.8678 acc_all=0.6911 loss_corrupt=3.2994 acc_corrupt=0.4488 corrupt_frac=0.5458 loss=3.2994 mean_t=0.5039 wrong_frac=0.7000 init_acc_corrupt=0.2272 init_gold_top10=0.2745 init_gold_top100=0.3114
|
| 92 |
+
step=3800 micro_steps=60800 elapsed=54.5s lr=3.000000e-04 loss_all=1.8839 acc_all=0.6886 loss_corrupt=3.3073 acc_corrupt=0.4479 corrupt_frac=0.5501 loss=3.3073 mean_t=0.4974 wrong_frac=0.6992 init_acc_corrupt=0.2266 init_gold_top10=0.2751 init_gold_top100=0.3123
|
| 93 |
+
step=3850 micro_steps=61600 elapsed=54.5s lr=3.000000e-04 loss_all=1.8565 acc_all=0.6916 loss_corrupt=3.2639 acc_corrupt=0.4520 corrupt_frac=0.5485 loss=3.2639 mean_t=0.4986 wrong_frac=0.6997 init_acc_corrupt=0.2271 init_gold_top10=0.2761 init_gold_top100=0.3118
|
| 94 |
+
step=3900 micro_steps=62400 elapsed=54.4s lr=3.000000e-04 loss_all=1.8642 acc_all=0.6900 loss_corrupt=3.2655 acc_corrupt=0.4516 corrupt_frac=0.5516 loss=3.2655 mean_t=0.5017 wrong_frac=0.7005 init_acc_corrupt=0.2272 init_gold_top10=0.2753 init_gold_top100=0.3109
|
| 95 |
+
step=3950 micro_steps=63200 elapsed=57.9s lr=3.000000e-04 loss_all=1.8377 acc_all=0.6936 loss_corrupt=3.2412 acc_corrupt=0.4543 corrupt_frac=0.5480 loss=3.2412 mean_t=0.5028 wrong_frac=0.7003 init_acc_corrupt=0.2284 init_gold_top10=0.2759 init_gold_top100=0.3115
|
| 96 |
+
step=4000 micro_steps=64000 elapsed=65.7s lr=3.000000e-04 loss_all=1.8519 acc_all=0.6915 loss_corrupt=3.2490 acc_corrupt=0.4534 corrupt_frac=0.5512 loss=3.2490 mean_t=0.5008 wrong_frac=0.7001 init_acc_corrupt=0.2263 init_gold_top10=0.2748 init_gold_top100=0.3113
|
| 97 |
+
step=4050 micro_steps=64800 elapsed=61.8s lr=3.000000e-04 loss_all=1.8528 acc_all=0.6912 loss_corrupt=3.2440 acc_corrupt=0.4541 corrupt_frac=0.5523 loss=3.2440 mean_t=0.5007 wrong_frac=0.7005 init_acc_corrupt=0.2271 init_gold_top10=0.2746 init_gold_top100=0.3109
|
| 98 |
+
step=4100 micro_steps=65600 elapsed=62.9s lr=3.000000e-04 loss_all=1.8451 acc_all=0.6925 loss_corrupt=3.2463 acc_corrupt=0.4536 corrupt_frac=0.5495 loss=3.2463 mean_t=0.4956 wrong_frac=0.6997 init_acc_corrupt=0.2261 init_gold_top10=0.2743 init_gold_top100=0.3115
|
| 99 |
+
step=4150 micro_steps=66400 elapsed=53.9s lr=3.000000e-04 loss_all=1.8382 acc_all=0.6930 loss_corrupt=3.2346 acc_corrupt=0.4545 corrupt_frac=0.5497 loss=3.2346 mean_t=0.5005 wrong_frac=0.7003 init_acc_corrupt=0.2263 init_gold_top10=0.2740 init_gold_top100=0.3109
|
| 100 |
+
step=4200 micro_steps=67200 elapsed=53.9s lr=3.000000e-04 loss_all=1.8483 acc_all=0.6908 loss_corrupt=3.2330 acc_corrupt=0.4542 corrupt_frac=0.5536 loss=3.2330 mean_t=0.5009 wrong_frac=0.7000 init_acc_corrupt=0.2256 init_gold_top10=0.2743 init_gold_top100=0.3114
|
| 101 |
+
step=4250 micro_steps=68000 elapsed=53.9s lr=3.000000e-04 loss_all=1.8289 acc_all=0.6935 loss_corrupt=3.2070 acc_corrupt=0.4571 corrupt_frac=0.5518 loss=3.2070 mean_t=0.5005 wrong_frac=0.7005 init_acc_corrupt=0.2268 init_gold_top10=0.2744 init_gold_top100=0.3110
|
| 102 |
+
step=4300 micro_steps=68800 elapsed=53.9s lr=3.000000e-04 loss_all=1.8142 acc_all=0.6954 loss_corrupt=3.1901 acc_corrupt=0.4591 corrupt_frac=0.5502 loss=3.1901 mean_t=0.4979 wrong_frac=0.6999 init_acc_corrupt=0.2255 init_gold_top10=0.2749 init_gold_top100=0.3121
|
| 103 |
+
step=4350 micro_steps=69600 elapsed=54.2s lr=3.000000e-04 loss_all=1.8094 acc_all=0.6958 loss_corrupt=3.1786 acc_corrupt=0.4603 corrupt_frac=0.5513 loss=3.1786 mean_t=0.5018 wrong_frac=0.6998 init_acc_corrupt=0.2281 init_gold_top10=0.2751 init_gold_top100=0.3115
|
| 104 |
+
step=4400 micro_steps=70400 elapsed=54.4s lr=3.000000e-04 loss_all=1.7855 acc_all=0.6997 loss_corrupt=3.1678 acc_corrupt=0.4620 corrupt_frac=0.5460 loss=3.1678 mean_t=0.5025 wrong_frac=0.6992 init_acc_corrupt=0.2282 init_gold_top10=0.2757 init_gold_top100=0.3118
|
| 105 |
+
step=4450 micro_steps=71200 elapsed=54.4s lr=3.000000e-04 loss_all=1.7829 acc_all=0.6987 loss_corrupt=3.1487 acc_corrupt=0.4628 corrupt_frac=0.5488 loss=3.1487 mean_t=0.5023 wrong_frac=0.6997 init_acc_corrupt=0.2278 init_gold_top10=0.2753 init_gold_top100=0.3111
|
| 106 |
+
step=4500 micro_steps=72000 elapsed=54.4s lr=3.000000e-04 loss_all=1.7906 acc_all=0.6977 loss_corrupt=3.1509 acc_corrupt=0.4628 corrupt_frac=0.5503 loss=3.1509 mean_t=0.5012 wrong_frac=0.6996 init_acc_corrupt=0.2282 init_gold_top10=0.2761 init_gold_top100=0.3119
|
| 107 |
+
step=4550 micro_steps=72800 elapsed=54.4s lr=3.000000e-04 loss_all=1.7611 acc_all=0.7018 loss_corrupt=3.1259 acc_corrupt=0.4655 corrupt_frac=0.5459 loss=3.1259 mean_t=0.4989 wrong_frac=0.6992 init_acc_corrupt=0.2276 init_gold_top10=0.2757 init_gold_top100=0.3125
|
| 108 |
+
step=4600 micro_steps=73600 elapsed=54.4s lr=3.000000e-04 loss_all=1.7884 acc_all=0.6981 loss_corrupt=3.1565 acc_corrupt=0.4620 corrupt_frac=0.5497 loss=3.1565 mean_t=0.5012 wrong_frac=0.7007 init_acc_corrupt=0.2260 init_gold_top10=0.2743 init_gold_top100=0.3111
|
| 109 |
+
step=4650 micro_steps=74400 elapsed=54.3s lr=3.000000e-04 loss_all=1.7657 acc_all=0.7005 loss_corrupt=3.1149 acc_corrupt=0.4664 corrupt_frac=0.5495 loss=3.1149 mean_t=0.5007 wrong_frac=0.6998 init_acc_corrupt=0.2277 init_gold_top10=0.2762 init_gold_top100=0.3126
|
| 110 |
+
step=4700 micro_steps=75200 elapsed=53.9s lr=3.000000e-04 loss_all=1.7764 acc_all=0.6994 loss_corrupt=3.1288 acc_corrupt=0.4655 corrupt_frac=0.5510 loss=3.1288 mean_t=0.4987 wrong_frac=0.7004 init_acc_corrupt=0.2256 init_gold_top10=0.2743 init_gold_top100=0.3115
|
| 111 |
+
step=4750 micro_steps=76000 elapsed=54.1s lr=3.000000e-04 loss_all=1.7684 acc_all=0.7000 loss_corrupt=3.1188 acc_corrupt=0.4658 corrupt_frac=0.5501 loss=3.1188 mean_t=0.5012 wrong_frac=0.6995 init_acc_corrupt=0.2264 init_gold_top10=0.2756 init_gold_top100=0.3126
|
| 112 |
+
step=4800 micro_steps=76800 elapsed=54.1s lr=3.000000e-04 loss_all=1.7626 acc_all=0.7011 loss_corrupt=3.1295 acc_corrupt=0.4643 corrupt_frac=0.5465 loss=3.1295 mean_t=0.4968 wrong_frac=0.7002 init_acc_corrupt=0.2246 init_gold_top10=0.2740 init_gold_top100=0.3119
|
| 113 |
+
step=4850 micro_steps=77600 elapsed=53.8s lr=3.000000e-04 loss_all=1.7504 acc_all=0.7021 loss_corrupt=3.0908 acc_corrupt=0.4691 corrupt_frac=0.5499 loss=3.0908 mean_t=0.5004 wrong_frac=0.6997 init_acc_corrupt=0.2283 init_gold_top10=0.2758 init_gold_top100=0.3115
|
| 114 |
+
step=4900 micro_steps=78400 elapsed=54.2s lr=3.000000e-04 loss_all=1.7656 acc_all=0.6998 loss_corrupt=3.0992 acc_corrupt=0.4681 corrupt_frac=0.5529 loss=3.0992 mean_t=0.4993 wrong_frac=0.6997 init_acc_corrupt=0.2279 init_gold_top10=0.2756 init_gold_top100=0.3115
|
| 115 |
+
step=4950 micro_steps=79200 elapsed=54.5s lr=3.000000e-04 loss_all=1.7401 acc_all=0.7032 loss_corrupt=3.0801 acc_corrupt=0.4697 corrupt_frac=0.5489 loss=3.0801 mean_t=0.4974 wrong_frac=0.7005 init_acc_corrupt=0.2259 init_gold_top10=0.2743 init_gold_top100=0.3111
|
| 116 |
+
step=5000 micro_steps=80000 elapsed=54.5s lr=3.000000e-04 loss_all=1.7395 acc_all=0.7034 loss_corrupt=3.0845 acc_corrupt=0.4689 corrupt_frac=0.5473 loss=3.0845 mean_t=0.4997 wrong_frac=0.6999 init_acc_corrupt=0.2266 init_gold_top10=0.2745 init_gold_top100=0.3114
|
| 117 |
+
step=5050 micro_steps=80800 elapsed=70.1s lr=3.000000e-04 loss_all=1.7487 acc_all=0.7022 loss_corrupt=3.0914 acc_corrupt=0.4686 corrupt_frac=0.5490 loss=3.0914 mean_t=0.4976 wrong_frac=0.7000 init_acc_corrupt=0.2248 init_gold_top10=0.2730 init_gold_top100=0.3116
|
| 118 |
+
step=5100 micro_steps=81600 elapsed=53.9s lr=3.000000e-04 loss_all=1.7399 acc_all=0.7030 loss_corrupt=3.0755 acc_corrupt=0.4701 corrupt_frac=0.5493 loss=3.0755 mean_t=0.4979 wrong_frac=0.6996 init_acc_corrupt=0.2258 init_gold_top10=0.2744 init_gold_top100=0.3118
|
| 119 |
+
step=5150 micro_steps=82400 elapsed=54.3s lr=3.000000e-04 loss_all=1.7418 acc_all=0.7025 loss_corrupt=3.0698 acc_corrupt=0.4705 corrupt_frac=0.5510 loss=3.0698 mean_t=0.4982 wrong_frac=0.7001 init_acc_corrupt=0.2259 init_gold_top10=0.2742 init_gold_top100=0.3114
|
| 120 |
+
step=5200 micro_steps=83200 elapsed=53.8s lr=3.000000e-04 loss_all=1.7329 acc_all=0.7038 loss_corrupt=3.0611 acc_corrupt=0.4719 corrupt_frac=0.5503 loss=3.0611 mean_t=0.5007 wrong_frac=0.6995 init_acc_corrupt=0.2272 init_gold_top10=0.2750 init_gold_top100=0.3116
|
| 121 |
+
step=5250 micro_steps=84000 elapsed=53.8s lr=3.000000e-04 loss_all=1.7249 acc_all=0.7047 loss_corrupt=3.0519 acc_corrupt=0.4726 corrupt_frac=0.5490 loss=3.0519 mean_t=0.4980 wrong_frac=0.6990 init_acc_corrupt=0.2260 init_gold_top10=0.2750 init_gold_top100=0.3127
|
| 122 |
+
step=5300 micro_steps=84800 elapsed=53.7s lr=3.000000e-04 loss_all=1.7279 acc_all=0.7044 loss_corrupt=3.0439 acc_corrupt=0.4744 corrupt_frac=0.5515 loss=3.0439 mean_t=0.4979 wrong_frac=0.6996 init_acc_corrupt=0.2272 init_gold_top10=0.2750 init_gold_top100=0.3120
|
| 123 |
+
step=5350 micro_steps=85600 elapsed=53.5s lr=3.000000e-04 loss_all=1.7095 acc_all=0.7066 loss_corrupt=3.0302 acc_corrupt=0.4751 corrupt_frac=0.5481 loss=3.0302 mean_t=0.4970 wrong_frac=0.7003 init_acc_corrupt=0.2249 init_gold_top10=0.2742 init_gold_top100=0.3121
|
| 124 |
+
step=5400 micro_steps=86400 elapsed=53.6s lr=3.000000e-04 loss_all=1.7046 acc_all=0.7076 loss_corrupt=3.0326 acc_corrupt=0.4749 corrupt_frac=0.5461 loss=3.0326 mean_t=0.5021 wrong_frac=0.7000 init_acc_corrupt=0.2268 init_gold_top10=0.2745 init_gold_top100=0.3113
|
| 125 |
+
step=5450 micro_steps=87200 elapsed=53.5s lr=3.000000e-04 loss_all=1.7316 acc_all=0.7026 loss_corrupt=3.0441 acc_corrupt=0.4727 corrupt_frac=0.5538 loss=3.0441 mean_t=0.4986 wrong_frac=0.6995 init_acc_corrupt=0.2260 init_gold_top10=0.2751 init_gold_top100=0.3121
|
| 126 |
+
step=5500 micro_steps=88000 elapsed=53.5s lr=3.000000e-04 loss_all=1.7123 acc_all=0.7055 loss_corrupt=3.0166 acc_corrupt=0.4764 corrupt_frac=0.5520 loss=3.0166 mean_t=0.5031 wrong_frac=0.6993 init_acc_corrupt=0.2286 init_gold_top10=0.2762 init_gold_top100=0.3119
|
| 127 |
+
step=5550 micro_steps=88800 elapsed=53.5s lr=3.000000e-04 loss_all=1.7026 acc_all=0.7071 loss_corrupt=3.0160 acc_corrupt=0.4761 corrupt_frac=0.5485 loss=3.0160 mean_t=0.4945 wrong_frac=0.6998 init_acc_corrupt=0.2258 init_gold_top10=0.2748 init_gold_top100=0.3116
|
| 128 |
+
step=5600 micro_steps=89600 elapsed=53.5s lr=3.000000e-04 loss_all=1.7061 acc_all=0.7065 loss_corrupt=2.9973 acc_corrupt=0.4792 corrupt_frac=0.5524 loss=2.9973 mean_t=0.5031 wrong_frac=0.6997 init_acc_corrupt=0.2276 init_gold_top10=0.2752 init_gold_top100=0.3113
|
| 129 |
+
step=5650 micro_steps=90400 elapsed=53.5s lr=3.000000e-04 loss_all=1.7087 acc_all=0.7053 loss_corrupt=3.0063 acc_corrupt=0.4766 corrupt_frac=0.5530 loss=3.0063 mean_t=0.4984 wrong_frac=0.7008 init_acc_corrupt=0.2272 init_gold_top10=0.2750 init_gold_top100=0.3110
|
| 130 |
+
step=5700 micro_steps=91200 elapsed=53.5s lr=3.000000e-04 loss_all=1.6979 acc_all=0.7077 loss_corrupt=3.0012 acc_corrupt=0.4784 corrupt_frac=0.5497 loss=3.0012 mean_t=0.5021 wrong_frac=0.6994 init_acc_corrupt=0.2275 init_gold_top10=0.2751 init_gold_top100=0.3114
|
| 131 |
+
step=5750 micro_steps=92000 elapsed=53.5s lr=3.000000e-04 loss_all=1.7046 acc_all=0.7058 loss_corrupt=3.0027 acc_corrupt=0.4770 corrupt_frac=0.5527 loss=3.0027 mean_t=0.4952 wrong_frac=0.7003 init_acc_corrupt=0.2254 init_gold_top10=0.2743 init_gold_top100=0.3112
|
| 132 |
+
step=5800 micro_steps=92800 elapsed=53.5s lr=3.000000e-04 loss_all=1.7074 acc_all=0.7055 loss_corrupt=3.0033 acc_corrupt=0.4772 corrupt_frac=0.5529 loss=3.0033 mean_t=0.4989 wrong_frac=0.7001 init_acc_corrupt=0.2261 init_gold_top10=0.2750 init_gold_top100=0.3118
|
| 133 |
+
step=5850 micro_steps=93600 elapsed=53.4s lr=3.000000e-04 loss_all=1.6698 acc_all=0.7110 loss_corrupt=2.9766 acc_corrupt=0.4802 corrupt_frac=0.5459 loss=2.9766 mean_t=0.4977 wrong_frac=0.7004 init_acc_corrupt=0.2259 init_gold_top10=0.2740 init_gold_top100=0.3107
|
| 134 |
+
step=5900 micro_steps=94400 elapsed=53.5s lr=3.000000e-04 loss_all=1.6801 acc_all=0.7087 loss_corrupt=2.9627 acc_corrupt=0.4816 corrupt_frac=0.5521 loss=2.9627 mean_t=0.5024 wrong_frac=0.7003 init_acc_corrupt=0.2276 init_gold_top10=0.2754 init_gold_top100=0.3114
|
| 135 |
+
step=5950 micro_steps=95200 elapsed=54.0s lr=3.000000e-04 loss_all=1.6587 acc_all=0.7125 loss_corrupt=2.9507 acc_corrupt=0.4838 corrupt_frac=0.5467 loss=2.9507 mean_t=0.4980 wrong_frac=0.6998 init_acc_corrupt=0.2278 init_gold_top10=0.2749 init_gold_top100=0.3112
|
| 136 |
+
step=6000 micro_steps=96000 elapsed=54.5s lr=3.000000e-04 loss_all=1.6782 acc_all=0.7091 loss_corrupt=2.9655 acc_corrupt=0.4818 corrupt_frac=0.5512 loss=2.9655 mean_t=0.5049 wrong_frac=0.7002 init_acc_corrupt=0.2273 init_gold_top10=0.2752 init_gold_top100=0.3117
|
| 137 |
+
step=6050 micro_steps=96800 elapsed=60.4s lr=3.000000e-04 loss_all=1.6813 acc_all=0.7090 loss_corrupt=2.9698 acc_corrupt=0.4815 corrupt_frac=0.5511 loss=2.9698 mean_t=0.4988 wrong_frac=0.6999 init_acc_corrupt=0.2261 init_gold_top10=0.2751 init_gold_top100=0.3121
|
| 138 |
+
step=6100 micro_steps=97600 elapsed=63.9s lr=3.000000e-04 loss_all=1.6839 acc_all=0.7081 loss_corrupt=2.9694 acc_corrupt=0.4807 corrupt_frac=0.5526 loss=2.9694 mean_t=0.5024 wrong_frac=0.7001 init_acc_corrupt=0.2261 init_gold_top10=0.2743 init_gold_top100=0.3113
|
| 139 |
+
step=6150 micro_steps=98400 elapsed=53.9s lr=3.000000e-04 loss_all=1.6589 acc_all=0.7113 loss_corrupt=2.9422 acc_corrupt=0.4835 corrupt_frac=0.5488 loss=2.9422 mean_t=0.5039 wrong_frac=0.7003 init_acc_corrupt=0.2271 init_gold_top10=0.2750 init_gold_top100=0.3109
|
| 140 |
+
step=6200 micro_steps=99200 elapsed=54.0s lr=3.000000e-04 loss_all=1.6651 acc_all=0.7103 loss_corrupt=2.9457 acc_corrupt=0.4831 corrupt_frac=0.5509 loss=2.9457 mean_t=0.4997 wrong_frac=0.6996 init_acc_corrupt=0.2271 init_gold_top10=0.2755 init_gold_top100=0.3122
|
| 141 |
+
step=6250 micro_steps=100000 elapsed=53.8s lr=3.000000e-04 loss_all=1.6482 acc_all=0.7129 loss_corrupt=2.9270 acc_corrupt=0.4854 corrupt_frac=0.5481 loss=2.9270 mean_t=0.4985 wrong_frac=0.7001 init_acc_corrupt=0.2265 init_gold_top10=0.2747 init_gold_top100=0.3120
|
| 142 |
+
step=6300 micro_steps=100800 elapsed=53.7s lr=3.000000e-04 loss_all=1.6623 acc_all=0.7105 loss_corrupt=2.9344 acc_corrupt=0.4846 corrupt_frac=0.5522 loss=2.9344 mean_t=0.5011 wrong_frac=0.7002 init_acc_corrupt=0.2262 init_gold_top10=0.2747 init_gold_top100=0.3120
|
| 143 |
+
step=6350 micro_steps=101600 elapsed=58.7s lr=3.000000e-04 loss_all=1.6481 acc_all=0.7130 loss_corrupt=2.9234 acc_corrupt=0.4864 corrupt_frac=0.5486 loss=2.9234 mean_t=0.4986 wrong_frac=0.6998 init_acc_corrupt=0.2269 init_gold_top10=0.2752 init_gold_top100=0.3118
|
| 144 |
+
step=6400 micro_steps=102400 elapsed=53.8s lr=3.000000e-04 loss_all=1.6661 acc_all=0.7095 loss_corrupt=2.9368 acc_corrupt=0.4836 corrupt_frac=0.5531 loss=2.9368 mean_t=0.4985 wrong_frac=0.7000 init_acc_corrupt=0.2263 init_gold_top10=0.2747 init_gold_top100=0.3115
|
| 145 |
+
step=6450 micro_steps=103200 elapsed=53.8s lr=3.000000e-04 loss_all=1.6521 acc_all=0.7120 loss_corrupt=2.9257 acc_corrupt=0.4856 corrupt_frac=0.5507 loss=2.9257 mean_t=0.5023 wrong_frac=0.6995 init_acc_corrupt=0.2271 init_gold_top10=0.2753 init_gold_top100=0.3115
|
| 146 |
+
step=6500 micro_steps=104000 elapsed=53.8s lr=3.000000e-04 loss_all=1.6655 acc_all=0.7096 loss_corrupt=2.9261 acc_corrupt=0.4854 corrupt_frac=0.5548 loss=2.9261 mean_t=0.5002 wrong_frac=0.7001 init_acc_corrupt=0.2272 init_gold_top10=0.2749 init_gold_top100=0.3111
|
| 147 |
+
step=6550 micro_steps=104800 elapsed=53.8s lr=3.000000e-04 loss_all=1.6448 acc_all=0.7131 loss_corrupt=2.9205 acc_corrupt=0.4859 corrupt_frac=0.5482 loss=2.9205 mean_t=0.4961 wrong_frac=0.7007 init_acc_corrupt=0.2246 init_gold_top10=0.2731 init_gold_top100=0.3105
|
| 148 |
+
step=6600 micro_steps=105600 elapsed=53.7s lr=3.000000e-04 loss_all=1.6428 acc_all=0.7129 loss_corrupt=2.8973 acc_corrupt=0.4894 corrupt_frac=0.5528 loss=2.8973 mean_t=0.5060 wrong_frac=0.6997 init_acc_corrupt=0.2300 init_gold_top10=0.2759 init_gold_top100=0.3113
|
| 149 |
+
step=6650 micro_steps=106400 elapsed=71.1s lr=3.000000e-04 loss_all=1.6636 acc_all=0.7096 loss_corrupt=2.9137 acc_corrupt=0.4869 corrupt_frac=0.5568 loss=2.9137 mean_t=0.5012 wrong_frac=0.7001 init_acc_corrupt=0.2266 init_gold_top10=0.2745 init_gold_top100=0.3117
|
| 150 |
+
step=6700 micro_steps=107200 elapsed=54.1s lr=3.000000e-04 loss_all=1.6563 acc_all=0.7109 loss_corrupt=2.9097 acc_corrupt=0.4876 corrupt_frac=0.5542 loss=2.9097 mean_t=0.5031 wrong_frac=0.6999 init_acc_corrupt=0.2280 init_gold_top10=0.2755 init_gold_top100=0.3116
|
| 151 |
+
step=6750 micro_steps=108000 elapsed=54.1s lr=3.000000e-04 loss_all=1.6580 acc_all=0.7102 loss_corrupt=2.9181 acc_corrupt=0.4855 corrupt_frac=0.5538 loss=2.9181 mean_t=0.4957 wrong_frac=0.7000 init_acc_corrupt=0.2248 init_gold_top10=0.2739 init_gold_top100=0.3116
|
| 152 |
+
step=6800 micro_steps=108800 elapsed=53.8s lr=3.000000e-04 loss_all=1.6242 acc_all=0.7153 loss_corrupt=2.8787 acc_corrupt=0.4910 corrupt_frac=0.5502 loss=2.8787 mean_t=0.5008 wrong_frac=0.6998 init_acc_corrupt=0.2286 init_gold_top10=0.2765 init_gold_top100=0.3116
|
| 153 |
+
step=6850 micro_steps=109600 elapsed=53.8s lr=3.000000e-04 loss_all=1.6186 acc_all=0.7163 loss_corrupt=2.8721 acc_corrupt=0.4923 corrupt_frac=0.5494 loss=2.8721 mean_t=0.5029 wrong_frac=0.6996 init_acc_corrupt=0.2286 init_gold_top10=0.2765 init_gold_top100=0.3123
|
| 154 |
+
step=6900 micro_steps=110400 elapsed=53.8s lr=3.000000e-04 loss_all=1.6265 acc_all=0.7149 loss_corrupt=2.8772 acc_corrupt=0.4912 corrupt_frac=0.5512 loss=2.8772 mean_t=0.5019 wrong_frac=0.7000 init_acc_corrupt=0.2272 init_gold_top10=0.2751 init_gold_top100=0.3115
|
| 155 |
+
step=6950 micro_steps=111200 elapsed=53.8s lr=3.000000e-04 loss_all=1.6363 acc_all=0.7130 loss_corrupt=2.8829 acc_corrupt=0.4901 corrupt_frac=0.5534 loss=2.8829 mean_t=0.4989 wrong_frac=0.7001 init_acc_corrupt=0.2265 init_gold_top10=0.2746 init_gold_top100=0.3118
|
| 156 |
+
step=7000 micro_steps=112000 elapsed=53.9s lr=3.000000e-04 loss_all=1.6347 acc_all=0.7135 loss_corrupt=2.8817 acc_corrupt=0.4906 corrupt_frac=0.5529 loss=2.8817 mean_t=0.4988 wrong_frac=0.7001 init_acc_corrupt=0.2263 init_gold_top10=0.2747 init_gold_top100=0.3115
|
| 157 |
+
step=7050 micro_steps=112800 elapsed=55.9s lr=3.000000e-04 loss_all=1.6213 acc_all=0.7149 loss_corrupt=2.8574 acc_corrupt=0.4930 corrupt_frac=0.5526 loss=2.8574 mean_t=0.5051 wrong_frac=0.6998 init_acc_corrupt=0.2287 init_gold_top10=0.2756 init_gold_top100=0.3117
|
| 158 |
+
step=7100 micro_steps=113600 elapsed=68.2s lr=3.000000e-04 loss_all=1.6264 acc_all=0.7143 loss_corrupt=2.8783 acc_corrupt=0.4900 corrupt_frac=0.5509 loss=2.8783 mean_t=0.4977 wrong_frac=0.7003 init_acc_corrupt=0.2259 init_gold_top10=0.2740 init_gold_top100=0.3107
|
| 159 |
+
step=7150 micro_steps=114400 elapsed=54.0s lr=3.000000e-04 loss_all=1.6208 acc_all=0.7151 loss_corrupt=2.8648 acc_corrupt=0.4922 corrupt_frac=0.5521 loss=2.8648 mean_t=0.5037 wrong_frac=0.7004 init_acc_corrupt=0.2277 init_gold_top10=0.2749 init_gold_top100=0.3107
|
| 160 |
+
step=7200 micro_steps=115200 elapsed=55.7s lr=3.000000e-04 loss_all=1.6170 acc_all=0.7157 loss_corrupt=2.8623 acc_corrupt=0.4923 corrupt_frac=0.5507 loss=2.8623 mean_t=0.4990 wrong_frac=0.6999 init_acc_corrupt=0.2270 init_gold_top10=0.2756 init_gold_top100=0.3123
|
| 161 |
+
step=7250 micro_steps=116000 elapsed=54.1s lr=3.000000e-04 loss_all=1.5985 acc_all=0.7183 loss_corrupt=2.8470 acc_corrupt=0.4940 corrupt_frac=0.5474 loss=2.8470 mean_t=0.4971 wrong_frac=0.7000 init_acc_corrupt=0.2247 init_gold_top10=0.2739 init_gold_top100=0.3113
|
| 162 |
+
step=7300 micro_steps=116800 elapsed=54.6s lr=3.000000e-04 loss_all=1.5972 acc_all=0.7180 loss_corrupt=2.8285 acc_corrupt=0.4961 corrupt_frac=0.5502 loss=2.8285 mean_t=0.4990 wrong_frac=0.7003 init_acc_corrupt=0.2263 init_gold_top10=0.2748 init_gold_top100=0.3117
|
| 163 |
+
step=7350 micro_steps=117600 elapsed=54.3s lr=3.000000e-04 loss_all=1.6147 acc_all=0.7159 loss_corrupt=2.8480 acc_corrupt=0.4944 corrupt_frac=0.5520 loss=2.8480 mean_t=0.5004 wrong_frac=0.6999 init_acc_corrupt=0.2277 init_gold_top10=0.2751 init_gold_top100=0.3109
|
| 164 |
+
step=7400 micro_steps=118400 elapsed=53.6s lr=3.000000e-04 loss_all=1.6097 acc_all=0.7162 loss_corrupt=2.8525 acc_corrupt=0.4929 corrupt_frac=0.5503 loss=2.8525 mean_t=0.4972 wrong_frac=0.7000 init_acc_corrupt=0.2247 init_gold_top10=0.2744 init_gold_top100=0.3124
|
| 165 |
+
step=7450 micro_steps=119200 elapsed=54.3s lr=3.000000e-04 loss_all=1.6152 acc_all=0.7154 loss_corrupt=2.8520 acc_corrupt=0.4932 corrupt_frac=0.5526 loss=2.8520 mean_t=0.5013 wrong_frac=0.7005 init_acc_corrupt=0.2260 init_gold_top10=0.2737 init_gold_top100=0.3106
|
| 166 |
+
step=7500 micro_steps=120000 elapsed=54.5s lr=3.000000e-04 loss_all=1.5871 acc_all=0.7193 loss_corrupt=2.8222 acc_corrupt=0.4965 corrupt_frac=0.5479 loss=2.8222 mean_t=0.4972 wrong_frac=0.7003 init_acc_corrupt=0.2263 init_gold_top10=0.2747 init_gold_top100=0.3112
|
| 167 |
+
step=7550 micro_steps=120800 elapsed=54.5s lr=3.000000e-04 loss_all=1.5896 acc_all=0.7194 loss_corrupt=2.8216 acc_corrupt=0.4974 corrupt_frac=0.5491 loss=2.8216 mean_t=0.5020 wrong_frac=0.6999 init_acc_corrupt=0.2270 init_gold_top10=0.2747 init_gold_top100=0.3115
|
| 168 |
+
step=7600 micro_steps=121600 elapsed=54.5s lr=3.000000e-04 loss_all=1.6009 acc_all=0.7171 loss_corrupt=2.8272 acc_corrupt=0.4963 corrupt_frac=0.5530 loss=2.8272 mean_t=0.5013 wrong_frac=0.7011 init_acc_corrupt=0.2266 init_gold_top10=0.2736 init_gold_top100=0.3102
|
| 169 |
+
step=7650 micro_steps=122400 elapsed=53.6s lr=3.000000e-04 loss_all=1.5859 acc_all=0.7196 loss_corrupt=2.8208 acc_corrupt=0.4971 corrupt_frac=0.5486 loss=2.8208 mean_t=0.4974 wrong_frac=0.6997 init_acc_corrupt=0.2262 init_gold_top10=0.2745 init_gold_top100=0.3119
|
| 170 |
+
step=7700 micro_steps=123200 elapsed=53.5s lr=3.000000e-04 loss_all=1.5855 acc_all=0.7190 loss_corrupt=2.8073 acc_corrupt=0.4984 corrupt_frac=0.5510 loss=2.8073 mean_t=0.4999 wrong_frac=0.7001 init_acc_corrupt=0.2271 init_gold_top10=0.2752 init_gold_top100=0.3118
|
| 171 |
+
step=7750 micro_steps=124000 elapsed=53.5s lr=3.000000e-04 loss_all=1.5885 acc_all=0.7186 loss_corrupt=2.8101 acc_corrupt=0.4980 corrupt_frac=0.5518 loss=2.8101 mean_t=0.5055 wrong_frac=0.7001 init_acc_corrupt=0.2280 init_gold_top10=0.2755 init_gold_top100=0.3113
|
| 172 |
+
step=7800 micro_steps=124800 elapsed=53.5s lr=3.000000e-04 loss_all=1.5982 acc_all=0.7173 loss_corrupt=2.8251 acc_corrupt=0.4960 corrupt_frac=0.5520 loss=2.8251 mean_t=0.4963 wrong_frac=0.6996 init_acc_corrupt=0.2258 init_gold_top10=0.2749 init_gold_top100=0.3121
|
| 173 |
+
step=7850 micro_steps=125600 elapsed=53.5s lr=3.000000e-04 loss_all=1.5945 acc_all=0.7182 loss_corrupt=2.8315 acc_corrupt=0.4951 corrupt_frac=0.5489 loss=2.8315 mean_t=0.4977 wrong_frac=0.7002 init_acc_corrupt=0.2250 init_gold_top10=0.2736 init_gold_top100=0.3115
|
| 174 |
+
step=7900 micro_steps=126400 elapsed=53.5s lr=3.000000e-04 loss_all=1.5946 acc_all=0.7177 loss_corrupt=2.8085 acc_corrupt=0.4984 corrupt_frac=0.5533 loss=2.8085 mean_t=0.4990 wrong_frac=0.6998 init_acc_corrupt=0.2267 init_gold_top10=0.2750 init_gold_top100=0.3116
|
| 175 |
+
step=7950 micro_steps=127200 elapsed=53.5s lr=3.000000e-04 loss_all=1.5667 acc_all=0.7213 loss_corrupt=2.7845 acc_corrupt=0.5006 corrupt_frac=0.5490 loss=2.7845 mean_t=0.5020 wrong_frac=0.7000 init_acc_corrupt=0.2258 init_gold_top10=0.2751 init_gold_top100=0.3127
|
| 176 |
+
step=8000 micro_steps=128000 elapsed=53.6s lr=3.000000e-04 loss_all=1.5797 acc_all=0.7200 loss_corrupt=2.8032 acc_corrupt=0.4988 corrupt_frac=0.5498 loss=2.8032 mean_t=0.5014 wrong_frac=0.7000 init_acc_corrupt=0.2271 init_gold_top10=0.2749 init_gold_top100=0.3112
|
| 177 |
+
step=8050 micro_steps=128800 elapsed=69.6s lr=3.000000e-04 loss_all=1.5695 acc_all=0.7212 loss_corrupt=2.7909 acc_corrupt=0.5000 corrupt_frac=0.5480 loss=2.7909 mean_t=0.5017 wrong_frac=0.7003 init_acc_corrupt=0.2269 init_gold_top10=0.2747 init_gold_top100=0.3112
|
| 178 |
+
step=8100 micro_steps=129600 elapsed=54.6s lr=3.000000e-04 loss_all=1.5886 acc_all=0.7182 loss_corrupt=2.8009 acc_corrupt=0.4989 corrupt_frac=0.5534 loss=2.8009 mean_t=0.5013 wrong_frac=0.6998 init_acc_corrupt=0.2270 init_gold_top10=0.2755 init_gold_top100=0.3117
|
| 179 |
+
step=8150 micro_steps=130400 elapsed=54.2s lr=3.000000e-04 loss_all=1.5626 acc_all=0.7220 loss_corrupt=2.7885 acc_corrupt=0.4998 corrupt_frac=0.5470 loss=2.7885 mean_t=0.4998 wrong_frac=0.7001 init_acc_corrupt=0.2252 init_gold_top10=0.2739 init_gold_top100=0.3116
|
| 180 |
+
step=8200 micro_steps=131200 elapsed=53.9s lr=3.000000e-04 loss_all=1.5581 acc_all=0.7228 loss_corrupt=2.7806 acc_corrupt=0.5014 corrupt_frac=0.5474 loss=2.7806 mean_t=0.4994 wrong_frac=0.7002 init_acc_corrupt=0.2261 init_gold_top10=0.2745 init_gold_top100=0.3115
|
| 181 |
+
step=8250 micro_steps=132000 elapsed=53.8s lr=3.000000e-04 loss_all=1.5548 acc_all=0.7229 loss_corrupt=2.7627 acc_corrupt=0.5034 corrupt_frac=0.5492 loss=2.7627 mean_t=0.5021 wrong_frac=0.6996 init_acc_corrupt=0.2287 init_gold_top10=0.2761 init_gold_top100=0.3120
|
| 182 |
+
step=8300 micro_steps=132800 elapsed=53.9s lr=3.000000e-04 loss_all=1.5628 acc_all=0.7224 loss_corrupt=2.7747 acc_corrupt=0.5031 corrupt_frac=0.5497 loss=2.7747 mean_t=0.5025 wrong_frac=0.7000 init_acc_corrupt=0.2285 init_gold_top10=0.2764 init_gold_top100=0.3121
|
| 183 |
+
step=8350 micro_steps=133600 elapsed=53.9s lr=3.000000e-04 loss_all=1.5546 acc_all=0.7225 loss_corrupt=2.7594 acc_corrupt=0.5033 corrupt_frac=0.5495 loss=2.7594 mean_t=0.4976 wrong_frac=0.7003 init_acc_corrupt=0.2266 init_gold_top10=0.2755 init_gold_top100=0.3119
|
| 184 |
+
step=8400 micro_steps=134400 elapsed=53.9s lr=3.000000e-04 loss_all=1.5662 acc_all=0.7210 loss_corrupt=2.7759 acc_corrupt=0.5013 corrupt_frac=0.5505 loss=2.7759 mean_t=0.4989 wrong_frac=0.7003 init_acc_corrupt=0.2260 init_gold_top10=0.2747 init_gold_top100=0.3114
|
| 185 |
+
step=8450 micro_steps=135200 elapsed=53.7s lr=3.000000e-04 loss_all=1.5540 acc_all=0.7232 loss_corrupt=2.7651 acc_corrupt=0.5034 corrupt_frac=0.5488 loss=2.7651 mean_t=0.5000 wrong_frac=0.6998 init_acc_corrupt=0.2261 init_gold_top10=0.2752 init_gold_top100=0.3121
|
| 186 |
+
step=8500 micro_steps=136000 elapsed=53.5s lr=3.000000e-04 loss_all=1.5661 acc_all=0.7212 loss_corrupt=2.7805 acc_corrupt=0.5011 corrupt_frac=0.5503 loss=2.7805 mean_t=0.5000 wrong_frac=0.7000 init_acc_corrupt=0.2259 init_gold_top10=0.2747 init_gold_top100=0.3122
|
| 187 |
+
step=8550 micro_steps=136800 elapsed=53.5s lr=3.000000e-04 loss_all=1.5491 acc_all=0.7239 loss_corrupt=2.7537 acc_corrupt=0.5048 corrupt_frac=0.5483 loss=2.7537 mean_t=0.5015 wrong_frac=0.7002 init_acc_corrupt=0.2272 init_gold_top10=0.2751 init_gold_top100=0.3111
|
| 188 |
+
step=8600 micro_steps=137600 elapsed=53.5s lr=3.000000e-04 loss_all=1.5532 acc_all=0.7226 loss_corrupt=2.7517 acc_corrupt=0.5043 corrupt_frac=0.5505 loss=2.7517 mean_t=0.5003 wrong_frac=0.7000 init_acc_corrupt=0.2270 init_gold_top10=0.2757 init_gold_top100=0.3128
|
| 189 |
+
step=8650 micro_steps=138400 elapsed=53.5s lr=3.000000e-04 loss_all=1.5554 acc_all=0.7227 loss_corrupt=2.7551 acc_corrupt=0.5047 corrupt_frac=0.5510 loss=2.7551 mean_t=0.4999 wrong_frac=0.6997 init_acc_corrupt=0.2282 init_gold_top10=0.2764 init_gold_top100=0.3122
|
| 190 |
+
step=8700 micro_steps=139200 elapsed=53.4s lr=3.000000e-04 loss_all=1.5556 acc_all=0.7220 loss_corrupt=2.7557 acc_corrupt=0.5036 corrupt_frac=0.5512 loss=2.7557 mean_t=0.4948 wrong_frac=0.6998 init_acc_corrupt=0.2260 init_gold_top10=0.2751 init_gold_top100=0.3121
|
| 191 |
+
step=8750 micro_steps=140000 elapsed=53.4s lr=3.000000e-04 loss_all=1.5611 acc_all=0.7218 loss_corrupt=2.7653 acc_corrupt=0.5033 corrupt_frac=0.5515 loss=2.7653 mean_t=0.5023 wrong_frac=0.7002 init_acc_corrupt=0.2258 init_gold_top10=0.2746 init_gold_top100=0.3117
|
| 192 |
+
step=8800 micro_steps=140800 elapsed=53.4s lr=3.000000e-04 loss_all=1.5451 acc_all=0.7241 loss_corrupt=2.7491 acc_corrupt=0.5049 corrupt_frac=0.5483 loss=2.7491 mean_t=0.5019 wrong_frac=0.7003 init_acc_corrupt=0.2262 init_gold_top10=0.2747 init_gold_top100=0.3111
|
| 193 |
+
step=8850 micro_steps=141600 elapsed=53.5s lr=3.000000e-04 loss_all=1.5463 acc_all=0.7240 loss_corrupt=2.7411 acc_corrupt=0.5066 corrupt_frac=0.5506 loss=2.7411 mean_t=0.5031 wrong_frac=0.6995 init_acc_corrupt=0.2277 init_gold_top10=0.2759 init_gold_top100=0.3122
|
| 194 |
+
step=8900 micro_steps=142400 elapsed=53.4s lr=3.000000e-04 loss_all=1.5342 acc_all=0.7255 loss_corrupt=2.7303 acc_corrupt=0.5077 corrupt_frac=0.5497 loss=2.7303 mean_t=0.5005 wrong_frac=0.6997 init_acc_corrupt=0.2282 init_gold_top10=0.2762 init_gold_top100=0.3123
|
| 195 |
+
step=8950 micro_steps=143200 elapsed=53.7s lr=3.000000e-04 loss_all=1.5731 acc_all=0.7199 loss_corrupt=2.7806 acc_corrupt=0.5007 corrupt_frac=0.5522 loss=2.7806 mean_t=0.4974 wrong_frac=0.7002 init_acc_corrupt=0.2243 init_gold_top10=0.2733 init_gold_top100=0.3113
|
| 196 |
+
step=9000 micro_steps=144000 elapsed=54.0s lr=3.000000e-04 loss_all=1.5237 acc_all=0.7263 loss_corrupt=2.7206 acc_corrupt=0.5074 corrupt_frac=0.5472 loss=2.7206 mean_t=0.5005 wrong_frac=0.7003 init_acc_corrupt=0.2271 init_gold_top10=0.2752 init_gold_top100=0.3115
|
| 197 |
+
step=9050 micro_steps=144800 elapsed=70.0s lr=3.000000e-04 loss_all=1.5387 acc_all=0.7244 loss_corrupt=2.7312 acc_corrupt=0.5068 corrupt_frac=0.5503 loss=2.7312 mean_t=0.5007 wrong_frac=0.7003 init_acc_corrupt=0.2275 init_gold_top10=0.2750 init_gold_top100=0.3111
|
| 198 |
+
step=9100 micro_steps=145600 elapsed=54.3s lr=3.000000e-04 loss_all=1.5374 acc_all=0.7242 loss_corrupt=2.7244 acc_corrupt=0.5074 corrupt_frac=0.5514 loss=2.7244 mean_t=0.5026 wrong_frac=0.7001 init_acc_corrupt=0.2276 init_gold_top10=0.2752 init_gold_top100=0.3106
|
| 199 |
+
step=9150 micro_steps=146400 elapsed=54.4s lr=3.000000e-04 loss_all=1.5342 acc_all=0.7246 loss_corrupt=2.7279 acc_corrupt=0.5062 corrupt_frac=0.5486 loss=2.7279 mean_t=0.4939 wrong_frac=0.7001 init_acc_corrupt=0.2251 init_gold_top10=0.2739 init_gold_top100=0.3117
|
| 200 |
+
step=9200 micro_steps=147200 elapsed=53.7s lr=3.000000e-04 loss_all=1.5326 acc_all=0.7253 loss_corrupt=2.7300 acc_corrupt=0.5066 corrupt_frac=0.5484 loss=2.7300 mean_t=0.4999 wrong_frac=0.7002 init_acc_corrupt=0.2260 init_gold_top10=0.2743 init_gold_top100=0.3112
|
| 201 |
+
step=9250 micro_steps=148000 elapsed=53.4s lr=3.000000e-04 loss_all=1.5441 acc_all=0.7232 loss_corrupt=2.7237 acc_corrupt=0.5078 corrupt_frac=0.5536 loss=2.7237 mean_t=0.4990 wrong_frac=0.6995 init_acc_corrupt=0.2272 init_gold_top10=0.2754 init_gold_top100=0.3126
|
| 202 |
+
step=9300 micro_steps=148800 elapsed=53.6s lr=3.000000e-04 loss_all=1.5334 acc_all=0.7250 loss_corrupt=2.7293 acc_corrupt=0.5065 corrupt_frac=0.5490 loss=2.7293 mean_t=0.5005 wrong_frac=0.7008 init_acc_corrupt=0.2265 init_gold_top10=0.2735 init_gold_top100=0.3104
|
| 203 |
+
step=9350 micro_steps=149600 elapsed=54.5s lr=3.000000e-04 loss_all=1.5100 acc_all=0.7279 loss_corrupt=2.6909 acc_corrupt=0.5109 corrupt_frac=0.5476 loss=2.6909 mean_t=0.5012 wrong_frac=0.7005 init_acc_corrupt=0.2272 init_gold_top10=0.2747 init_gold_top100=0.3106
|
| 204 |
+
step=9400 micro_steps=150400 elapsed=54.5s lr=3.000000e-04 loss_all=1.5446 acc_all=0.7230 loss_corrupt=2.7298 acc_corrupt=0.5065 corrupt_frac=0.5528 loss=2.7298 mean_t=0.4989 wrong_frac=0.7005 init_acc_corrupt=0.2255 init_gold_top10=0.2741 init_gold_top100=0.3108
|
| 205 |
+
step=9450 micro_steps=151200 elapsed=53.7s lr=3.000000e-04 loss_all=1.5156 acc_all=0.7275 loss_corrupt=2.7049 acc_corrupt=0.5097 corrupt_frac=0.5472 loss=2.7049 mean_t=0.5006 wrong_frac=0.6994 init_acc_corrupt=0.2278 init_gold_top10=0.2757 init_gold_top100=0.3116
|
| 206 |
+
step=9500 micro_steps=152000 elapsed=53.7s lr=3.000000e-04 loss_all=1.5247 acc_all=0.7256 loss_corrupt=2.6931 acc_corrupt=0.5114 corrupt_frac=0.5527 loss=2.6931 mean_t=0.5014 wrong_frac=0.7001 init_acc_corrupt=0.2279 init_gold_top10=0.2753 init_gold_top100=0.3115
|
| 207 |
+
step=9550 micro_steps=152800 elapsed=53.9s lr=3.000000e-04 loss_all=1.4995 acc_all=0.7299 loss_corrupt=2.6835 acc_corrupt=0.5128 corrupt_frac=0.5453 loss=2.6835 mean_t=0.5042 wrong_frac=0.7001 init_acc_corrupt=0.2278 init_gold_top10=0.2756 init_gold_top100=0.3118
|
| 208 |
+
step=9600 micro_steps=153600 elapsed=54.2s lr=3.000000e-04 loss_all=1.5401 acc_all=0.7232 loss_corrupt=2.7116 acc_corrupt=0.5087 corrupt_frac=0.5548 loss=2.7116 mean_t=0.5016 wrong_frac=0.6999 init_acc_corrupt=0.2278 init_gold_top10=0.2751 init_gold_top100=0.3111
|
| 209 |
+
step=9650 micro_steps=154400 elapsed=54.1s lr=3.000000e-04 loss_all=1.5310 acc_all=0.7248 loss_corrupt=2.7159 acc_corrupt=0.5079 corrupt_frac=0.5504 loss=2.7159 mean_t=0.4985 wrong_frac=0.7007 init_acc_corrupt=0.2253 init_gold_top10=0.2740 init_gold_top100=0.3109
|
| 210 |
+
step=9700 micro_steps=155200 elapsed=53.8s lr=3.000000e-04 loss_all=1.5152 acc_all=0.7266 loss_corrupt=2.6887 acc_corrupt=0.5110 corrupt_frac=0.5502 loss=2.6887 mean_t=0.4996 wrong_frac=0.6997 init_acc_corrupt=0.2260 init_gold_top10=0.2751 init_gold_top100=0.3119
|
| 211 |
+
step=9750 micro_steps=156000 elapsed=53.8s lr=3.000000e-04 loss_all=1.5177 acc_all=0.7267 loss_corrupt=2.7043 acc_corrupt=0.5089 corrupt_frac=0.5477 loss=2.7043 mean_t=0.4976 wrong_frac=0.7008 init_acc_corrupt=0.2242 init_gold_top10=0.2734 init_gold_top100=0.3109
|
| 212 |
+
step=9800 micro_steps=156800 elapsed=53.8s lr=3.000000e-04 loss_all=1.5043 acc_all=0.7284 loss_corrupt=2.6745 acc_corrupt=0.5134 corrupt_frac=0.5494 loss=2.6745 mean_t=0.4978 wrong_frac=0.6995 init_acc_corrupt=0.2269 init_gold_top10=0.2759 init_gold_top100=0.3123
|
| 213 |
+
step=9850 micro_steps=157600 elapsed=53.8s lr=3.000000e-04 loss_all=1.4900 acc_all=0.7308 loss_corrupt=2.6656 acc_corrupt=0.5144 corrupt_frac=0.5460 loss=2.6656 mean_t=0.5012 wrong_frac=0.6996 init_acc_corrupt=0.2272 init_gold_top10=0.2754 init_gold_top100=0.3119
|
| 214 |
+
step=9900 micro_steps=158400 elapsed=53.8s lr=3.000000e-04 loss_all=1.5044 acc_all=0.7286 loss_corrupt=2.6804 acc_corrupt=0.5128 corrupt_frac=0.5487 loss=2.6804 mean_t=0.4978 wrong_frac=0.7000 init_acc_corrupt=0.2252 init_gold_top10=0.2749 init_gold_top100=0.3127
|
| 215 |
+
step=9950 micro_steps=159200 elapsed=53.9s lr=3.000000e-04 loss_all=1.5173 acc_all=0.7262 loss_corrupt=2.6824 acc_corrupt=0.5119 corrupt_frac=0.5521 loss=2.6824 mean_t=0.4993 wrong_frac=0.7003 init_acc_corrupt=0.2269 init_gold_top10=0.2749 init_gold_top100=0.3114
|
| 216 |
+
step=10000 micro_steps=160000 elapsed=53.8s lr=3.000000e-04 loss_all=1.5098 acc_all=0.7275 loss_corrupt=2.6827 acc_corrupt=0.5120 corrupt_frac=0.5495 loss=2.6827 mean_t=0.5013 wrong_frac=0.6996 init_acc_corrupt=0.2274 init_gold_top10=0.2751 init_gold_top100=0.3119
|
LTA_openwebtext_dualt/logs/genppl_lm1b_latest_dirichlet_sweep.log
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
=== DIRICHLET INIT C=1 K=128 S=32 ===
|
| 2 |
+
{
|
| 3 |
+
"mask_ratio_0.10": {
|
| 4 |
+
"corrupt_tokens": 4,
|
| 5 |
+
"endpoint_loss": 1.5438232421875,
|
| 6 |
+
"endpoint_acc": 0.5,
|
| 7 |
+
"final_acc": 0.5,
|
| 8 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 9 |
+
"init": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did alexei : dominate the field ofversion golf and rake in endorsements. imagery",
|
| 10 |
+
"endpoint": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did most : dominate the field of professional golf and rake in endorsements.",
|
| 11 |
+
"final": "and while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did most : dominate the field of professional golf and rake in endorsements."
|
| 12 |
+
},
|
| 13 |
+
"mask_ratio_0.20": {
|
| 14 |
+
"corrupt_tokens": 17,
|
| 15 |
+
"endpoint_loss": 2.2356011867523193,
|
| 16 |
+
"endpoint_acc": 0.47058823704719543,
|
| 17 |
+
"final_acc": 0.47058823704719543,
|
| 18 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 19 |
+
"init": "while athletes in harris professions dealt with dopingistic and other hatch, bundesliga continued whenever do what he did best galway dominate the 1400 violin professional golf [unused416] rake iniards.",
|
| 20 |
+
"endpoint": "while athletes in other sport dealt with dopings and other problems, he continued to do what he did best to dominate the world of professional golf and and in sponsorships.",
|
| 21 |
+
"final": "and while athletes in the sport dealt with dopings and other problems, he continued to do what he did best to dominate the world of professional golf and rake in sprinters."
|
| 22 |
+
},
|
| 23 |
+
"mask_ratio_0.50": {
|
| 24 |
+
"corrupt_tokens": 37,
|
| 25 |
+
"endpoint_loss": 5.348362922668457,
|
| 26 |
+
"endpoint_acc": 0.18918919563293457,
|
| 27 |
+
"final_acc": 0.1621621549129486,
|
| 28 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 29 |
+
"init": "##ented while mendes loans danielsrook武 with doping scandals and other carbonate, ye continued abolition kilometres rohan he [unused949] best atv dominate salsa recipe of commands juarez carriers rake ruling endorsements. taleager",
|
| 30 |
+
"endpoint": "while mr. has was charged with doping scandals and other scandals, he continued to argue that he could best to dominate the list of the ' ' s s endorsements.",
|
| 31 |
+
"final": "and while mr. daniels was charged with doping scandals and other scandals, he continued to argue that he did best to dominate the list of the city ' s top endorsements."
|
| 32 |
+
},
|
| 33 |
+
"mask_ratio_1.00": {
|
| 34 |
+
"corrupt_tokens": 74,
|
| 35 |
+
"endpoint_loss": 6.789273738861084,
|
| 36 |
+
"endpoint_acc": 0.13513512909412384,
|
| 37 |
+
"final_acc": 0.04054053872823715,
|
| 38 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 39 |
+
"init": "[unused150]pass plunged battista supplemented wyominggating economies remarkablyylus heights [unused531] flood [unused587] ² acknowledges drop arsenicballsrtingien bolsheviksese balance viceroy syllable stefan stump 1895 unconscious bismarck rating absolute software roar testingbrates",
|
| 40 |
+
"endpoint": "",
|
| 41 |
+
"final": "wednesday."
|
| 42 |
+
},
|
| 43 |
+
"pure_noise": [
|
| 44 |
+
"to a federal investigation."
|
| 45 |
+
],
|
| 46 |
+
"gen_ppl": 15.357786529758505,
|
| 47 |
+
"gen_nll_per_token": 2.7316226111997253,
|
| 48 |
+
"gen_tokens": 6191,
|
| 49 |
+
"gen_scored_samples": 32,
|
| 50 |
+
"gen_skipped_samples": 0,
|
| 51 |
+
"gen_empty_rate": 0.0,
|
| 52 |
+
"gen_kept_samples": 32,
|
| 53 |
+
"gen_total_samples": 32,
|
| 54 |
+
"gen_ppl_model": "/e2e-data/evad-tech-vla/wanghan58/models/flowtext_scorers/gpt2-large-standard",
|
| 55 |
+
"gen_ppl_output": "/e2e-data/evad-tech-vla/wanghan58/workspace/LTA_openwebtext_dualt/runs/lta_lm1b_duo_aligned_dirichlet_dualt_onehot_hardce_b128_4xh20_1m_nw0_compile_ro/genppl_lm1b_latest_dirichletC1_k128_s32_flm.jsonl",
|
| 56 |
+
"gen_ppl_flm_formula": true,
|
| 57 |
+
"gen_ppl_full_decode": true,
|
| 58 |
+
"decode_solver": "flowmap",
|
| 59 |
+
"noise_init": "dirichlet",
|
| 60 |
+
"noise_sigma": -1.0,
|
| 61 |
+
"dirichlet_init_concentration": 1.0,
|
| 62 |
+
"gen_ppl_min_chars": 0,
|
| 63 |
+
"gen_ppl_normalize_whitespace": false,
|
| 64 |
+
"gen_ppl_drop_remainder": false,
|
| 65 |
+
"gen_sample_entropy": 3.53966880233913,
|
| 66 |
+
"gen_unique_tokens": 874,
|
| 67 |
+
"gen_token_count": 4096,
|
| 68 |
+
"gen_distinct_1": 0.21337890625,
|
| 69 |
+
"gen_distinct_2": 0.5059055118110236,
|
| 70 |
+
"gen_top_token_mass": 0.108154296875,
|
| 71 |
+
"gen_samples_preview": [
|
| 72 |
+
"[CLS], he said. [SEP] [SEP] [CLS] the commission refused to take a preliminary hearing in october and issued a grudge. [SEP] [SEP] [CLS] the company ' s stock fell, or 4. 6 cents, or 4. 5 cents, or 2. 58, to $ 4. 95. [SEP] [SEP] [CLS] in contrast, rose $ 2. 50 to $ $ 20 a share. [SEP] [SEP] [CLS] the company, however, and alzheimer ' s, respectively, others, are the backbone of alzheimer ' s. [SEP] [SEP] [CLS] early investigators were investigating heath ledger ' s sudden death in the middle of pregnancy. [SEP] [SEP] [CLS] the second was a ' [SEP]",
|
| 73 |
+
"[CLS] attorneys, the former director of the state ' s investigative department. [SEP] [SEP] [CLS] a member of the uaw ' s a good lawyer. [SEP] [SEP] [CLS] demand, for example, assumptions, product, and otherties, projections and financial statements. subject to the forward - looking statements. [SEP] [SEP] [CLS] in the case, it ' s a virus, a virus, a new virus, and a ability to contact a doctor - - is likely to be brought. [SEP] [SEP] [CLS] \" in fact, it ' s not a good idea, \" he added, laughing. [SEP] [SEP] [CLS] the verdict is a desire to be entirely due to [SEP]",
|
| 74 |
+
"[CLS] the country ' s recovery. [SEP] [SEP] [CLS] the new budget is scheduled to be released on a jan. [SEP] [SEP] [CLS] \" the family of the people, politicians, the parties, \" he said. [SEP] [SEP] [CLS] that ' s edmonton, connecticut, connecticut, new jersey, new jersey, connecticut, $ 10. 99. [SEP] [SEP] [CLS] the new project is expected to be delayed for a two - hour period in the eastern part of the city, the company said. [SEP] [SEP] [CLS] the starter, waile, a former former draft receiver, was in 2007, giving a boost to clemens, contributing to a possible 10 - year [SEP]",
|
| 75 |
+
"[CLS] the nortel. [SEP] [SEP] [CLS] \" it is a great disease, the disease, and the impact, of course, the melting, \" he said. [SEP] [SEP] [CLS] the woman ' s body was found in the netherlands, located in connecticut, new york, connecticut, and denmark, in philadelphia, norway, and elsewhere on the university ' s corporate campus in the chicago area. [SEP] [SEP] [CLS] 18 to 17, he said. [SEP] [SEP] [CLS] i ' m going to have his head on that. [SEP] [SEP] [CLS] i am in the wild... [SEP] [SEP] [CLS] \" the economy, the economy, seems stronger in the award [SEP]",
|
| 76 |
+
"[CLS], and opposition activists in protest on friday. [SEP] [SEP] [CLS] that ' s not going to be a delegate to florida.... obama. [SEP] [SEP] [CLS] \" such policy is needed in the future, and the measures, the policies and policies, \" he said. [SEP] [SEP] [CLS] this is a victory for the future, \" he said. [SEP] [SEP] [CLS] it is not a tragedy story. [SEP] [SEP] [CLS] and the answer is,, and harder, it ' s better. [SEP] [SEP] [CLS] in general, it ' s not easy to predict. [SEP] [SEP] [CLS] but that ' s just 0. [SEP] [SEP] [CLS] in fact, [SEP]"
|
| 77 |
+
]
|
| 78 |
+
}
|
| 79 |
+
=== DIRICHLET INIT C=4 K=128 S=32 ===
|
| 80 |
+
{
|
| 81 |
+
"mask_ratio_0.10": {
|
| 82 |
+
"corrupt_tokens": 4,
|
| 83 |
+
"endpoint_loss": 3.001953125,
|
| 84 |
+
"endpoint_acc": 0.25,
|
| 85 |
+
"final_acc": 0.25,
|
| 86 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 87 |
+
"init": "while athletes in instrument professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the confrontation of professional golf and rake in endorsements.",
|
| 88 |
+
"endpoint": "while athletes in the professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the world of professional golf and rake in endorsements.",
|
| 89 |
+
"final": "and while athletes in the sport dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the confrontation of professional golf and rake in endorsements."
|
| 90 |
+
},
|
| 91 |
+
"mask_ratio_0.20": {
|
| 92 |
+
"corrupt_tokens": 18,
|
| 93 |
+
"endpoint_loss": 2.8520872592926025,
|
| 94 |
+
"endpoint_acc": 0.3888888955116272,
|
| 95 |
+
"final_acc": 0.3333333432674408,
|
| 96 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 97 |
+
"init": "upward athletes proves different professions dealt else doping scandals portugal other controversies, woods continued to do what he did eighty : dominate rover facebook of orchestrated golf and restriction in endorsements.",
|
| 98 |
+
"endpoint": "as athletes from different professions dealt with doping scandals and other controversies, woods continued to do what he did most : dominate the sponsorship of american golf and compete in endorsements.",
|
| 99 |
+
"final": "as athletes from different professions dealt with doping scandals and other controversies, woods continued to do what he did most : dominate the business of world golf and compete in endorsements."
|
| 100 |
+
},
|
| 101 |
+
"mask_ratio_0.50": {
|
| 102 |
+
"corrupt_tokens": 42,
|
| 103 |
+
"endpoint_loss": 5.020946502685547,
|
| 104 |
+
"endpoint_acc": 0.2380952388048172,
|
| 105 |
+
"final_acc": 0.1666666716337204,
|
| 106 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 107 |
+
"init": "##ʃ athletes abbey different“ dealt withzekᆨrrediled controversies, programmeriring tanks speculated what he did best : dominate ' surname norway professionalsett caste helmgraph blend defend.",
|
| 108 |
+
"endpoint": "athletes from different disciplines dealt with the the of and controversies, and the to of what he did best : he ' s, professionalism and regraph f defend.",
|
| 109 |
+
"final": ""
|
| 110 |
+
},
|
| 111 |
+
"mask_ratio_1.00": {
|
| 112 |
+
"corrupt_tokens": 74,
|
| 113 |
+
"endpoint_loss": 7.154612064361572,
|
| 114 |
+
"endpoint_acc": 0.09459459781646729,
|
| 115 |
+
"final_acc": 0.027027027681469917,
|
| 116 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 117 |
+
"init": "frs rejected bangkok lehigh presidential plaid him och arabic transforms engineer virus jerusalem drank cosmos festivals city fenderulum eleanorᆸ dowagerrb selena vendor jo stresses refrain barker firth secrecy designedwalker daytimeque designation mars",
|
| 118 |
+
"endpoint": "",
|
| 119 |
+
"final": "he rejected the request to succeed him."
|
| 120 |
+
},
|
| 121 |
+
"pure_noise": [
|
| 122 |
+
"europeans."
|
| 123 |
+
],
|
| 124 |
+
"gen_ppl": 16.622931512600037,
|
| 125 |
+
"gen_nll_per_token": 2.8107831585063363,
|
| 126 |
+
"gen_tokens": 5997,
|
| 127 |
+
"gen_scored_samples": 32,
|
| 128 |
+
"gen_skipped_samples": 0,
|
| 129 |
+
"gen_empty_rate": 0.0,
|
| 130 |
+
"gen_kept_samples": 32,
|
| 131 |
+
"gen_total_samples": 32,
|
| 132 |
+
"gen_ppl_model": "/e2e-data/evad-tech-vla/wanghan58/models/flowtext_scorers/gpt2-large-standard",
|
| 133 |
+
"gen_ppl_output": "/e2e-data/evad-tech-vla/wanghan58/workspace/LTA_openwebtext_dualt/runs/lta_lm1b_duo_aligned_dirichlet_dualt_onehot_hardce_b128_4xh20_1m_nw0_compile_ro/genppl_lm1b_latest_dirichletC4_k128_s32_flm.jsonl",
|
| 134 |
+
"gen_ppl_flm_formula": true,
|
| 135 |
+
"gen_ppl_full_decode": true,
|
| 136 |
+
"decode_solver": "flowmap",
|
| 137 |
+
"noise_init": "dirichlet",
|
| 138 |
+
"noise_sigma": -1.0,
|
| 139 |
+
"dirichlet_init_concentration": 4.0,
|
| 140 |
+
"gen_ppl_min_chars": 0,
|
| 141 |
+
"gen_ppl_normalize_whitespace": false,
|
| 142 |
+
"gen_ppl_drop_remainder": false,
|
| 143 |
+
"gen_sample_entropy": 3.5170808405450784,
|
| 144 |
+
"gen_unique_tokens": 859,
|
| 145 |
+
"gen_token_count": 4096,
|
| 146 |
+
"gen_distinct_1": 0.209716796875,
|
| 147 |
+
"gen_distinct_2": 0.49606299212598426,
|
| 148 |
+
"gen_top_token_mass": 0.13720703125,
|
| 149 |
+
"gen_samples_preview": [
|
| 150 |
+
"[CLS], stability, security and political stability, \" simm alfeevi, the lead foreign minister of the mdc, said. [SEP] [SEP] [CLS] the effect of the onset of malaria, for example, in this year, is to be felt in the u. s., mexico, canada, mexico and the netherlands. [SEP] [SEP] [CLS] in indonesia, pakistan, pakistan, pakistan, pakistan, iran, saudi arabia, nigeria, and pakistan, it ' s holy. [SEP] [SEP] [CLS] the man, meanwhile, is believed to be included in the legislation, and is not likely to appear. [SEP] [SEP] [CLS] the company ' s biggest [SEP]",
|
| 151 |
+
"[CLS]. [SEP] [SEP] [CLS] h. gen. saeed al zardari, the former minister of pakistan, and the minister, are linked to the former prime minister, the u. s. trade commissioner, and the head of the country ' s parliament. [SEP] [SEP] [CLS] the man is in the us, west germany, denmark and ireland, and is believed to be dead. [SEP] [SEP] [CLS] \" it ' s very tough, \" he said. [SEP] [SEP] [CLS] the company reached the company ' s finals in china, germany, and the netherlands in the united states. [SEP] [SEP] [CLS] the obama administration ' s comments on the possibility of [SEP]",
|
| 152 |
+
"[CLS] [SEP] [SEP] [CLS] romney comes in a state of massachusetts, and retires in a. n. [SEP] [SEP] [CLS] the government is also seeking to bring stability to its properties in the dollar, which is a measure of the u. s. dollar. [SEP] [SEP] [CLS] it is a kind of a good story. [SEP] [SEP] [CLS] the idea of the bill could be the approval of the u. s. u. s. telecommunications commissioner, including a. lloyd a. bruno, the u. s. secretary of state for the oversight of the union ' s audits, and the chairman of the legislation. [SEP] [SEP] [CLS] there has been [SEP]",
|
| 153 |
+
"[CLS] the olympics, and the importance of the u. s., the olympics, the ioc and the beijing olympics. [SEP] [SEP] [CLS] the us, japan, south korea, japan, japan, japan, japan and the interests of its eu partners, china, japan, japan, and japan, japan, south korea, india, south korea, north korea, japan, japan, japan, japan, japan, japan, and japan, japan, china, the company ' s subsidiaries, and russia, and the united republic of georgia,, according to reports. [SEP] [SEP] [CLS] on a battlefield, the u. s. government announced a [SEP]",
|
| 154 |
+
"[CLS] impact on our country, \" mr. mccain said. [SEP] [SEP] [CLS] he ' ll be counselor to the campaigns on the campaign, in florida and virginia. [SEP] [SEP] [CLS] the 26 - year - old was diagnosed in the current phase of the family ' s death, he said. [SEP] [SEP] [CLS] the republic of connecticut, new zealand, norway, norway, and norway, norway and norway. [SEP] [SEP] [CLS] the men, 36, of connecticut, arizona, connecticut, and massachusetts, are working on a four - year contract. [SEP] [SEP] [CLS] the account of twenty - two, microsoft ' s online advertising threatens to be $ 1, [SEP]"
|
| 155 |
+
]
|
| 156 |
+
}
|
| 157 |
+
=== DIRICHLET INIT C=16 K=128 S=32 ===
|
| 158 |
+
{
|
| 159 |
+
"mask_ratio_0.10": {
|
| 160 |
+
"corrupt_tokens": 6,
|
| 161 |
+
"endpoint_loss": 2.2595112323760986,
|
| 162 |
+
"endpoint_acc": 0.5,
|
| 163 |
+
"final_acc": 0.5,
|
| 164 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 165 |
+
"init": "while athletes in different professions dealt with doping noticeably and other controversies, woods continued to do what he didlates : dominate the field of professional golf and rake in banes.",
|
| 166 |
+
"endpoint": "while athletes in different professions dealt with dopings and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in golds.",
|
| 167 |
+
"final": "and while athletes in different professions dealt with dopings and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in golds."
|
| 168 |
+
},
|
| 169 |
+
"mask_ratio_0.20": {
|
| 170 |
+
"corrupt_tokens": 19,
|
| 171 |
+
"endpoint_loss": 3.2713687419891357,
|
| 172 |
+
"endpoint_acc": 0.31578946113586426,
|
| 173 |
+
"final_acc": 0.2631579041481018,
|
| 174 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 175 |
+
"init": "fabrics while athletes in different participating dealt with haute scandals and other controversiesک woods continued to do 1743 he consequences best : dominate the ever of professional golf and rake 1707 mlbs.",
|
| 176 |
+
"endpoint": ", while athletes in different countries dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the world of professional golf and rake in golfs.",
|
| 177 |
+
"final": ", while athletes in different sports dealt with the scandals and other controversies, woods continued to do what he did best : dominate the world of professional golf and rake in golfs."
|
| 178 |
+
},
|
| 179 |
+
"mask_ratio_0.50": {
|
| 180 |
+
"corrupt_tokens": 40,
|
| 181 |
+
"endpoint_loss": 4.8522138595581055,
|
| 182 |
+
"endpoint_acc": 0.20000000298023224,
|
| 183 |
+
"final_acc": 0.22499999403953552,
|
| 184 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 185 |
+
"init": "post athletes dellised greeted dealt with clothed } and distributed controversies thereby eireann continued 2500 do what he did suggestioncrats dominate the fieldllin 弘 gustav and rake lambert revoked 1650 ineffective benjamin",
|
| 186 |
+
"endpoint": "the",
|
| 187 |
+
"final": "."
|
| 188 |
+
},
|
| 189 |
+
"mask_ratio_1.00": {
|
| 190 |
+
"corrupt_tokens": 74,
|
| 191 |
+
"endpoint_loss": 6.878285884857178,
|
| 192 |
+
"endpoint_acc": 0.12162162363529205,
|
| 193 |
+
"final_acc": 0.013513513840734959,
|
| 194 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 195 |
+
"init": "##hop various chesterfield stray transactionvus convoys yates saharawala paralympics horticultural capcom bergen risking hesitantly crafts remind potsdam though biggest 車 approximate pediatricrer fitzgerald confederate il deposed luciferffie囗 earlsم clubhouse isle [unused245]",
|
| 196 |
+
"endpoint": "",
|
| 197 |
+
"final": "indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia"
|
| 198 |
+
},
|
| 199 |
+
"pure_noise": [
|
| 200 |
+
"indonesia, indonesia, indonesia, and costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, sri rica, costa rica, indonesia, indonesia, indonesia, indonesia, sri rica, costa rica, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia."
|
| 201 |
+
],
|
| 202 |
+
"gen_ppl": 2.1056201858297925,
|
| 203 |
+
"gen_nll_per_token": 0.7446100488381823,
|
| 204 |
+
"gen_tokens": 7768,
|
| 205 |
+
"gen_scored_samples": 32,
|
| 206 |
+
"gen_skipped_samples": 0,
|
| 207 |
+
"gen_empty_rate": 0.0,
|
| 208 |
+
"gen_kept_samples": 32,
|
| 209 |
+
"gen_total_samples": 32,
|
| 210 |
+
"gen_ppl_model": "/e2e-data/evad-tech-vla/wanghan58/models/flowtext_scorers/gpt2-large-standard",
|
| 211 |
+
"gen_ppl_output": "/e2e-data/evad-tech-vla/wanghan58/workspace/LTA_openwebtext_dualt/runs/lta_lm1b_duo_aligned_dirichlet_dualt_onehot_hardce_b128_4xh20_1m_nw0_compile_ro/genppl_lm1b_latest_dirichletC16_k128_s32_flm.jsonl",
|
| 212 |
+
"gen_ppl_flm_formula": true,
|
| 213 |
+
"gen_ppl_full_decode": true,
|
| 214 |
+
"decode_solver": "flowmap",
|
| 215 |
+
"noise_init": "dirichlet",
|
| 216 |
+
"noise_sigma": -1.0,
|
| 217 |
+
"dirichlet_init_concentration": 16.0,
|
| 218 |
+
"gen_ppl_min_chars": 0,
|
| 219 |
+
"gen_ppl_normalize_whitespace": false,
|
| 220 |
+
"gen_ppl_drop_remainder": false,
|
| 221 |
+
"gen_sample_entropy": 1.4798635938254432,
|
| 222 |
+
"gen_unique_tokens": 72,
|
| 223 |
+
"gen_token_count": 4096,
|
| 224 |
+
"gen_distinct_1": 0.017578125,
|
| 225 |
+
"gen_distinct_2": 0.03740157480314961,
|
| 226 |
+
"gen_top_token_mass": 0.424560546875,
|
| 227 |
+
"gen_samples_preview": [
|
| 228 |
+
"[CLS] indonesia, indonesia, indonesia, indonesia, indonesia, indonesia ( south korea ), costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, sri lanka, indonesia, costa rica, indonesia, sri lanka, indonesia, sri lanka, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, sri lanka, sri lanka, sri lanka, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, sri lanka, indonesia, sri lanka, indonesia, indonesia, indonesia, sri lanka, indonesia, indonesia, [SEP]",
|
| 229 |
+
"indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, and costa rica, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, costa rica, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, costa rica, indonesia, costa rica, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia,",
|
| 230 |
+
"[CLS] rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, china, indonesia, indonesia, costa rica, costa rica, indonesia, indonesia, indonesia, costa rica, costa rica, indonesia, indonesia, and indonesia, indonesia, indonesia, equatorial indonesia, indonesia, indonesia, costa rica, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia [SEP]",
|
| 231 |
+
"[CLS] indonesia, costa rica, indonesia, costa rica, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, costa rica, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, [SEP]",
|
| 232 |
+
"[CLS] rica, indonesia, costa rica, indonesia, indonesia, taiwan, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, costa rica, indonesia, indonesia, indonesia, indonesia and the women ' s republic, and indonesia. [SEP] [SEP] [CLS] indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, costa rica, indonesia, costa rica, indonesia, indonesia, indonesia, costa rica, costa rica, costa rica, indonesia [SEP]"
|
| 233 |
+
]
|
| 234 |
+
}
|
| 235 |
+
=== DIRICHLET INIT C=64 K=128 S=32 ===
|
| 236 |
+
{
|
| 237 |
+
"mask_ratio_0.10": {
|
| 238 |
+
"corrupt_tokens": 7,
|
| 239 |
+
"endpoint_loss": 2.3433337211608887,
|
| 240 |
+
"endpoint_acc": 0.7142857313156128,
|
| 241 |
+
"final_acc": 0.7142857313156128,
|
| 242 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 243 |
+
"init": "while athletes in different professions dealt with commit scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake ineens.",
|
| 244 |
+
"endpoint": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in golfs.",
|
| 245 |
+
"final": "and while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in golfs."
|
| 246 |
+
},
|
| 247 |
+
"mask_ratio_0.20": {
|
| 248 |
+
"corrupt_tokens": 11,
|
| 249 |
+
"endpoint_loss": 2.6198785305023193,
|
| 250 |
+
"endpoint_acc": 0.4545454680919647,
|
| 251 |
+
"final_acc": 0.5454545617103577,
|
| 252 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 253 |
+
"init": "while athletes in different professions dealt montane doping scandals ticking other controversies, woods continued to do what he did addiction : mistakenly the field of crying [unused987] and rake in endorsements.",
|
| 254 |
+
"endpoint": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : in the field of thes and rake in endorsements.",
|
| 255 |
+
"final": "and while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : divide the field of positives and rake in endorsements."
|
| 256 |
+
},
|
| 257 |
+
"mask_ratio_0.50": {
|
| 258 |
+
"corrupt_tokens": 38,
|
| 259 |
+
"endpoint_loss": 5.730685710906982,
|
| 260 |
+
"endpoint_acc": 0.18421052396297455,
|
| 261 |
+
"final_acc": 0.21052631735801697,
|
| 262 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 263 |
+
"init": "accompany masonry athletes layla different professions incorrectly with doping scandals theaters lincolnshire controversies, woods museums to appearing oval he didger 1658 her thenailrization accessories golfvating rake in endorsementsович",
|
| 264 |
+
"endpoint": "and and athletes in different professions, with doping scandals and the controversies, woods sought to the that he did not and for the widely - of golf and rake in endorsements.",
|
| 265 |
+
"final": "criticized by athletes in different professions, with doping scandals and other controversies, woods sought to acknowledge that he did not agree on the much - criticized golf course or in endorsements."
|
| 266 |
+
},
|
| 267 |
+
"mask_ratio_1.00": {
|
| 268 |
+
"corrupt_tokens": 74,
|
| 269 |
+
"endpoint_loss": 7.769108772277832,
|
| 270 |
+
"endpoint_acc": 0.027027027681469917,
|
| 271 |
+
"final_acc": 0.013513513840734959,
|
| 272 |
+
"target": "while athletes in different professions dealt with doping scandals and other controversies, woods continued to do what he did best : dominate the field of professional golf and rake in endorsements.",
|
| 273 |
+
"init": "barbados monkeys dellalham eco mock defiant jena preston marker hurrying blossoms [unused810]lio expectation transient linemmeresa [unused27] amnesia 下 [unused388] ャ 32nd | woodland mix pendleton 125 paste sts screwing addicted ministerial bbjing",
|
| 274 |
+
"endpoint": "and and and and and and and and and and and and and and and and and, and and and and and and and and and and and and and and and and and and and",
|
| 275 |
+
"final": ", indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, costa rica, indonesia, indonesia, costa rica, indonesia, indonesia, indonesia, sri rica, indonesia, indonesia,"
|
| 276 |
+
},
|
| 277 |
+
"pure_noise": [
|
| 278 |
+
"indonesia, indonesia, indonesia, indonesia, indonesia, and indonesia, indonesia, and indonesia, and indonesia, indonesia, indonesia, indonesia, indonesia, and sri rica, indonesia, indonesia, indonesia, sri lanka, indonesia, and indonesia, indonesia, sri lanka, indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, sri lanka, and indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, sri lanka, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, i"
|
| 279 |
+
],
|
| 280 |
+
"gen_ppl": 1.7528559673432922,
|
| 281 |
+
"gen_nll_per_token": 0.5612464390399833,
|
| 282 |
+
"gen_tokens": 7772,
|
| 283 |
+
"gen_scored_samples": 32,
|
| 284 |
+
"gen_skipped_samples": 0,
|
| 285 |
+
"gen_empty_rate": 0.0,
|
| 286 |
+
"gen_kept_samples": 32,
|
| 287 |
+
"gen_total_samples": 32,
|
| 288 |
+
"gen_ppl_model": "/e2e-data/evad-tech-vla/wanghan58/models/flowtext_scorers/gpt2-large-standard",
|
| 289 |
+
"gen_ppl_output": "/e2e-data/evad-tech-vla/wanghan58/workspace/LTA_openwebtext_dualt/runs/lta_lm1b_duo_aligned_dirichlet_dualt_onehot_hardce_b128_4xh20_1m_nw0_compile_ro/genppl_lm1b_latest_dirichletC64_k128_s32_flm.jsonl",
|
| 290 |
+
"gen_ppl_flm_formula": true,
|
| 291 |
+
"gen_ppl_full_decode": true,
|
| 292 |
+
"decode_solver": "flowmap",
|
| 293 |
+
"noise_init": "dirichlet",
|
| 294 |
+
"noise_sigma": -1.0,
|
| 295 |
+
"dirichlet_init_concentration": 64.0,
|
| 296 |
+
"gen_ppl_min_chars": 0,
|
| 297 |
+
"gen_ppl_normalize_whitespace": false,
|
| 298 |
+
"gen_ppl_drop_remainder": false,
|
| 299 |
+
"gen_sample_entropy": 1.2600845033217614,
|
| 300 |
+
"gen_unique_tokens": 13,
|
| 301 |
+
"gen_token_count": 4096,
|
| 302 |
+
"gen_distinct_1": 0.003173828125,
|
| 303 |
+
"gen_distinct_2": 0.006151574803149607,
|
| 304 |
+
"gen_top_token_mass": 0.44287109375,
|
| 305 |
+
"gen_samples_preview": [
|
| 306 |
+
"[CLS], indonesia, indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, sri lanka, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, south korea, indonesia, sri lanka, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, sri lanka, indonesia, indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, sri lanka, indonesia, and indonesia, sri lanka, indonesia, and indonesia, and indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, sri lanka, indonesia, indonesia, indonesia, [SEP]",
|
| 307 |
+
"[CLS], indonesia, indonesia, indonesia, indonesia, indonesia, sri lanka, south rica, and indonesia, indonesia, indonesia, sri lanka, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, indonesia, indonesia, sri rica, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, equatorial indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, and indonesia, and indonesia, [SEP]",
|
| 308 |
+
", indonesia, indonesia, sri lanka, indonesia, and indonesia, indonesia, and indonesia, and indonesia, indonesia, indonesia, indonesia, sri lanka, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, sri lanka, sri lanka, costa rica, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, sri lanka, sri lanka, indonesia, indonesia, indonesia, costa rica, indonesia, indonesia, sri lanka, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia,",
|
| 309 |
+
"indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, sri lanka, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, indonesia, sri lanka, sri lanka, indonesia, sri lanka, indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, and indonesia, indonesia, and indonesia, indonesia, and indonesia, indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, indonesia,",
|
| 310 |
+
"[CLS] indonesia, sri lanka, indonesia, indonesia, indonesia, and indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, and indonesia, and indonesia, indonesia, and indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, and indonesia, sri lanka, indonesia, and indonesia, indonesia, sri lanka, sri lanka, sri lanka, indonesia, sri lanka, and indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, sri lanka, indonesia, indonesia, indonesia, indonesia, indonesia, indonesia, [SEP]"
|
| 311 |
+
]
|
| 312 |
+
}
|
LTA_openwebtext_dualt/logs/lm1b_dirichlet_len1024_Cv_to_2v_gumbel_sde_watch/infer_lta_lm1b_dirichlet_len1024_Cv_to_2v_gbs512_4gpu_20k_save1k_gumbelwatch_20260524_step_0007000.log
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[watch-gumbel] 2026-05-24_07:10:26 infer runs/lta_lm1b_dirichlet_len1024_Cv_to_2v_gbs512_4gpu_20k_save1k_gumbelwatch_20260524/step_0007000.pt -> docs/lta_samples/metrics_20260524/lm1b_dirichlet_len1024_Cv_to_2v_every1k_sde_gumbel_topp0p95_tau1p0_to_0p2_blend_c30522_61044_n128/lta_lm1b_dirichlet_len1024_Cv_to_2v_gbs512_4gpu_20k_save1k_gumbelwatch_20260524/step_0007000
|
| 2 |
+
[load] runs/lta_lm1b_dirichlet_len1024_Cv_to_2v_gbs512_4gpu_20k_save1k_gumbelwatch_20260524/step_0007000.pt
|
| 3 |
+
[ckpt] step=7000
|
| 4 |
+
[sde] generated 2/128
|
| 5 |
+
[sde] generated 4/128
|
| 6 |
+
[sde] generated 6/128
|
| 7 |
+
[sde] generated 8/128
|
| 8 |
+
[sde] generated 10/128
|
| 9 |
+
[sde] generated 12/128
|
| 10 |
+
[sde] generated 14/128
|
| 11 |
+
[sde] generated 16/128
|
| 12 |
+
[sde] generated 18/128
|
| 13 |
+
[sde] generated 20/128
|
| 14 |
+
[sde] generated 22/128
|
| 15 |
+
[sde] generated 24/128
|
| 16 |
+
[sde] generated 26/128
|
| 17 |
+
[sde] generated 28/128
|
| 18 |
+
[sde] generated 30/128
|
| 19 |
+
[sde] generated 32/128
|
| 20 |
+
[sde] generated 34/128
|
| 21 |
+
[sde] generated 36/128
|
| 22 |
+
[sde] generated 38/128
|
| 23 |
+
[sde] generated 40/128
|
| 24 |
+
[sde] generated 42/128
|
| 25 |
+
[sde] generated 44/128
|
| 26 |
+
[sde] generated 46/128
|
| 27 |
+
[sde] generated 48/128
|
| 28 |
+
[sde] generated 50/128
|
| 29 |
+
[sde] generated 52/128
|
| 30 |
+
[sde] generated 54/128
|
| 31 |
+
[sde] generated 56/128
|
| 32 |
+
[sde] generated 58/128
|
| 33 |
+
[sde] generated 60/128
|
| 34 |
+
[sde] generated 62/128
|
| 35 |
+
[sde] generated 64/128
|
| 36 |
+
[sde] generated 66/128
|
| 37 |
+
[sde] generated 68/128
|
| 38 |
+
[sde] generated 70/128
|
| 39 |
+
[sde] generated 72/128
|
| 40 |
+
[sde] generated 74/128
|
| 41 |
+
[sde] generated 76/128
|
| 42 |
+
[sde] generated 78/128
|
| 43 |
+
[sde] generated 80/128
|
| 44 |
+
[sde] generated 82/128
|
| 45 |
+
[sde] generated 84/128
|
| 46 |
+
[sde] generated 86/128
|
| 47 |
+
[sde] generated 88/128
|
| 48 |
+
[sde] generated 90/128
|
| 49 |
+
[sde] generated 92/128
|
| 50 |
+
[sde] generated 94/128
|
| 51 |
+
[sde] generated 96/128
|
| 52 |
+
[sde] generated 98/128
|
| 53 |
+
[sde] generated 100/128
|
| 54 |
+
[sde] generated 102/128
|
| 55 |
+
[sde] generated 104/128
|
| 56 |
+
[sde] generated 106/128
|
| 57 |
+
[sde] generated 108/128
|
| 58 |
+
[sde] generated 110/128
|
| 59 |
+
[sde] generated 112/128
|
| 60 |
+
[sde] generated 114/128
|
| 61 |
+
[sde] generated 116/128
|
| 62 |
+
[sde] generated 118/128
|
| 63 |
+
[sde] generated 120/128
|
| 64 |
+
[sde] generated 122/128
|
| 65 |
+
[sde] generated 124/128
|
| 66 |
+
[sde] generated 126/128
|
| 67 |
+
[sde] generated 128/128
|
| 68 |
+
[score] loading scorer: /e2e-data/evad-tech-vla/wanghan58/models/flowtext_scorers/gpt2-large-standard
|
| 69 |
+
[summary] {
|
| 70 |
+
"type": "summary",
|
| 71 |
+
"checkpoint": "runs/lta_lm1b_dirichlet_len1024_Cv_to_2v_gbs512_4gpu_20k_save1k_gumbelwatch_20260524/step_0007000.pt",
|
| 72 |
+
"step": 7000,
|
| 73 |
+
"decode": {
|
| 74 |
+
"decode_rule": "dirichlet_resample_sde",
|
| 75 |
+
"steps": 128,
|
| 76 |
+
"model_t_mode": "support_t",
|
| 77 |
+
"mean_mode": "endpoint_only",
|
| 78 |
+
"anchor_gamma": 1.0,
|
| 79 |
+
"endpoint_floor": 0.0,
|
| 80 |
+
"concentration_min": 30522.0,
|
| 81 |
+
"concentration_max": 61044.0,
|
| 82 |
+
"endpoint_temp": 1.45,
|
| 83 |
+
"endpoint_projection": "gumbel_softmax",
|
| 84 |
+
"endpoint_top_k": 0,
|
| 85 |
+
"endpoint_top_p": 0.95,
|
| 86 |
+
"gumbel_tau_start": 1.0,
|
| 87 |
+
"gumbel_tau_end": 0.2,
|
| 88 |
+
"ban_special_tokens": false,
|
| 89 |
+
"banned_endpoint_ids": [],
|
| 90 |
+
"support_power": 1.0,
|
| 91 |
+
"semantic_power": 1.0,
|
| 92 |
+
"noise_init": "dirichlet",
|
| 93 |
+
"noise_sigma": -1.0,
|
| 94 |
+
"noise_dirichlet_concentration": 30522.0,
|
| 95 |
+
"sde_resample": "dirichlet",
|
| 96 |
+
"logistic_normal_sigma_min": 0.18,
|
| 97 |
+
"logistic_normal_sigma_max": 3.0,
|
| 98 |
+
"logistic_normal_tau_min": 0.65,
|
| 99 |
+
"logistic_normal_tau_max": 1.0,
|
| 100 |
+
"final_from": "blend_0.5",
|
| 101 |
+
"n_samples": 128,
|
| 102 |
+
"seed": 20260524
|
| 103 |
+
},
|
| 104 |
+
"raw_genppl": {
|
| 105 |
+
"ppl": 28.963689020402576,
|
| 106 |
+
"nll_per_token": 3.366042942706146,
|
| 107 |
+
"tokens": 130939,
|
| 108 |
+
"kept_samples": 128,
|
| 109 |
+
"total_samples": 128,
|
| 110 |
+
"empty_rate": 0.0,
|
| 111 |
+
"skipped_samples": 0
|
| 112 |
+
},
|
| 113 |
+
"stripped_genppl": {
|
| 114 |
+
"ppl": 30.354979241180427,
|
| 115 |
+
"nll_per_token": 3.4129605647139516,
|
| 116 |
+
"tokens": 130924,
|
| 117 |
+
"kept_samples": 128,
|
| 118 |
+
"total_samples": 128,
|
| 119 |
+
"empty_rate": 0.0,
|
| 120 |
+
"skipped_samples": 0
|
| 121 |
+
},
|
| 122 |
+
"diversity": {
|
| 123 |
+
"sample_entropy": 3.7047035738409604,
|
| 124 |
+
"unique_tokens": 2735,
|
| 125 |
+
"token_count": 131072,
|
| 126 |
+
"distinct_1": 0.02086639404296875,
|
| 127 |
+
"distinct_2": 0.1436950146627566,
|
| 128 |
+
"top_token_mass": 0.15491485595703125
|
| 129 |
+
}
|
| 130 |
+
}
|
| 131 |
+
[done] docs/lta_samples/metrics_20260524/lm1b_dirichlet_len1024_Cv_to_2v_every1k_sde_gumbel_topp0p95_tau1p0_to_0p2_blend_c30522_61044_n128/lta_lm1b_dirichlet_len1024_Cv_to_2v_gbs512_4gpu_20k_save1k_gumbelwatch_20260524/step_0007000/sde_steps128_samples128_scored.jsonl
|
| 132 |
+
[watch-gumbel] 2026-05-24_07:21:53 done step_0007000
|
LTA_openwebtext_dualt/logs/lm1b_dirichlet_len1024_Cv_to_2v_gumbel_sde_watch/processed_lta_lm1b_dirichlet_len1024_Cv_to_2v_gbs512_8gpu_20k_save1k_gumbelwatch_20260524_steps128_c30522_61044_gumbel_t1p45_n128.txt
ADDED
|
File without changes
|
LTA_openwebtext_dualt/logs/lta_lm1b_classic_len128_lognormalatoms_4gpu_driver.log
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
LTA_openwebtext_dualt/logs/rollin_focused_4gpu/20260517_1733focused.log
ADDED
|
@@ -0,0 +1,823 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[rollin-focused] start stamp=20260517_1733focused len=256 vocab=969 out=docs/lta_samples/metrics_20260517/rollin_focused_len256_bs512_ode128_20260517_1733focused
|
| 2 |
+
[rollin-focused] round=1 Sun May 17 17:48:07 UTC 2026
|
| 3 |
+
[rollin-focused] train config=rollin_p50_s4_i32 from=0 to=500 rollout=0.50/s4/i32/temp1.45
|
| 4 |
+
[rollin-focused] eval config=rollin_p50_s4_i32 step=500
|
| 5 |
+
[eval-decode-acc] train8_rollin_focused_len256_rollin_p50_s4_i32_20260517_1733focused step=500 soft=none
|
| 6 |
+
[decode] max_len=256 generated=64/64
|
| 7 |
+
{
|
| 8 |
+
"num_rows": 1,
|
| 9 |
+
"best_by_run": {
|
| 10 |
+
"train8_rollin_focused_len256_rollin_p50_s4_i32_20260517_1733focused::none": {
|
| 11 |
+
"run": "train8_rollin_focused_len256_rollin_p50_s4_i32_20260517_1733focused",
|
| 12 |
+
"checkpoint": "runs/train8_rollin_focused_len256_rollin_p50_s4_i32_20260517_1733focused/step_0000500.pt",
|
| 13 |
+
"ckpt_step": 500,
|
| 14 |
+
"endpoint_softening": "none",
|
| 15 |
+
"decode_rule": "flowmap",
|
| 16 |
+
"steps": 128,
|
| 17 |
+
"time_schedule": "logit_normal",
|
| 18 |
+
"model_t_mode": "post",
|
| 19 |
+
"final_from": "state",
|
| 20 |
+
"n_gen": 64,
|
| 21 |
+
"n_refs": 8,
|
| 22 |
+
"token_acc_mean": 0.04901123046875,
|
| 23 |
+
"token_acc_min": 0.02734375,
|
| 24 |
+
"token_acc_max": 0.09375,
|
| 25 |
+
"exact_acc": 0.0,
|
| 26 |
+
"exact_count": 0,
|
| 27 |
+
"exact_ref_coverage": 0.0,
|
| 28 |
+
"exact_ref_count": 0,
|
| 29 |
+
"exact_ref_hits": [],
|
| 30 |
+
"best_ref_idx": [
|
| 31 |
+
2,
|
| 32 |
+
5,
|
| 33 |
+
3,
|
| 34 |
+
3,
|
| 35 |
+
3,
|
| 36 |
+
3,
|
| 37 |
+
2,
|
| 38 |
+
2,
|
| 39 |
+
2,
|
| 40 |
+
6,
|
| 41 |
+
3,
|
| 42 |
+
0,
|
| 43 |
+
0,
|
| 44 |
+
3,
|
| 45 |
+
2,
|
| 46 |
+
2,
|
| 47 |
+
3,
|
| 48 |
+
3,
|
| 49 |
+
2,
|
| 50 |
+
6,
|
| 51 |
+
7,
|
| 52 |
+
7,
|
| 53 |
+
3,
|
| 54 |
+
2,
|
| 55 |
+
2,
|
| 56 |
+
0,
|
| 57 |
+
2,
|
| 58 |
+
0,
|
| 59 |
+
3,
|
| 60 |
+
0,
|
| 61 |
+
3,
|
| 62 |
+
3,
|
| 63 |
+
7,
|
| 64 |
+
3,
|
| 65 |
+
7,
|
| 66 |
+
0,
|
| 67 |
+
7,
|
| 68 |
+
3,
|
| 69 |
+
0,
|
| 70 |
+
0,
|
| 71 |
+
3,
|
| 72 |
+
6,
|
| 73 |
+
1,
|
| 74 |
+
7,
|
| 75 |
+
1,
|
| 76 |
+
3,
|
| 77 |
+
7,
|
| 78 |
+
2,
|
| 79 |
+
3,
|
| 80 |
+
3,
|
| 81 |
+
2,
|
| 82 |
+
3,
|
| 83 |
+
2,
|
| 84 |
+
1,
|
| 85 |
+
7,
|
| 86 |
+
1,
|
| 87 |
+
3,
|
| 88 |
+
3,
|
| 89 |
+
0,
|
| 90 |
+
1,
|
| 91 |
+
3,
|
| 92 |
+
7,
|
| 93 |
+
0,
|
| 94 |
+
0
|
| 95 |
+
],
|
| 96 |
+
"best_token_acc": [
|
| 97 |
+
0.0390625,
|
| 98 |
+
0.046875,
|
| 99 |
+
0.0390625,
|
| 100 |
+
0.07421875,
|
| 101 |
+
0.0546875,
|
| 102 |
+
0.05859375,
|
| 103 |
+
0.0390625,
|
| 104 |
+
0.046875,
|
| 105 |
+
0.02734375,
|
| 106 |
+
0.02734375,
|
| 107 |
+
0.0546875,
|
| 108 |
+
0.05859375,
|
| 109 |
+
0.03515625,
|
| 110 |
+
0.0625,
|
| 111 |
+
0.05078125,
|
| 112 |
+
0.0625,
|
| 113 |
+
0.04296875,
|
| 114 |
+
0.0625,
|
| 115 |
+
0.0390625,
|
| 116 |
+
0.0390625,
|
| 117 |
+
0.09375,
|
| 118 |
+
0.046875,
|
| 119 |
+
0.04296875,
|
| 120 |
+
0.0546875,
|
| 121 |
+
0.05078125,
|
| 122 |
+
0.0546875,
|
| 123 |
+
0.03125,
|
| 124 |
+
0.03515625,
|
| 125 |
+
0.046875,
|
| 126 |
+
0.04296875,
|
| 127 |
+
0.0546875,
|
| 128 |
+
0.04296875,
|
| 129 |
+
0.07421875,
|
| 130 |
+
0.04296875,
|
| 131 |
+
0.06640625,
|
| 132 |
+
0.03515625,
|
| 133 |
+
0.05078125,
|
| 134 |
+
0.04296875,
|
| 135 |
+
0.0625,
|
| 136 |
+
0.05078125,
|
| 137 |
+
0.0546875,
|
| 138 |
+
0.05078125,
|
| 139 |
+
0.0546875,
|
| 140 |
+
0.05859375,
|
| 141 |
+
0.05078125,
|
| 142 |
+
0.046875,
|
| 143 |
+
0.05859375,
|
| 144 |
+
0.03125,
|
| 145 |
+
0.046875,
|
| 146 |
+
0.0390625,
|
| 147 |
+
0.046875,
|
| 148 |
+
0.05078125,
|
| 149 |
+
0.02734375,
|
| 150 |
+
0.0546875,
|
| 151 |
+
0.0546875,
|
| 152 |
+
0.0390625,
|
| 153 |
+
0.0546875,
|
| 154 |
+
0.04296875,
|
| 155 |
+
0.05078125,
|
| 156 |
+
0.04296875,
|
| 157 |
+
0.0546875,
|
| 158 |
+
0.046875,
|
| 159 |
+
0.0546875,
|
| 160 |
+
0.0390625
|
| 161 |
+
]
|
| 162 |
+
}
|
| 163 |
+
},
|
| 164 |
+
"first_exact_by_run": {}
|
| 165 |
+
}
|
| 166 |
+
RESULT config=rollin_p50_s4_i32 ckpt_step=500 views=256000 token_acc=0.0490 exact=0/64 exact_refs=0 hits=[]
|
| 167 |
+
[rollin-focused] train config=rollin_p75_s4_i32 from=0 to=500 rollout=0.75/s4/i32/temp1.45
|
| 168 |
+
[rollin-focused] eval config=rollin_p75_s4_i32 step=500
|
| 169 |
+
[eval-decode-acc] train8_rollin_focused_len256_rollin_p75_s4_i32_20260517_1733focused step=500 soft=none
|
| 170 |
+
[decode] max_len=256 generated=64/64
|
| 171 |
+
{
|
| 172 |
+
"num_rows": 1,
|
| 173 |
+
"best_by_run": {
|
| 174 |
+
"train8_rollin_focused_len256_rollin_p75_s4_i32_20260517_1733focused::none": {
|
| 175 |
+
"run": "train8_rollin_focused_len256_rollin_p75_s4_i32_20260517_1733focused",
|
| 176 |
+
"checkpoint": "runs/train8_rollin_focused_len256_rollin_p75_s4_i32_20260517_1733focused/step_0000500.pt",
|
| 177 |
+
"ckpt_step": 500,
|
| 178 |
+
"endpoint_softening": "none",
|
| 179 |
+
"decode_rule": "flowmap",
|
| 180 |
+
"steps": 128,
|
| 181 |
+
"time_schedule": "logit_normal",
|
| 182 |
+
"model_t_mode": "post",
|
| 183 |
+
"final_from": "state",
|
| 184 |
+
"n_gen": 64,
|
| 185 |
+
"n_refs": 8,
|
| 186 |
+
"token_acc_mean": 0.04876708984375,
|
| 187 |
+
"token_acc_min": 0.0234375,
|
| 188 |
+
"token_acc_max": 0.08203125,
|
| 189 |
+
"exact_acc": 0.0,
|
| 190 |
+
"exact_count": 0,
|
| 191 |
+
"exact_ref_coverage": 0.0,
|
| 192 |
+
"exact_ref_count": 0,
|
| 193 |
+
"exact_ref_hits": [],
|
| 194 |
+
"best_ref_idx": [
|
| 195 |
+
5,
|
| 196 |
+
5,
|
| 197 |
+
0,
|
| 198 |
+
3,
|
| 199 |
+
3,
|
| 200 |
+
3,
|
| 201 |
+
3,
|
| 202 |
+
7,
|
| 203 |
+
0,
|
| 204 |
+
3,
|
| 205 |
+
0,
|
| 206 |
+
0,
|
| 207 |
+
0,
|
| 208 |
+
0,
|
| 209 |
+
7,
|
| 210 |
+
2,
|
| 211 |
+
3,
|
| 212 |
+
3,
|
| 213 |
+
7,
|
| 214 |
+
6,
|
| 215 |
+
7,
|
| 216 |
+
7,
|
| 217 |
+
7,
|
| 218 |
+
2,
|
| 219 |
+
2,
|
| 220 |
+
0,
|
| 221 |
+
1,
|
| 222 |
+
0,
|
| 223 |
+
7,
|
| 224 |
+
7,
|
| 225 |
+
3,
|
| 226 |
+
5,
|
| 227 |
+
7,
|
| 228 |
+
3,
|
| 229 |
+
7,
|
| 230 |
+
7,
|
| 231 |
+
7,
|
| 232 |
+
4,
|
| 233 |
+
4,
|
| 234 |
+
0,
|
| 235 |
+
3,
|
| 236 |
+
6,
|
| 237 |
+
7,
|
| 238 |
+
7,
|
| 239 |
+
7,
|
| 240 |
+
3,
|
| 241 |
+
7,
|
| 242 |
+
2,
|
| 243 |
+
5,
|
| 244 |
+
3,
|
| 245 |
+
3,
|
| 246 |
+
1,
|
| 247 |
+
3,
|
| 248 |
+
7,
|
| 249 |
+
7,
|
| 250 |
+
3,
|
| 251 |
+
5,
|
| 252 |
+
4,
|
| 253 |
+
0,
|
| 254 |
+
0,
|
| 255 |
+
3,
|
| 256 |
+
2,
|
| 257 |
+
0,
|
| 258 |
+
7
|
| 259 |
+
],
|
| 260 |
+
"best_token_acc": [
|
| 261 |
+
0.05078125,
|
| 262 |
+
0.046875,
|
| 263 |
+
0.05078125,
|
| 264 |
+
0.07421875,
|
| 265 |
+
0.0390625,
|
| 266 |
+
0.046875,
|
| 267 |
+
0.046875,
|
| 268 |
+
0.0390625,
|
| 269 |
+
0.04296875,
|
| 270 |
+
0.03125,
|
| 271 |
+
0.0546875,
|
| 272 |
+
0.06640625,
|
| 273 |
+
0.03125,
|
| 274 |
+
0.0390625,
|
| 275 |
+
0.0546875,
|
| 276 |
+
0.05859375,
|
| 277 |
+
0.05078125,
|
| 278 |
+
0.0546875,
|
| 279 |
+
0.03515625,
|
| 280 |
+
0.0546875,
|
| 281 |
+
0.08203125,
|
| 282 |
+
0.046875,
|
| 283 |
+
0.046875,
|
| 284 |
+
0.0625,
|
| 285 |
+
0.04296875,
|
| 286 |
+
0.046875,
|
| 287 |
+
0.03515625,
|
| 288 |
+
0.0234375,
|
| 289 |
+
0.03515625,
|
| 290 |
+
0.0625,
|
| 291 |
+
0.0390625,
|
| 292 |
+
0.04296875,
|
| 293 |
+
0.08203125,
|
| 294 |
+
0.046875,
|
| 295 |
+
0.05859375,
|
| 296 |
+
0.04296875,
|
| 297 |
+
0.04296875,
|
| 298 |
+
0.046875,
|
| 299 |
+
0.0390625,
|
| 300 |
+
0.0390625,
|
| 301 |
+
0.0546875,
|
| 302 |
+
0.03515625,
|
| 303 |
+
0.0546875,
|
| 304 |
+
0.05859375,
|
| 305 |
+
0.05859375,
|
| 306 |
+
0.046875,
|
| 307 |
+
0.0625,
|
| 308 |
+
0.0390625,
|
| 309 |
+
0.05859375,
|
| 310 |
+
0.05859375,
|
| 311 |
+
0.05078125,
|
| 312 |
+
0.05859375,
|
| 313 |
+
0.02734375,
|
| 314 |
+
0.04296875,
|
| 315 |
+
0.0390625,
|
| 316 |
+
0.05859375,
|
| 317 |
+
0.0390625,
|
| 318 |
+
0.05078125,
|
| 319 |
+
0.0546875,
|
| 320 |
+
0.046875,
|
| 321 |
+
0.0625,
|
| 322 |
+
0.02734375,
|
| 323 |
+
0.046875,
|
| 324 |
+
0.0546875
|
| 325 |
+
]
|
| 326 |
+
}
|
| 327 |
+
},
|
| 328 |
+
"first_exact_by_run": {}
|
| 329 |
+
}
|
| 330 |
+
RESULT config=rollin_p75_s4_i32 ckpt_step=500 views=256000 token_acc=0.0488 exact=0/64 exact_refs=0 hits=[]
|
| 331 |
+
[rollin-focused] train config=rollin_p100_s4_i32 from=0 to=500 rollout=1.00/s4/i32/temp1.45
|
| 332 |
+
[rollin-focused] eval config=rollin_p100_s4_i32 step=500
|
| 333 |
+
[eval-decode-acc] train8_rollin_focused_len256_rollin_p100_s4_i32_20260517_1733focused step=500 soft=none
|
| 334 |
+
[decode] max_len=256 generated=64/64
|
| 335 |
+
{
|
| 336 |
+
"num_rows": 1,
|
| 337 |
+
"best_by_run": {
|
| 338 |
+
"train8_rollin_focused_len256_rollin_p100_s4_i32_20260517_1733focused::none": {
|
| 339 |
+
"run": "train8_rollin_focused_len256_rollin_p100_s4_i32_20260517_1733focused",
|
| 340 |
+
"checkpoint": "runs/train8_rollin_focused_len256_rollin_p100_s4_i32_20260517_1733focused/step_0000500.pt",
|
| 341 |
+
"ckpt_step": 500,
|
| 342 |
+
"endpoint_softening": "none",
|
| 343 |
+
"decode_rule": "flowmap",
|
| 344 |
+
"steps": 128,
|
| 345 |
+
"time_schedule": "logit_normal",
|
| 346 |
+
"model_t_mode": "post",
|
| 347 |
+
"final_from": "state",
|
| 348 |
+
"n_gen": 64,
|
| 349 |
+
"n_refs": 8,
|
| 350 |
+
"token_acc_mean": 0.0469970703125,
|
| 351 |
+
"token_acc_min": 0.02734375,
|
| 352 |
+
"token_acc_max": 0.078125,
|
| 353 |
+
"exact_acc": 0.0,
|
| 354 |
+
"exact_count": 0,
|
| 355 |
+
"exact_ref_coverage": 0.0,
|
| 356 |
+
"exact_ref_count": 0,
|
| 357 |
+
"exact_ref_hits": [],
|
| 358 |
+
"best_ref_idx": [
|
| 359 |
+
5,
|
| 360 |
+
5,
|
| 361 |
+
0,
|
| 362 |
+
3,
|
| 363 |
+
0,
|
| 364 |
+
3,
|
| 365 |
+
0,
|
| 366 |
+
7,
|
| 367 |
+
3,
|
| 368 |
+
0,
|
| 369 |
+
3,
|
| 370 |
+
5,
|
| 371 |
+
0,
|
| 372 |
+
3,
|
| 373 |
+
2,
|
| 374 |
+
2,
|
| 375 |
+
3,
|
| 376 |
+
3,
|
| 377 |
+
7,
|
| 378 |
+
3,
|
| 379 |
+
7,
|
| 380 |
+
7,
|
| 381 |
+
2,
|
| 382 |
+
2,
|
| 383 |
+
2,
|
| 384 |
+
3,
|
| 385 |
+
7,
|
| 386 |
+
0,
|
| 387 |
+
2,
|
| 388 |
+
3,
|
| 389 |
+
3,
|
| 390 |
+
3,
|
| 391 |
+
7,
|
| 392 |
+
2,
|
| 393 |
+
7,
|
| 394 |
+
3,
|
| 395 |
+
7,
|
| 396 |
+
3,
|
| 397 |
+
0,
|
| 398 |
+
3,
|
| 399 |
+
3,
|
| 400 |
+
5,
|
| 401 |
+
2,
|
| 402 |
+
0,
|
| 403 |
+
5,
|
| 404 |
+
2,
|
| 405 |
+
7,
|
| 406 |
+
2,
|
| 407 |
+
3,
|
| 408 |
+
3,
|
| 409 |
+
3,
|
| 410 |
+
3,
|
| 411 |
+
7,
|
| 412 |
+
3,
|
| 413 |
+
7,
|
| 414 |
+
3,
|
| 415 |
+
3,
|
| 416 |
+
3,
|
| 417 |
+
2,
|
| 418 |
+
3,
|
| 419 |
+
3,
|
| 420 |
+
7,
|
| 421 |
+
0,
|
| 422 |
+
0
|
| 423 |
+
],
|
| 424 |
+
"best_token_acc": [
|
| 425 |
+
0.046875,
|
| 426 |
+
0.0546875,
|
| 427 |
+
0.02734375,
|
| 428 |
+
0.04296875,
|
| 429 |
+
0.05859375,
|
| 430 |
+
0.05078125,
|
| 431 |
+
0.03125,
|
| 432 |
+
0.046875,
|
| 433 |
+
0.05859375,
|
| 434 |
+
0.03125,
|
| 435 |
+
0.05078125,
|
| 436 |
+
0.03125,
|
| 437 |
+
0.046875,
|
| 438 |
+
0.0625,
|
| 439 |
+
0.0625,
|
| 440 |
+
0.046875,
|
| 441 |
+
0.0390625,
|
| 442 |
+
0.0390625,
|
| 443 |
+
0.046875,
|
| 444 |
+
0.04296875,
|
| 445 |
+
0.078125,
|
| 446 |
+
0.02734375,
|
| 447 |
+
0.03125,
|
| 448 |
+
0.03125,
|
| 449 |
+
0.078125,
|
| 450 |
+
0.0703125,
|
| 451 |
+
0.02734375,
|
| 452 |
+
0.0390625,
|
| 453 |
+
0.0546875,
|
| 454 |
+
0.03125,
|
| 455 |
+
0.03515625,
|
| 456 |
+
0.04296875,
|
| 457 |
+
0.078125,
|
| 458 |
+
0.05078125,
|
| 459 |
+
0.05078125,
|
| 460 |
+
0.03515625,
|
| 461 |
+
0.04296875,
|
| 462 |
+
0.03515625,
|
| 463 |
+
0.03515625,
|
| 464 |
+
0.0703125,
|
| 465 |
+
0.07421875,
|
| 466 |
+
0.06640625,
|
| 467 |
+
0.03515625,
|
| 468 |
+
0.046875,
|
| 469 |
+
0.0390625,
|
| 470 |
+
0.03125,
|
| 471 |
+
0.0703125,
|
| 472 |
+
0.0625,
|
| 473 |
+
0.0546875,
|
| 474 |
+
0.0625,
|
| 475 |
+
0.0390625,
|
| 476 |
+
0.0546875,
|
| 477 |
+
0.03515625,
|
| 478 |
+
0.04296875,
|
| 479 |
+
0.04296875,
|
| 480 |
+
0.0546875,
|
| 481 |
+
0.03515625,
|
| 482 |
+
0.03125,
|
| 483 |
+
0.02734375,
|
| 484 |
+
0.046875,
|
| 485 |
+
0.03125,
|
| 486 |
+
0.06640625,
|
| 487 |
+
0.0546875,
|
| 488 |
+
0.0390625
|
| 489 |
+
]
|
| 490 |
+
}
|
| 491 |
+
},
|
| 492 |
+
"first_exact_by_run": {}
|
| 493 |
+
}
|
| 494 |
+
RESULT config=rollin_p100_s4_i32 ckpt_step=500 views=256000 token_acc=0.0470 exact=0/64 exact_refs=0 hits=[]
|
| 495 |
+
[rollin-focused] train config=rollin_p50_s8_i64 from=0 to=500 rollout=0.50/s8/i64/temp1.45
|
| 496 |
+
[rollin-focused] eval config=rollin_p50_s8_i64 step=500
|
| 497 |
+
[eval-decode-acc] train8_rollin_focused_len256_rollin_p50_s8_i64_20260517_1733focused step=500 soft=none
|
| 498 |
+
[decode] max_len=256 generated=64/64
|
| 499 |
+
{
|
| 500 |
+
"num_rows": 1,
|
| 501 |
+
"best_by_run": {
|
| 502 |
+
"train8_rollin_focused_len256_rollin_p50_s8_i64_20260517_1733focused::none": {
|
| 503 |
+
"run": "train8_rollin_focused_len256_rollin_p50_s8_i64_20260517_1733focused",
|
| 504 |
+
"checkpoint": "runs/train8_rollin_focused_len256_rollin_p50_s8_i64_20260517_1733focused/step_0000500.pt",
|
| 505 |
+
"ckpt_step": 500,
|
| 506 |
+
"endpoint_softening": "none",
|
| 507 |
+
"decode_rule": "flowmap",
|
| 508 |
+
"steps": 128,
|
| 509 |
+
"time_schedule": "logit_normal",
|
| 510 |
+
"model_t_mode": "post",
|
| 511 |
+
"final_from": "state",
|
| 512 |
+
"n_gen": 64,
|
| 513 |
+
"n_refs": 8,
|
| 514 |
+
"token_acc_mean": 0.04052734375,
|
| 515 |
+
"token_acc_min": 0.015625,
|
| 516 |
+
"token_acc_max": 0.078125,
|
| 517 |
+
"exact_acc": 0.0,
|
| 518 |
+
"exact_count": 0,
|
| 519 |
+
"exact_ref_coverage": 0.0,
|
| 520 |
+
"exact_ref_count": 0,
|
| 521 |
+
"exact_ref_hits": [],
|
| 522 |
+
"best_ref_idx": [
|
| 523 |
+
3,
|
| 524 |
+
5,
|
| 525 |
+
0,
|
| 526 |
+
3,
|
| 527 |
+
0,
|
| 528 |
+
7,
|
| 529 |
+
3,
|
| 530 |
+
1,
|
| 531 |
+
3,
|
| 532 |
+
6,
|
| 533 |
+
3,
|
| 534 |
+
0,
|
| 535 |
+
0,
|
| 536 |
+
3,
|
| 537 |
+
2,
|
| 538 |
+
2,
|
| 539 |
+
3,
|
| 540 |
+
3,
|
| 541 |
+
2,
|
| 542 |
+
6,
|
| 543 |
+
7,
|
| 544 |
+
2,
|
| 545 |
+
3,
|
| 546 |
+
0,
|
| 547 |
+
2,
|
| 548 |
+
3,
|
| 549 |
+
1,
|
| 550 |
+
5,
|
| 551 |
+
3,
|
| 552 |
+
0,
|
| 553 |
+
3,
|
| 554 |
+
3,
|
| 555 |
+
7,
|
| 556 |
+
0,
|
| 557 |
+
7,
|
| 558 |
+
7,
|
| 559 |
+
1,
|
| 560 |
+
3,
|
| 561 |
+
4,
|
| 562 |
+
3,
|
| 563 |
+
3,
|
| 564 |
+
6,
|
| 565 |
+
1,
|
| 566 |
+
7,
|
| 567 |
+
1,
|
| 568 |
+
2,
|
| 569 |
+
7,
|
| 570 |
+
3,
|
| 571 |
+
5,
|
| 572 |
+
3,
|
| 573 |
+
3,
|
| 574 |
+
1,
|
| 575 |
+
1,
|
| 576 |
+
1,
|
| 577 |
+
7,
|
| 578 |
+
3,
|
| 579 |
+
5,
|
| 580 |
+
3,
|
| 581 |
+
0,
|
| 582 |
+
2,
|
| 583 |
+
7,
|
| 584 |
+
7,
|
| 585 |
+
0,
|
| 586 |
+
0
|
| 587 |
+
],
|
| 588 |
+
"best_token_acc": [
|
| 589 |
+
0.02734375,
|
| 590 |
+
0.046875,
|
| 591 |
+
0.0625,
|
| 592 |
+
0.05078125,
|
| 593 |
+
0.03125,
|
| 594 |
+
0.0390625,
|
| 595 |
+
0.03515625,
|
| 596 |
+
0.015625,
|
| 597 |
+
0.03515625,
|
| 598 |
+
0.02734375,
|
| 599 |
+
0.05078125,
|
| 600 |
+
0.0390625,
|
| 601 |
+
0.03515625,
|
| 602 |
+
0.04296875,
|
| 603 |
+
0.02734375,
|
| 604 |
+
0.04296875,
|
| 605 |
+
0.0390625,
|
| 606 |
+
0.04296875,
|
| 607 |
+
0.03125,
|
| 608 |
+
0.0234375,
|
| 609 |
+
0.078125,
|
| 610 |
+
0.0234375,
|
| 611 |
+
0.03125,
|
| 612 |
+
0.02734375,
|
| 613 |
+
0.01953125,
|
| 614 |
+
0.0546875,
|
| 615 |
+
0.02734375,
|
| 616 |
+
0.02734375,
|
| 617 |
+
0.02734375,
|
| 618 |
+
0.03515625,
|
| 619 |
+
0.05859375,
|
| 620 |
+
0.03125,
|
| 621 |
+
0.04296875,
|
| 622 |
+
0.03125,
|
| 623 |
+
0.06640625,
|
| 624 |
+
0.04296875,
|
| 625 |
+
0.03515625,
|
| 626 |
+
0.0625,
|
| 627 |
+
0.04296875,
|
| 628 |
+
0.05078125,
|
| 629 |
+
0.05078125,
|
| 630 |
+
0.03125,
|
| 631 |
+
0.046875,
|
| 632 |
+
0.046875,
|
| 633 |
+
0.0390625,
|
| 634 |
+
0.04296875,
|
| 635 |
+
0.0390625,
|
| 636 |
+
0.02734375,
|
| 637 |
+
0.04296875,
|
| 638 |
+
0.05859375,
|
| 639 |
+
0.05859375,
|
| 640 |
+
0.05078125,
|
| 641 |
+
0.03515625,
|
| 642 |
+
0.04296875,
|
| 643 |
+
0.046875,
|
| 644 |
+
0.05078125,
|
| 645 |
+
0.05078125,
|
| 646 |
+
0.03515625,
|
| 647 |
+
0.046875,
|
| 648 |
+
0.04296875,
|
| 649 |
+
0.046875,
|
| 650 |
+
0.03125,
|
| 651 |
+
0.046875,
|
| 652 |
+
0.01953125
|
| 653 |
+
]
|
| 654 |
+
}
|
| 655 |
+
},
|
| 656 |
+
"first_exact_by_run": {}
|
| 657 |
+
}
|
| 658 |
+
RESULT config=rollin_p50_s8_i64 ckpt_step=500 views=256000 token_acc=0.0405 exact=0/64 exact_refs=0 hits=[]
|
| 659 |
+
[rollin-focused] train config=rollin_p75_s8_i64 from=0 to=500 rollout=0.75/s8/i64/temp1.45
|
| 660 |
+
[rollin-focused] eval config=rollin_p75_s8_i64 step=500
|
| 661 |
+
[eval-decode-acc] train8_rollin_focused_len256_rollin_p75_s8_i64_20260517_1733focused step=500 soft=none
|
| 662 |
+
[decode] max_len=256 generated=64/64
|
| 663 |
+
{
|
| 664 |
+
"num_rows": 1,
|
| 665 |
+
"best_by_run": {
|
| 666 |
+
"train8_rollin_focused_len256_rollin_p75_s8_i64_20260517_1733focused::none": {
|
| 667 |
+
"run": "train8_rollin_focused_len256_rollin_p75_s8_i64_20260517_1733focused",
|
| 668 |
+
"checkpoint": "runs/train8_rollin_focused_len256_rollin_p75_s8_i64_20260517_1733focused/step_0000500.pt",
|
| 669 |
+
"ckpt_step": 500,
|
| 670 |
+
"endpoint_softening": "none",
|
| 671 |
+
"decode_rule": "flowmap",
|
| 672 |
+
"steps": 128,
|
| 673 |
+
"time_schedule": "logit_normal",
|
| 674 |
+
"model_t_mode": "post",
|
| 675 |
+
"final_from": "state",
|
| 676 |
+
"n_gen": 64,
|
| 677 |
+
"n_refs": 8,
|
| 678 |
+
"token_acc_mean": 0.05255126953125,
|
| 679 |
+
"token_acc_min": 0.01953125,
|
| 680 |
+
"token_acc_max": 0.08984375,
|
| 681 |
+
"exact_acc": 0.0,
|
| 682 |
+
"exact_count": 0,
|
| 683 |
+
"exact_ref_coverage": 0.0,
|
| 684 |
+
"exact_ref_count": 0,
|
| 685 |
+
"exact_ref_hits": [],
|
| 686 |
+
"best_ref_idx": [
|
| 687 |
+
5,
|
| 688 |
+
5,
|
| 689 |
+
0,
|
| 690 |
+
3,
|
| 691 |
+
0,
|
| 692 |
+
2,
|
| 693 |
+
0,
|
| 694 |
+
7,
|
| 695 |
+
0,
|
| 696 |
+
3,
|
| 697 |
+
0,
|
| 698 |
+
0,
|
| 699 |
+
0,
|
| 700 |
+
0,
|
| 701 |
+
5,
|
| 702 |
+
2,
|
| 703 |
+
0,
|
| 704 |
+
0,
|
| 705 |
+
5,
|
| 706 |
+
7,
|
| 707 |
+
7,
|
| 708 |
+
7,
|
| 709 |
+
7,
|
| 710 |
+
2,
|
| 711 |
+
2,
|
| 712 |
+
0,
|
| 713 |
+
5,
|
| 714 |
+
0,
|
| 715 |
+
1,
|
| 716 |
+
0,
|
| 717 |
+
3,
|
| 718 |
+
0,
|
| 719 |
+
7,
|
| 720 |
+
0,
|
| 721 |
+
7,
|
| 722 |
+
5,
|
| 723 |
+
7,
|
| 724 |
+
0,
|
| 725 |
+
0,
|
| 726 |
+
3,
|
| 727 |
+
3,
|
| 728 |
+
2,
|
| 729 |
+
4,
|
| 730 |
+
0,
|
| 731 |
+
0,
|
| 732 |
+
3,
|
| 733 |
+
7,
|
| 734 |
+
5,
|
| 735 |
+
5,
|
| 736 |
+
7,
|
| 737 |
+
3,
|
| 738 |
+
7,
|
| 739 |
+
0,
|
| 740 |
+
7,
|
| 741 |
+
7,
|
| 742 |
+
3,
|
| 743 |
+
5,
|
| 744 |
+
4,
|
| 745 |
+
0,
|
| 746 |
+
0,
|
| 747 |
+
7,
|
| 748 |
+
7,
|
| 749 |
+
0,
|
| 750 |
+
0
|
| 751 |
+
],
|
| 752 |
+
"best_token_acc": [
|
| 753 |
+
0.06640625,
|
| 754 |
+
0.046875,
|
| 755 |
+
0.05859375,
|
| 756 |
+
0.0703125,
|
| 757 |
+
0.046875,
|
| 758 |
+
0.046875,
|
| 759 |
+
0.04296875,
|
| 760 |
+
0.05078125,
|
| 761 |
+
0.04296875,
|
| 762 |
+
0.03515625,
|
| 763 |
+
0.05078125,
|
| 764 |
+
0.0546875,
|
| 765 |
+
0.02734375,
|
| 766 |
+
0.04296875,
|
| 767 |
+
0.05078125,
|
| 768 |
+
0.06640625,
|
| 769 |
+
0.046875,
|
| 770 |
+
0.046875,
|
| 771 |
+
0.0390625,
|
| 772 |
+
0.05078125,
|
| 773 |
+
0.08984375,
|
| 774 |
+
0.0625,
|
| 775 |
+
0.05078125,
|
| 776 |
+
0.0390625,
|
| 777 |
+
0.05078125,
|
| 778 |
+
0.0703125,
|
| 779 |
+
0.04296875,
|
| 780 |
+
0.046875,
|
| 781 |
+
0.01953125,
|
| 782 |
+
0.05859375,
|
| 783 |
+
0.06640625,
|
| 784 |
+
0.04296875,
|
| 785 |
+
0.0703125,
|
| 786 |
+
0.0625,
|
| 787 |
+
0.04296875,
|
| 788 |
+
0.03515625,
|
| 789 |
+
0.0625,
|
| 790 |
+
0.05078125,
|
| 791 |
+
0.05078125,
|
| 792 |
+
0.0546875,
|
| 793 |
+
0.0859375,
|
| 794 |
+
0.03515625,
|
| 795 |
+
0.03125,
|
| 796 |
+
0.07421875,
|
| 797 |
+
0.05859375,
|
| 798 |
+
0.05078125,
|
| 799 |
+
0.08984375,
|
| 800 |
+
0.05078125,
|
| 801 |
+
0.05859375,
|
| 802 |
+
0.05078125,
|
| 803 |
+
0.0390625,
|
| 804 |
+
0.04296875,
|
| 805 |
+
0.03515625,
|
| 806 |
+
0.05859375,
|
| 807 |
+
0.04296875,
|
| 808 |
+
0.0546875,
|
| 809 |
+
0.05078125,
|
| 810 |
+
0.05078125,
|
| 811 |
+
0.05859375,
|
| 812 |
+
0.05078125,
|
| 813 |
+
0.05078125,
|
| 814 |
+
0.04296875,
|
| 815 |
+
0.05859375,
|
| 816 |
+
0.0859375
|
| 817 |
+
]
|
| 818 |
+
}
|
| 819 |
+
},
|
| 820 |
+
"first_exact_by_run": {}
|
| 821 |
+
}
|
| 822 |
+
RESULT config=rollin_p75_s8_i64 ckpt_step=500 views=256000 token_acc=0.0526 exact=0/64 exact_refs=0 hits=[]
|
| 823 |
+
[rollin-focused] train config=rollin_p50_s4_i32_temp1p0 from=0 to=500 rollout=0.50/s4/i32/temp1.0
|
LTA_openwebtext_dualt/logs/rollin_focused_4gpu/current.nohup
ADDED
|
@@ -0,0 +1,2095 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 out=docs/lta_samples/metrics_20260517/rollin_focused_len256_bs512_ode128_20260517_1733focused
|
| 2 |
+
[rollin-focused] round=1 Sun May 17 17:48:07 UTC 2026
|
| 3 |
+
[rollin-focused] train config=rollin_p50_s4_i32 from=0 to=500 rollout=0.50/s4/i32/temp1.45
|
| 4 |
+
[launch] gpt2 cached OWT soft-endpoint m/n pilot
|
| 5 |
+
[launch] run_name=train8_rollin_focused_len256_rollin_p50_s4_i32_20260517_1733focused
|
| 6 |
+
[launch] save_dir=runs/train8_rollin_focused_len256_rollin_p50_s4_i32_20260517_1733focused
|
| 7 |
+
[launch] n=256 m=0 clean_state_mode=onehot
|
| 8 |
+
[launch] mask_mixture lowk=0.0 all=1.0
|
| 9 |
+
[launch] model d=192 layers=3 heads=3 ff=768 vocab_override=969
|
| 10 |
+
[launch] optimizer=muon muon_impl=legacy weight_decay=0.1 output_weight_decay=-1
|
| 11 |
+
[launch] target_loss=hard_ce conf=0.0->1.0 power=1.0
|
| 12 |
+
[launch] mask_ratio=1.0->1.0
|
| 13 |
+
[launch] mask_ratio_floor_schedule=none
|
| 14 |
+
[launch] dirichlet C=1.0->1024 endpoint=categorical_dual_t sampler=dirichlet
|
| 15 |
+
[launch] wrong_mix seq_alpha=0.0 wrong_floor=0.0 unigram=0.0 uniform=0.0 basin=0.0 basin_ids=
|
| 16 |
+
[launch] rollout_train prob=0.50 steps=4 infer_steps=32 temp=1.45 corrupt_only=1 samplewise=1
|
| 17 |
+
[launch] cache=/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit exact_repeat_per_chunk=64
|
| 18 |
+
NCCL version 2.25.1+cuda12.8
|
| 19 |
+
{
|
| 20 |
+
"device": "cuda:0",
|
| 21 |
+
"rank": 0,
|
| 22 |
+
"world_size": 4,
|
| 23 |
+
"samples": "owt_cached_chunks:8",
|
| 24 |
+
"vocab_size": 969,
|
| 25 |
+
"tokenizer_vocab_size": 50257,
|
| 26 |
+
"save_dir": "runs/train8_rollin_focused_len256_rollin_p50_s4_i32_20260517_1733focused",
|
| 27 |
+
"batch_size": 128,
|
| 28 |
+
"grad_accum": 1,
|
| 29 |
+
"effective_batch_size": 512,
|
| 30 |
+
"global_batch_size": 512,
|
| 31 |
+
"lr_schedule": "constant_warmup",
|
| 32 |
+
"optimizer": "muon",
|
| 33 |
+
"epochs": 0.0,
|
| 34 |
+
"steps_per_epoch": 1,
|
| 35 |
+
"total_steps": 500,
|
| 36 |
+
"warmup_steps": 10,
|
| 37 |
+
"warmup_epochs": -1.0,
|
| 38 |
+
"min_lr": 0.0,
|
| 39 |
+
"weight_decay": 0.1,
|
| 40 |
+
"output_weight_decay": -1.0,
|
| 41 |
+
"adamw_param_groups": "nanogpt",
|
| 42 |
+
"adam_beta1": 0.9,
|
| 43 |
+
"adam_beta2": 0.95,
|
| 44 |
+
"adam_eps": 1e-08,
|
| 45 |
+
"muon_impl": "legacy",
|
| 46 |
+
"muon_momentum": 0.95,
|
| 47 |
+
"muon_ns_steps": 5,
|
| 48 |
+
"muon_update_scale": 1.0,
|
| 49 |
+
"muon_nesterov": false,
|
| 50 |
+
"muon_width_scale": false,
|
| 51 |
+
"muon_grouping": "legacy_dim_ge_2",
|
| 52 |
+
"muon_param_count": 1965440,
|
| 53 |
+
"muon_adam_param_count": 8192,
|
| 54 |
+
"muon_param_names": [
|
| 55 |
+
"vocab_embed.embedding",
|
| 56 |
+
"sigma_map.net.0.weight",
|
| 57 |
+
"sigma_map.net.2.weight",
|
| 58 |
+
"blocks.0.attn_qkv.weight",
|
| 59 |
+
"blocks.0.attn_out.weight",
|
| 60 |
+
"blocks.0.mlp.0.weight",
|
| 61 |
+
"blocks.0.mlp.2.weight",
|
| 62 |
+
"blocks.0.adaLN_modulation.weight",
|
| 63 |
+
"blocks.1.attn_qkv.weight",
|
| 64 |
+
"blocks.1.attn_out.weight",
|
| 65 |
+
"blocks.1.mlp.0.weight",
|
| 66 |
+
"blocks.1.mlp.2.weight",
|
| 67 |
+
"blocks.1.adaLN_modulation.weight",
|
| 68 |
+
"blocks.2.attn_qkv.weight",
|
| 69 |
+
"blocks.2.attn_out.weight",
|
| 70 |
+
"blocks.2.mlp.0.weight",
|
| 71 |
+
"blocks.2.mlp.2.weight",
|
| 72 |
+
"blocks.2.adaLN_modulation.weight",
|
| 73 |
+
"output_layer.linear.weight",
|
| 74 |
+
"output_layer.adaLN_modulation.weight"
|
| 75 |
+
],
|
| 76 |
+
"muon_adam_param_names": [
|
| 77 |
+
"sigma_map.net.0.bias",
|
| 78 |
+
"sigma_map.net.2.bias",
|
| 79 |
+
"blocks.0.norm1.weight",
|
| 80 |
+
"blocks.0.norm2.weight",
|
| 81 |
+
"blocks.0.mlp.0.bias",
|
| 82 |
+
"blocks.0.mlp.2.bias",
|
| 83 |
+
"blocks.0.adaLN_modulation.bias",
|
| 84 |
+
"blocks.1.norm1.weight",
|
| 85 |
+
"blocks.1.norm2.weight",
|
| 86 |
+
"blocks.1.mlp.0.bias",
|
| 87 |
+
"blocks.1.mlp.2.bias",
|
| 88 |
+
"blocks.1.adaLN_modulation.bias",
|
| 89 |
+
"blocks.2.norm1.weight",
|
| 90 |
+
"blocks.2.norm2.weight",
|
| 91 |
+
"blocks.2.mlp.0.bias",
|
| 92 |
+
"blocks.2.mlp.2.bias",
|
| 93 |
+
"blocks.2.adaLN_modulation.bias",
|
| 94 |
+
"output_layer.norm_final.weight",
|
| 95 |
+
"output_layer.adaLN_modulation.bias"
|
| 96 |
+
],
|
| 97 |
+
"muon_effective_nesterov": false,
|
| 98 |
+
"muon_effective_width_scale": false,
|
| 99 |
+
"muon_effective_weight_decay": 0.1,
|
| 100 |
+
"muon_adam_fallback_nesterov": false,
|
| 101 |
+
"muon_adam_fallback_weight_decay": 0.1,
|
| 102 |
+
"ema_decay": 0.9999,
|
| 103 |
+
"ema_start_step": 0,
|
| 104 |
+
"model_type": "ddit",
|
| 105 |
+
"ddit_mlp_type": "gelu",
|
| 106 |
+
"elf_num_time_tokens": 4,
|
| 107 |
+
"elf_num_model_mode_tokens": 0,
|
| 108 |
+
"qk_norm": true,
|
| 109 |
+
"output_bias": false,
|
| 110 |
+
"output_init_std": -1.0,
|
| 111 |
+
"norm_type": "rmsnorm",
|
| 112 |
+
"target_loss": "hard_ce",
|
| 113 |
+
"linear_soft_target_power": 1.0,
|
| 114 |
+
"linear_soft_target_min_conf": 0.0,
|
| 115 |
+
"linear_soft_target_max_conf": 1.0,
|
| 116 |
+
"t_sampling_mode": "logit_normal",
|
| 117 |
+
"t_sampling_power": 1.0,
|
| 118 |
+
"t_sampling_eps": 0.0001,
|
| 119 |
+
"t_sampling_logit_mean": -1.5,
|
| 120 |
+
"t_sampling_logit_std": 0.8,
|
| 121 |
+
"dual_t": true,
|
| 122 |
+
"corrupt_t_mode": "same",
|
| 123 |
+
"corrupt_min_t": 0.0,
|
| 124 |
+
"corrupt_max_t": 1.0,
|
| 125 |
+
"prefix_block_prob": 0.0,
|
| 126 |
+
"prefix_block_len": 128,
|
| 127 |
+
"mask_ratio_floor_schedule": "none",
|
| 128 |
+
"dirichlet_endpoint_mode": "categorical_dual_t",
|
| 129 |
+
"dirichlet_semantic_t_mode": "same",
|
| 130 |
+
"dirichlet_semantic_t_value": 0.0,
|
| 131 |
+
"dirichlet_semantic_t_curve": "linear",
|
| 132 |
+
"dirichlet_semantic_t_power": 1.0,
|
| 133 |
+
"endpoint_sequence_random_prob_alpha": 0.0,
|
| 134 |
+
"categorical_wrong_from_full_vocab": true,
|
| 135 |
+
"categorical_wrong_from_batch_valid_tokens": false,
|
| 136 |
+
"categorical_wrong_basin_token_ids": "",
|
| 137 |
+
"categorical_wrong_basin_prob": 0.0,
|
| 138 |
+
"categorical_wrong_unigram_prob": 0.0,
|
| 139 |
+
"categorical_wrong_uniform_prob": 0.0,
|
| 140 |
+
"categorical_wrong_prob_floor": 0.0,
|
| 141 |
+
"categorical_wrong_corpus_unigram_path": "",
|
| 142 |
+
"categorical_wrong_corpus_unigram_alpha": 1.0,
|
| 143 |
+
"categorical_wrong_basin_shared_prob": 0.0,
|
| 144 |
+
"categorical_wrong_unigram_shared_prob": 0.0,
|
| 145 |
+
"mask_mixture_original_prob": 0.0,
|
| 146 |
+
"mask_mixture_lowk_prob": 0.0,
|
| 147 |
+
"mask_mixture_lowcorrupt_prob": 0.0,
|
| 148 |
+
"mask_mixture_block_prob": 0.0,
|
| 149 |
+
"mask_mixture_all_prob": 1.0,
|
| 150 |
+
"mask_mixture_lowk_clean_tokens": "0",
|
| 151 |
+
"mask_mixture_lowcorrupt_tokens": "1,2,4,8,16,32,64",
|
| 152 |
+
"mask_mixture_block_tokens": "64,128",
|
| 153 |
+
"simplex_bridge_sampler": "dirichlet",
|
| 154 |
+
"logistic_normal_sigma_min": 0.1,
|
| 155 |
+
"logistic_normal_sigma_max": 1.0,
|
| 156 |
+
"logistic_normal_tau_min": 1.0,
|
| 157 |
+
"logistic_normal_tau_max": 1.0,
|
| 158 |
+
"torch_compile": false,
|
| 159 |
+
"compile_mode": "max-autotune",
|
| 160 |
+
"state_format": "prob",
|
| 161 |
+
"meanflow_weight": 0.0,
|
| 162 |
+
"rollout_train_prob": 0.5,
|
| 163 |
+
"rollout_train_steps": 4,
|
| 164 |
+
"rollout_train_infer_steps": 32,
|
| 165 |
+
"rollout_train_temp": 1.45,
|
| 166 |
+
"rollout_train_max_gamma": 1.0,
|
| 167 |
+
"rollout_train_corrupt_only": true,
|
| 168 |
+
"rollout_train_samplewise": true,
|
| 169 |
+
"rollout_train_compute_always": false,
|
| 170 |
+
"bridge_noise_init": "logistic_normal",
|
| 171 |
+
"noise_sigma": -1.0,
|
| 172 |
+
"allow_tf32": true,
|
| 173 |
+
"activation_checkpointing": false,
|
| 174 |
+
"activation_checkpoint_interval": 1,
|
| 175 |
+
"activation_checkpoint_scope": "block",
|
| 176 |
+
"ddp_static_graph": false,
|
| 177 |
+
"ddp_gradient_as_bucket_view": true,
|
| 178 |
+
"blocking_data_transfer": false,
|
| 179 |
+
"dataloader_prefetch_factor": 4,
|
| 180 |
+
"full_train_stats": false,
|
| 181 |
+
"tokenized_hf": false,
|
| 182 |
+
"tokenized_pad_token": "pad",
|
| 183 |
+
"elf_conditional_hf": false,
|
| 184 |
+
"record_pad_truncate": false,
|
| 185 |
+
"record_add_eos": false,
|
| 186 |
+
"record_add_special_tokens": false,
|
| 187 |
+
"record_pad_token": "pad",
|
| 188 |
+
"record_shuffle_buffer": 10000,
|
| 189 |
+
"wrap": true,
|
| 190 |
+
"wrap_mode": "stream",
|
| 191 |
+
"wrap_record_buffer_size": 200,
|
| 192 |
+
"owt_cached_chunks": true,
|
| 193 |
+
"owt_chunk_cache_dir": "/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit",
|
| 194 |
+
"owt_chunk_cache_rebuild": false,
|
| 195 |
+
"owt_chunk_cache_write_batch": 4096,
|
| 196 |
+
"owt_exact_repeat_per_chunk": 64,
|
| 197 |
+
"online_chunk_shuffle": false,
|
| 198 |
+
"online_chunk_shuffle_buffer": 10000,
|
| 199 |
+
"openwebtext_split": "train_minus_100k",
|
| 200 |
+
"detokenizer": "auto",
|
| 201 |
+
"resolved_detokenizer": null,
|
| 202 |
+
"num_workers": 0,
|
| 203 |
+
"latest_every": 500,
|
| 204 |
+
"resume_path": ""
|
| 205 |
+
}
|
| 206 |
+
step=100 epoch=100/500 epoch_step=1/1 micro_steps=100 elapsed=8.1s lr=2.000000e-03 loss=6.7066 loss_recon=6.7066 loss_meanflow=0.0000 mean_model_t=0.2083 mean_corrupt_t=0.2083 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.5128 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.0996 corrupt_frac=1.0000 acc_corrupt=0.0996 loss_corrupt=6.7066 wrong_frac=0.7915 init_acc_corrupt=0.1159 acc_corrupt_t_0p0_0p2=0.0486 corrupt_frac_t_0p0_0p2=0.5559 acc_corrupt_t_0p2_0p4=0.1327 corrupt_frac_t_0p2_0p4=0.3589 acc_corrupt_t_0p4_0p6=0.2813 corrupt_frac_t_0p4_0p6=0.0773 acc_corrupt_t_0p6_0p8=0.4044 corrupt_frac_t_0p6_0p8=0.0121 out_w_norm=1.0999 out_g_norm=1.0063 loss_all=6.4485 init_gold_top10=0.2091 init_gold_top100=0.4880 rollout_applied_pos_frac=0.4844 init_acc_rollout_applied=0.1132 init_acc_rollout_kept=0.1206 logit_acc_rollout_applied=0.1071 logit_acc_rollout_kept=0.1002
|
| 207 |
+
step=200 epoch=200/500 epoch_step=1/1 micro_steps=200 elapsed=7.3s lr=2.000000e-03 loss=6.0967 loss_recon=6.0967 loss_meanflow=0.0000 mean_model_t=0.2108 mean_corrupt_t=0.2108 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.4954 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1105 corrupt_frac=1.0000 acc_corrupt=0.1105 loss_corrupt=6.0967 wrong_frac=0.7892 init_acc_corrupt=0.1187 acc_corrupt_t_0p0_0p2=0.0550 corrupt_frac_t_0p0_0p2=0.5516 acc_corrupt_t_0p2_0p4=0.1484 corrupt_frac_t_0p2_0p4=0.3621 acc_corrupt_t_0p4_0p6=0.2931 corrupt_frac_t_0p4_0p6=0.0781 acc_corrupt_t_0p6_0p8=0.4273 corrupt_frac_t_0p6_0p8=0.0123 out_w_norm=3.3153 out_g_norm=1.4045 acc_corrupt_t_0p8_1p0=0.4753 corrupt_frac_t_0p8_1p0=0.0078 loss_all=5.8271 init_gold_top10=0.2011 init_gold_top100=0.5196 rollout_applied_pos_frac=0.5234 init_acc_rollout_applied=0.0963 init_acc_rollout_kept=0.1255 logit_acc_rollout_applied=0.1037 logit_acc_rollout_kept=0.1171
|
| 208 |
+
step=300 epoch=300/500 epoch_step=1/1 micro_steps=300 elapsed=7.3s lr=2.000000e-03 loss=5.5738 loss_recon=5.5738 loss_meanflow=0.0000 mean_model_t=0.2067 mean_corrupt_t=0.2067 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.5003 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1199 corrupt_frac=1.0000 acc_corrupt=0.1199 loss_corrupt=5.5738 wrong_frac=0.7935 init_acc_corrupt=0.1146 acc_corrupt_t_0p0_0p2=0.0584 corrupt_frac_t_0p0_0p2=0.5641 acc_corrupt_t_0p2_0p4=0.1673 corrupt_frac_t_0p2_0p4=0.3542 acc_corrupt_t_0p4_0p6=0.3229 corrupt_frac_t_0p4_0p6=0.0734 acc_corrupt_t_0p6_0p8=0.4766 corrupt_frac_t_0p6_0p8=0.0121 out_w_norm=5.1952 out_g_norm=0.7234 acc_corrupt_t_0p8_1p0=0.6445 corrupt_frac_t_0p8_1p0=0.0078 loss_all=5.3223 init_gold_top10=0.2068 init_gold_top100=0.5396 rollout_applied_pos_frac=0.4688 init_acc_rollout_applied=0.1296 init_acc_rollout_kept=0.1153 logit_acc_rollout_applied=0.1337 logit_acc_rollout_kept=0.1255
|
| 209 |
+
step=400 epoch=400/500 epoch_step=1/1 micro_steps=400 elapsed=7.4s lr=2.000000e-03 loss=5.0170 loss_recon=5.0170 loss_meanflow=0.0000 mean_model_t=0.2085 mean_corrupt_t=0.2085 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.5077 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1455 corrupt_frac=1.0000 acc_corrupt=0.1455 loss_corrupt=5.0170 wrong_frac=0.7917 init_acc_corrupt=0.1171 acc_corrupt_t_0p0_0p2=0.0635 corrupt_frac_t_0p0_0p2=0.5564 acc_corrupt_t_0p2_0p4=0.1998 corrupt_frac_t_0p2_0p4=0.3620 acc_corrupt_t_0p4_0p6=0.4382 corrupt_frac_t_0p4_0p6=0.0719 out_w_norm=6.8540 out_g_norm=0.4136 acc_corrupt_t_0p6_0p8=0.6488 corrupt_frac_t_0p6_0p8=0.0131 acc_corrupt_t_0p8_1p0=0.7832 corrupt_frac_t_0p8_1p0=0.0078 loss_all=4.8079 init_gold_top10=0.1987 init_gold_top100=0.5691 rollout_applied_pos_frac=0.4297 init_acc_rollout_applied=0.0888 init_acc_rollout_kept=0.1080 logit_acc_rollout_applied=0.1315 logit_acc_rollout_kept=0.1581
|
| 210 |
+
step=500 epoch=500/500 epoch_step=1/1 micro_steps=500 elapsed=7.4s lr=2.000000e-03 loss=4.2786 loss_recon=4.2786 loss_meanflow=0.0000 mean_model_t=0.2071 mean_corrupt_t=0.2071 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.5024 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1817 corrupt_frac=1.0000 acc_corrupt=0.1817 loss_corrupt=4.2786 wrong_frac=0.7928 init_acc_corrupt=0.1164 acc_corrupt_t_0p0_0p2=0.0737 corrupt_frac_t_0p0_0p2=0.5632 acc_corrupt_t_0p2_0p4=0.2701 corrupt_frac_t_0p2_0p4=0.3546 acc_corrupt_t_0p4_0p6=0.5240 corrupt_frac_t_0p4_0p6=0.0745 acc_corrupt_t_0p6_0p8=0.6918 corrupt_frac_t_0p6_0p8=0.0118 acc_corrupt_t_0p8_1p0=0.8594 corrupt_frac_t_0p8_1p0=0.0078 out_w_norm=8.3727 out_g_norm=0.4580 loss_all=3.8022 init_gold_top10=0.2265 init_gold_top100=0.6773 rollout_applied_pos_frac=0.5156 init_acc_rollout_applied=0.1161 init_acc_rollout_kept=0.1360 logit_acc_rollout_applied=0.2017 logit_acc_rollout_kept=0.2186
|
| 211 |
+
[rollin-focused] eval config=rollin_p50_s4_i32 step=500
|
| 212 |
+
[eval-decode-acc] train8_rollin_focused_len256_rollin_p50_s4_i32_20260517_1733focused step=500 soft=none
|
| 213 |
+
[decode] max_len=256 generated=64/64
|
| 214 |
+
{
|
| 215 |
+
"num_rows": 1,
|
| 216 |
+
"best_by_run": {
|
| 217 |
+
"train8_rollin_focused_len256_rollin_p50_s4_i32_20260517_1733focused::none": {
|
| 218 |
+
"run": "train8_rollin_focused_len256_rollin_p50_s4_i32_20260517_1733focused",
|
| 219 |
+
"checkpoint": "runs/train8_rollin_focused_len256_rollin_p50_s4_i32_20260517_1733focused/step_0000500.pt",
|
| 220 |
+
"ckpt_step": 500,
|
| 221 |
+
"endpoint_softening": "none",
|
| 222 |
+
"decode_rule": "flowmap",
|
| 223 |
+
"steps": 128,
|
| 224 |
+
"time_schedule": "logit_normal",
|
| 225 |
+
"model_t_mode": "post",
|
| 226 |
+
"final_from": "state",
|
| 227 |
+
"n_gen": 64,
|
| 228 |
+
"n_refs": 8,
|
| 229 |
+
"token_acc_mean": 0.04901123046875,
|
| 230 |
+
"token_acc_min": 0.02734375,
|
| 231 |
+
"token_acc_max": 0.09375,
|
| 232 |
+
"exact_acc": 0.0,
|
| 233 |
+
"exact_count": 0,
|
| 234 |
+
"exact_ref_coverage": 0.0,
|
| 235 |
+
"exact_ref_count": 0,
|
| 236 |
+
"exact_ref_hits": [],
|
| 237 |
+
"best_ref_idx": [
|
| 238 |
+
2,
|
| 239 |
+
5,
|
| 240 |
+
3,
|
| 241 |
+
3,
|
| 242 |
+
3,
|
| 243 |
+
3,
|
| 244 |
+
2,
|
| 245 |
+
2,
|
| 246 |
+
2,
|
| 247 |
+
6,
|
| 248 |
+
3,
|
| 249 |
+
0,
|
| 250 |
+
0,
|
| 251 |
+
3,
|
| 252 |
+
2,
|
| 253 |
+
2,
|
| 254 |
+
3,
|
| 255 |
+
3,
|
| 256 |
+
2,
|
| 257 |
+
6,
|
| 258 |
+
7,
|
| 259 |
+
7,
|
| 260 |
+
3,
|
| 261 |
+
2,
|
| 262 |
+
2,
|
| 263 |
+
0,
|
| 264 |
+
2,
|
| 265 |
+
0,
|
| 266 |
+
3,
|
| 267 |
+
0,
|
| 268 |
+
3,
|
| 269 |
+
3,
|
| 270 |
+
7,
|
| 271 |
+
3,
|
| 272 |
+
7,
|
| 273 |
+
0,
|
| 274 |
+
7,
|
| 275 |
+
3,
|
| 276 |
+
0,
|
| 277 |
+
0,
|
| 278 |
+
3,
|
| 279 |
+
6,
|
| 280 |
+
1,
|
| 281 |
+
7,
|
| 282 |
+
1,
|
| 283 |
+
3,
|
| 284 |
+
7,
|
| 285 |
+
2,
|
| 286 |
+
3,
|
| 287 |
+
3,
|
| 288 |
+
2,
|
| 289 |
+
3,
|
| 290 |
+
2,
|
| 291 |
+
1,
|
| 292 |
+
7,
|
| 293 |
+
1,
|
| 294 |
+
3,
|
| 295 |
+
3,
|
| 296 |
+
0,
|
| 297 |
+
1,
|
| 298 |
+
3,
|
| 299 |
+
7,
|
| 300 |
+
0,
|
| 301 |
+
0
|
| 302 |
+
],
|
| 303 |
+
"best_token_acc": [
|
| 304 |
+
0.0390625,
|
| 305 |
+
0.046875,
|
| 306 |
+
0.0390625,
|
| 307 |
+
0.07421875,
|
| 308 |
+
0.0546875,
|
| 309 |
+
0.05859375,
|
| 310 |
+
0.0390625,
|
| 311 |
+
0.046875,
|
| 312 |
+
0.02734375,
|
| 313 |
+
0.02734375,
|
| 314 |
+
0.0546875,
|
| 315 |
+
0.05859375,
|
| 316 |
+
0.03515625,
|
| 317 |
+
0.0625,
|
| 318 |
+
0.05078125,
|
| 319 |
+
0.0625,
|
| 320 |
+
0.04296875,
|
| 321 |
+
0.0625,
|
| 322 |
+
0.0390625,
|
| 323 |
+
0.0390625,
|
| 324 |
+
0.09375,
|
| 325 |
+
0.046875,
|
| 326 |
+
0.04296875,
|
| 327 |
+
0.0546875,
|
| 328 |
+
0.05078125,
|
| 329 |
+
0.0546875,
|
| 330 |
+
0.03125,
|
| 331 |
+
0.03515625,
|
| 332 |
+
0.046875,
|
| 333 |
+
0.04296875,
|
| 334 |
+
0.0546875,
|
| 335 |
+
0.04296875,
|
| 336 |
+
0.07421875,
|
| 337 |
+
0.04296875,
|
| 338 |
+
0.06640625,
|
| 339 |
+
0.03515625,
|
| 340 |
+
0.05078125,
|
| 341 |
+
0.04296875,
|
| 342 |
+
0.0625,
|
| 343 |
+
0.05078125,
|
| 344 |
+
0.0546875,
|
| 345 |
+
0.05078125,
|
| 346 |
+
0.0546875,
|
| 347 |
+
0.05859375,
|
| 348 |
+
0.05078125,
|
| 349 |
+
0.046875,
|
| 350 |
+
0.05859375,
|
| 351 |
+
0.03125,
|
| 352 |
+
0.046875,
|
| 353 |
+
0.0390625,
|
| 354 |
+
0.046875,
|
| 355 |
+
0.05078125,
|
| 356 |
+
0.02734375,
|
| 357 |
+
0.0546875,
|
| 358 |
+
0.0546875,
|
| 359 |
+
0.0390625,
|
| 360 |
+
0.0546875,
|
| 361 |
+
0.04296875,
|
| 362 |
+
0.05078125,
|
| 363 |
+
0.04296875,
|
| 364 |
+
0.0546875,
|
| 365 |
+
0.046875,
|
| 366 |
+
0.0546875,
|
| 367 |
+
0.0390625
|
| 368 |
+
]
|
| 369 |
+
}
|
| 370 |
+
},
|
| 371 |
+
"first_exact_by_run": {}
|
| 372 |
+
}
|
| 373 |
+
RESULT config=rollin_p50_s4_i32 ckpt_step=500 views=256000 token_acc=0.0490 exact=0/64 exact_refs=0 hits=[]
|
| 374 |
+
[rollin-focused] train config=rollin_p75_s4_i32 from=0 to=500 rollout=0.75/s4/i32/temp1.45
|
| 375 |
+
[launch] gpt2 cached OWT soft-endpoint m/n pilot
|
| 376 |
+
[launch] run_name=train8_rollin_focused_len256_rollin_p75_s4_i32_20260517_1733focused
|
| 377 |
+
[launch] save_dir=runs/train8_rollin_focused_len256_rollin_p75_s4_i32_20260517_1733focused
|
| 378 |
+
[launch] n=256 m=0 clean_state_mode=onehot
|
| 379 |
+
[launch] mask_mixture lowk=0.0 all=1.0
|
| 380 |
+
[launch] model d=192 layers=3 heads=3 ff=768 vocab_override=969
|
| 381 |
+
[launch] optimizer=muon muon_impl=legacy weight_decay=0.1 output_weight_decay=-1
|
| 382 |
+
[launch] target_loss=hard_ce conf=0.0->1.0 power=1.0
|
| 383 |
+
[launch] mask_ratio=1.0->1.0
|
| 384 |
+
[launch] mask_ratio_floor_schedule=none
|
| 385 |
+
[launch] dirichlet C=1.0->1024 endpoint=categorical_dual_t sampler=dirichlet
|
| 386 |
+
[launch] wrong_mix seq_alpha=0.0 wrong_floor=0.0 unigram=0.0 uniform=0.0 basin=0.0 basin_ids=
|
| 387 |
+
[launch] rollout_train prob=0.75 steps=4 infer_steps=32 temp=1.45 corrupt_only=1 samplewise=1
|
| 388 |
+
[launch] cache=/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit exact_repeat_per_chunk=64
|
| 389 |
+
NCCL version 2.25.1+cuda12.8
|
| 390 |
+
{
|
| 391 |
+
"device": "cuda:0",
|
| 392 |
+
"rank": 0,
|
| 393 |
+
"world_size": 4,
|
| 394 |
+
"samples": "owt_cached_chunks:8",
|
| 395 |
+
"vocab_size": 969,
|
| 396 |
+
"tokenizer_vocab_size": 50257,
|
| 397 |
+
"save_dir": "runs/train8_rollin_focused_len256_rollin_p75_s4_i32_20260517_1733focused",
|
| 398 |
+
"batch_size": 128,
|
| 399 |
+
"grad_accum": 1,
|
| 400 |
+
"effective_batch_size": 512,
|
| 401 |
+
"global_batch_size": 512,
|
| 402 |
+
"lr_schedule": "constant_warmup",
|
| 403 |
+
"optimizer": "muon",
|
| 404 |
+
"epochs": 0.0,
|
| 405 |
+
"steps_per_epoch": 1,
|
| 406 |
+
"total_steps": 500,
|
| 407 |
+
"warmup_steps": 10,
|
| 408 |
+
"warmup_epochs": -1.0,
|
| 409 |
+
"min_lr": 0.0,
|
| 410 |
+
"weight_decay": 0.1,
|
| 411 |
+
"output_weight_decay": -1.0,
|
| 412 |
+
"adamw_param_groups": "nanogpt",
|
| 413 |
+
"adam_beta1": 0.9,
|
| 414 |
+
"adam_beta2": 0.95,
|
| 415 |
+
"adam_eps": 1e-08,
|
| 416 |
+
"muon_impl": "legacy",
|
| 417 |
+
"muon_momentum": 0.95,
|
| 418 |
+
"muon_ns_steps": 5,
|
| 419 |
+
"muon_update_scale": 1.0,
|
| 420 |
+
"muon_nesterov": false,
|
| 421 |
+
"muon_width_scale": false,
|
| 422 |
+
"muon_grouping": "legacy_dim_ge_2",
|
| 423 |
+
"muon_param_count": 1965440,
|
| 424 |
+
"muon_adam_param_count": 8192,
|
| 425 |
+
"muon_param_names": [
|
| 426 |
+
"vocab_embed.embedding",
|
| 427 |
+
"sigma_map.net.0.weight",
|
| 428 |
+
"sigma_map.net.2.weight",
|
| 429 |
+
"blocks.0.attn_qkv.weight",
|
| 430 |
+
"blocks.0.attn_out.weight",
|
| 431 |
+
"blocks.0.mlp.0.weight",
|
| 432 |
+
"blocks.0.mlp.2.weight",
|
| 433 |
+
"blocks.0.adaLN_modulation.weight",
|
| 434 |
+
"blocks.1.attn_qkv.weight",
|
| 435 |
+
"blocks.1.attn_out.weight",
|
| 436 |
+
"blocks.1.mlp.0.weight",
|
| 437 |
+
"blocks.1.mlp.2.weight",
|
| 438 |
+
"blocks.1.adaLN_modulation.weight",
|
| 439 |
+
"blocks.2.attn_qkv.weight",
|
| 440 |
+
"blocks.2.attn_out.weight",
|
| 441 |
+
"blocks.2.mlp.0.weight",
|
| 442 |
+
"blocks.2.mlp.2.weight",
|
| 443 |
+
"blocks.2.adaLN_modulation.weight",
|
| 444 |
+
"output_layer.linear.weight",
|
| 445 |
+
"output_layer.adaLN_modulation.weight"
|
| 446 |
+
],
|
| 447 |
+
"muon_adam_param_names": [
|
| 448 |
+
"sigma_map.net.0.bias",
|
| 449 |
+
"sigma_map.net.2.bias",
|
| 450 |
+
"blocks.0.norm1.weight",
|
| 451 |
+
"blocks.0.norm2.weight",
|
| 452 |
+
"blocks.0.mlp.0.bias",
|
| 453 |
+
"blocks.0.mlp.2.bias",
|
| 454 |
+
"blocks.0.adaLN_modulation.bias",
|
| 455 |
+
"blocks.1.norm1.weight",
|
| 456 |
+
"blocks.1.norm2.weight",
|
| 457 |
+
"blocks.1.mlp.0.bias",
|
| 458 |
+
"blocks.1.mlp.2.bias",
|
| 459 |
+
"blocks.1.adaLN_modulation.bias",
|
| 460 |
+
"blocks.2.norm1.weight",
|
| 461 |
+
"blocks.2.norm2.weight",
|
| 462 |
+
"blocks.2.mlp.0.bias",
|
| 463 |
+
"blocks.2.mlp.2.bias",
|
| 464 |
+
"blocks.2.adaLN_modulation.bias",
|
| 465 |
+
"output_layer.norm_final.weight",
|
| 466 |
+
"output_layer.adaLN_modulation.bias"
|
| 467 |
+
],
|
| 468 |
+
"muon_effective_nesterov": false,
|
| 469 |
+
"muon_effective_width_scale": false,
|
| 470 |
+
"muon_effective_weight_decay": 0.1,
|
| 471 |
+
"muon_adam_fallback_nesterov": false,
|
| 472 |
+
"muon_adam_fallback_weight_decay": 0.1,
|
| 473 |
+
"ema_decay": 0.9999,
|
| 474 |
+
"ema_start_step": 0,
|
| 475 |
+
"model_type": "ddit",
|
| 476 |
+
"ddit_mlp_type": "gelu",
|
| 477 |
+
"elf_num_time_tokens": 4,
|
| 478 |
+
"elf_num_model_mode_tokens": 0,
|
| 479 |
+
"qk_norm": true,
|
| 480 |
+
"output_bias": false,
|
| 481 |
+
"output_init_std": -1.0,
|
| 482 |
+
"norm_type": "rmsnorm",
|
| 483 |
+
"target_loss": "hard_ce",
|
| 484 |
+
"linear_soft_target_power": 1.0,
|
| 485 |
+
"linear_soft_target_min_conf": 0.0,
|
| 486 |
+
"linear_soft_target_max_conf": 1.0,
|
| 487 |
+
"t_sampling_mode": "logit_normal",
|
| 488 |
+
"t_sampling_power": 1.0,
|
| 489 |
+
"t_sampling_eps": 0.0001,
|
| 490 |
+
"t_sampling_logit_mean": -1.5,
|
| 491 |
+
"t_sampling_logit_std": 0.8,
|
| 492 |
+
"dual_t": true,
|
| 493 |
+
"corrupt_t_mode": "same",
|
| 494 |
+
"corrupt_min_t": 0.0,
|
| 495 |
+
"corrupt_max_t": 1.0,
|
| 496 |
+
"prefix_block_prob": 0.0,
|
| 497 |
+
"prefix_block_len": 128,
|
| 498 |
+
"mask_ratio_floor_schedule": "none",
|
| 499 |
+
"dirichlet_endpoint_mode": "categorical_dual_t",
|
| 500 |
+
"dirichlet_semantic_t_mode": "same",
|
| 501 |
+
"dirichlet_semantic_t_value": 0.0,
|
| 502 |
+
"dirichlet_semantic_t_curve": "linear",
|
| 503 |
+
"dirichlet_semantic_t_power": 1.0,
|
| 504 |
+
"endpoint_sequence_random_prob_alpha": 0.0,
|
| 505 |
+
"categorical_wrong_from_full_vocab": true,
|
| 506 |
+
"categorical_wrong_from_batch_valid_tokens": false,
|
| 507 |
+
"categorical_wrong_basin_token_ids": "",
|
| 508 |
+
"categorical_wrong_basin_prob": 0.0,
|
| 509 |
+
"categorical_wrong_unigram_prob": 0.0,
|
| 510 |
+
"categorical_wrong_uniform_prob": 0.0,
|
| 511 |
+
"categorical_wrong_prob_floor": 0.0,
|
| 512 |
+
"categorical_wrong_corpus_unigram_path": "",
|
| 513 |
+
"categorical_wrong_corpus_unigram_alpha": 1.0,
|
| 514 |
+
"categorical_wrong_basin_shared_prob": 0.0,
|
| 515 |
+
"categorical_wrong_unigram_shared_prob": 0.0,
|
| 516 |
+
"mask_mixture_original_prob": 0.0,
|
| 517 |
+
"mask_mixture_lowk_prob": 0.0,
|
| 518 |
+
"mask_mixture_lowcorrupt_prob": 0.0,
|
| 519 |
+
"mask_mixture_block_prob": 0.0,
|
| 520 |
+
"mask_mixture_all_prob": 1.0,
|
| 521 |
+
"mask_mixture_lowk_clean_tokens": "0",
|
| 522 |
+
"mask_mixture_lowcorrupt_tokens": "1,2,4,8,16,32,64",
|
| 523 |
+
"mask_mixture_block_tokens": "64,128",
|
| 524 |
+
"simplex_bridge_sampler": "dirichlet",
|
| 525 |
+
"logistic_normal_sigma_min": 0.1,
|
| 526 |
+
"logistic_normal_sigma_max": 1.0,
|
| 527 |
+
"logistic_normal_tau_min": 1.0,
|
| 528 |
+
"logistic_normal_tau_max": 1.0,
|
| 529 |
+
"torch_compile": false,
|
| 530 |
+
"compile_mode": "max-autotune",
|
| 531 |
+
"state_format": "prob",
|
| 532 |
+
"meanflow_weight": 0.0,
|
| 533 |
+
"rollout_train_prob": 0.75,
|
| 534 |
+
"rollout_train_steps": 4,
|
| 535 |
+
"rollout_train_infer_steps": 32,
|
| 536 |
+
"rollout_train_temp": 1.45,
|
| 537 |
+
"rollout_train_max_gamma": 1.0,
|
| 538 |
+
"rollout_train_corrupt_only": true,
|
| 539 |
+
"rollout_train_samplewise": true,
|
| 540 |
+
"rollout_train_compute_always": false,
|
| 541 |
+
"bridge_noise_init": "logistic_normal",
|
| 542 |
+
"noise_sigma": -1.0,
|
| 543 |
+
"allow_tf32": true,
|
| 544 |
+
"activation_checkpointing": false,
|
| 545 |
+
"activation_checkpoint_interval": 1,
|
| 546 |
+
"activation_checkpoint_scope": "block",
|
| 547 |
+
"ddp_static_graph": false,
|
| 548 |
+
"ddp_gradient_as_bucket_view": true,
|
| 549 |
+
"blocking_data_transfer": false,
|
| 550 |
+
"dataloader_prefetch_factor": 4,
|
| 551 |
+
"full_train_stats": false,
|
| 552 |
+
"tokenized_hf": false,
|
| 553 |
+
"tokenized_pad_token": "pad",
|
| 554 |
+
"elf_conditional_hf": false,
|
| 555 |
+
"record_pad_truncate": false,
|
| 556 |
+
"record_add_eos": false,
|
| 557 |
+
"record_add_special_tokens": false,
|
| 558 |
+
"record_pad_token": "pad",
|
| 559 |
+
"record_shuffle_buffer": 10000,
|
| 560 |
+
"wrap": true,
|
| 561 |
+
"wrap_mode": "stream",
|
| 562 |
+
"wrap_record_buffer_size": 200,
|
| 563 |
+
"owt_cached_chunks": true,
|
| 564 |
+
"owt_chunk_cache_dir": "/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit",
|
| 565 |
+
"owt_chunk_cache_rebuild": false,
|
| 566 |
+
"owt_chunk_cache_write_batch": 4096,
|
| 567 |
+
"owt_exact_repeat_per_chunk": 64,
|
| 568 |
+
"online_chunk_shuffle": false,
|
| 569 |
+
"online_chunk_shuffle_buffer": 10000,
|
| 570 |
+
"openwebtext_split": "train_minus_100k",
|
| 571 |
+
"detokenizer": "auto",
|
| 572 |
+
"resolved_detokenizer": null,
|
| 573 |
+
"num_workers": 0,
|
| 574 |
+
"latest_every": 500,
|
| 575 |
+
"resume_path": ""
|
| 576 |
+
}
|
| 577 |
+
step=100 epoch=100/500 epoch_step=1/1 micro_steps=100 elapsed=7.9s lr=2.000000e-03 loss=6.7062 loss_recon=6.7062 loss_meanflow=0.0000 mean_model_t=0.2083 mean_corrupt_t=0.2083 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.7551 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.0995 corrupt_frac=1.0000 acc_corrupt=0.0995 loss_corrupt=6.7062 wrong_frac=0.7915 init_acc_corrupt=0.1159 acc_corrupt_t_0p0_0p2=0.0487 corrupt_frac_t_0p0_0p2=0.5559 acc_corrupt_t_0p2_0p4=0.1328 corrupt_frac_t_0p2_0p4=0.3589 acc_corrupt_t_0p4_0p6=0.2793 corrupt_frac_t_0p4_0p6=0.0773 acc_corrupt_t_0p6_0p8=0.3955 corrupt_frac_t_0p6_0p8=0.0121 out_w_norm=1.0988 out_g_norm=1.0088 loss_all=6.4472 init_gold_top10=0.2094 init_gold_top100=0.5158 rollout_applied_pos_frac=0.7109 init_acc_rollout_applied=0.1260 init_acc_rollout_kept=0.0945 logit_acc_rollout_applied=0.1110 logit_acc_rollout_kept=0.0877
|
| 578 |
+
step=200 epoch=200/500 epoch_step=1/1 micro_steps=200 elapsed=7.2s lr=2.000000e-03 loss=6.0952 loss_recon=6.0952 loss_meanflow=0.0000 mean_model_t=0.2108 mean_corrupt_t=0.2108 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.7441 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1107 corrupt_frac=1.0000 acc_corrupt=0.1107 loss_corrupt=6.0952 wrong_frac=0.7892 init_acc_corrupt=0.1189 acc_corrupt_t_0p0_0p2=0.0550 corrupt_frac_t_0p0_0p2=0.5516 acc_corrupt_t_0p2_0p4=0.1490 corrupt_frac_t_0p2_0p4=0.3621 acc_corrupt_t_0p4_0p6=0.2934 corrupt_frac_t_0p4_0p6=0.0781 acc_corrupt_t_0p6_0p8=0.4247 corrupt_frac_t_0p6_0p8=0.0123 out_w_norm=3.3189 out_g_norm=1.4035 acc_corrupt_t_0p8_1p0=0.4753 corrupt_frac_t_0p8_1p0=0.0078 loss_all=5.8276 init_gold_top10=0.2034 init_gold_top100=0.5537 rollout_applied_pos_frac=0.7422 init_acc_rollout_applied=0.0933 init_acc_rollout_kept=0.1610 logit_acc_rollout_applied=0.1023 logit_acc_rollout_kept=0.1327
|
| 579 |
+
step=300 epoch=300/500 epoch_step=1/1 micro_steps=300 elapsed=7.2s lr=2.000000e-03 loss=5.5678 loss_recon=5.5678 loss_meanflow=0.0000 mean_model_t=0.2067 mean_corrupt_t=0.2067 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.7523 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1201 corrupt_frac=1.0000 acc_corrupt=0.1201 loss_corrupt=5.5678 wrong_frac=0.7935 init_acc_corrupt=0.1150 acc_corrupt_t_0p0_0p2=0.0586 corrupt_frac_t_0p0_0p2=0.5641 acc_corrupt_t_0p2_0p4=0.1676 corrupt_frac_t_0p2_0p4=0.3542 acc_corrupt_t_0p4_0p6=0.3226 corrupt_frac_t_0p4_0p6=0.0734 acc_corrupt_t_0p6_0p8=0.4741 corrupt_frac_t_0p6_0p8=0.0121 out_w_norm=5.1933 out_g_norm=0.7206 acc_corrupt_t_0p8_1p0=0.6419 corrupt_frac_t_0p8_1p0=0.0078 loss_all=5.3093 init_gold_top10=0.2147 init_gold_top100=0.5972 rollout_applied_pos_frac=0.7266 init_acc_rollout_applied=0.1141 init_acc_rollout_kept=0.1450 logit_acc_rollout_applied=0.1243 logit_acc_rollout_kept=0.1458
|
| 580 |
+
step=400 epoch=400/500 epoch_step=1/1 micro_steps=400 elapsed=7.2s lr=2.000000e-03 loss=4.9989 loss_recon=4.9989 loss_meanflow=0.0000 mean_model_t=0.2085 mean_corrupt_t=0.2085 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.7507 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1464 corrupt_frac=1.0000 acc_corrupt=0.1464 loss_corrupt=4.9989 wrong_frac=0.7917 init_acc_corrupt=0.1178 acc_corrupt_t_0p0_0p2=0.0638 corrupt_frac_t_0p0_0p2=0.5564 acc_corrupt_t_0p2_0p4=0.2015 corrupt_frac_t_0p2_0p4=0.3620 acc_corrupt_t_0p4_0p6=0.4397 corrupt_frac_t_0p4_0p6=0.0719 out_w_norm=6.8482 out_g_norm=0.4141 acc_corrupt_t_0p6_0p8=0.6478 corrupt_frac_t_0p6_0p8=0.0131 acc_corrupt_t_0p8_1p0=0.7051 corrupt_frac_t_0p8_1p0=0.0078 loss_all=4.7662 init_gold_top10=0.2048 init_gold_top100=0.6762 rollout_applied_pos_frac=0.7188 init_acc_rollout_applied=0.0821 init_acc_rollout_kept=0.1494 logit_acc_rollout_applied=0.1291 logit_acc_rollout_kept=0.2026
|
| 581 |
+
step=500 epoch=500/500 epoch_step=1/1 micro_steps=500 elapsed=7.2s lr=2.000000e-03 loss=4.2177 loss_recon=4.2177 loss_meanflow=0.0000 mean_model_t=0.2071 mean_corrupt_t=0.2071 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.7552 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1858 corrupt_frac=1.0000 acc_corrupt=0.1858 loss_corrupt=4.2177 wrong_frac=0.7928 init_acc_corrupt=0.1175 acc_corrupt_t_0p0_0p2=0.0755 corrupt_frac_t_0p0_0p2=0.5632 acc_corrupt_t_0p2_0p4=0.2769 corrupt_frac_t_0p2_0p4=0.3546 acc_corrupt_t_0p4_0p6=0.5320 corrupt_frac_t_0p4_0p6=0.0745 acc_corrupt_t_0p6_0p8=0.6984 corrupt_frac_t_0p6_0p8=0.0118 acc_corrupt_t_0p8_1p0=0.8555 corrupt_frac_t_0p8_1p0=0.0078 out_w_norm=8.3516 out_g_norm=0.4557 loss_all=3.7268 init_gold_top10=0.2427 init_gold_top100=0.7842 rollout_applied_pos_frac=0.7344 init_acc_rollout_applied=0.1315 init_acc_rollout_kept=0.1149 logit_acc_rollout_applied=0.2242 logit_acc_rollout_kept=0.2061
|
| 582 |
+
[rollin-focused] eval config=rollin_p75_s4_i32 step=500
|
| 583 |
+
[eval-decode-acc] train8_rollin_focused_len256_rollin_p75_s4_i32_20260517_1733focused step=500 soft=none
|
| 584 |
+
[decode] max_len=256 generated=64/64
|
| 585 |
+
{
|
| 586 |
+
"num_rows": 1,
|
| 587 |
+
"best_by_run": {
|
| 588 |
+
"train8_rollin_focused_len256_rollin_p75_s4_i32_20260517_1733focused::none": {
|
| 589 |
+
"run": "train8_rollin_focused_len256_rollin_p75_s4_i32_20260517_1733focused",
|
| 590 |
+
"checkpoint": "runs/train8_rollin_focused_len256_rollin_p75_s4_i32_20260517_1733focused/step_0000500.pt",
|
| 591 |
+
"ckpt_step": 500,
|
| 592 |
+
"endpoint_softening": "none",
|
| 593 |
+
"decode_rule": "flowmap",
|
| 594 |
+
"steps": 128,
|
| 595 |
+
"time_schedule": "logit_normal",
|
| 596 |
+
"model_t_mode": "post",
|
| 597 |
+
"final_from": "state",
|
| 598 |
+
"n_gen": 64,
|
| 599 |
+
"n_refs": 8,
|
| 600 |
+
"token_acc_mean": 0.04876708984375,
|
| 601 |
+
"token_acc_min": 0.0234375,
|
| 602 |
+
"token_acc_max": 0.08203125,
|
| 603 |
+
"exact_acc": 0.0,
|
| 604 |
+
"exact_count": 0,
|
| 605 |
+
"exact_ref_coverage": 0.0,
|
| 606 |
+
"exact_ref_count": 0,
|
| 607 |
+
"exact_ref_hits": [],
|
| 608 |
+
"best_ref_idx": [
|
| 609 |
+
5,
|
| 610 |
+
5,
|
| 611 |
+
0,
|
| 612 |
+
3,
|
| 613 |
+
3,
|
| 614 |
+
3,
|
| 615 |
+
3,
|
| 616 |
+
7,
|
| 617 |
+
0,
|
| 618 |
+
3,
|
| 619 |
+
0,
|
| 620 |
+
0,
|
| 621 |
+
0,
|
| 622 |
+
0,
|
| 623 |
+
7,
|
| 624 |
+
2,
|
| 625 |
+
3,
|
| 626 |
+
3,
|
| 627 |
+
7,
|
| 628 |
+
6,
|
| 629 |
+
7,
|
| 630 |
+
7,
|
| 631 |
+
7,
|
| 632 |
+
2,
|
| 633 |
+
2,
|
| 634 |
+
0,
|
| 635 |
+
1,
|
| 636 |
+
0,
|
| 637 |
+
7,
|
| 638 |
+
7,
|
| 639 |
+
3,
|
| 640 |
+
5,
|
| 641 |
+
7,
|
| 642 |
+
3,
|
| 643 |
+
7,
|
| 644 |
+
7,
|
| 645 |
+
7,
|
| 646 |
+
4,
|
| 647 |
+
4,
|
| 648 |
+
0,
|
| 649 |
+
3,
|
| 650 |
+
6,
|
| 651 |
+
7,
|
| 652 |
+
7,
|
| 653 |
+
7,
|
| 654 |
+
3,
|
| 655 |
+
7,
|
| 656 |
+
2,
|
| 657 |
+
5,
|
| 658 |
+
3,
|
| 659 |
+
3,
|
| 660 |
+
1,
|
| 661 |
+
3,
|
| 662 |
+
7,
|
| 663 |
+
7,
|
| 664 |
+
3,
|
| 665 |
+
5,
|
| 666 |
+
4,
|
| 667 |
+
0,
|
| 668 |
+
0,
|
| 669 |
+
3,
|
| 670 |
+
2,
|
| 671 |
+
0,
|
| 672 |
+
7
|
| 673 |
+
],
|
| 674 |
+
"best_token_acc": [
|
| 675 |
+
0.05078125,
|
| 676 |
+
0.046875,
|
| 677 |
+
0.05078125,
|
| 678 |
+
0.07421875,
|
| 679 |
+
0.0390625,
|
| 680 |
+
0.046875,
|
| 681 |
+
0.046875,
|
| 682 |
+
0.0390625,
|
| 683 |
+
0.04296875,
|
| 684 |
+
0.03125,
|
| 685 |
+
0.0546875,
|
| 686 |
+
0.06640625,
|
| 687 |
+
0.03125,
|
| 688 |
+
0.0390625,
|
| 689 |
+
0.0546875,
|
| 690 |
+
0.05859375,
|
| 691 |
+
0.05078125,
|
| 692 |
+
0.0546875,
|
| 693 |
+
0.03515625,
|
| 694 |
+
0.0546875,
|
| 695 |
+
0.08203125,
|
| 696 |
+
0.046875,
|
| 697 |
+
0.046875,
|
| 698 |
+
0.0625,
|
| 699 |
+
0.04296875,
|
| 700 |
+
0.046875,
|
| 701 |
+
0.03515625,
|
| 702 |
+
0.0234375,
|
| 703 |
+
0.03515625,
|
| 704 |
+
0.0625,
|
| 705 |
+
0.0390625,
|
| 706 |
+
0.04296875,
|
| 707 |
+
0.08203125,
|
| 708 |
+
0.046875,
|
| 709 |
+
0.05859375,
|
| 710 |
+
0.04296875,
|
| 711 |
+
0.04296875,
|
| 712 |
+
0.046875,
|
| 713 |
+
0.0390625,
|
| 714 |
+
0.0390625,
|
| 715 |
+
0.0546875,
|
| 716 |
+
0.03515625,
|
| 717 |
+
0.0546875,
|
| 718 |
+
0.05859375,
|
| 719 |
+
0.05859375,
|
| 720 |
+
0.046875,
|
| 721 |
+
0.0625,
|
| 722 |
+
0.0390625,
|
| 723 |
+
0.05859375,
|
| 724 |
+
0.05859375,
|
| 725 |
+
0.05078125,
|
| 726 |
+
0.05859375,
|
| 727 |
+
0.02734375,
|
| 728 |
+
0.04296875,
|
| 729 |
+
0.0390625,
|
| 730 |
+
0.05859375,
|
| 731 |
+
0.0390625,
|
| 732 |
+
0.05078125,
|
| 733 |
+
0.0546875,
|
| 734 |
+
0.046875,
|
| 735 |
+
0.0625,
|
| 736 |
+
0.02734375,
|
| 737 |
+
0.046875,
|
| 738 |
+
0.0546875
|
| 739 |
+
]
|
| 740 |
+
}
|
| 741 |
+
},
|
| 742 |
+
"first_exact_by_run": {}
|
| 743 |
+
}
|
| 744 |
+
RESULT config=rollin_p75_s4_i32 ckpt_step=500 views=256000 token_acc=0.0488 exact=0/64 exact_refs=0 hits=[]
|
| 745 |
+
[rollin-focused] train config=rollin_p100_s4_i32 from=0 to=500 rollout=1.00/s4/i32/temp1.45
|
| 746 |
+
[launch] gpt2 cached OWT soft-endpoint m/n pilot
|
| 747 |
+
[launch] run_name=train8_rollin_focused_len256_rollin_p100_s4_i32_20260517_1733focused
|
| 748 |
+
[launch] save_dir=runs/train8_rollin_focused_len256_rollin_p100_s4_i32_20260517_1733focused
|
| 749 |
+
[launch] n=256 m=0 clean_state_mode=onehot
|
| 750 |
+
[launch] mask_mixture lowk=0.0 all=1.0
|
| 751 |
+
[launch] model d=192 layers=3 heads=3 ff=768 vocab_override=969
|
| 752 |
+
[launch] optimizer=muon muon_impl=legacy weight_decay=0.1 output_weight_decay=-1
|
| 753 |
+
[launch] target_loss=hard_ce conf=0.0->1.0 power=1.0
|
| 754 |
+
[launch] mask_ratio=1.0->1.0
|
| 755 |
+
[launch] mask_ratio_floor_schedule=none
|
| 756 |
+
[launch] dirichlet C=1.0->1024 endpoint=categorical_dual_t sampler=dirichlet
|
| 757 |
+
[launch] wrong_mix seq_alpha=0.0 wrong_floor=0.0 unigram=0.0 uniform=0.0 basin=0.0 basin_ids=
|
| 758 |
+
[launch] rollout_train prob=1.00 steps=4 infer_steps=32 temp=1.45 corrupt_only=1 samplewise=1
|
| 759 |
+
[launch] cache=/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit exact_repeat_per_chunk=64
|
| 760 |
+
NCCL version 2.25.1+cuda12.8
|
| 761 |
+
{
|
| 762 |
+
"device": "cuda:0",
|
| 763 |
+
"rank": 0,
|
| 764 |
+
"world_size": 4,
|
| 765 |
+
"samples": "owt_cached_chunks:8",
|
| 766 |
+
"vocab_size": 969,
|
| 767 |
+
"tokenizer_vocab_size": 50257,
|
| 768 |
+
"save_dir": "runs/train8_rollin_focused_len256_rollin_p100_s4_i32_20260517_1733focused",
|
| 769 |
+
"batch_size": 128,
|
| 770 |
+
"grad_accum": 1,
|
| 771 |
+
"effective_batch_size": 512,
|
| 772 |
+
"global_batch_size": 512,
|
| 773 |
+
"lr_schedule": "constant_warmup",
|
| 774 |
+
"optimizer": "muon",
|
| 775 |
+
"epochs": 0.0,
|
| 776 |
+
"steps_per_epoch": 1,
|
| 777 |
+
"total_steps": 500,
|
| 778 |
+
"warmup_steps": 10,
|
| 779 |
+
"warmup_epochs": -1.0,
|
| 780 |
+
"min_lr": 0.0,
|
| 781 |
+
"weight_decay": 0.1,
|
| 782 |
+
"output_weight_decay": -1.0,
|
| 783 |
+
"adamw_param_groups": "nanogpt",
|
| 784 |
+
"adam_beta1": 0.9,
|
| 785 |
+
"adam_beta2": 0.95,
|
| 786 |
+
"adam_eps": 1e-08,
|
| 787 |
+
"muon_impl": "legacy",
|
| 788 |
+
"muon_momentum": 0.95,
|
| 789 |
+
"muon_ns_steps": 5,
|
| 790 |
+
"muon_update_scale": 1.0,
|
| 791 |
+
"muon_nesterov": false,
|
| 792 |
+
"muon_width_scale": false,
|
| 793 |
+
"muon_grouping": "legacy_dim_ge_2",
|
| 794 |
+
"muon_param_count": 1965440,
|
| 795 |
+
"muon_adam_param_count": 8192,
|
| 796 |
+
"muon_param_names": [
|
| 797 |
+
"vocab_embed.embedding",
|
| 798 |
+
"sigma_map.net.0.weight",
|
| 799 |
+
"sigma_map.net.2.weight",
|
| 800 |
+
"blocks.0.attn_qkv.weight",
|
| 801 |
+
"blocks.0.attn_out.weight",
|
| 802 |
+
"blocks.0.mlp.0.weight",
|
| 803 |
+
"blocks.0.mlp.2.weight",
|
| 804 |
+
"blocks.0.adaLN_modulation.weight",
|
| 805 |
+
"blocks.1.attn_qkv.weight",
|
| 806 |
+
"blocks.1.attn_out.weight",
|
| 807 |
+
"blocks.1.mlp.0.weight",
|
| 808 |
+
"blocks.1.mlp.2.weight",
|
| 809 |
+
"blocks.1.adaLN_modulation.weight",
|
| 810 |
+
"blocks.2.attn_qkv.weight",
|
| 811 |
+
"blocks.2.attn_out.weight",
|
| 812 |
+
"blocks.2.mlp.0.weight",
|
| 813 |
+
"blocks.2.mlp.2.weight",
|
| 814 |
+
"blocks.2.adaLN_modulation.weight",
|
| 815 |
+
"output_layer.linear.weight",
|
| 816 |
+
"output_layer.adaLN_modulation.weight"
|
| 817 |
+
],
|
| 818 |
+
"muon_adam_param_names": [
|
| 819 |
+
"sigma_map.net.0.bias",
|
| 820 |
+
"sigma_map.net.2.bias",
|
| 821 |
+
"blocks.0.norm1.weight",
|
| 822 |
+
"blocks.0.norm2.weight",
|
| 823 |
+
"blocks.0.mlp.0.bias",
|
| 824 |
+
"blocks.0.mlp.2.bias",
|
| 825 |
+
"blocks.0.adaLN_modulation.bias",
|
| 826 |
+
"blocks.1.norm1.weight",
|
| 827 |
+
"blocks.1.norm2.weight",
|
| 828 |
+
"blocks.1.mlp.0.bias",
|
| 829 |
+
"blocks.1.mlp.2.bias",
|
| 830 |
+
"blocks.1.adaLN_modulation.bias",
|
| 831 |
+
"blocks.2.norm1.weight",
|
| 832 |
+
"blocks.2.norm2.weight",
|
| 833 |
+
"blocks.2.mlp.0.bias",
|
| 834 |
+
"blocks.2.mlp.2.bias",
|
| 835 |
+
"blocks.2.adaLN_modulation.bias",
|
| 836 |
+
"output_layer.norm_final.weight",
|
| 837 |
+
"output_layer.adaLN_modulation.bias"
|
| 838 |
+
],
|
| 839 |
+
"muon_effective_nesterov": false,
|
| 840 |
+
"muon_effective_width_scale": false,
|
| 841 |
+
"muon_effective_weight_decay": 0.1,
|
| 842 |
+
"muon_adam_fallback_nesterov": false,
|
| 843 |
+
"muon_adam_fallback_weight_decay": 0.1,
|
| 844 |
+
"ema_decay": 0.9999,
|
| 845 |
+
"ema_start_step": 0,
|
| 846 |
+
"model_type": "ddit",
|
| 847 |
+
"ddit_mlp_type": "gelu",
|
| 848 |
+
"elf_num_time_tokens": 4,
|
| 849 |
+
"elf_num_model_mode_tokens": 0,
|
| 850 |
+
"qk_norm": true,
|
| 851 |
+
"output_bias": false,
|
| 852 |
+
"output_init_std": -1.0,
|
| 853 |
+
"norm_type": "rmsnorm",
|
| 854 |
+
"target_loss": "hard_ce",
|
| 855 |
+
"linear_soft_target_power": 1.0,
|
| 856 |
+
"linear_soft_target_min_conf": 0.0,
|
| 857 |
+
"linear_soft_target_max_conf": 1.0,
|
| 858 |
+
"t_sampling_mode": "logit_normal",
|
| 859 |
+
"t_sampling_power": 1.0,
|
| 860 |
+
"t_sampling_eps": 0.0001,
|
| 861 |
+
"t_sampling_logit_mean": -1.5,
|
| 862 |
+
"t_sampling_logit_std": 0.8,
|
| 863 |
+
"dual_t": true,
|
| 864 |
+
"corrupt_t_mode": "same",
|
| 865 |
+
"corrupt_min_t": 0.0,
|
| 866 |
+
"corrupt_max_t": 1.0,
|
| 867 |
+
"prefix_block_prob": 0.0,
|
| 868 |
+
"prefix_block_len": 128,
|
| 869 |
+
"mask_ratio_floor_schedule": "none",
|
| 870 |
+
"dirichlet_endpoint_mode": "categorical_dual_t",
|
| 871 |
+
"dirichlet_semantic_t_mode": "same",
|
| 872 |
+
"dirichlet_semantic_t_value": 0.0,
|
| 873 |
+
"dirichlet_semantic_t_curve": "linear",
|
| 874 |
+
"dirichlet_semantic_t_power": 1.0,
|
| 875 |
+
"endpoint_sequence_random_prob_alpha": 0.0,
|
| 876 |
+
"categorical_wrong_from_full_vocab": true,
|
| 877 |
+
"categorical_wrong_from_batch_valid_tokens": false,
|
| 878 |
+
"categorical_wrong_basin_token_ids": "",
|
| 879 |
+
"categorical_wrong_basin_prob": 0.0,
|
| 880 |
+
"categorical_wrong_unigram_prob": 0.0,
|
| 881 |
+
"categorical_wrong_uniform_prob": 0.0,
|
| 882 |
+
"categorical_wrong_prob_floor": 0.0,
|
| 883 |
+
"categorical_wrong_corpus_unigram_path": "",
|
| 884 |
+
"categorical_wrong_corpus_unigram_alpha": 1.0,
|
| 885 |
+
"categorical_wrong_basin_shared_prob": 0.0,
|
| 886 |
+
"categorical_wrong_unigram_shared_prob": 0.0,
|
| 887 |
+
"mask_mixture_original_prob": 0.0,
|
| 888 |
+
"mask_mixture_lowk_prob": 0.0,
|
| 889 |
+
"mask_mixture_lowcorrupt_prob": 0.0,
|
| 890 |
+
"mask_mixture_block_prob": 0.0,
|
| 891 |
+
"mask_mixture_all_prob": 1.0,
|
| 892 |
+
"mask_mixture_lowk_clean_tokens": "0",
|
| 893 |
+
"mask_mixture_lowcorrupt_tokens": "1,2,4,8,16,32,64",
|
| 894 |
+
"mask_mixture_block_tokens": "64,128",
|
| 895 |
+
"simplex_bridge_sampler": "dirichlet",
|
| 896 |
+
"logistic_normal_sigma_min": 0.1,
|
| 897 |
+
"logistic_normal_sigma_max": 1.0,
|
| 898 |
+
"logistic_normal_tau_min": 1.0,
|
| 899 |
+
"logistic_normal_tau_max": 1.0,
|
| 900 |
+
"torch_compile": false,
|
| 901 |
+
"compile_mode": "max-autotune",
|
| 902 |
+
"state_format": "prob",
|
| 903 |
+
"meanflow_weight": 0.0,
|
| 904 |
+
"rollout_train_prob": 1.0,
|
| 905 |
+
"rollout_train_steps": 4,
|
| 906 |
+
"rollout_train_infer_steps": 32,
|
| 907 |
+
"rollout_train_temp": 1.45,
|
| 908 |
+
"rollout_train_max_gamma": 1.0,
|
| 909 |
+
"rollout_train_corrupt_only": true,
|
| 910 |
+
"rollout_train_samplewise": true,
|
| 911 |
+
"rollout_train_compute_always": false,
|
| 912 |
+
"bridge_noise_init": "logistic_normal",
|
| 913 |
+
"noise_sigma": -1.0,
|
| 914 |
+
"allow_tf32": true,
|
| 915 |
+
"activation_checkpointing": false,
|
| 916 |
+
"activation_checkpoint_interval": 1,
|
| 917 |
+
"activation_checkpoint_scope": "block",
|
| 918 |
+
"ddp_static_graph": false,
|
| 919 |
+
"ddp_gradient_as_bucket_view": true,
|
| 920 |
+
"blocking_data_transfer": false,
|
| 921 |
+
"dataloader_prefetch_factor": 4,
|
| 922 |
+
"full_train_stats": false,
|
| 923 |
+
"tokenized_hf": false,
|
| 924 |
+
"tokenized_pad_token": "pad",
|
| 925 |
+
"elf_conditional_hf": false,
|
| 926 |
+
"record_pad_truncate": false,
|
| 927 |
+
"record_add_eos": false,
|
| 928 |
+
"record_add_special_tokens": false,
|
| 929 |
+
"record_pad_token": "pad",
|
| 930 |
+
"record_shuffle_buffer": 10000,
|
| 931 |
+
"wrap": true,
|
| 932 |
+
"wrap_mode": "stream",
|
| 933 |
+
"wrap_record_buffer_size": 200,
|
| 934 |
+
"owt_cached_chunks": true,
|
| 935 |
+
"owt_chunk_cache_dir": "/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit",
|
| 936 |
+
"owt_chunk_cache_rebuild": false,
|
| 937 |
+
"owt_chunk_cache_write_batch": 4096,
|
| 938 |
+
"owt_exact_repeat_per_chunk": 64,
|
| 939 |
+
"online_chunk_shuffle": false,
|
| 940 |
+
"online_chunk_shuffle_buffer": 10000,
|
| 941 |
+
"openwebtext_split": "train_minus_100k",
|
| 942 |
+
"detokenizer": "auto",
|
| 943 |
+
"resolved_detokenizer": null,
|
| 944 |
+
"num_workers": 0,
|
| 945 |
+
"latest_every": 500,
|
| 946 |
+
"resume_path": ""
|
| 947 |
+
}
|
| 948 |
+
step=100 epoch=100/500 epoch_step=1/1 micro_steps=100 elapsed=8.2s lr=2.000000e-03 loss=6.7057 loss_recon=6.7057 loss_meanflow=0.0000 mean_model_t=0.2083 mean_corrupt_t=0.2083 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=1.0000 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.0995 corrupt_frac=1.0000 acc_corrupt=0.0995 loss_corrupt=6.7057 wrong_frac=0.7915 init_acc_corrupt=0.1159 acc_corrupt_t_0p0_0p2=0.0488 corrupt_frac_t_0p0_0p2=0.5559 acc_corrupt_t_0p2_0p4=0.1333 corrupt_frac_t_0p2_0p4=0.3589 acc_corrupt_t_0p4_0p6=0.2777 corrupt_frac_t_0p4_0p6=0.0773 acc_corrupt_t_0p6_0p8=0.3853 corrupt_frac_t_0p6_0p8=0.0121 out_w_norm=1.0988 out_g_norm=1.0104 loss_all=6.4460 init_gold_top10=0.2110 init_gold_top100=0.5461 rollout_applied_pos_frac=1.0000 init_acc_rollout_applied=0.1169 init_acc_rollout_kept=0.0000 logit_acc_rollout_applied=0.1051 logit_acc_rollout_kept=0.0000
|
| 949 |
+
step=200 epoch=200/500 epoch_step=1/1 micro_steps=200 elapsed=7.5s lr=2.000000e-03 loss=6.0920 loss_recon=6.0920 loss_meanflow=0.0000 mean_model_t=0.2108 mean_corrupt_t=0.2108 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=1.0000 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1116 corrupt_frac=1.0000 acc_corrupt=0.1116 loss_corrupt=6.0920 wrong_frac=0.7892 init_acc_corrupt=0.1190 acc_corrupt_t_0p0_0p2=0.0551 corrupt_frac_t_0p0_0p2=0.5516 acc_corrupt_t_0p2_0p4=0.1512 corrupt_frac_t_0p2_0p4=0.3621 acc_corrupt_t_0p4_0p6=0.2945 corrupt_frac_t_0p4_0p6=0.0781 acc_corrupt_t_0p6_0p8=0.4229 corrupt_frac_t_0p6_0p8=0.0123 out_w_norm=3.3334 out_g_norm=1.4060 acc_corrupt_t_0p8_1p0=0.4766 corrupt_frac_t_0p8_1p0=0.0078 loss_all=5.8240 init_gold_top10=0.2049 init_gold_top100=0.5963 rollout_applied_pos_frac=1.0000 init_acc_rollout_applied=0.1107 init_acc_rollout_kept=0.0000 logit_acc_rollout_applied=0.1096 logit_acc_rollout_kept=0.0000
|
| 950 |
+
step=300 epoch=300/500 epoch_step=1/1 micro_steps=300 elapsed=7.4s lr=2.000000e-03 loss=5.5560 loss_recon=5.5560 loss_meanflow=0.0000 mean_model_t=0.2067 mean_corrupt_t=0.2067 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=1.0000 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1210 corrupt_frac=1.0000 acc_corrupt=0.1210 loss_corrupt=5.5560 wrong_frac=0.7935 init_acc_corrupt=0.1153 acc_corrupt_t_0p0_0p2=0.0590 corrupt_frac_t_0p0_0p2=0.5641 acc_corrupt_t_0p2_0p4=0.1694 corrupt_frac_t_0p2_0p4=0.3542 acc_corrupt_t_0p4_0p6=0.3234 corrupt_frac_t_0p4_0p6=0.0734 acc_corrupt_t_0p6_0p8=0.4773 corrupt_frac_t_0p6_0p8=0.0121 out_w_norm=5.2201 out_g_norm=0.7125 acc_corrupt_t_0p8_1p0=0.6380 corrupt_frac_t_0p8_1p0=0.0078 loss_all=5.2826 init_gold_top10=0.2209 init_gold_top100=0.6553 rollout_applied_pos_frac=1.0000 init_acc_rollout_applied=0.1227 init_acc_rollout_kept=0.0000 logit_acc_rollout_applied=0.1303 logit_acc_rollout_kept=0.0000
|
| 951 |
+
step=400 epoch=400/500 epoch_step=1/1 micro_steps=400 elapsed=7.3s lr=2.000000e-03 loss=4.9781 loss_recon=4.9781 loss_meanflow=0.0000 mean_model_t=0.2085 mean_corrupt_t=0.2085 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=1.0000 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1483 corrupt_frac=1.0000 acc_corrupt=0.1483 loss_corrupt=4.9781 wrong_frac=0.7917 init_acc_corrupt=0.1181 acc_corrupt_t_0p0_0p2=0.0642 corrupt_frac_t_0p0_0p2=0.5564 acc_corrupt_t_0p2_0p4=0.2056 corrupt_frac_t_0p2_0p4=0.3620 acc_corrupt_t_0p4_0p6=0.4439 corrupt_frac_t_0p4_0p6=0.0719 out_w_norm=6.9063 out_g_norm=0.4180 acc_corrupt_t_0p6_0p8=0.6502 corrupt_frac_t_0p6_0p8=0.0131 acc_corrupt_t_0p8_1p0=0.7422 corrupt_frac_t_0p8_1p0=0.0078 loss_all=4.7369 init_gold_top10=0.2113 init_gold_top100=0.7779 rollout_applied_pos_frac=1.0000 init_acc_rollout_applied=0.1016 init_acc_rollout_kept=0.0000 logit_acc_rollout_applied=0.1530 logit_acc_rollout_kept=0.0000
|
| 952 |
+
step=500 epoch=500/500 epoch_step=1/1 micro_steps=500 elapsed=7.3s lr=2.000000e-03 loss=4.1805 loss_recon=4.1805 loss_meanflow=0.0000 mean_model_t=0.2071 mean_corrupt_t=0.2071 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=1.0000 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1890 corrupt_frac=1.0000 acc_corrupt=0.1890 loss_corrupt=4.1805 wrong_frac=0.7928 init_acc_corrupt=0.1178 acc_corrupt_t_0p0_0p2=0.0758 corrupt_frac_t_0p0_0p2=0.5632 acc_corrupt_t_0p2_0p4=0.2839 corrupt_frac_t_0p2_0p4=0.3546 acc_corrupt_t_0p4_0p6=0.5403 corrupt_frac_t_0p4_0p6=0.0745 acc_corrupt_t_0p6_0p8=0.7033 corrupt_frac_t_0p6_0p8=0.0118 acc_corrupt_t_0p8_1p0=0.8555 corrupt_frac_t_0p8_1p0=0.0078 out_w_norm=8.4044 out_g_norm=0.4606 loss_all=3.6550 init_gold_top10=0.2562 init_gold_top100=0.9090 rollout_applied_pos_frac=1.0000 init_acc_rollout_applied=0.1274 init_acc_rollout_kept=0.0000 logit_acc_rollout_applied=0.2250 logit_acc_rollout_kept=0.0000
|
| 953 |
+
[rollin-focused] eval config=rollin_p100_s4_i32 step=500
|
| 954 |
+
[eval-decode-acc] train8_rollin_focused_len256_rollin_p100_s4_i32_20260517_1733focused step=500 soft=none
|
| 955 |
+
[decode] max_len=256 generated=64/64
|
| 956 |
+
{
|
| 957 |
+
"num_rows": 1,
|
| 958 |
+
"best_by_run": {
|
| 959 |
+
"train8_rollin_focused_len256_rollin_p100_s4_i32_20260517_1733focused::none": {
|
| 960 |
+
"run": "train8_rollin_focused_len256_rollin_p100_s4_i32_20260517_1733focused",
|
| 961 |
+
"checkpoint": "runs/train8_rollin_focused_len256_rollin_p100_s4_i32_20260517_1733focused/step_0000500.pt",
|
| 962 |
+
"ckpt_step": 500,
|
| 963 |
+
"endpoint_softening": "none",
|
| 964 |
+
"decode_rule": "flowmap",
|
| 965 |
+
"steps": 128,
|
| 966 |
+
"time_schedule": "logit_normal",
|
| 967 |
+
"model_t_mode": "post",
|
| 968 |
+
"final_from": "state",
|
| 969 |
+
"n_gen": 64,
|
| 970 |
+
"n_refs": 8,
|
| 971 |
+
"token_acc_mean": 0.0469970703125,
|
| 972 |
+
"token_acc_min": 0.02734375,
|
| 973 |
+
"token_acc_max": 0.078125,
|
| 974 |
+
"exact_acc": 0.0,
|
| 975 |
+
"exact_count": 0,
|
| 976 |
+
"exact_ref_coverage": 0.0,
|
| 977 |
+
"exact_ref_count": 0,
|
| 978 |
+
"exact_ref_hits": [],
|
| 979 |
+
"best_ref_idx": [
|
| 980 |
+
5,
|
| 981 |
+
5,
|
| 982 |
+
0,
|
| 983 |
+
3,
|
| 984 |
+
0,
|
| 985 |
+
3,
|
| 986 |
+
0,
|
| 987 |
+
7,
|
| 988 |
+
3,
|
| 989 |
+
0,
|
| 990 |
+
3,
|
| 991 |
+
5,
|
| 992 |
+
0,
|
| 993 |
+
3,
|
| 994 |
+
2,
|
| 995 |
+
2,
|
| 996 |
+
3,
|
| 997 |
+
3,
|
| 998 |
+
7,
|
| 999 |
+
3,
|
| 1000 |
+
7,
|
| 1001 |
+
7,
|
| 1002 |
+
2,
|
| 1003 |
+
2,
|
| 1004 |
+
2,
|
| 1005 |
+
3,
|
| 1006 |
+
7,
|
| 1007 |
+
0,
|
| 1008 |
+
2,
|
| 1009 |
+
3,
|
| 1010 |
+
3,
|
| 1011 |
+
3,
|
| 1012 |
+
7,
|
| 1013 |
+
2,
|
| 1014 |
+
7,
|
| 1015 |
+
3,
|
| 1016 |
+
7,
|
| 1017 |
+
3,
|
| 1018 |
+
0,
|
| 1019 |
+
3,
|
| 1020 |
+
3,
|
| 1021 |
+
5,
|
| 1022 |
+
2,
|
| 1023 |
+
0,
|
| 1024 |
+
5,
|
| 1025 |
+
2,
|
| 1026 |
+
7,
|
| 1027 |
+
2,
|
| 1028 |
+
3,
|
| 1029 |
+
3,
|
| 1030 |
+
3,
|
| 1031 |
+
3,
|
| 1032 |
+
7,
|
| 1033 |
+
3,
|
| 1034 |
+
7,
|
| 1035 |
+
3,
|
| 1036 |
+
3,
|
| 1037 |
+
3,
|
| 1038 |
+
2,
|
| 1039 |
+
3,
|
| 1040 |
+
3,
|
| 1041 |
+
7,
|
| 1042 |
+
0,
|
| 1043 |
+
0
|
| 1044 |
+
],
|
| 1045 |
+
"best_token_acc": [
|
| 1046 |
+
0.046875,
|
| 1047 |
+
0.0546875,
|
| 1048 |
+
0.02734375,
|
| 1049 |
+
0.04296875,
|
| 1050 |
+
0.05859375,
|
| 1051 |
+
0.05078125,
|
| 1052 |
+
0.03125,
|
| 1053 |
+
0.046875,
|
| 1054 |
+
0.05859375,
|
| 1055 |
+
0.03125,
|
| 1056 |
+
0.05078125,
|
| 1057 |
+
0.03125,
|
| 1058 |
+
0.046875,
|
| 1059 |
+
0.0625,
|
| 1060 |
+
0.0625,
|
| 1061 |
+
0.046875,
|
| 1062 |
+
0.0390625,
|
| 1063 |
+
0.0390625,
|
| 1064 |
+
0.046875,
|
| 1065 |
+
0.04296875,
|
| 1066 |
+
0.078125,
|
| 1067 |
+
0.02734375,
|
| 1068 |
+
0.03125,
|
| 1069 |
+
0.03125,
|
| 1070 |
+
0.078125,
|
| 1071 |
+
0.0703125,
|
| 1072 |
+
0.02734375,
|
| 1073 |
+
0.0390625,
|
| 1074 |
+
0.0546875,
|
| 1075 |
+
0.03125,
|
| 1076 |
+
0.03515625,
|
| 1077 |
+
0.04296875,
|
| 1078 |
+
0.078125,
|
| 1079 |
+
0.05078125,
|
| 1080 |
+
0.05078125,
|
| 1081 |
+
0.03515625,
|
| 1082 |
+
0.04296875,
|
| 1083 |
+
0.03515625,
|
| 1084 |
+
0.03515625,
|
| 1085 |
+
0.0703125,
|
| 1086 |
+
0.07421875,
|
| 1087 |
+
0.06640625,
|
| 1088 |
+
0.03515625,
|
| 1089 |
+
0.046875,
|
| 1090 |
+
0.0390625,
|
| 1091 |
+
0.03125,
|
| 1092 |
+
0.0703125,
|
| 1093 |
+
0.0625,
|
| 1094 |
+
0.0546875,
|
| 1095 |
+
0.0625,
|
| 1096 |
+
0.0390625,
|
| 1097 |
+
0.0546875,
|
| 1098 |
+
0.03515625,
|
| 1099 |
+
0.04296875,
|
| 1100 |
+
0.04296875,
|
| 1101 |
+
0.0546875,
|
| 1102 |
+
0.03515625,
|
| 1103 |
+
0.03125,
|
| 1104 |
+
0.02734375,
|
| 1105 |
+
0.046875,
|
| 1106 |
+
0.03125,
|
| 1107 |
+
0.06640625,
|
| 1108 |
+
0.0546875,
|
| 1109 |
+
0.0390625
|
| 1110 |
+
]
|
| 1111 |
+
}
|
| 1112 |
+
},
|
| 1113 |
+
"first_exact_by_run": {}
|
| 1114 |
+
}
|
| 1115 |
+
RESULT config=rollin_p100_s4_i32 ckpt_step=500 views=256000 token_acc=0.0470 exact=0/64 exact_refs=0 hits=[]
|
| 1116 |
+
[rollin-focused] train config=rollin_p50_s8_i64 from=0 to=500 rollout=0.50/s8/i64/temp1.45
|
| 1117 |
+
[launch] gpt2 cached OWT soft-endpoint m/n pilot
|
| 1118 |
+
[launch] run_name=train8_rollin_focused_len256_rollin_p50_s8_i64_20260517_1733focused
|
| 1119 |
+
[launch] save_dir=runs/train8_rollin_focused_len256_rollin_p50_s8_i64_20260517_1733focused
|
| 1120 |
+
[launch] n=256 m=0 clean_state_mode=onehot
|
| 1121 |
+
[launch] mask_mixture lowk=0.0 all=1.0
|
| 1122 |
+
[launch] model d=192 layers=3 heads=3 ff=768 vocab_override=969
|
| 1123 |
+
[launch] optimizer=muon muon_impl=legacy weight_decay=0.1 output_weight_decay=-1
|
| 1124 |
+
[launch] target_loss=hard_ce conf=0.0->1.0 power=1.0
|
| 1125 |
+
[launch] mask_ratio=1.0->1.0
|
| 1126 |
+
[launch] mask_ratio_floor_schedule=none
|
| 1127 |
+
[launch] dirichlet C=1.0->1024 endpoint=categorical_dual_t sampler=dirichlet
|
| 1128 |
+
[launch] wrong_mix seq_alpha=0.0 wrong_floor=0.0 unigram=0.0 uniform=0.0 basin=0.0 basin_ids=
|
| 1129 |
+
[launch] rollout_train prob=0.50 steps=8 infer_steps=64 temp=1.45 corrupt_only=1 samplewise=1
|
| 1130 |
+
[launch] cache=/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit exact_repeat_per_chunk=64
|
| 1131 |
+
NCCL version 2.25.1+cuda12.8
|
| 1132 |
+
{
|
| 1133 |
+
"device": "cuda:0",
|
| 1134 |
+
"rank": 0,
|
| 1135 |
+
"world_size": 4,
|
| 1136 |
+
"samples": "owt_cached_chunks:8",
|
| 1137 |
+
"vocab_size": 969,
|
| 1138 |
+
"tokenizer_vocab_size": 50257,
|
| 1139 |
+
"save_dir": "runs/train8_rollin_focused_len256_rollin_p50_s8_i64_20260517_1733focused",
|
| 1140 |
+
"batch_size": 128,
|
| 1141 |
+
"grad_accum": 1,
|
| 1142 |
+
"effective_batch_size": 512,
|
| 1143 |
+
"global_batch_size": 512,
|
| 1144 |
+
"lr_schedule": "constant_warmup",
|
| 1145 |
+
"optimizer": "muon",
|
| 1146 |
+
"epochs": 0.0,
|
| 1147 |
+
"steps_per_epoch": 1,
|
| 1148 |
+
"total_steps": 500,
|
| 1149 |
+
"warmup_steps": 10,
|
| 1150 |
+
"warmup_epochs": -1.0,
|
| 1151 |
+
"min_lr": 0.0,
|
| 1152 |
+
"weight_decay": 0.1,
|
| 1153 |
+
"output_weight_decay": -1.0,
|
| 1154 |
+
"adamw_param_groups": "nanogpt",
|
| 1155 |
+
"adam_beta1": 0.9,
|
| 1156 |
+
"adam_beta2": 0.95,
|
| 1157 |
+
"adam_eps": 1e-08,
|
| 1158 |
+
"muon_impl": "legacy",
|
| 1159 |
+
"muon_momentum": 0.95,
|
| 1160 |
+
"muon_ns_steps": 5,
|
| 1161 |
+
"muon_update_scale": 1.0,
|
| 1162 |
+
"muon_nesterov": false,
|
| 1163 |
+
"muon_width_scale": false,
|
| 1164 |
+
"muon_grouping": "legacy_dim_ge_2",
|
| 1165 |
+
"muon_param_count": 1965440,
|
| 1166 |
+
"muon_adam_param_count": 8192,
|
| 1167 |
+
"muon_param_names": [
|
| 1168 |
+
"vocab_embed.embedding",
|
| 1169 |
+
"sigma_map.net.0.weight",
|
| 1170 |
+
"sigma_map.net.2.weight",
|
| 1171 |
+
"blocks.0.attn_qkv.weight",
|
| 1172 |
+
"blocks.0.attn_out.weight",
|
| 1173 |
+
"blocks.0.mlp.0.weight",
|
| 1174 |
+
"blocks.0.mlp.2.weight",
|
| 1175 |
+
"blocks.0.adaLN_modulation.weight",
|
| 1176 |
+
"blocks.1.attn_qkv.weight",
|
| 1177 |
+
"blocks.1.attn_out.weight",
|
| 1178 |
+
"blocks.1.mlp.0.weight",
|
| 1179 |
+
"blocks.1.mlp.2.weight",
|
| 1180 |
+
"blocks.1.adaLN_modulation.weight",
|
| 1181 |
+
"blocks.2.attn_qkv.weight",
|
| 1182 |
+
"blocks.2.attn_out.weight",
|
| 1183 |
+
"blocks.2.mlp.0.weight",
|
| 1184 |
+
"blocks.2.mlp.2.weight",
|
| 1185 |
+
"blocks.2.adaLN_modulation.weight",
|
| 1186 |
+
"output_layer.linear.weight",
|
| 1187 |
+
"output_layer.adaLN_modulation.weight"
|
| 1188 |
+
],
|
| 1189 |
+
"muon_adam_param_names": [
|
| 1190 |
+
"sigma_map.net.0.bias",
|
| 1191 |
+
"sigma_map.net.2.bias",
|
| 1192 |
+
"blocks.0.norm1.weight",
|
| 1193 |
+
"blocks.0.norm2.weight",
|
| 1194 |
+
"blocks.0.mlp.0.bias",
|
| 1195 |
+
"blocks.0.mlp.2.bias",
|
| 1196 |
+
"blocks.0.adaLN_modulation.bias",
|
| 1197 |
+
"blocks.1.norm1.weight",
|
| 1198 |
+
"blocks.1.norm2.weight",
|
| 1199 |
+
"blocks.1.mlp.0.bias",
|
| 1200 |
+
"blocks.1.mlp.2.bias",
|
| 1201 |
+
"blocks.1.adaLN_modulation.bias",
|
| 1202 |
+
"blocks.2.norm1.weight",
|
| 1203 |
+
"blocks.2.norm2.weight",
|
| 1204 |
+
"blocks.2.mlp.0.bias",
|
| 1205 |
+
"blocks.2.mlp.2.bias",
|
| 1206 |
+
"blocks.2.adaLN_modulation.bias",
|
| 1207 |
+
"output_layer.norm_final.weight",
|
| 1208 |
+
"output_layer.adaLN_modulation.bias"
|
| 1209 |
+
],
|
| 1210 |
+
"muon_effective_nesterov": false,
|
| 1211 |
+
"muon_effective_width_scale": false,
|
| 1212 |
+
"muon_effective_weight_decay": 0.1,
|
| 1213 |
+
"muon_adam_fallback_nesterov": false,
|
| 1214 |
+
"muon_adam_fallback_weight_decay": 0.1,
|
| 1215 |
+
"ema_decay": 0.9999,
|
| 1216 |
+
"ema_start_step": 0,
|
| 1217 |
+
"model_type": "ddit",
|
| 1218 |
+
"ddit_mlp_type": "gelu",
|
| 1219 |
+
"elf_num_time_tokens": 4,
|
| 1220 |
+
"elf_num_model_mode_tokens": 0,
|
| 1221 |
+
"qk_norm": true,
|
| 1222 |
+
"output_bias": false,
|
| 1223 |
+
"output_init_std": -1.0,
|
| 1224 |
+
"norm_type": "rmsnorm",
|
| 1225 |
+
"target_loss": "hard_ce",
|
| 1226 |
+
"linear_soft_target_power": 1.0,
|
| 1227 |
+
"linear_soft_target_min_conf": 0.0,
|
| 1228 |
+
"linear_soft_target_max_conf": 1.0,
|
| 1229 |
+
"t_sampling_mode": "logit_normal",
|
| 1230 |
+
"t_sampling_power": 1.0,
|
| 1231 |
+
"t_sampling_eps": 0.0001,
|
| 1232 |
+
"t_sampling_logit_mean": -1.5,
|
| 1233 |
+
"t_sampling_logit_std": 0.8,
|
| 1234 |
+
"dual_t": true,
|
| 1235 |
+
"corrupt_t_mode": "same",
|
| 1236 |
+
"corrupt_min_t": 0.0,
|
| 1237 |
+
"corrupt_max_t": 1.0,
|
| 1238 |
+
"prefix_block_prob": 0.0,
|
| 1239 |
+
"prefix_block_len": 128,
|
| 1240 |
+
"mask_ratio_floor_schedule": "none",
|
| 1241 |
+
"dirichlet_endpoint_mode": "categorical_dual_t",
|
| 1242 |
+
"dirichlet_semantic_t_mode": "same",
|
| 1243 |
+
"dirichlet_semantic_t_value": 0.0,
|
| 1244 |
+
"dirichlet_semantic_t_curve": "linear",
|
| 1245 |
+
"dirichlet_semantic_t_power": 1.0,
|
| 1246 |
+
"endpoint_sequence_random_prob_alpha": 0.0,
|
| 1247 |
+
"categorical_wrong_from_full_vocab": true,
|
| 1248 |
+
"categorical_wrong_from_batch_valid_tokens": false,
|
| 1249 |
+
"categorical_wrong_basin_token_ids": "",
|
| 1250 |
+
"categorical_wrong_basin_prob": 0.0,
|
| 1251 |
+
"categorical_wrong_unigram_prob": 0.0,
|
| 1252 |
+
"categorical_wrong_uniform_prob": 0.0,
|
| 1253 |
+
"categorical_wrong_prob_floor": 0.0,
|
| 1254 |
+
"categorical_wrong_corpus_unigram_path": "",
|
| 1255 |
+
"categorical_wrong_corpus_unigram_alpha": 1.0,
|
| 1256 |
+
"categorical_wrong_basin_shared_prob": 0.0,
|
| 1257 |
+
"categorical_wrong_unigram_shared_prob": 0.0,
|
| 1258 |
+
"mask_mixture_original_prob": 0.0,
|
| 1259 |
+
"mask_mixture_lowk_prob": 0.0,
|
| 1260 |
+
"mask_mixture_lowcorrupt_prob": 0.0,
|
| 1261 |
+
"mask_mixture_block_prob": 0.0,
|
| 1262 |
+
"mask_mixture_all_prob": 1.0,
|
| 1263 |
+
"mask_mixture_lowk_clean_tokens": "0",
|
| 1264 |
+
"mask_mixture_lowcorrupt_tokens": "1,2,4,8,16,32,64",
|
| 1265 |
+
"mask_mixture_block_tokens": "64,128",
|
| 1266 |
+
"simplex_bridge_sampler": "dirichlet",
|
| 1267 |
+
"logistic_normal_sigma_min": 0.1,
|
| 1268 |
+
"logistic_normal_sigma_max": 1.0,
|
| 1269 |
+
"logistic_normal_tau_min": 1.0,
|
| 1270 |
+
"logistic_normal_tau_max": 1.0,
|
| 1271 |
+
"torch_compile": false,
|
| 1272 |
+
"compile_mode": "max-autotune",
|
| 1273 |
+
"state_format": "prob",
|
| 1274 |
+
"meanflow_weight": 0.0,
|
| 1275 |
+
"rollout_train_prob": 0.5,
|
| 1276 |
+
"rollout_train_steps": 8,
|
| 1277 |
+
"rollout_train_infer_steps": 64,
|
| 1278 |
+
"rollout_train_temp": 1.45,
|
| 1279 |
+
"rollout_train_max_gamma": 1.0,
|
| 1280 |
+
"rollout_train_corrupt_only": true,
|
| 1281 |
+
"rollout_train_samplewise": true,
|
| 1282 |
+
"rollout_train_compute_always": false,
|
| 1283 |
+
"bridge_noise_init": "logistic_normal",
|
| 1284 |
+
"noise_sigma": -1.0,
|
| 1285 |
+
"allow_tf32": true,
|
| 1286 |
+
"activation_checkpointing": false,
|
| 1287 |
+
"activation_checkpoint_interval": 1,
|
| 1288 |
+
"activation_checkpoint_scope": "block",
|
| 1289 |
+
"ddp_static_graph": false,
|
| 1290 |
+
"ddp_gradient_as_bucket_view": true,
|
| 1291 |
+
"blocking_data_transfer": false,
|
| 1292 |
+
"dataloader_prefetch_factor": 4,
|
| 1293 |
+
"full_train_stats": false,
|
| 1294 |
+
"tokenized_hf": false,
|
| 1295 |
+
"tokenized_pad_token": "pad",
|
| 1296 |
+
"elf_conditional_hf": false,
|
| 1297 |
+
"record_pad_truncate": false,
|
| 1298 |
+
"record_add_eos": false,
|
| 1299 |
+
"record_add_special_tokens": false,
|
| 1300 |
+
"record_pad_token": "pad",
|
| 1301 |
+
"record_shuffle_buffer": 10000,
|
| 1302 |
+
"wrap": true,
|
| 1303 |
+
"wrap_mode": "stream",
|
| 1304 |
+
"wrap_record_buffer_size": 200,
|
| 1305 |
+
"owt_cached_chunks": true,
|
| 1306 |
+
"owt_chunk_cache_dir": "/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit",
|
| 1307 |
+
"owt_chunk_cache_rebuild": false,
|
| 1308 |
+
"owt_chunk_cache_write_batch": 4096,
|
| 1309 |
+
"owt_exact_repeat_per_chunk": 64,
|
| 1310 |
+
"online_chunk_shuffle": false,
|
| 1311 |
+
"online_chunk_shuffle_buffer": 10000,
|
| 1312 |
+
"openwebtext_split": "train_minus_100k",
|
| 1313 |
+
"detokenizer": "auto",
|
| 1314 |
+
"resolved_detokenizer": null,
|
| 1315 |
+
"num_workers": 0,
|
| 1316 |
+
"latest_every": 500,
|
| 1317 |
+
"resume_path": ""
|
| 1318 |
+
}
|
| 1319 |
+
step=100 epoch=100/500 epoch_step=1/1 micro_steps=100 elapsed=11.1s lr=2.000000e-03 loss=6.7066 loss_recon=6.7066 loss_meanflow=0.0000 mean_model_t=0.2083 mean_corrupt_t=0.2083 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.5128 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.0996 corrupt_frac=1.0000 acc_corrupt=0.0996 loss_corrupt=6.7066 wrong_frac=0.7915 init_acc_corrupt=0.1159 acc_corrupt_t_0p0_0p2=0.0486 corrupt_frac_t_0p0_0p2=0.5559 acc_corrupt_t_0p2_0p4=0.1327 corrupt_frac_t_0p2_0p4=0.3589 acc_corrupt_t_0p4_0p6=0.2812 corrupt_frac_t_0p4_0p6=0.0773 acc_corrupt_t_0p6_0p8=0.4043 corrupt_frac_t_0p6_0p8=0.0121 out_w_norm=1.0999 out_g_norm=1.0063 loss_all=6.4484 init_gold_top10=0.2091 init_gold_top100=0.4879 rollout_applied_pos_frac=0.4844 init_acc_rollout_applied=0.1131 init_acc_rollout_kept=0.1206 logit_acc_rollout_applied=0.1072 logit_acc_rollout_kept=0.1000
|
| 1320 |
+
step=200 epoch=200/500 epoch_step=1/1 micro_steps=200 elapsed=10.4s lr=2.000000e-03 loss=6.0959 loss_recon=6.0959 loss_meanflow=0.0000 mean_model_t=0.2108 mean_corrupt_t=0.2108 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.4954 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1105 corrupt_frac=1.0000 acc_corrupt=0.1105 loss_corrupt=6.0959 wrong_frac=0.7892 init_acc_corrupt=0.1187 acc_corrupt_t_0p0_0p2=0.0551 corrupt_frac_t_0p0_0p2=0.5516 acc_corrupt_t_0p2_0p4=0.1483 corrupt_frac_t_0p2_0p4=0.3621 acc_corrupt_t_0p4_0p6=0.2930 corrupt_frac_t_0p4_0p6=0.0781 acc_corrupt_t_0p6_0p8=0.4270 corrupt_frac_t_0p6_0p8=0.0123 out_w_norm=3.3156 out_g_norm=1.4051 acc_corrupt_t_0p8_1p0=0.4753 corrupt_frac_t_0p8_1p0=0.0078 loss_all=5.8272 init_gold_top10=0.2013 init_gold_top100=0.5202 rollout_applied_pos_frac=0.5234 init_acc_rollout_applied=0.0961 init_acc_rollout_kept=0.1255 logit_acc_rollout_applied=0.1021 logit_acc_rollout_kept=0.1155
|
| 1321 |
+
step=300 epoch=300/500 epoch_step=1/1 micro_steps=300 elapsed=10.4s lr=2.000000e-03 loss=5.5736 loss_recon=5.5736 loss_meanflow=0.0000 mean_model_t=0.2067 mean_corrupt_t=0.2067 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.5003 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1198 corrupt_frac=1.0000 acc_corrupt=0.1198 loss_corrupt=5.5736 wrong_frac=0.7935 init_acc_corrupt=0.1146 acc_corrupt_t_0p0_0p2=0.0584 corrupt_frac_t_0p0_0p2=0.5641 acc_corrupt_t_0p2_0p4=0.1671 corrupt_frac_t_0p2_0p4=0.3542 acc_corrupt_t_0p4_0p6=0.3230 corrupt_frac_t_0p4_0p6=0.0734 acc_corrupt_t_0p6_0p8=0.4747 corrupt_frac_t_0p6_0p8=0.0121 out_w_norm=5.1950 out_g_norm=0.7224 acc_corrupt_t_0p8_1p0=0.6680 corrupt_frac_t_0p8_1p0=0.0078 loss_all=5.3115 init_gold_top10=0.2068 init_gold_top100=0.5429 rollout_applied_pos_frac=0.4688 init_acc_rollout_applied=0.1298 init_acc_rollout_kept=0.1153 logit_acc_rollout_applied=0.1342 logit_acc_rollout_kept=0.1293
|
| 1322 |
+
step=400 epoch=400/500 epoch_step=1/1 micro_steps=400 elapsed=10.4s lr=2.000000e-03 loss=5.0145 loss_recon=5.0145 loss_meanflow=0.0000 mean_model_t=0.2085 mean_corrupt_t=0.2085 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.5077 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1453 corrupt_frac=1.0000 acc_corrupt=0.1453 loss_corrupt=5.0145 wrong_frac=0.7917 init_acc_corrupt=0.1171 acc_corrupt_t_0p0_0p2=0.0634 corrupt_frac_t_0p0_0p2=0.5564 acc_corrupt_t_0p2_0p4=0.1998 corrupt_frac_t_0p2_0p4=0.3620 acc_corrupt_t_0p4_0p6=0.4370 corrupt_frac_t_0p4_0p6=0.0719 out_w_norm=6.8552 out_g_norm=0.4143 acc_corrupt_t_0p6_0p8=0.6432 corrupt_frac_t_0p6_0p8=0.0131 acc_corrupt_t_0p8_1p0=0.7754 corrupt_frac_t_0p8_1p0=0.0078 loss_all=4.7813 init_gold_top10=0.2001 init_gold_top100=0.5698 rollout_applied_pos_frac=0.4297 init_acc_rollout_applied=0.0895 init_acc_rollout_kept=0.1080 logit_acc_rollout_applied=0.1349 logit_acc_rollout_kept=0.1588
|
| 1323 |
+
step=500 epoch=500/500 epoch_step=1/1 micro_steps=500 elapsed=10.4s lr=2.000000e-03 loss=4.2764 loss_recon=4.2764 loss_meanflow=0.0000 mean_model_t=0.2071 mean_corrupt_t=0.2071 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.5024 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1819 corrupt_frac=1.0000 acc_corrupt=0.1819 loss_corrupt=4.2764 wrong_frac=0.7928 init_acc_corrupt=0.1165 acc_corrupt_t_0p0_0p2=0.0737 corrupt_frac_t_0p0_0p2=0.5632 acc_corrupt_t_0p2_0p4=0.2704 corrupt_frac_t_0p2_0p4=0.3546 acc_corrupt_t_0p4_0p6=0.5253 corrupt_frac_t_0p4_0p6=0.0745 acc_corrupt_t_0p6_0p8=0.6928 corrupt_frac_t_0p6_0p8=0.0118 acc_corrupt_t_0p8_1p0=0.8516 corrupt_frac_t_0p8_1p0=0.0078 out_w_norm=8.3760 out_g_norm=0.4541 loss_all=3.7745 init_gold_top10=0.2264 init_gold_top100=0.6832 rollout_applied_pos_frac=0.5156 init_acc_rollout_applied=0.1152 init_acc_rollout_kept=0.1360 logit_acc_rollout_applied=0.2051 logit_acc_rollout_kept=0.2191
|
| 1324 |
+
[rollin-focused] eval config=rollin_p50_s8_i64 step=500
|
| 1325 |
+
[eval-decode-acc] train8_rollin_focused_len256_rollin_p50_s8_i64_20260517_1733focused step=500 soft=none
|
| 1326 |
+
[decode] max_len=256 generated=64/64
|
| 1327 |
+
{
|
| 1328 |
+
"num_rows": 1,
|
| 1329 |
+
"best_by_run": {
|
| 1330 |
+
"train8_rollin_focused_len256_rollin_p50_s8_i64_20260517_1733focused::none": {
|
| 1331 |
+
"run": "train8_rollin_focused_len256_rollin_p50_s8_i64_20260517_1733focused",
|
| 1332 |
+
"checkpoint": "runs/train8_rollin_focused_len256_rollin_p50_s8_i64_20260517_1733focused/step_0000500.pt",
|
| 1333 |
+
"ckpt_step": 500,
|
| 1334 |
+
"endpoint_softening": "none",
|
| 1335 |
+
"decode_rule": "flowmap",
|
| 1336 |
+
"steps": 128,
|
| 1337 |
+
"time_schedule": "logit_normal",
|
| 1338 |
+
"model_t_mode": "post",
|
| 1339 |
+
"final_from": "state",
|
| 1340 |
+
"n_gen": 64,
|
| 1341 |
+
"n_refs": 8,
|
| 1342 |
+
"token_acc_mean": 0.04052734375,
|
| 1343 |
+
"token_acc_min": 0.015625,
|
| 1344 |
+
"token_acc_max": 0.078125,
|
| 1345 |
+
"exact_acc": 0.0,
|
| 1346 |
+
"exact_count": 0,
|
| 1347 |
+
"exact_ref_coverage": 0.0,
|
| 1348 |
+
"exact_ref_count": 0,
|
| 1349 |
+
"exact_ref_hits": [],
|
| 1350 |
+
"best_ref_idx": [
|
| 1351 |
+
3,
|
| 1352 |
+
5,
|
| 1353 |
+
0,
|
| 1354 |
+
3,
|
| 1355 |
+
0,
|
| 1356 |
+
7,
|
| 1357 |
+
3,
|
| 1358 |
+
1,
|
| 1359 |
+
3,
|
| 1360 |
+
6,
|
| 1361 |
+
3,
|
| 1362 |
+
0,
|
| 1363 |
+
0,
|
| 1364 |
+
3,
|
| 1365 |
+
2,
|
| 1366 |
+
2,
|
| 1367 |
+
3,
|
| 1368 |
+
3,
|
| 1369 |
+
2,
|
| 1370 |
+
6,
|
| 1371 |
+
7,
|
| 1372 |
+
2,
|
| 1373 |
+
3,
|
| 1374 |
+
0,
|
| 1375 |
+
2,
|
| 1376 |
+
3,
|
| 1377 |
+
1,
|
| 1378 |
+
5,
|
| 1379 |
+
3,
|
| 1380 |
+
0,
|
| 1381 |
+
3,
|
| 1382 |
+
3,
|
| 1383 |
+
7,
|
| 1384 |
+
0,
|
| 1385 |
+
7,
|
| 1386 |
+
7,
|
| 1387 |
+
1,
|
| 1388 |
+
3,
|
| 1389 |
+
4,
|
| 1390 |
+
3,
|
| 1391 |
+
3,
|
| 1392 |
+
6,
|
| 1393 |
+
1,
|
| 1394 |
+
7,
|
| 1395 |
+
1,
|
| 1396 |
+
2,
|
| 1397 |
+
7,
|
| 1398 |
+
3,
|
| 1399 |
+
5,
|
| 1400 |
+
3,
|
| 1401 |
+
3,
|
| 1402 |
+
1,
|
| 1403 |
+
1,
|
| 1404 |
+
1,
|
| 1405 |
+
7,
|
| 1406 |
+
3,
|
| 1407 |
+
5,
|
| 1408 |
+
3,
|
| 1409 |
+
0,
|
| 1410 |
+
2,
|
| 1411 |
+
7,
|
| 1412 |
+
7,
|
| 1413 |
+
0,
|
| 1414 |
+
0
|
| 1415 |
+
],
|
| 1416 |
+
"best_token_acc": [
|
| 1417 |
+
0.02734375,
|
| 1418 |
+
0.046875,
|
| 1419 |
+
0.0625,
|
| 1420 |
+
0.05078125,
|
| 1421 |
+
0.03125,
|
| 1422 |
+
0.0390625,
|
| 1423 |
+
0.03515625,
|
| 1424 |
+
0.015625,
|
| 1425 |
+
0.03515625,
|
| 1426 |
+
0.02734375,
|
| 1427 |
+
0.05078125,
|
| 1428 |
+
0.0390625,
|
| 1429 |
+
0.03515625,
|
| 1430 |
+
0.04296875,
|
| 1431 |
+
0.02734375,
|
| 1432 |
+
0.04296875,
|
| 1433 |
+
0.0390625,
|
| 1434 |
+
0.04296875,
|
| 1435 |
+
0.03125,
|
| 1436 |
+
0.0234375,
|
| 1437 |
+
0.078125,
|
| 1438 |
+
0.0234375,
|
| 1439 |
+
0.03125,
|
| 1440 |
+
0.02734375,
|
| 1441 |
+
0.01953125,
|
| 1442 |
+
0.0546875,
|
| 1443 |
+
0.02734375,
|
| 1444 |
+
0.02734375,
|
| 1445 |
+
0.02734375,
|
| 1446 |
+
0.03515625,
|
| 1447 |
+
0.05859375,
|
| 1448 |
+
0.03125,
|
| 1449 |
+
0.04296875,
|
| 1450 |
+
0.03125,
|
| 1451 |
+
0.06640625,
|
| 1452 |
+
0.04296875,
|
| 1453 |
+
0.03515625,
|
| 1454 |
+
0.0625,
|
| 1455 |
+
0.04296875,
|
| 1456 |
+
0.05078125,
|
| 1457 |
+
0.05078125,
|
| 1458 |
+
0.03125,
|
| 1459 |
+
0.046875,
|
| 1460 |
+
0.046875,
|
| 1461 |
+
0.0390625,
|
| 1462 |
+
0.04296875,
|
| 1463 |
+
0.0390625,
|
| 1464 |
+
0.02734375,
|
| 1465 |
+
0.04296875,
|
| 1466 |
+
0.05859375,
|
| 1467 |
+
0.05859375,
|
| 1468 |
+
0.05078125,
|
| 1469 |
+
0.03515625,
|
| 1470 |
+
0.04296875,
|
| 1471 |
+
0.046875,
|
| 1472 |
+
0.05078125,
|
| 1473 |
+
0.05078125,
|
| 1474 |
+
0.03515625,
|
| 1475 |
+
0.046875,
|
| 1476 |
+
0.04296875,
|
| 1477 |
+
0.046875,
|
| 1478 |
+
0.03125,
|
| 1479 |
+
0.046875,
|
| 1480 |
+
0.01953125
|
| 1481 |
+
]
|
| 1482 |
+
}
|
| 1483 |
+
},
|
| 1484 |
+
"first_exact_by_run": {}
|
| 1485 |
+
}
|
| 1486 |
+
RESULT config=rollin_p50_s8_i64 ckpt_step=500 views=256000 token_acc=0.0405 exact=0/64 exact_refs=0 hits=[]
|
| 1487 |
+
[rollin-focused] train config=rollin_p75_s8_i64 from=0 to=500 rollout=0.75/s8/i64/temp1.45
|
| 1488 |
+
[launch] gpt2 cached OWT soft-endpoint m/n pilot
|
| 1489 |
+
[launch] run_name=train8_rollin_focused_len256_rollin_p75_s8_i64_20260517_1733focused
|
| 1490 |
+
[launch] save_dir=runs/train8_rollin_focused_len256_rollin_p75_s8_i64_20260517_1733focused
|
| 1491 |
+
[launch] n=256 m=0 clean_state_mode=onehot
|
| 1492 |
+
[launch] mask_mixture lowk=0.0 all=1.0
|
| 1493 |
+
[launch] model d=192 layers=3 heads=3 ff=768 vocab_override=969
|
| 1494 |
+
[launch] optimizer=muon muon_impl=legacy weight_decay=0.1 output_weight_decay=-1
|
| 1495 |
+
[launch] target_loss=hard_ce conf=0.0->1.0 power=1.0
|
| 1496 |
+
[launch] mask_ratio=1.0->1.0
|
| 1497 |
+
[launch] mask_ratio_floor_schedule=none
|
| 1498 |
+
[launch] dirichlet C=1.0->1024 endpoint=categorical_dual_t sampler=dirichlet
|
| 1499 |
+
[launch] wrong_mix seq_alpha=0.0 wrong_floor=0.0 unigram=0.0 uniform=0.0 basin=0.0 basin_ids=
|
| 1500 |
+
[launch] rollout_train prob=0.75 steps=8 infer_steps=64 temp=1.45 corrupt_only=1 samplewise=1
|
| 1501 |
+
[launch] cache=/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit exact_repeat_per_chunk=64
|
| 1502 |
+
NCCL version 2.25.1+cuda12.8
|
| 1503 |
+
{
|
| 1504 |
+
"device": "cuda:0",
|
| 1505 |
+
"rank": 0,
|
| 1506 |
+
"world_size": 4,
|
| 1507 |
+
"samples": "owt_cached_chunks:8",
|
| 1508 |
+
"vocab_size": 969,
|
| 1509 |
+
"tokenizer_vocab_size": 50257,
|
| 1510 |
+
"save_dir": "runs/train8_rollin_focused_len256_rollin_p75_s8_i64_20260517_1733focused",
|
| 1511 |
+
"batch_size": 128,
|
| 1512 |
+
"grad_accum": 1,
|
| 1513 |
+
"effective_batch_size": 512,
|
| 1514 |
+
"global_batch_size": 512,
|
| 1515 |
+
"lr_schedule": "constant_warmup",
|
| 1516 |
+
"optimizer": "muon",
|
| 1517 |
+
"epochs": 0.0,
|
| 1518 |
+
"steps_per_epoch": 1,
|
| 1519 |
+
"total_steps": 500,
|
| 1520 |
+
"warmup_steps": 10,
|
| 1521 |
+
"warmup_epochs": -1.0,
|
| 1522 |
+
"min_lr": 0.0,
|
| 1523 |
+
"weight_decay": 0.1,
|
| 1524 |
+
"output_weight_decay": -1.0,
|
| 1525 |
+
"adamw_param_groups": "nanogpt",
|
| 1526 |
+
"adam_beta1": 0.9,
|
| 1527 |
+
"adam_beta2": 0.95,
|
| 1528 |
+
"adam_eps": 1e-08,
|
| 1529 |
+
"muon_impl": "legacy",
|
| 1530 |
+
"muon_momentum": 0.95,
|
| 1531 |
+
"muon_ns_steps": 5,
|
| 1532 |
+
"muon_update_scale": 1.0,
|
| 1533 |
+
"muon_nesterov": false,
|
| 1534 |
+
"muon_width_scale": false,
|
| 1535 |
+
"muon_grouping": "legacy_dim_ge_2",
|
| 1536 |
+
"muon_param_count": 1965440,
|
| 1537 |
+
"muon_adam_param_count": 8192,
|
| 1538 |
+
"muon_param_names": [
|
| 1539 |
+
"vocab_embed.embedding",
|
| 1540 |
+
"sigma_map.net.0.weight",
|
| 1541 |
+
"sigma_map.net.2.weight",
|
| 1542 |
+
"blocks.0.attn_qkv.weight",
|
| 1543 |
+
"blocks.0.attn_out.weight",
|
| 1544 |
+
"blocks.0.mlp.0.weight",
|
| 1545 |
+
"blocks.0.mlp.2.weight",
|
| 1546 |
+
"blocks.0.adaLN_modulation.weight",
|
| 1547 |
+
"blocks.1.attn_qkv.weight",
|
| 1548 |
+
"blocks.1.attn_out.weight",
|
| 1549 |
+
"blocks.1.mlp.0.weight",
|
| 1550 |
+
"blocks.1.mlp.2.weight",
|
| 1551 |
+
"blocks.1.adaLN_modulation.weight",
|
| 1552 |
+
"blocks.2.attn_qkv.weight",
|
| 1553 |
+
"blocks.2.attn_out.weight",
|
| 1554 |
+
"blocks.2.mlp.0.weight",
|
| 1555 |
+
"blocks.2.mlp.2.weight",
|
| 1556 |
+
"blocks.2.adaLN_modulation.weight",
|
| 1557 |
+
"output_layer.linear.weight",
|
| 1558 |
+
"output_layer.adaLN_modulation.weight"
|
| 1559 |
+
],
|
| 1560 |
+
"muon_adam_param_names": [
|
| 1561 |
+
"sigma_map.net.0.bias",
|
| 1562 |
+
"sigma_map.net.2.bias",
|
| 1563 |
+
"blocks.0.norm1.weight",
|
| 1564 |
+
"blocks.0.norm2.weight",
|
| 1565 |
+
"blocks.0.mlp.0.bias",
|
| 1566 |
+
"blocks.0.mlp.2.bias",
|
| 1567 |
+
"blocks.0.adaLN_modulation.bias",
|
| 1568 |
+
"blocks.1.norm1.weight",
|
| 1569 |
+
"blocks.1.norm2.weight",
|
| 1570 |
+
"blocks.1.mlp.0.bias",
|
| 1571 |
+
"blocks.1.mlp.2.bias",
|
| 1572 |
+
"blocks.1.adaLN_modulation.bias",
|
| 1573 |
+
"blocks.2.norm1.weight",
|
| 1574 |
+
"blocks.2.norm2.weight",
|
| 1575 |
+
"blocks.2.mlp.0.bias",
|
| 1576 |
+
"blocks.2.mlp.2.bias",
|
| 1577 |
+
"blocks.2.adaLN_modulation.bias",
|
| 1578 |
+
"output_layer.norm_final.weight",
|
| 1579 |
+
"output_layer.adaLN_modulation.bias"
|
| 1580 |
+
],
|
| 1581 |
+
"muon_effective_nesterov": false,
|
| 1582 |
+
"muon_effective_width_scale": false,
|
| 1583 |
+
"muon_effective_weight_decay": 0.1,
|
| 1584 |
+
"muon_adam_fallback_nesterov": false,
|
| 1585 |
+
"muon_adam_fallback_weight_decay": 0.1,
|
| 1586 |
+
"ema_decay": 0.9999,
|
| 1587 |
+
"ema_start_step": 0,
|
| 1588 |
+
"model_type": "ddit",
|
| 1589 |
+
"ddit_mlp_type": "gelu",
|
| 1590 |
+
"elf_num_time_tokens": 4,
|
| 1591 |
+
"elf_num_model_mode_tokens": 0,
|
| 1592 |
+
"qk_norm": true,
|
| 1593 |
+
"output_bias": false,
|
| 1594 |
+
"output_init_std": -1.0,
|
| 1595 |
+
"norm_type": "rmsnorm",
|
| 1596 |
+
"target_loss": "hard_ce",
|
| 1597 |
+
"linear_soft_target_power": 1.0,
|
| 1598 |
+
"linear_soft_target_min_conf": 0.0,
|
| 1599 |
+
"linear_soft_target_max_conf": 1.0,
|
| 1600 |
+
"t_sampling_mode": "logit_normal",
|
| 1601 |
+
"t_sampling_power": 1.0,
|
| 1602 |
+
"t_sampling_eps": 0.0001,
|
| 1603 |
+
"t_sampling_logit_mean": -1.5,
|
| 1604 |
+
"t_sampling_logit_std": 0.8,
|
| 1605 |
+
"dual_t": true,
|
| 1606 |
+
"corrupt_t_mode": "same",
|
| 1607 |
+
"corrupt_min_t": 0.0,
|
| 1608 |
+
"corrupt_max_t": 1.0,
|
| 1609 |
+
"prefix_block_prob": 0.0,
|
| 1610 |
+
"prefix_block_len": 128,
|
| 1611 |
+
"mask_ratio_floor_schedule": "none",
|
| 1612 |
+
"dirichlet_endpoint_mode": "categorical_dual_t",
|
| 1613 |
+
"dirichlet_semantic_t_mode": "same",
|
| 1614 |
+
"dirichlet_semantic_t_value": 0.0,
|
| 1615 |
+
"dirichlet_semantic_t_curve": "linear",
|
| 1616 |
+
"dirichlet_semantic_t_power": 1.0,
|
| 1617 |
+
"endpoint_sequence_random_prob_alpha": 0.0,
|
| 1618 |
+
"categorical_wrong_from_full_vocab": true,
|
| 1619 |
+
"categorical_wrong_from_batch_valid_tokens": false,
|
| 1620 |
+
"categorical_wrong_basin_token_ids": "",
|
| 1621 |
+
"categorical_wrong_basin_prob": 0.0,
|
| 1622 |
+
"categorical_wrong_unigram_prob": 0.0,
|
| 1623 |
+
"categorical_wrong_uniform_prob": 0.0,
|
| 1624 |
+
"categorical_wrong_prob_floor": 0.0,
|
| 1625 |
+
"categorical_wrong_corpus_unigram_path": "",
|
| 1626 |
+
"categorical_wrong_corpus_unigram_alpha": 1.0,
|
| 1627 |
+
"categorical_wrong_basin_shared_prob": 0.0,
|
| 1628 |
+
"categorical_wrong_unigram_shared_prob": 0.0,
|
| 1629 |
+
"mask_mixture_original_prob": 0.0,
|
| 1630 |
+
"mask_mixture_lowk_prob": 0.0,
|
| 1631 |
+
"mask_mixture_lowcorrupt_prob": 0.0,
|
| 1632 |
+
"mask_mixture_block_prob": 0.0,
|
| 1633 |
+
"mask_mixture_all_prob": 1.0,
|
| 1634 |
+
"mask_mixture_lowk_clean_tokens": "0",
|
| 1635 |
+
"mask_mixture_lowcorrupt_tokens": "1,2,4,8,16,32,64",
|
| 1636 |
+
"mask_mixture_block_tokens": "64,128",
|
| 1637 |
+
"simplex_bridge_sampler": "dirichlet",
|
| 1638 |
+
"logistic_normal_sigma_min": 0.1,
|
| 1639 |
+
"logistic_normal_sigma_max": 1.0,
|
| 1640 |
+
"logistic_normal_tau_min": 1.0,
|
| 1641 |
+
"logistic_normal_tau_max": 1.0,
|
| 1642 |
+
"torch_compile": false,
|
| 1643 |
+
"compile_mode": "max-autotune",
|
| 1644 |
+
"state_format": "prob",
|
| 1645 |
+
"meanflow_weight": 0.0,
|
| 1646 |
+
"rollout_train_prob": 0.75,
|
| 1647 |
+
"rollout_train_steps": 8,
|
| 1648 |
+
"rollout_train_infer_steps": 64,
|
| 1649 |
+
"rollout_train_temp": 1.45,
|
| 1650 |
+
"rollout_train_max_gamma": 1.0,
|
| 1651 |
+
"rollout_train_corrupt_only": true,
|
| 1652 |
+
"rollout_train_samplewise": true,
|
| 1653 |
+
"rollout_train_compute_always": false,
|
| 1654 |
+
"bridge_noise_init": "logistic_normal",
|
| 1655 |
+
"noise_sigma": -1.0,
|
| 1656 |
+
"allow_tf32": true,
|
| 1657 |
+
"activation_checkpointing": false,
|
| 1658 |
+
"activation_checkpoint_interval": 1,
|
| 1659 |
+
"activation_checkpoint_scope": "block",
|
| 1660 |
+
"ddp_static_graph": false,
|
| 1661 |
+
"ddp_gradient_as_bucket_view": true,
|
| 1662 |
+
"blocking_data_transfer": false,
|
| 1663 |
+
"dataloader_prefetch_factor": 4,
|
| 1664 |
+
"full_train_stats": false,
|
| 1665 |
+
"tokenized_hf": false,
|
| 1666 |
+
"tokenized_pad_token": "pad",
|
| 1667 |
+
"elf_conditional_hf": false,
|
| 1668 |
+
"record_pad_truncate": false,
|
| 1669 |
+
"record_add_eos": false,
|
| 1670 |
+
"record_add_special_tokens": false,
|
| 1671 |
+
"record_pad_token": "pad",
|
| 1672 |
+
"record_shuffle_buffer": 10000,
|
| 1673 |
+
"wrap": true,
|
| 1674 |
+
"wrap_mode": "stream",
|
| 1675 |
+
"wrap_record_buffer_size": 200,
|
| 1676 |
+
"owt_cached_chunks": true,
|
| 1677 |
+
"owt_chunk_cache_dir": "/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit",
|
| 1678 |
+
"owt_chunk_cache_rebuild": false,
|
| 1679 |
+
"owt_chunk_cache_write_batch": 4096,
|
| 1680 |
+
"owt_exact_repeat_per_chunk": 64,
|
| 1681 |
+
"online_chunk_shuffle": false,
|
| 1682 |
+
"online_chunk_shuffle_buffer": 10000,
|
| 1683 |
+
"openwebtext_split": "train_minus_100k",
|
| 1684 |
+
"detokenizer": "auto",
|
| 1685 |
+
"resolved_detokenizer": null,
|
| 1686 |
+
"num_workers": 0,
|
| 1687 |
+
"latest_every": 500,
|
| 1688 |
+
"resume_path": ""
|
| 1689 |
+
}
|
| 1690 |
+
step=100 epoch=100/500 epoch_step=1/1 micro_steps=100 elapsed=11.2s lr=2.000000e-03 loss=6.7062 loss_recon=6.7062 loss_meanflow=0.0000 mean_model_t=0.2083 mean_corrupt_t=0.2083 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.7551 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.0995 corrupt_frac=1.0000 acc_corrupt=0.0995 loss_corrupt=6.7062 wrong_frac=0.7915 init_acc_corrupt=0.1159 acc_corrupt_t_0p0_0p2=0.0487 corrupt_frac_t_0p0_0p2=0.5559 acc_corrupt_t_0p2_0p4=0.1328 corrupt_frac_t_0p2_0p4=0.3589 acc_corrupt_t_0p4_0p6=0.2794 corrupt_frac_t_0p4_0p6=0.0773 acc_corrupt_t_0p6_0p8=0.3953 corrupt_frac_t_0p6_0p8=0.0121 out_w_norm=1.0988 out_g_norm=1.0089 loss_all=6.4473 init_gold_top10=0.2094 init_gold_top100=0.5156 rollout_applied_pos_frac=0.7109 init_acc_rollout_applied=0.1260 init_acc_rollout_kept=0.0945 logit_acc_rollout_applied=0.1111 logit_acc_rollout_kept=0.0885
|
| 1691 |
+
step=200 epoch=200/500 epoch_step=1/1 micro_steps=200 elapsed=10.5s lr=2.000000e-03 loss=6.0950 loss_recon=6.0950 loss_meanflow=0.0000 mean_model_t=0.2108 mean_corrupt_t=0.2108 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.7441 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1106 corrupt_frac=1.0000 acc_corrupt=0.1106 loss_corrupt=6.0950 wrong_frac=0.7892 init_acc_corrupt=0.1189 acc_corrupt_t_0p0_0p2=0.0550 corrupt_frac_t_0p0_0p2=0.5516 acc_corrupt_t_0p2_0p4=0.1488 corrupt_frac_t_0p2_0p4=0.3621 acc_corrupt_t_0p4_0p6=0.2932 corrupt_frac_t_0p4_0p6=0.0781 acc_corrupt_t_0p6_0p8=0.4252 corrupt_frac_t_0p6_0p8=0.0123 out_w_norm=3.3192 out_g_norm=1.4040 acc_corrupt_t_0p8_1p0=0.4740 corrupt_frac_t_0p8_1p0=0.0078 loss_all=5.8266 init_gold_top10=0.2031 init_gold_top100=0.5559 rollout_applied_pos_frac=0.7422 init_acc_rollout_applied=0.0931 init_acc_rollout_kept=0.1610 logit_acc_rollout_applied=0.1016 logit_acc_rollout_kept=0.1322
|
| 1692 |
+
step=300 epoch=300/500 epoch_step=1/1 micro_steps=300 elapsed=10.5s lr=2.000000e-03 loss=5.5671 loss_recon=5.5671 loss_meanflow=0.0000 mean_model_t=0.2067 mean_corrupt_t=0.2067 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.7523 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1201 corrupt_frac=1.0000 acc_corrupt=0.1201 loss_corrupt=5.5671 wrong_frac=0.7935 init_acc_corrupt=0.1151 acc_corrupt_t_0p0_0p2=0.0585 corrupt_frac_t_0p0_0p2=0.5641 acc_corrupt_t_0p2_0p4=0.1676 corrupt_frac_t_0p2_0p4=0.3542 acc_corrupt_t_0p4_0p6=0.3231 corrupt_frac_t_0p4_0p6=0.0734 acc_corrupt_t_0p6_0p8=0.4789 corrupt_frac_t_0p6_0p8=0.0121 out_w_norm=5.1966 out_g_norm=0.7255 acc_corrupt_t_0p8_1p0=0.6445 corrupt_frac_t_0p8_1p0=0.0078 loss_all=5.2920 init_gold_top10=0.2141 init_gold_top100=0.6023 rollout_applied_pos_frac=0.7266 init_acc_rollout_applied=0.1141 init_acc_rollout_kept=0.1450 logit_acc_rollout_applied=0.1252 logit_acc_rollout_kept=0.1500
|
| 1693 |
+
step=400 epoch=400/500 epoch_step=1/1 micro_steps=400 elapsed=10.5s lr=2.000000e-03 loss=4.9962 loss_recon=4.9962 loss_meanflow=0.0000 mean_model_t=0.2085 mean_corrupt_t=0.2085 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.7507 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1463 corrupt_frac=1.0000 acc_corrupt=0.1463 loss_corrupt=4.9962 wrong_frac=0.7917 init_acc_corrupt=0.1179 acc_corrupt_t_0p0_0p2=0.0639 corrupt_frac_t_0p0_0p2=0.5564 acc_corrupt_t_0p2_0p4=0.2015 corrupt_frac_t_0p2_0p4=0.3620 acc_corrupt_t_0p4_0p6=0.4385 corrupt_frac_t_0p4_0p6=0.0719 out_w_norm=6.8565 out_g_norm=0.4149 acc_corrupt_t_0p6_0p8=0.6449 corrupt_frac_t_0p6_0p8=0.0131 acc_corrupt_t_0p8_1p0=0.7031 corrupt_frac_t_0p8_1p0=0.0078 loss_all=4.7734 init_gold_top10=0.2049 init_gold_top100=0.6761 rollout_applied_pos_frac=0.7188 init_acc_rollout_applied=0.0819 init_acc_rollout_kept=0.1494 logit_acc_rollout_applied=0.1270 logit_acc_rollout_kept=0.2018
|
| 1694 |
+
step=500 epoch=500/500 epoch_step=1/1 micro_steps=500 elapsed=10.5s lr=2.000000e-03 loss=4.2104 loss_recon=4.2104 loss_meanflow=0.0000 mean_model_t=0.2071 mean_corrupt_t=0.2071 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.7552 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.1863 corrupt_frac=1.0000 acc_corrupt=0.1863 loss_corrupt=4.2104 wrong_frac=0.7928 init_acc_corrupt=0.1176 acc_corrupt_t_0p0_0p2=0.0757 corrupt_frac_t_0p0_0p2=0.5632 acc_corrupt_t_0p2_0p4=0.2778 corrupt_frac_t_0p2_0p4=0.3546 acc_corrupt_t_0p4_0p6=0.5334 corrupt_frac_t_0p4_0p6=0.0745 acc_corrupt_t_0p6_0p8=0.6991 corrupt_frac_t_0p6_0p8=0.0118 acc_corrupt_t_0p8_1p0=0.8594 corrupt_frac_t_0p8_1p0=0.0078 out_w_norm=8.3604 out_g_norm=0.4534 loss_all=3.6982 init_gold_top10=0.2438 init_gold_top100=0.7904 rollout_applied_pos_frac=0.7344 init_acc_rollout_applied=0.1312 init_acc_rollout_kept=0.1149 logit_acc_rollout_applied=0.2264 logit_acc_rollout_kept=0.2090
|
| 1695 |
+
[rollin-focused] eval config=rollin_p75_s8_i64 step=500
|
| 1696 |
+
[eval-decode-acc] train8_rollin_focused_len256_rollin_p75_s8_i64_20260517_1733focused step=500 soft=none
|
| 1697 |
+
[decode] max_len=256 generated=64/64
|
| 1698 |
+
{
|
| 1699 |
+
"num_rows": 1,
|
| 1700 |
+
"best_by_run": {
|
| 1701 |
+
"train8_rollin_focused_len256_rollin_p75_s8_i64_20260517_1733focused::none": {
|
| 1702 |
+
"run": "train8_rollin_focused_len256_rollin_p75_s8_i64_20260517_1733focused",
|
| 1703 |
+
"checkpoint": "runs/train8_rollin_focused_len256_rollin_p75_s8_i64_20260517_1733focused/step_0000500.pt",
|
| 1704 |
+
"ckpt_step": 500,
|
| 1705 |
+
"endpoint_softening": "none",
|
| 1706 |
+
"decode_rule": "flowmap",
|
| 1707 |
+
"steps": 128,
|
| 1708 |
+
"time_schedule": "logit_normal",
|
| 1709 |
+
"model_t_mode": "post",
|
| 1710 |
+
"final_from": "state",
|
| 1711 |
+
"n_gen": 64,
|
| 1712 |
+
"n_refs": 8,
|
| 1713 |
+
"token_acc_mean": 0.05255126953125,
|
| 1714 |
+
"token_acc_min": 0.01953125,
|
| 1715 |
+
"token_acc_max": 0.08984375,
|
| 1716 |
+
"exact_acc": 0.0,
|
| 1717 |
+
"exact_count": 0,
|
| 1718 |
+
"exact_ref_coverage": 0.0,
|
| 1719 |
+
"exact_ref_count": 0,
|
| 1720 |
+
"exact_ref_hits": [],
|
| 1721 |
+
"best_ref_idx": [
|
| 1722 |
+
5,
|
| 1723 |
+
5,
|
| 1724 |
+
0,
|
| 1725 |
+
3,
|
| 1726 |
+
0,
|
| 1727 |
+
2,
|
| 1728 |
+
0,
|
| 1729 |
+
7,
|
| 1730 |
+
0,
|
| 1731 |
+
3,
|
| 1732 |
+
0,
|
| 1733 |
+
0,
|
| 1734 |
+
0,
|
| 1735 |
+
0,
|
| 1736 |
+
5,
|
| 1737 |
+
2,
|
| 1738 |
+
0,
|
| 1739 |
+
0,
|
| 1740 |
+
5,
|
| 1741 |
+
7,
|
| 1742 |
+
7,
|
| 1743 |
+
7,
|
| 1744 |
+
7,
|
| 1745 |
+
2,
|
| 1746 |
+
2,
|
| 1747 |
+
0,
|
| 1748 |
+
5,
|
| 1749 |
+
0,
|
| 1750 |
+
1,
|
| 1751 |
+
0,
|
| 1752 |
+
3,
|
| 1753 |
+
0,
|
| 1754 |
+
7,
|
| 1755 |
+
0,
|
| 1756 |
+
7,
|
| 1757 |
+
5,
|
| 1758 |
+
7,
|
| 1759 |
+
0,
|
| 1760 |
+
0,
|
| 1761 |
+
3,
|
| 1762 |
+
3,
|
| 1763 |
+
2,
|
| 1764 |
+
4,
|
| 1765 |
+
0,
|
| 1766 |
+
0,
|
| 1767 |
+
3,
|
| 1768 |
+
7,
|
| 1769 |
+
5,
|
| 1770 |
+
5,
|
| 1771 |
+
7,
|
| 1772 |
+
3,
|
| 1773 |
+
7,
|
| 1774 |
+
0,
|
| 1775 |
+
7,
|
| 1776 |
+
7,
|
| 1777 |
+
3,
|
| 1778 |
+
5,
|
| 1779 |
+
4,
|
| 1780 |
+
0,
|
| 1781 |
+
0,
|
| 1782 |
+
7,
|
| 1783 |
+
7,
|
| 1784 |
+
0,
|
| 1785 |
+
0
|
| 1786 |
+
],
|
| 1787 |
+
"best_token_acc": [
|
| 1788 |
+
0.06640625,
|
| 1789 |
+
0.046875,
|
| 1790 |
+
0.05859375,
|
| 1791 |
+
0.0703125,
|
| 1792 |
+
0.046875,
|
| 1793 |
+
0.046875,
|
| 1794 |
+
0.04296875,
|
| 1795 |
+
0.05078125,
|
| 1796 |
+
0.04296875,
|
| 1797 |
+
0.03515625,
|
| 1798 |
+
0.05078125,
|
| 1799 |
+
0.0546875,
|
| 1800 |
+
0.02734375,
|
| 1801 |
+
0.04296875,
|
| 1802 |
+
0.05078125,
|
| 1803 |
+
0.06640625,
|
| 1804 |
+
0.046875,
|
| 1805 |
+
0.046875,
|
| 1806 |
+
0.0390625,
|
| 1807 |
+
0.05078125,
|
| 1808 |
+
0.08984375,
|
| 1809 |
+
0.0625,
|
| 1810 |
+
0.05078125,
|
| 1811 |
+
0.0390625,
|
| 1812 |
+
0.05078125,
|
| 1813 |
+
0.0703125,
|
| 1814 |
+
0.04296875,
|
| 1815 |
+
0.046875,
|
| 1816 |
+
0.01953125,
|
| 1817 |
+
0.05859375,
|
| 1818 |
+
0.06640625,
|
| 1819 |
+
0.04296875,
|
| 1820 |
+
0.0703125,
|
| 1821 |
+
0.0625,
|
| 1822 |
+
0.04296875,
|
| 1823 |
+
0.03515625,
|
| 1824 |
+
0.0625,
|
| 1825 |
+
0.05078125,
|
| 1826 |
+
0.05078125,
|
| 1827 |
+
0.0546875,
|
| 1828 |
+
0.0859375,
|
| 1829 |
+
0.03515625,
|
| 1830 |
+
0.03125,
|
| 1831 |
+
0.07421875,
|
| 1832 |
+
0.05859375,
|
| 1833 |
+
0.05078125,
|
| 1834 |
+
0.08984375,
|
| 1835 |
+
0.05078125,
|
| 1836 |
+
0.05859375,
|
| 1837 |
+
0.05078125,
|
| 1838 |
+
0.0390625,
|
| 1839 |
+
0.04296875,
|
| 1840 |
+
0.03515625,
|
| 1841 |
+
0.05859375,
|
| 1842 |
+
0.04296875,
|
| 1843 |
+
0.0546875,
|
| 1844 |
+
0.05078125,
|
| 1845 |
+
0.05078125,
|
| 1846 |
+
0.05859375,
|
| 1847 |
+
0.05078125,
|
| 1848 |
+
0.05078125,
|
| 1849 |
+
0.04296875,
|
| 1850 |
+
0.05859375,
|
| 1851 |
+
0.0859375
|
| 1852 |
+
]
|
| 1853 |
+
}
|
| 1854 |
+
},
|
| 1855 |
+
"first_exact_by_run": {}
|
| 1856 |
+
}
|
| 1857 |
+
RESULT config=rollin_p75_s8_i64 ckpt_step=500 views=256000 token_acc=0.0526 exact=0/64 exact_refs=0 hits=[]
|
| 1858 |
+
[rollin-focused] train config=rollin_p50_s4_i32_temp1p0 from=0 to=500 rollout=0.50/s4/i32/temp1.0
|
| 1859 |
+
[launch] gpt2 cached OWT soft-endpoint m/n pilot
|
| 1860 |
+
[launch] run_name=train8_rollin_focused_len256_rollin_p50_s4_i32_temp1p0_20260517_1733focused
|
| 1861 |
+
[launch] save_dir=runs/train8_rollin_focused_len256_rollin_p50_s4_i32_temp1p0_20260517_1733focused
|
| 1862 |
+
[launch] n=256 m=0 clean_state_mode=onehot
|
| 1863 |
+
[launch] mask_mixture lowk=0.0 all=1.0
|
| 1864 |
+
[launch] model d=192 layers=3 heads=3 ff=768 vocab_override=969
|
| 1865 |
+
[launch] optimizer=muon muon_impl=legacy weight_decay=0.1 output_weight_decay=-1
|
| 1866 |
+
[launch] target_loss=hard_ce conf=0.0->1.0 power=1.0
|
| 1867 |
+
[launch] mask_ratio=1.0->1.0
|
| 1868 |
+
[launch] mask_ratio_floor_schedule=none
|
| 1869 |
+
[launch] dirichlet C=1.0->1024 endpoint=categorical_dual_t sampler=dirichlet
|
| 1870 |
+
[launch] wrong_mix seq_alpha=0.0 wrong_floor=0.0 unigram=0.0 uniform=0.0 basin=0.0 basin_ids=
|
| 1871 |
+
[launch] rollout_train prob=0.50 steps=4 infer_steps=32 temp=1.0 corrupt_only=1 samplewise=1
|
| 1872 |
+
[launch] cache=/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit exact_repeat_per_chunk=64
|
| 1873 |
+
NCCL version 2.25.1+cuda12.8
|
| 1874 |
+
{
|
| 1875 |
+
"device": "cuda:0",
|
| 1876 |
+
"rank": 0,
|
| 1877 |
+
"world_size": 4,
|
| 1878 |
+
"samples": "owt_cached_chunks:8",
|
| 1879 |
+
"vocab_size": 969,
|
| 1880 |
+
"tokenizer_vocab_size": 50257,
|
| 1881 |
+
"save_dir": "runs/train8_rollin_focused_len256_rollin_p50_s4_i32_temp1p0_20260517_1733focused",
|
| 1882 |
+
"batch_size": 128,
|
| 1883 |
+
"grad_accum": 1,
|
| 1884 |
+
"effective_batch_size": 512,
|
| 1885 |
+
"global_batch_size": 512,
|
| 1886 |
+
"lr_schedule": "constant_warmup",
|
| 1887 |
+
"optimizer": "muon",
|
| 1888 |
+
"epochs": 0.0,
|
| 1889 |
+
"steps_per_epoch": 1,
|
| 1890 |
+
"total_steps": 500,
|
| 1891 |
+
"warmup_steps": 10,
|
| 1892 |
+
"warmup_epochs": -1.0,
|
| 1893 |
+
"min_lr": 0.0,
|
| 1894 |
+
"weight_decay": 0.1,
|
| 1895 |
+
"output_weight_decay": -1.0,
|
| 1896 |
+
"adamw_param_groups": "nanogpt",
|
| 1897 |
+
"adam_beta1": 0.9,
|
| 1898 |
+
"adam_beta2": 0.95,
|
| 1899 |
+
"adam_eps": 1e-08,
|
| 1900 |
+
"muon_impl": "legacy",
|
| 1901 |
+
"muon_momentum": 0.95,
|
| 1902 |
+
"muon_ns_steps": 5,
|
| 1903 |
+
"muon_update_scale": 1.0,
|
| 1904 |
+
"muon_nesterov": false,
|
| 1905 |
+
"muon_width_scale": false,
|
| 1906 |
+
"muon_grouping": "legacy_dim_ge_2",
|
| 1907 |
+
"muon_param_count": 1965440,
|
| 1908 |
+
"muon_adam_param_count": 8192,
|
| 1909 |
+
"muon_param_names": [
|
| 1910 |
+
"vocab_embed.embedding",
|
| 1911 |
+
"sigma_map.net.0.weight",
|
| 1912 |
+
"sigma_map.net.2.weight",
|
| 1913 |
+
"blocks.0.attn_qkv.weight",
|
| 1914 |
+
"blocks.0.attn_out.weight",
|
| 1915 |
+
"blocks.0.mlp.0.weight",
|
| 1916 |
+
"blocks.0.mlp.2.weight",
|
| 1917 |
+
"blocks.0.adaLN_modulation.weight",
|
| 1918 |
+
"blocks.1.attn_qkv.weight",
|
| 1919 |
+
"blocks.1.attn_out.weight",
|
| 1920 |
+
"blocks.1.mlp.0.weight",
|
| 1921 |
+
"blocks.1.mlp.2.weight",
|
| 1922 |
+
"blocks.1.adaLN_modulation.weight",
|
| 1923 |
+
"blocks.2.attn_qkv.weight",
|
| 1924 |
+
"blocks.2.attn_out.weight",
|
| 1925 |
+
"blocks.2.mlp.0.weight",
|
| 1926 |
+
"blocks.2.mlp.2.weight",
|
| 1927 |
+
"blocks.2.adaLN_modulation.weight",
|
| 1928 |
+
"output_layer.linear.weight",
|
| 1929 |
+
"output_layer.adaLN_modulation.weight"
|
| 1930 |
+
],
|
| 1931 |
+
"muon_adam_param_names": [
|
| 1932 |
+
"sigma_map.net.0.bias",
|
| 1933 |
+
"sigma_map.net.2.bias",
|
| 1934 |
+
"blocks.0.norm1.weight",
|
| 1935 |
+
"blocks.0.norm2.weight",
|
| 1936 |
+
"blocks.0.mlp.0.bias",
|
| 1937 |
+
"blocks.0.mlp.2.bias",
|
| 1938 |
+
"blocks.0.adaLN_modulation.bias",
|
| 1939 |
+
"blocks.1.norm1.weight",
|
| 1940 |
+
"blocks.1.norm2.weight",
|
| 1941 |
+
"blocks.1.mlp.0.bias",
|
| 1942 |
+
"blocks.1.mlp.2.bias",
|
| 1943 |
+
"blocks.1.adaLN_modulation.bias",
|
| 1944 |
+
"blocks.2.norm1.weight",
|
| 1945 |
+
"blocks.2.norm2.weight",
|
| 1946 |
+
"blocks.2.mlp.0.bias",
|
| 1947 |
+
"blocks.2.mlp.2.bias",
|
| 1948 |
+
"blocks.2.adaLN_modulation.bias",
|
| 1949 |
+
"output_layer.norm_final.weight",
|
| 1950 |
+
"output_layer.adaLN_modulation.bias"
|
| 1951 |
+
],
|
| 1952 |
+
"muon_effective_nesterov": false,
|
| 1953 |
+
"muon_effective_width_scale": false,
|
| 1954 |
+
"muon_effective_weight_decay": 0.1,
|
| 1955 |
+
"muon_adam_fallback_nesterov": false,
|
| 1956 |
+
"muon_adam_fallback_weight_decay": 0.1,
|
| 1957 |
+
"ema_decay": 0.9999,
|
| 1958 |
+
"ema_start_step": 0,
|
| 1959 |
+
"model_type": "ddit",
|
| 1960 |
+
"ddit_mlp_type": "gelu",
|
| 1961 |
+
"elf_num_time_tokens": 4,
|
| 1962 |
+
"elf_num_model_mode_tokens": 0,
|
| 1963 |
+
"qk_norm": true,
|
| 1964 |
+
"output_bias": false,
|
| 1965 |
+
"output_init_std": -1.0,
|
| 1966 |
+
"norm_type": "rmsnorm",
|
| 1967 |
+
"target_loss": "hard_ce",
|
| 1968 |
+
"linear_soft_target_power": 1.0,
|
| 1969 |
+
"linear_soft_target_min_conf": 0.0,
|
| 1970 |
+
"linear_soft_target_max_conf": 1.0,
|
| 1971 |
+
"t_sampling_mode": "logit_normal",
|
| 1972 |
+
"t_sampling_power": 1.0,
|
| 1973 |
+
"t_sampling_eps": 0.0001,
|
| 1974 |
+
"t_sampling_logit_mean": -1.5,
|
| 1975 |
+
"t_sampling_logit_std": 0.8,
|
| 1976 |
+
"dual_t": true,
|
| 1977 |
+
"corrupt_t_mode": "same",
|
| 1978 |
+
"corrupt_min_t": 0.0,
|
| 1979 |
+
"corrupt_max_t": 1.0,
|
| 1980 |
+
"prefix_block_prob": 0.0,
|
| 1981 |
+
"prefix_block_len": 128,
|
| 1982 |
+
"mask_ratio_floor_schedule": "none",
|
| 1983 |
+
"dirichlet_endpoint_mode": "categorical_dual_t",
|
| 1984 |
+
"dirichlet_semantic_t_mode": "same",
|
| 1985 |
+
"dirichlet_semantic_t_value": 0.0,
|
| 1986 |
+
"dirichlet_semantic_t_curve": "linear",
|
| 1987 |
+
"dirichlet_semantic_t_power": 1.0,
|
| 1988 |
+
"endpoint_sequence_random_prob_alpha": 0.0,
|
| 1989 |
+
"categorical_wrong_from_full_vocab": true,
|
| 1990 |
+
"categorical_wrong_from_batch_valid_tokens": false,
|
| 1991 |
+
"categorical_wrong_basin_token_ids": "",
|
| 1992 |
+
"categorical_wrong_basin_prob": 0.0,
|
| 1993 |
+
"categorical_wrong_unigram_prob": 0.0,
|
| 1994 |
+
"categorical_wrong_uniform_prob": 0.0,
|
| 1995 |
+
"categorical_wrong_prob_floor": 0.0,
|
| 1996 |
+
"categorical_wrong_corpus_unigram_path": "",
|
| 1997 |
+
"categorical_wrong_corpus_unigram_alpha": 1.0,
|
| 1998 |
+
"categorical_wrong_basin_shared_prob": 0.0,
|
| 1999 |
+
"categorical_wrong_unigram_shared_prob": 0.0,
|
| 2000 |
+
"mask_mixture_original_prob": 0.0,
|
| 2001 |
+
"mask_mixture_lowk_prob": 0.0,
|
| 2002 |
+
"mask_mixture_lowcorrupt_prob": 0.0,
|
| 2003 |
+
"mask_mixture_block_prob": 0.0,
|
| 2004 |
+
"mask_mixture_all_prob": 1.0,
|
| 2005 |
+
"mask_mixture_lowk_clean_tokens": "0",
|
| 2006 |
+
"mask_mixture_lowcorrupt_tokens": "1,2,4,8,16,32,64",
|
| 2007 |
+
"mask_mixture_block_tokens": "64,128",
|
| 2008 |
+
"simplex_bridge_sampler": "dirichlet",
|
| 2009 |
+
"logistic_normal_sigma_min": 0.1,
|
| 2010 |
+
"logistic_normal_sigma_max": 1.0,
|
| 2011 |
+
"logistic_normal_tau_min": 1.0,
|
| 2012 |
+
"logistic_normal_tau_max": 1.0,
|
| 2013 |
+
"torch_compile": false,
|
| 2014 |
+
"compile_mode": "max-autotune",
|
| 2015 |
+
"state_format": "prob",
|
| 2016 |
+
"meanflow_weight": 0.0,
|
| 2017 |
+
"rollout_train_prob": 0.5,
|
| 2018 |
+
"rollout_train_steps": 4,
|
| 2019 |
+
"rollout_train_infer_steps": 32,
|
| 2020 |
+
"rollout_train_temp": 1.0,
|
| 2021 |
+
"rollout_train_max_gamma": 1.0,
|
| 2022 |
+
"rollout_train_corrupt_only": true,
|
| 2023 |
+
"rollout_train_samplewise": true,
|
| 2024 |
+
"rollout_train_compute_always": false,
|
| 2025 |
+
"bridge_noise_init": "logistic_normal",
|
| 2026 |
+
"noise_sigma": -1.0,
|
| 2027 |
+
"allow_tf32": true,
|
| 2028 |
+
"activation_checkpointing": false,
|
| 2029 |
+
"activation_checkpoint_interval": 1,
|
| 2030 |
+
"activation_checkpoint_scope": "block",
|
| 2031 |
+
"ddp_static_graph": false,
|
| 2032 |
+
"ddp_gradient_as_bucket_view": true,
|
| 2033 |
+
"blocking_data_transfer": false,
|
| 2034 |
+
"dataloader_prefetch_factor": 4,
|
| 2035 |
+
"full_train_stats": false,
|
| 2036 |
+
"tokenized_hf": false,
|
| 2037 |
+
"tokenized_pad_token": "pad",
|
| 2038 |
+
"elf_conditional_hf": false,
|
| 2039 |
+
"record_pad_truncate": false,
|
| 2040 |
+
"record_add_eos": false,
|
| 2041 |
+
"record_add_special_tokens": false,
|
| 2042 |
+
"record_pad_token": "pad",
|
| 2043 |
+
"record_shuffle_buffer": 10000,
|
| 2044 |
+
"wrap": true,
|
| 2045 |
+
"wrap_mode": "stream",
|
| 2046 |
+
"wrap_record_buffer_size": 200,
|
| 2047 |
+
"owt_cached_chunks": true,
|
| 2048 |
+
"owt_chunk_cache_dir": "/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len256_train8_compact_overfit",
|
| 2049 |
+
"owt_chunk_cache_rebuild": false,
|
| 2050 |
+
"owt_chunk_cache_write_batch": 4096,
|
| 2051 |
+
"owt_exact_repeat_per_chunk": 64,
|
| 2052 |
+
"online_chunk_shuffle": false,
|
| 2053 |
+
"online_chunk_shuffle_buffer": 10000,
|
| 2054 |
+
"openwebtext_split": "train_minus_100k",
|
| 2055 |
+
"detokenizer": "auto",
|
| 2056 |
+
"resolved_detokenizer": null,
|
| 2057 |
+
"num_workers": 0,
|
| 2058 |
+
"latest_every": 500,
|
| 2059 |
+
"resume_path": ""
|
| 2060 |
+
}
|
| 2061 |
+
step=100 epoch=100/500 epoch_step=1/1 micro_steps=100 elapsed=7.8s lr=2.000000e-03 loss=6.7066 loss_recon=6.7066 loss_meanflow=0.0000 mean_model_t=0.2083 mean_corrupt_t=0.2083 mean_loss_t_weight=1.0000 linear_soft_target_mean_conf=0.0000 prior_center_loss_beta=0.0000 rollout_train_applied=0.5128 grad_enabled_before_rollout=1.0000 grad_enabled_after_rollout=1.0000 logits_requires_grad=1.0000 raw_loss_requires_grad=1.0000 acc_all=0.0996 corrupt_frac=1.0000 acc_corrupt=0.0996 loss_corrupt=6.7066 wrong_frac=0.7915 init_acc_corrupt=0.1159 acc_corrupt_t_0p0_0p2=0.0486 corrupt_frac_t_0p0_0p2=0.5559 acc_corrupt_t_0p2_0p4=0.1327 corrupt_frac_t_0p2_0p4=0.3589 acc_corrupt_t_0p4_0p6=0.2812 corrupt_frac_t_0p4_0p6=0.0773 acc_corrupt_t_0p6_0p8=0.4045 corrupt_frac_t_0p6_0p8=0.0121 out_w_norm=1.0998 out_g_norm=1.0065 loss_all=6.4484 init_gold_top10=0.2095 init_gold_top100=0.4890 rollout_applied_pos_frac=0.4844 init_acc_rollout_applied=0.1133 init_acc_rollout_kept=0.1206 logit_acc_rollout_applied=0.1074 logit_acc_rollout_kept=0.0999
|
| 2062 |
+
W0517 17:53:06.133000 250451 torch/distributed/elastic/agent/server/api.py:719] Received 15 death signal, shutting down workers
|
| 2063 |
+
W0517 17:53:06.134000 250451 torch/distributed/elastic/multiprocessing/api.py:898] Sending process 250455 closing signal SIGTERM
|
| 2064 |
+
W0517 17:53:06.135000 250451 torch/distributed/elastic/multiprocessing/api.py:898] Sending process 250456 closing signal SIGTERM
|
| 2065 |
+
W0517 17:53:06.135000 250451 torch/distributed/elastic/multiprocessing/api.py:898] Sending process 250457 closing signal SIGTERM
|
| 2066 |
+
W0517 17:53:06.135000 250451 torch/distributed/elastic/multiprocessing/api.py:898] Sending process 250458 closing signal SIGTERM
|
| 2067 |
+
Traceback (most recent call last):
|
| 2068 |
+
File "<frozen runpy>", line 198, in _run_module_as_main
|
| 2069 |
+
File "<frozen runpy>", line 88, in _run_code
|
| 2070 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 922, in <module>
|
| 2071 |
+
main()
|
| 2072 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 355, in wrapper
|
| 2073 |
+
return f(*args, **kwargs)
|
| 2074 |
+
^^^^^^^^^^^^^^^^^^
|
| 2075 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 918, in main
|
| 2076 |
+
run(args)
|
| 2077 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 909, in run
|
| 2078 |
+
elastic_launch(
|
| 2079 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 139, in __call__
|
| 2080 |
+
return launch_agent(self._config, self._entrypoint, list(args))
|
| 2081 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 2082 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 261, in launch_agent
|
| 2083 |
+
result = agent.run()
|
| 2084 |
+
^^^^^^^^^^^
|
| 2085 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/metrics/api.py", line 137, in wrapper
|
| 2086 |
+
result = f(*args, **kwargs)
|
| 2087 |
+
^^^^^^^^^^^^^^^^^^
|
| 2088 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 711, in run
|
| 2089 |
+
result = self._invoke_run(role)
|
| 2090 |
+
^^^^^^^^^^^^^^^^^^^^^^
|
| 2091 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 870, in _invoke_run
|
| 2092 |
+
time.sleep(monitor_interval)
|
| 2093 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/multiprocessing/api.py", line 84, in _terminate_process_handler
|
| 2094 |
+
raise SignalException(f"Process {os.getpid()} got signal: {sigval}", sigval=sigval)
|
| 2095 |
+
torch.distributed.elastic.multiprocessing.api.SignalException: Process 250451 got signal: 15
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/chmv2/configuration_chmv2.py
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 2 |
+
# This file was automatically generated from src/transformers/models/chmv2/modular_chmv2.py.
|
| 3 |
+
# Do NOT edit this file manually as any edits will be overwritten by the generation of
|
| 4 |
+
# the file from the modular. If any change should be done, please apply the change to the
|
| 5 |
+
# modular_chmv2.py file directly. One of our CI enforces this.
|
| 6 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 7 |
+
# Copyright 2026 Meta Platforms, Inc. and The HuggingFace Inc. team. All rights reserved.
|
| 8 |
+
#
|
| 9 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 10 |
+
# you may not use this file except in compliance with the License.
|
| 11 |
+
# You may obtain a copy of the License at
|
| 12 |
+
#
|
| 13 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 14 |
+
#
|
| 15 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 16 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 17 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 18 |
+
# See the License for the specific language governing permissions and
|
| 19 |
+
# limitations under the License.
|
| 20 |
+
|
| 21 |
+
from typing import Literal
|
| 22 |
+
|
| 23 |
+
from huggingface_hub.dataclasses import strict
|
| 24 |
+
|
| 25 |
+
from ...backbone_utils import consolidate_backbone_kwargs_to_config
|
| 26 |
+
from ...configuration_utils import PreTrainedConfig
|
| 27 |
+
from ...utils import auto_docstring
|
| 28 |
+
from ..auto import AutoConfig
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
@auto_docstring(checkpoint="facebook/dinov3-vitl16-chmv2-dpt-head")
|
| 32 |
+
@strict
|
| 33 |
+
class CHMv2Config(PreTrainedConfig):
|
| 34 |
+
r"""
|
| 35 |
+
backbone_config (`Union[dict, "PreTrainedConfig"]`, *optional*):
|
| 36 |
+
The configuration of the backbone model. Only DINOv3ViTConfig is currently supported.
|
| 37 |
+
patch_size (`int`, *optional*, defaults to 16):
|
| 38 |
+
The patch size used by the backbone vision transformer.
|
| 39 |
+
reassemble_factors (`list[float]`, *optional*, defaults to `[4, 2, 1, 0.5]`):
|
| 40 |
+
The up/downsampling factors of the reassemble layers.
|
| 41 |
+
post_process_channels (`list[int]`, *optional*, defaults to `[128, 256, 512, 1024]`):
|
| 42 |
+
The output channel sizes of the reassemble stage for each backbone feature level.
|
| 43 |
+
fusion_hidden_size (`int`, *optional*, defaults to 256):
|
| 44 |
+
The number of channels before fusion.
|
| 45 |
+
head_hidden_size (`int`, *optional*, defaults to 128):
|
| 46 |
+
The number of channels in the hidden layer of the depth estimation head.
|
| 47 |
+
number_output_channels (`int`, *optional*, defaults to 256):
|
| 48 |
+
Number of output channels for the CHMv2 head (number of depth bins).
|
| 49 |
+
readout_type (`str`, *optional*, defaults to `"project"`):
|
| 50 |
+
Type of readout operation for the CLS token. One of `["ignore", "add", "project"]`.
|
| 51 |
+
min_depth (`float`, *optional*, defaults to 0.001):
|
| 52 |
+
The minimum depth value for depth bin calculation.
|
| 53 |
+
max_depth (`float`, *optional*, defaults to 96.0):
|
| 54 |
+
The maximum depth value for depth bin calculation.
|
| 55 |
+
bins_strategy (`str`, *optional*, defaults to `"chmv2_mixlog"`):
|
| 56 |
+
The strategy for depth bins distribution. One of `["linear", "log", "chmv2_mixlog"]`.
|
| 57 |
+
norm_strategy (`str`, *optional*, defaults to `"chmv2_mixlog"`):
|
| 58 |
+
The normalization strategy for depth prediction. One of `["linear", "softmax", "sigmoid", "chmv2_mixlog"]`.
|
| 59 |
+
|
| 60 |
+
```python
|
| 61 |
+
>>> from transformers import CHMv2Config, CHMv2ForDepthEstimation
|
| 62 |
+
|
| 63 |
+
>>> configuration = CHMv2Config()
|
| 64 |
+
>>> model = CHMv2ForDepthEstimation(configuration)
|
| 65 |
+
>>> configuration = model.config
|
| 66 |
+
```
|
| 67 |
+
"""
|
| 68 |
+
|
| 69 |
+
model_type = "chmv2"
|
| 70 |
+
sub_configs = {"backbone_config": AutoConfig}
|
| 71 |
+
|
| 72 |
+
backbone_config: dict | PreTrainedConfig | None = None
|
| 73 |
+
patch_size: int = 16
|
| 74 |
+
initializer_range: float = 0.02
|
| 75 |
+
reassemble_factors: list[float | int] | None = None
|
| 76 |
+
post_process_channels: list[int] | None = None
|
| 77 |
+
fusion_hidden_size: int = 256
|
| 78 |
+
head_hidden_size: int = 128
|
| 79 |
+
number_output_channels: int = 256
|
| 80 |
+
readout_type: str = "project"
|
| 81 |
+
min_depth: float = 0.001
|
| 82 |
+
max_depth: float = 96.0
|
| 83 |
+
bins_strategy: Literal["linear", "log", "chmv2_mixlog"] = "chmv2_mixlog"
|
| 84 |
+
norm_strategy: Literal["linear", "softmax", "sigmoid", "chmv2_mixlog"] = "chmv2_mixlog"
|
| 85 |
+
|
| 86 |
+
def __post_init__(self, **kwargs):
|
| 87 |
+
if self.reassemble_factors is None:
|
| 88 |
+
self.reassemble_factors = [4, 2, 1, 0.5]
|
| 89 |
+
if self.post_process_channels is None:
|
| 90 |
+
self.post_process_channels = [128, 256, 512, 1024]
|
| 91 |
+
|
| 92 |
+
default_config_kwargs = {
|
| 93 |
+
"image_size": 416,
|
| 94 |
+
"hidden_size": 1024,
|
| 95 |
+
"intermediate_size": 4096,
|
| 96 |
+
"num_attention_heads": 16,
|
| 97 |
+
"num_hidden_layers": 24,
|
| 98 |
+
"num_register_tokens": 4,
|
| 99 |
+
"key_bias": True,
|
| 100 |
+
"out_indices": [6, 12, 18, 24],
|
| 101 |
+
"reshape_hidden_states": True,
|
| 102 |
+
"apply_layernorm": True,
|
| 103 |
+
"layer_norm_eps": 1e-6,
|
| 104 |
+
"return_class_token": True,
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
self.backbone_config, kwargs = consolidate_backbone_kwargs_to_config(
|
| 108 |
+
backbone_config=self.backbone_config,
|
| 109 |
+
default_config_type="dinov3_vit",
|
| 110 |
+
default_config_kwargs=default_config_kwargs,
|
| 111 |
+
**kwargs,
|
| 112 |
+
)
|
| 113 |
+
|
| 114 |
+
super().__post_init__(**kwargs)
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
__all__ = ["CHMv2Config"]
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 2 |
+
# This file was automatically generated from src/transformers/models/chmv2/modular_chmv2.py.
|
| 3 |
+
# Do NOT edit this file manually as any edits will be overwritten by the generation of
|
| 4 |
+
# the file from the modular. If any change should be done, please apply the change to the
|
| 5 |
+
# modular_chmv2.py file directly. One of our CI enforces this.
|
| 6 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 7 |
+
# Copyright 2026 Meta Platforms, Inc. and The HuggingFace Inc. team. All rights reserved.
|
| 8 |
+
#
|
| 9 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 10 |
+
# you may not use this file except in compliance with the License.
|
| 11 |
+
# You may obtain a copy of the License at
|
| 12 |
+
#
|
| 13 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 14 |
+
#
|
| 15 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 16 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 17 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 18 |
+
# See the License for the specific language governing permissions and
|
| 19 |
+
# limitations under the License.
|
| 20 |
+
|
| 21 |
+
import math
|
| 22 |
+
from collections.abc import Iterable
|
| 23 |
+
from typing import Union
|
| 24 |
+
|
| 25 |
+
import torch
|
| 26 |
+
import torch.nn.functional as F
|
| 27 |
+
from torchvision.transforms.v2 import functional as tvF
|
| 28 |
+
|
| 29 |
+
from ...image_processing_backends import TorchvisionBackend
|
| 30 |
+
from ...image_processing_base import BatchFeature
|
| 31 |
+
from ...image_transforms import group_images_by_shape, reorder_images
|
| 32 |
+
from ...image_utils import ChannelDimension, ImageInput, PILImageResampling, SizeDict
|
| 33 |
+
from ...modeling_outputs import DepthEstimatorOutput
|
| 34 |
+
from ...processing_utils import ImagesKwargs, Unpack
|
| 35 |
+
from ...utils import TensorType, auto_docstring, is_torch_available, requires_backends
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
class CHMv2ImageProcessorKwargs(ImagesKwargs, total=False):
|
| 39 |
+
r"""
|
| 40 |
+
ensure_multiple_of (`int`, *optional*, defaults to 1):
|
| 41 |
+
If `do_resize` is `True`, the image is resized to a size that is a multiple of this value. Can be overridden
|
| 42 |
+
by `ensure_multiple_of` in `preprocess`.
|
| 43 |
+
keep_aspect_ratio (`bool`, *optional*, defaults to `False`):
|
| 44 |
+
If `True`, the image is resized to the largest possible size such that the aspect ratio is preserved. Can
|
| 45 |
+
be overridden by `keep_aspect_ratio` in `preprocess`.
|
| 46 |
+
do_reduce_labels (`bool`, *optional*, defaults to `self.do_reduce_labels`):
|
| 47 |
+
Whether or not to reduce all label values of segmentation maps by 1. Usually used for datasets where 0
|
| 48 |
+
is used for background, and background itself is not included in all classes of a dataset (e.g.
|
| 49 |
+
ADE20k). The background label will be replaced by 255.
|
| 50 |
+
"""
|
| 51 |
+
|
| 52 |
+
ensure_multiple_of: int
|
| 53 |
+
size_divisor: int
|
| 54 |
+
keep_aspect_ratio: bool
|
| 55 |
+
do_reduce_labels: bool
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
def get_resize_output_image_size(
|
| 59 |
+
input_image: "torch.Tensor",
|
| 60 |
+
output_size: int | Iterable[int],
|
| 61 |
+
keep_aspect_ratio: bool,
|
| 62 |
+
multiple: int,
|
| 63 |
+
) -> SizeDict:
|
| 64 |
+
def constrain_to_multiple_of(val, multiple, min_val=0, max_val=None):
|
| 65 |
+
x = round(val / multiple) * multiple
|
| 66 |
+
|
| 67 |
+
if max_val is not None and x > max_val:
|
| 68 |
+
x = math.floor(val / multiple) * multiple
|
| 69 |
+
|
| 70 |
+
if x < min_val:
|
| 71 |
+
x = math.ceil(val / multiple) * multiple
|
| 72 |
+
|
| 73 |
+
return x
|
| 74 |
+
|
| 75 |
+
input_height, input_width = input_image.shape[-2:]
|
| 76 |
+
output_height, output_width = output_size
|
| 77 |
+
|
| 78 |
+
# determine new height and width
|
| 79 |
+
scale_height = output_height / input_height
|
| 80 |
+
scale_width = output_width / input_width
|
| 81 |
+
|
| 82 |
+
if keep_aspect_ratio:
|
| 83 |
+
# scale as little as possible
|
| 84 |
+
if abs(1 - scale_width) < abs(1 - scale_height):
|
| 85 |
+
# fit width
|
| 86 |
+
scale_height = scale_width
|
| 87 |
+
else:
|
| 88 |
+
# fit height
|
| 89 |
+
scale_width = scale_height
|
| 90 |
+
|
| 91 |
+
new_height = constrain_to_multiple_of(scale_height * input_height, multiple=multiple)
|
| 92 |
+
new_width = constrain_to_multiple_of(scale_width * input_width, multiple=multiple)
|
| 93 |
+
|
| 94 |
+
return SizeDict(height=new_height, width=new_width)
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
@auto_docstring
|
| 98 |
+
class CHMv2ImageProcessor(TorchvisionBackend):
|
| 99 |
+
"""PIL backend for CHMV2 with reduce_label support."""
|
| 100 |
+
|
| 101 |
+
valid_kwargs = CHMv2ImageProcessorKwargs
|
| 102 |
+
resample = PILImageResampling.BICUBIC
|
| 103 |
+
image_mean = [0.420, 0.411, 0.296]
|
| 104 |
+
image_std = [0.213, 0.156, 0.143]
|
| 105 |
+
size = {"height": 384, "width": 384}
|
| 106 |
+
default_to_square = True
|
| 107 |
+
|
| 108 |
+
# necessary for modular conversion
|
| 109 |
+
crop_size = None
|
| 110 |
+
do_resize = False
|
| 111 |
+
do_center_crop = None
|
| 112 |
+
do_rescale = True
|
| 113 |
+
do_normalize = True
|
| 114 |
+
do_reduce_labels = None
|
| 115 |
+
do_pad = True
|
| 116 |
+
rescale_factor = 1 / 255
|
| 117 |
+
ensure_multiple_of = 16
|
| 118 |
+
keep_aspect_ratio = True
|
| 119 |
+
size_divisor = 16
|
| 120 |
+
|
| 121 |
+
def __init__(self, **kwargs: Unpack[CHMv2ImageProcessorKwargs]):
|
| 122 |
+
super().__init__(**kwargs)
|
| 123 |
+
|
| 124 |
+
@auto_docstring
|
| 125 |
+
def preprocess(
|
| 126 |
+
self,
|
| 127 |
+
images: ImageInput,
|
| 128 |
+
segmentation_maps: ImageInput | None = None,
|
| 129 |
+
**kwargs: Unpack[CHMv2ImageProcessorKwargs],
|
| 130 |
+
) -> BatchFeature:
|
| 131 |
+
r"""
|
| 132 |
+
segmentation_maps (`ImageInput`, *optional*):
|
| 133 |
+
The segmentation maps to preprocess.
|
| 134 |
+
"""
|
| 135 |
+
return super().preprocess(images, segmentation_maps, **kwargs)
|
| 136 |
+
|
| 137 |
+
def _preprocess_image_like_inputs(
|
| 138 |
+
self,
|
| 139 |
+
images: ImageInput,
|
| 140 |
+
segmentation_maps: ImageInput | None,
|
| 141 |
+
do_convert_rgb: bool,
|
| 142 |
+
input_data_format: ChannelDimension,
|
| 143 |
+
return_tensors: str | TensorType | None,
|
| 144 |
+
device: Union[str, "torch.device"] | None = None,
|
| 145 |
+
**kwargs,
|
| 146 |
+
) -> BatchFeature:
|
| 147 |
+
"""Handle extra inputs beyond images."""
|
| 148 |
+
images = self._prepare_image_like_inputs(
|
| 149 |
+
images=images, do_convert_rgb=do_convert_rgb, input_data_format=input_data_format, device=device
|
| 150 |
+
)
|
| 151 |
+
images_kwargs = kwargs.copy()
|
| 152 |
+
images_kwargs["do_reduce_labels"] = False
|
| 153 |
+
data = {}
|
| 154 |
+
data["pixel_values"] = self._preprocess(images, **images_kwargs)
|
| 155 |
+
|
| 156 |
+
# Prepare segmentation maps if provided
|
| 157 |
+
if segmentation_maps is not None:
|
| 158 |
+
processed_segmentation_maps = self._prepare_image_like_inputs(
|
| 159 |
+
images=segmentation_maps,
|
| 160 |
+
expected_ndims=2,
|
| 161 |
+
do_convert_rgb=False,
|
| 162 |
+
input_data_format=ChannelDimension.FIRST,
|
| 163 |
+
)
|
| 164 |
+
|
| 165 |
+
# Process segmentation maps with do_normalize=False and do_rescale=False
|
| 166 |
+
segmentation_maps_kwargs = kwargs.copy()
|
| 167 |
+
segmentation_maps_kwargs.update({"do_normalize": False, "do_rescale": False})
|
| 168 |
+
processed_segmentation_maps = self._preprocess(
|
| 169 |
+
images=processed_segmentation_maps, **segmentation_maps_kwargs
|
| 170 |
+
)
|
| 171 |
+
|
| 172 |
+
# Convert to int64 and squeeze channel dimension
|
| 173 |
+
processed_segmentation_maps = [
|
| 174 |
+
processed_segmentation_map.squeeze(0).to(torch.int64)
|
| 175 |
+
for processed_segmentation_map in processed_segmentation_maps
|
| 176 |
+
]
|
| 177 |
+
data["labels"] = processed_segmentation_maps
|
| 178 |
+
|
| 179 |
+
return BatchFeature(data=data, tensor_type=return_tensors)
|
| 180 |
+
|
| 181 |
+
def reduce_label(self, labels: list["torch.Tensor"]) -> list["torch.Tensor"]:
|
| 182 |
+
"""Reduce label values by 1, replacing 0 with 255."""
|
| 183 |
+
for idx in range(len(labels)):
|
| 184 |
+
label = labels[idx]
|
| 185 |
+
label = torch.where(label == 0, torch.tensor(255, dtype=label.dtype, device=label.device), label)
|
| 186 |
+
label = label - 1
|
| 187 |
+
label = torch.where(label == 254, torch.tensor(255, dtype=label.dtype, device=label.device), label)
|
| 188 |
+
labels[idx] = label
|
| 189 |
+
return labels
|
| 190 |
+
|
| 191 |
+
def _preprocess(
|
| 192 |
+
self,
|
| 193 |
+
images: list["torch.Tensor"],
|
| 194 |
+
do_reduce_labels: bool,
|
| 195 |
+
do_resize: bool,
|
| 196 |
+
size: SizeDict,
|
| 197 |
+
resample: "PILImageResampling | tvF.InterpolationMode | int | None",
|
| 198 |
+
do_center_crop: bool,
|
| 199 |
+
crop_size: SizeDict,
|
| 200 |
+
do_rescale: bool,
|
| 201 |
+
rescale_factor: float,
|
| 202 |
+
do_normalize: bool,
|
| 203 |
+
image_mean: float | list[float] | None,
|
| 204 |
+
image_std: float | list[float] | None,
|
| 205 |
+
keep_aspect_ratio: bool,
|
| 206 |
+
ensure_multiple_of: int | None,
|
| 207 |
+
do_pad: bool,
|
| 208 |
+
size_divisor: int | None,
|
| 209 |
+
disable_grouping: bool | None,
|
| 210 |
+
**kwargs,
|
| 211 |
+
) -> BatchFeature:
|
| 212 |
+
"""Custom preprocessing for CHMV2."""
|
| 213 |
+
if do_reduce_labels:
|
| 214 |
+
images = self.reduce_label(images)
|
| 215 |
+
|
| 216 |
+
# Group images by size for batched resizing
|
| 217 |
+
grouped_images, grouped_images_index = group_images_by_shape(images, disable_grouping=disable_grouping)
|
| 218 |
+
resized_images_grouped = {}
|
| 219 |
+
for shape, stacked_images in grouped_images.items():
|
| 220 |
+
if do_resize:
|
| 221 |
+
stacked_images = self.resize(
|
| 222 |
+
image=stacked_images,
|
| 223 |
+
size=size,
|
| 224 |
+
resample=resample,
|
| 225 |
+
ensure_multiple_of=ensure_multiple_of,
|
| 226 |
+
keep_aspect_ratio=keep_aspect_ratio,
|
| 227 |
+
)
|
| 228 |
+
resized_images_grouped[shape] = stacked_images
|
| 229 |
+
resized_images = reorder_images(resized_images_grouped, grouped_images_index)
|
| 230 |
+
|
| 231 |
+
# Group images by size for further processing
|
| 232 |
+
# Needed in case do_resize is False, or resize returns images with different sizes
|
| 233 |
+
grouped_images, grouped_images_index = group_images_by_shape(resized_images, disable_grouping=disable_grouping)
|
| 234 |
+
processed_images_grouped = {}
|
| 235 |
+
for shape, stacked_images in grouped_images.items():
|
| 236 |
+
if do_center_crop:
|
| 237 |
+
stacked_images = self.center_crop(stacked_images, crop_size)
|
| 238 |
+
# Fused rescale and normalize
|
| 239 |
+
stacked_images = self.rescale_and_normalize(
|
| 240 |
+
stacked_images, do_rescale, rescale_factor, do_normalize, image_mean, image_std
|
| 241 |
+
)
|
| 242 |
+
if do_pad:
|
| 243 |
+
stacked_images = self.pad_image(stacked_images, size_divisor)
|
| 244 |
+
processed_images_grouped[shape] = stacked_images
|
| 245 |
+
|
| 246 |
+
processed_images = reorder_images(processed_images_grouped, grouped_images_index)
|
| 247 |
+
|
| 248 |
+
return processed_images
|
| 249 |
+
|
| 250 |
+
def post_process_semantic_segmentation(self, outputs, target_sizes: list[tuple] | None = None):
|
| 251 |
+
"""
|
| 252 |
+
Converts the output of [`CHMv2ForSemanticSegmentation`] into semantic segmentation maps.
|
| 253 |
+
|
| 254 |
+
Args:
|
| 255 |
+
outputs ([`CHMv2ForSemanticSegmentation`]):
|
| 256 |
+
Raw outputs of the model.
|
| 257 |
+
target_sizes (`list[Tuple]` of length `batch_size`, *optional*):
|
| 258 |
+
List of tuples corresponding to the requested final size (height, width) of each prediction. If unset,
|
| 259 |
+
predictions will not be resized.
|
| 260 |
+
|
| 261 |
+
Returns:
|
| 262 |
+
semantic_segmentation: `list[torch.Tensor]` of length `batch_size`, where each item is a semantic
|
| 263 |
+
segmentation map of shape (height, width) corresponding to the target_sizes entry (if `target_sizes` is
|
| 264 |
+
specified). Each entry of each `torch.Tensor` correspond to a semantic class id.
|
| 265 |
+
"""
|
| 266 |
+
if not is_torch_available():
|
| 267 |
+
raise ImportError("PyTorch is required for post_process_semantic_segmentation")
|
| 268 |
+
|
| 269 |
+
logits = outputs.logits
|
| 270 |
+
|
| 271 |
+
# Resize logits and compute semantic segmentation maps
|
| 272 |
+
if target_sizes is not None:
|
| 273 |
+
if len(logits) != len(target_sizes):
|
| 274 |
+
raise ValueError(
|
| 275 |
+
"Make sure that you pass in as many target sizes as the batch dimension of the logits"
|
| 276 |
+
)
|
| 277 |
+
|
| 278 |
+
if isinstance(target_sizes, torch.Tensor):
|
| 279 |
+
target_sizes = target_sizes.numpy()
|
| 280 |
+
|
| 281 |
+
semantic_segmentation = []
|
| 282 |
+
|
| 283 |
+
for idx in range(len(logits)):
|
| 284 |
+
resized_logits = F.interpolate(
|
| 285 |
+
logits[idx].unsqueeze(dim=0), size=target_sizes[idx], mode="bilinear", align_corners=False
|
| 286 |
+
)
|
| 287 |
+
semantic_map = resized_logits[0].argmax(dim=0)
|
| 288 |
+
semantic_segmentation.append(semantic_map)
|
| 289 |
+
else:
|
| 290 |
+
semantic_segmentation = logits.argmax(dim=1)
|
| 291 |
+
semantic_segmentation = [semantic_segmentation[i] for i in range(semantic_segmentation.shape[0])]
|
| 292 |
+
|
| 293 |
+
return semantic_segmentation
|
| 294 |
+
|
| 295 |
+
def resize(
|
| 296 |
+
self,
|
| 297 |
+
image: "torch.Tensor",
|
| 298 |
+
size: SizeDict,
|
| 299 |
+
resample: "PILImageResampling | tvF.InterpolationMode | int | None",
|
| 300 |
+
antialias: bool = True,
|
| 301 |
+
ensure_multiple_of: int | None = 1,
|
| 302 |
+
keep_aspect_ratio: bool = False,
|
| 303 |
+
) -> "torch.Tensor":
|
| 304 |
+
"""
|
| 305 |
+
Resize an image to `(size["height"], size["width"])`.
|
| 306 |
+
|
| 307 |
+
Args:
|
| 308 |
+
image (`torch.Tensor`):
|
| 309 |
+
Image to resize.
|
| 310 |
+
size (`SizeDict`):
|
| 311 |
+
Dictionary in the format `{"height": int, "width": int}` specifying the size of the output image.
|
| 312 |
+
interpolation (`InterpolationMode`, *optional*, defaults to `InterpolationMode.BILINEAR`):
|
| 313 |
+
`InterpolationMode` filter to use when resizing the image e.g. `InterpolationMode.BICUBIC`.
|
| 314 |
+
antialias (`bool`, *optional*, defaults to `True`):
|
| 315 |
+
Whether to use antialiasing when resizing the image
|
| 316 |
+
ensure_multiple_of (`int`, *optional*):
|
| 317 |
+
If `do_resize` is `True`, the image is resized to a size that is a multiple of this value
|
| 318 |
+
keep_aspect_ratio (`bool`, *optional*, defaults to `False`):
|
| 319 |
+
If `True`, and `do_resize` is `True`, the image is resized to the largest possible size such that the aspect ratio is preserved.
|
| 320 |
+
|
| 321 |
+
Returns:
|
| 322 |
+
`torch.Tensor`: The resized image.
|
| 323 |
+
"""
|
| 324 |
+
if not size.height or not size.width:
|
| 325 |
+
raise ValueError(f"The size dictionary must contain the keys 'height' and 'width'. Got {size.keys()}")
|
| 326 |
+
|
| 327 |
+
output_size = get_resize_output_image_size(
|
| 328 |
+
image,
|
| 329 |
+
output_size=(size.height, size.width),
|
| 330 |
+
keep_aspect_ratio=keep_aspect_ratio,
|
| 331 |
+
multiple=ensure_multiple_of,
|
| 332 |
+
)
|
| 333 |
+
return super().resize(image, output_size, resample=resample, antialias=antialias)
|
| 334 |
+
|
| 335 |
+
def pad_image(
|
| 336 |
+
self,
|
| 337 |
+
image: "torch.Tensor",
|
| 338 |
+
size_divisor: int = 1,
|
| 339 |
+
) -> "torch.Tensor":
|
| 340 |
+
r"""
|
| 341 |
+
Center pad a batch of images to be a multiple of `size_divisor`.
|
| 342 |
+
|
| 343 |
+
Args:
|
| 344 |
+
image (`torch.Tensor`):
|
| 345 |
+
Image to pad. Can be a batch of images of dimensions (N, C, H, W) or a single image of dimensions (C, H, W).
|
| 346 |
+
size_divisor (`int`):
|
| 347 |
+
The width and height of the image will be padded to a multiple of this number.
|
| 348 |
+
"""
|
| 349 |
+
height, width = image.shape[-2:]
|
| 350 |
+
|
| 351 |
+
def _get_pad(size, size_divisor):
|
| 352 |
+
new_size = math.ceil(size / size_divisor) * size_divisor
|
| 353 |
+
pad_size = new_size - size
|
| 354 |
+
pad_size_left = pad_size // 2
|
| 355 |
+
pad_size_right = pad_size - pad_size_left
|
| 356 |
+
return pad_size_left, pad_size_right
|
| 357 |
+
|
| 358 |
+
pad_top, pad_bottom = _get_pad(height, size_divisor)
|
| 359 |
+
pad_left, pad_right = _get_pad(width, size_divisor)
|
| 360 |
+
padding = (pad_left, pad_top, pad_right, pad_bottom)
|
| 361 |
+
return tvF.pad(image, padding)
|
| 362 |
+
|
| 363 |
+
def post_process_depth_estimation(
|
| 364 |
+
self,
|
| 365 |
+
outputs: "DepthEstimatorOutput",
|
| 366 |
+
target_sizes: TensorType | list[tuple[int, int]] | None | None = None,
|
| 367 |
+
) -> list[dict[str, TensorType]]:
|
| 368 |
+
"""
|
| 369 |
+
Converts the raw output of [`DepthEstimatorOutput`] into final depth predictions and depth PIL images.
|
| 370 |
+
Only supports PyTorch.
|
| 371 |
+
|
| 372 |
+
Args:
|
| 373 |
+
outputs ([`DepthEstimatorOutput`]):
|
| 374 |
+
Raw outputs of the model.
|
| 375 |
+
target_sizes (`TensorType` or `List[Tuple[int, int]]`, *optional*):
|
| 376 |
+
Tensor of shape `(batch_size, 2)` or list of tuples (`Tuple[int, int]`) containing the target size
|
| 377 |
+
(height, width) of each image in the batch. If left to None, predictions will not be resized.
|
| 378 |
+
|
| 379 |
+
Returns:
|
| 380 |
+
`List[Dict[str, TensorType]]`: A list of dictionaries of tensors representing the processed depth
|
| 381 |
+
predictions.
|
| 382 |
+
"""
|
| 383 |
+
requires_backends(self, "torch")
|
| 384 |
+
|
| 385 |
+
predicted_depth = outputs.predicted_depth
|
| 386 |
+
|
| 387 |
+
if (target_sizes is not None) and (len(predicted_depth) != len(target_sizes)):
|
| 388 |
+
raise ValueError(
|
| 389 |
+
"Make sure that you pass in as many target sizes as the batch dimension of the predicted depth"
|
| 390 |
+
)
|
| 391 |
+
|
| 392 |
+
results = []
|
| 393 |
+
target_sizes = [None] * len(predicted_depth) if target_sizes is None else target_sizes
|
| 394 |
+
for depth, target_size in zip(predicted_depth, target_sizes):
|
| 395 |
+
if target_size is not None:
|
| 396 |
+
depth = torch.nn.functional.interpolate(
|
| 397 |
+
depth[None, None, ...], size=target_size, mode="bilinear", align_corners=True
|
| 398 |
+
).squeeze()
|
| 399 |
+
|
| 400 |
+
results.append({"predicted_depth": depth})
|
| 401 |
+
|
| 402 |
+
return results
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
__all__ = ["CHMv2ImageProcessor"]
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/chmv2/modeling_chmv2.py
ADDED
|
@@ -0,0 +1,434 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 2 |
+
# This file was automatically generated from src/transformers/models/chmv2/modular_chmv2.py.
|
| 3 |
+
# Do NOT edit this file manually as any edits will be overwritten by the generation of
|
| 4 |
+
# the file from the modular. If any change should be done, please apply the change to the
|
| 5 |
+
# modular_chmv2.py file directly. One of our CI enforces this.
|
| 6 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 7 |
+
# Copyright 2026 Meta Platforms, Inc. and The HuggingFace Inc. team. All rights reserved.
|
| 8 |
+
#
|
| 9 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 10 |
+
# you may not use this file except in compliance with the License.
|
| 11 |
+
# You may obtain a copy of the License at
|
| 12 |
+
#
|
| 13 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 14 |
+
#
|
| 15 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 16 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 17 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 18 |
+
# See the License for the specific language governing permissions and
|
| 19 |
+
# limitations under the License.
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
import torch
|
| 23 |
+
from torch import nn
|
| 24 |
+
|
| 25 |
+
from ... import initialization as init
|
| 26 |
+
from ...backbone_utils import load_backbone
|
| 27 |
+
from ...modeling_outputs import DepthEstimatorOutput
|
| 28 |
+
from ...modeling_utils import PreTrainedModel
|
| 29 |
+
from ...processing_utils import Unpack
|
| 30 |
+
from ...utils import TransformersKwargs, auto_docstring, can_return_tuple
|
| 31 |
+
from .configuration_chmv2 import CHMv2Config
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
def _get_backbone_hidden_size(config):
|
| 35 |
+
if config.backbone_config is not None and hasattr(config.backbone_config, "hidden_size"):
|
| 36 |
+
return config.backbone_config.hidden_size
|
| 37 |
+
else:
|
| 38 |
+
return config.hidden_size
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
class CHMv2ReassembleLayer(nn.Module):
|
| 42 |
+
def __init__(self, config: CHMv2Config, channels: int, factor: int):
|
| 43 |
+
super().__init__()
|
| 44 |
+
# projection
|
| 45 |
+
hidden_size = _get_backbone_hidden_size(config)
|
| 46 |
+
self.projection = nn.Conv2d(in_channels=hidden_size, out_channels=channels, kernel_size=1)
|
| 47 |
+
|
| 48 |
+
# up/down sampling depending on factor
|
| 49 |
+
if factor > 1:
|
| 50 |
+
self.resize = nn.ConvTranspose2d(channels, channels, kernel_size=factor, stride=factor, padding=0)
|
| 51 |
+
elif factor == 1:
|
| 52 |
+
self.resize = nn.Identity()
|
| 53 |
+
elif factor < 1:
|
| 54 |
+
# so should downsample
|
| 55 |
+
self.resize = nn.Conv2d(channels, channels, kernel_size=3, stride=int(1 / factor), padding=1)
|
| 56 |
+
|
| 57 |
+
def forward(self, hidden_state):
|
| 58 |
+
hidden_state = self.projection(hidden_state)
|
| 59 |
+
hidden_state = self.resize(hidden_state)
|
| 60 |
+
return hidden_state
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
class CHMv2ReassembleStage(nn.Module):
|
| 64 |
+
"""
|
| 65 |
+
Reassemble stage that processes hidden states from the backbone into image-like feature
|
| 66 |
+
representations at various resolutions.
|
| 67 |
+
"""
|
| 68 |
+
|
| 69 |
+
def __init__(self, config: CHMv2Config):
|
| 70 |
+
super().__init__()
|
| 71 |
+
self.config = config
|
| 72 |
+
self.readout_type = config.readout_type
|
| 73 |
+
|
| 74 |
+
self.layers = nn.ModuleList()
|
| 75 |
+
for out_channels, factor in zip(config.post_process_channels, config.reassemble_factors):
|
| 76 |
+
self.layers.append(
|
| 77 |
+
CHMv2ReassembleLayer(
|
| 78 |
+
config=config,
|
| 79 |
+
channels=out_channels,
|
| 80 |
+
factor=factor,
|
| 81 |
+
)
|
| 82 |
+
)
|
| 83 |
+
|
| 84 |
+
hidden_size = _get_backbone_hidden_size(config)
|
| 85 |
+
if self.readout_type == "project":
|
| 86 |
+
self.readout_projects = nn.ModuleList()
|
| 87 |
+
for _ in range(len(self.layers)):
|
| 88 |
+
self.readout_projects.append(nn.Sequential(nn.Linear(2 * hidden_size, hidden_size), nn.GELU()))
|
| 89 |
+
|
| 90 |
+
def forward(self, hidden_states: list[torch.Tensor], patch_height=None, patch_width=None) -> list[torch.Tensor]:
|
| 91 |
+
out = []
|
| 92 |
+
|
| 93 |
+
for layer_idx, hidden_state in enumerate(hidden_states):
|
| 94 |
+
if isinstance(hidden_state, (tuple, list)) and len(hidden_state) == 2:
|
| 95 |
+
hidden_state, cls_token = hidden_state[0], hidden_state[1]
|
| 96 |
+
feature_shape = hidden_state.shape
|
| 97 |
+
|
| 98 |
+
if self.readout_type == "project":
|
| 99 |
+
hidden_state = hidden_state.flatten(2).transpose(1, 2)
|
| 100 |
+
readout = cls_token.unsqueeze(1).expand_as(hidden_state)
|
| 101 |
+
hidden_state = self.readout_projects[layer_idx](torch.cat((hidden_state, readout), -1))
|
| 102 |
+
hidden_state = hidden_state.permute(0, 2, 1).reshape(feature_shape)
|
| 103 |
+
elif self.readout_type == "add":
|
| 104 |
+
hidden_state = hidden_state.flatten(2) + cls_token.unsqueeze(-1)
|
| 105 |
+
hidden_state = hidden_state.reshape(feature_shape)
|
| 106 |
+
else:
|
| 107 |
+
if hidden_state.dim() == 3:
|
| 108 |
+
hidden_state = hidden_state[:, 1:]
|
| 109 |
+
batch_size, _, num_channels = hidden_state.shape
|
| 110 |
+
hidden_state = hidden_state.reshape(batch_size, patch_height, patch_width, num_channels)
|
| 111 |
+
hidden_state = hidden_state.permute(0, 3, 1, 2).contiguous()
|
| 112 |
+
|
| 113 |
+
hidden_state = self.layers[layer_idx](hidden_state)
|
| 114 |
+
out.append(hidden_state)
|
| 115 |
+
|
| 116 |
+
return out
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
class CHMv2PreActResidualLayer(nn.Module):
|
| 120 |
+
"""
|
| 121 |
+
ResidualConvUnit, pre-activate residual unit.
|
| 122 |
+
|
| 123 |
+
Args:
|
| 124 |
+
config (`[CHMv2Config]`):
|
| 125 |
+
Model configuration class defining the model architecture.
|
| 126 |
+
"""
|
| 127 |
+
|
| 128 |
+
def __init__(self, config):
|
| 129 |
+
super().__init__()
|
| 130 |
+
|
| 131 |
+
self.activation1 = nn.ReLU()
|
| 132 |
+
self.convolution1 = nn.Conv2d(
|
| 133 |
+
config.fusion_hidden_size,
|
| 134 |
+
config.fusion_hidden_size,
|
| 135 |
+
kernel_size=3,
|
| 136 |
+
stride=1,
|
| 137 |
+
padding=1,
|
| 138 |
+
bias=True,
|
| 139 |
+
)
|
| 140 |
+
|
| 141 |
+
self.activation2 = nn.ReLU()
|
| 142 |
+
self.convolution2 = nn.Conv2d(
|
| 143 |
+
config.fusion_hidden_size,
|
| 144 |
+
config.fusion_hidden_size,
|
| 145 |
+
kernel_size=3,
|
| 146 |
+
stride=1,
|
| 147 |
+
padding=1,
|
| 148 |
+
bias=True,
|
| 149 |
+
)
|
| 150 |
+
|
| 151 |
+
def forward(self, hidden_state: torch.Tensor) -> torch.Tensor:
|
| 152 |
+
residual = hidden_state
|
| 153 |
+
hidden_state = self.activation1(hidden_state)
|
| 154 |
+
hidden_state = self.convolution1(hidden_state)
|
| 155 |
+
hidden_state = self.activation2(hidden_state)
|
| 156 |
+
hidden_state = self.convolution2(hidden_state)
|
| 157 |
+
|
| 158 |
+
return hidden_state + residual
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
class CHMv2FeatureFusionLayer(nn.Module):
|
| 162 |
+
def __init__(self, config: CHMv2Config, is_first_layer: bool = False):
|
| 163 |
+
super().__init__()
|
| 164 |
+
self.is_first_layer = is_first_layer
|
| 165 |
+
|
| 166 |
+
self.projection = nn.Conv2d(config.fusion_hidden_size, config.fusion_hidden_size, kernel_size=1, bias=True)
|
| 167 |
+
|
| 168 |
+
if not is_first_layer:
|
| 169 |
+
self.residual_layer1 = CHMv2PreActResidualLayer(config)
|
| 170 |
+
|
| 171 |
+
self.residual_layer2 = CHMv2PreActResidualLayer(config)
|
| 172 |
+
|
| 173 |
+
def forward(self, hidden_state, residual=None, size=None):
|
| 174 |
+
if residual is not None and not self.is_first_layer:
|
| 175 |
+
if hidden_state.shape != residual.shape:
|
| 176 |
+
_, _, height, width = hidden_state.shape
|
| 177 |
+
residual = nn.functional.interpolate(
|
| 178 |
+
residual, size=(height, width), mode="bilinear", align_corners=False
|
| 179 |
+
)
|
| 180 |
+
hidden_state = hidden_state + self.residual_layer1(residual)
|
| 181 |
+
|
| 182 |
+
hidden_state = self.residual_layer2(hidden_state)
|
| 183 |
+
|
| 184 |
+
modifier = {"scale_factor": 2} if size is None else {"size": size}
|
| 185 |
+
|
| 186 |
+
hidden_state = nn.functional.interpolate(
|
| 187 |
+
hidden_state,
|
| 188 |
+
**modifier,
|
| 189 |
+
mode="bilinear",
|
| 190 |
+
align_corners=True,
|
| 191 |
+
)
|
| 192 |
+
|
| 193 |
+
hidden_state = self.projection(hidden_state)
|
| 194 |
+
|
| 195 |
+
return hidden_state
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
class CHMv2UpsampleConvHead(nn.Module):
|
| 199 |
+
"""
|
| 200 |
+
Convolutional head with intermediate upsampling.
|
| 201 |
+
|
| 202 |
+
Architecture: Conv3x3 -> 2x bilinear upsample -> Conv3x3 -> ReLU -> Conv1x1.
|
| 203 |
+
"""
|
| 204 |
+
|
| 205 |
+
def __init__(self, features, number_output_channels, n_hidden_channels=128):
|
| 206 |
+
super().__init__()
|
| 207 |
+
self.head = nn.ModuleList(
|
| 208 |
+
[
|
| 209 |
+
nn.Conv2d(features, features // 2, kernel_size=3, stride=1, padding=1),
|
| 210 |
+
nn.Upsample(scale_factor=2, mode="bilinear", align_corners=True),
|
| 211 |
+
nn.Conv2d(features // 2, n_hidden_channels, kernel_size=3, stride=1, padding=1),
|
| 212 |
+
nn.ReLU(),
|
| 213 |
+
nn.Conv2d(n_hidden_channels, number_output_channels, kernel_size=1, stride=1, padding=0),
|
| 214 |
+
]
|
| 215 |
+
)
|
| 216 |
+
|
| 217 |
+
def forward(self, hidden_states):
|
| 218 |
+
for layer in self.head:
|
| 219 |
+
hidden_states = layer(hidden_states)
|
| 220 |
+
return hidden_states
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
class CHMv2Head(nn.Module):
|
| 224 |
+
"""
|
| 225 |
+
CHMv2 dense-prediction head adapted from DPT.
|
| 226 |
+
|
| 227 |
+
Integrates reassemble, projection convs, feature fusion, and UpConv depth head.
|
| 228 |
+
"""
|
| 229 |
+
|
| 230 |
+
def __init__(self, config: CHMv2Config):
|
| 231 |
+
super().__init__()
|
| 232 |
+
self.config = config
|
| 233 |
+
|
| 234 |
+
self.reassemble_stage = CHMv2ReassembleStage(config)
|
| 235 |
+
|
| 236 |
+
self.convs = nn.ModuleList()
|
| 237 |
+
for channel in config.post_process_channels:
|
| 238 |
+
self.convs.append(nn.Conv2d(channel, config.fusion_hidden_size, kernel_size=3, padding=1, bias=False))
|
| 239 |
+
|
| 240 |
+
self.fusion_layers = nn.ModuleList()
|
| 241 |
+
for idx in range(len(config.post_process_channels)):
|
| 242 |
+
self.fusion_layers.append(CHMv2FeatureFusionLayer(config, is_first_layer=(idx == 0)))
|
| 243 |
+
|
| 244 |
+
self.conv_depth = CHMv2UpsampleConvHead(
|
| 245 |
+
features=config.fusion_hidden_size,
|
| 246 |
+
number_output_channels=config.number_output_channels,
|
| 247 |
+
n_hidden_channels=config.head_hidden_size,
|
| 248 |
+
)
|
| 249 |
+
|
| 250 |
+
def forward_features(self, hidden_states: list[torch.Tensor], patch_height: int, patch_width: int) -> torch.Tensor:
|
| 251 |
+
hidden_states = self.reassemble_stage(hidden_states, patch_height, patch_width)
|
| 252 |
+
|
| 253 |
+
features = [self.convs[i](feature) for i, feature in enumerate(hidden_states)]
|
| 254 |
+
features.reverse()
|
| 255 |
+
|
| 256 |
+
fused_hidden_state = self.fusion_layers[0](features[0])
|
| 257 |
+
for i in range(1, len(self.fusion_layers)):
|
| 258 |
+
fused_hidden_state = self.fusion_layers[i](fused_hidden_state, features[i])
|
| 259 |
+
|
| 260 |
+
return fused_hidden_state
|
| 261 |
+
|
| 262 |
+
def forward(self, hidden_states: list[torch.Tensor], patch_height: int, patch_width: int) -> torch.Tensor:
|
| 263 |
+
out = self.forward_features(hidden_states, patch_height, patch_width)
|
| 264 |
+
out = self.conv_depth(out)
|
| 265 |
+
return out
|
| 266 |
+
|
| 267 |
+
|
| 268 |
+
class CHMv2FeaturesToDepth(nn.Module):
|
| 269 |
+
"""Converts raw logits from the CHMv2 head into a depth map using depth bins."""
|
| 270 |
+
|
| 271 |
+
def __init__(self, config: CHMv2Config):
|
| 272 |
+
super().__init__()
|
| 273 |
+
self.min_depth = config.min_depth
|
| 274 |
+
self.max_depth = config.max_depth
|
| 275 |
+
self.bins_strategy = config.bins_strategy
|
| 276 |
+
self.norm_strategy = config.norm_strategy
|
| 277 |
+
self._mixlog_max_clamp_value = 1e-4
|
| 278 |
+
self._mixlog_eps_shift = 1e-8
|
| 279 |
+
self._mixlog_eps = 1e-12
|
| 280 |
+
|
| 281 |
+
def _create_mixlog_bins(self, n_bins: int, device: torch.device) -> torch.Tensor:
|
| 282 |
+
"""
|
| 283 |
+
Creates mixed log bins interpolated between linear and log distributions.
|
| 284 |
+
|
| 285 |
+
The max_depth is divided by 8.0 internally; this scaling is reversed in
|
| 286 |
+
`_create_outputs_with_mixlog_norm` by multiplying by 8.0.
|
| 287 |
+
"""
|
| 288 |
+
scaled_max_depth = self.max_depth / 8.0
|
| 289 |
+
linear = torch.linspace(self.min_depth, scaled_max_depth, n_bins, device=device)
|
| 290 |
+
log = torch.exp(
|
| 291 |
+
torch.linspace(
|
| 292 |
+
torch.log(torch.tensor(self.min_depth, device=device)),
|
| 293 |
+
torch.log(torch.tensor(scaled_max_depth, device=device)),
|
| 294 |
+
n_bins,
|
| 295 |
+
device=device,
|
| 296 |
+
)
|
| 297 |
+
)
|
| 298 |
+
interp_weight = torch.linspace(1.0, 0.0, n_bins, device=device)
|
| 299 |
+
bins = interp_weight * log + (1.0 - interp_weight) * linear
|
| 300 |
+
return bins
|
| 301 |
+
|
| 302 |
+
def _create_outputs_with_mixlog_norm(self, input: torch.Tensor, bins: torch.Tensor) -> torch.Tensor:
|
| 303 |
+
"""Converts depth bin logits to depth values using mixlog normalization."""
|
| 304 |
+
logits = torch.relu(input)
|
| 305 |
+
|
| 306 |
+
min_per_sample = logits.amin(dim=1, keepdim=True)
|
| 307 |
+
shift = (-min_per_sample).clamp_min(0.0).clamp_max(self._mixlog_max_clamp_value) + self._mixlog_eps_shift
|
| 308 |
+
logits_pos = logits + shift
|
| 309 |
+
|
| 310 |
+
denom = logits_pos.sum(dim=1, keepdim=True)
|
| 311 |
+
denom = torch.nan_to_num(denom, nan=1.0, posinf=1.0, neginf=1.0).clamp_min(self._mixlog_eps)
|
| 312 |
+
weights = logits_pos / denom
|
| 313 |
+
|
| 314 |
+
bins_broadcast = bins.view(1, -1, 1, 1).clamp_min(self._mixlog_eps)
|
| 315 |
+
output = (weights * bins_broadcast).sum(dim=1, keepdim=True).clamp_min(self._mixlog_eps)
|
| 316 |
+
|
| 317 |
+
output = output * 8.0
|
| 318 |
+
|
| 319 |
+
return output
|
| 320 |
+
|
| 321 |
+
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
| 322 |
+
n_bins = x.shape[1]
|
| 323 |
+
|
| 324 |
+
if n_bins > 1:
|
| 325 |
+
if self.bins_strategy == "linear":
|
| 326 |
+
bins = torch.linspace(self.min_depth, self.max_depth, n_bins, device=x.device)
|
| 327 |
+
elif self.bins_strategy == "log":
|
| 328 |
+
bins = torch.linspace(
|
| 329 |
+
torch.log(torch.tensor(self.min_depth)),
|
| 330 |
+
torch.log(torch.tensor(self.max_depth)),
|
| 331 |
+
n_bins,
|
| 332 |
+
device=x.device,
|
| 333 |
+
)
|
| 334 |
+
bins = torch.exp(bins)
|
| 335 |
+
else:
|
| 336 |
+
bins = self._create_mixlog_bins(n_bins, x.device)
|
| 337 |
+
|
| 338 |
+
if self.norm_strategy in ["linear", "softmax", "sigmoid"]:
|
| 339 |
+
if self.norm_strategy == "linear":
|
| 340 |
+
logit = torch.relu(x)
|
| 341 |
+
eps = 0.1
|
| 342 |
+
logit = logit + eps
|
| 343 |
+
logit = logit / logit.sum(dim=1, keepdim=True)
|
| 344 |
+
elif self.norm_strategy == "softmax":
|
| 345 |
+
logit = torch.softmax(x, dim=1)
|
| 346 |
+
else:
|
| 347 |
+
logit = torch.sigmoid(x)
|
| 348 |
+
logit = logit / logit.sum(dim=1, keepdim=True)
|
| 349 |
+
output = torch.einsum("ikmn,k->imn", [logit, bins]).unsqueeze(dim=1)
|
| 350 |
+
else:
|
| 351 |
+
output = self._create_outputs_with_mixlog_norm(x, bins)
|
| 352 |
+
else:
|
| 353 |
+
output = torch.relu(x) + self.min_depth
|
| 354 |
+
|
| 355 |
+
return output
|
| 356 |
+
|
| 357 |
+
|
| 358 |
+
@auto_docstring
|
| 359 |
+
class CHMv2PreTrainedModel(PreTrainedModel):
|
| 360 |
+
config: CHMv2Config
|
| 361 |
+
base_model_prefix = "chmv2"
|
| 362 |
+
main_input_name = "pixel_values"
|
| 363 |
+
input_modalities = ("image",)
|
| 364 |
+
supports_gradient_checkpointing = True
|
| 365 |
+
_supports_sdpa = True
|
| 366 |
+
_supports_flash_attn = True
|
| 367 |
+
_supports_flex_attn = True
|
| 368 |
+
_supports_attention_backend = True
|
| 369 |
+
|
| 370 |
+
def _init_weights(self, module) -> None:
|
| 371 |
+
super()._init_weights(module)
|
| 372 |
+
if isinstance(module, (nn.Linear, nn.Conv2d, nn.ConvTranspose2d)):
|
| 373 |
+
init.trunc_normal_(module.weight, mean=0.0, std=self.config.initializer_range)
|
| 374 |
+
if module.bias is not None:
|
| 375 |
+
init.zeros_(module.bias)
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
@auto_docstring(
|
| 379 |
+
custom_intro="""
|
| 380 |
+
CHMv2 Model with a depth estimation head on top (consisting of convolutional layers) e.g. for canopy height
|
| 381 |
+
estimation.
|
| 382 |
+
"""
|
| 383 |
+
)
|
| 384 |
+
class CHMv2ForDepthEstimation(CHMv2PreTrainedModel):
|
| 385 |
+
def __init__(self, config: CHMv2Config):
|
| 386 |
+
super().__init__(config)
|
| 387 |
+
|
| 388 |
+
self.backbone = load_backbone(config)
|
| 389 |
+
self.head = CHMv2Head(config)
|
| 390 |
+
self.features_to_depth = CHMv2FeaturesToDepth(config)
|
| 391 |
+
|
| 392 |
+
self.post_init()
|
| 393 |
+
|
| 394 |
+
def get_input_embeddings(self):
|
| 395 |
+
return self.backbone.get_input_embeddings()
|
| 396 |
+
|
| 397 |
+
@can_return_tuple
|
| 398 |
+
@auto_docstring
|
| 399 |
+
def forward(
|
| 400 |
+
self,
|
| 401 |
+
pixel_values: torch.FloatTensor,
|
| 402 |
+
labels: torch.LongTensor | None = None,
|
| 403 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 404 |
+
) -> DepthEstimatorOutput:
|
| 405 |
+
r"""
|
| 406 |
+
labels (`torch.LongTensor` of shape `(batch_size, height, width)`, *optional*):
|
| 407 |
+
Ground truth depth estimation maps for computing the loss.
|
| 408 |
+
"""
|
| 409 |
+
loss = None
|
| 410 |
+
if labels is not None:
|
| 411 |
+
raise NotImplementedError("Training is not implemented yet")
|
| 412 |
+
|
| 413 |
+
_, _, height, width = pixel_values.shape
|
| 414 |
+
patch_size = self.config.patch_size
|
| 415 |
+
patch_height = height // patch_size
|
| 416 |
+
patch_width = width // patch_size
|
| 417 |
+
|
| 418 |
+
backbone_output = self.backbone(pixel_values, **kwargs)
|
| 419 |
+
intermediate_features = list(zip(backbone_output.feature_maps, backbone_output.cls_tokens))
|
| 420 |
+
|
| 421 |
+
head_output = self.head(intermediate_features, patch_height, patch_width)
|
| 422 |
+
|
| 423 |
+
predicted_depth = self.features_to_depth(head_output)
|
| 424 |
+
predicted_depth = predicted_depth.squeeze(dim=1)
|
| 425 |
+
|
| 426 |
+
return DepthEstimatorOutput(
|
| 427 |
+
loss=loss,
|
| 428 |
+
predicted_depth=predicted_depth,
|
| 429 |
+
hidden_states=backbone_output.hidden_states,
|
| 430 |
+
attentions=backbone_output.attentions,
|
| 431 |
+
)
|
| 432 |
+
|
| 433 |
+
|
| 434 |
+
__all__ = ["CHMv2ForDepthEstimation", "CHMv2PreTrainedModel"]
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/clipseg/configuration_clipseg.py
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 2 |
+
# This file was automatically generated from src/transformers/models/clipseg/modular_clipseg.py.
|
| 3 |
+
# Do NOT edit this file manually as any edits will be overwritten by the generation of
|
| 4 |
+
# the file from the modular. If any change should be done, please apply the change to the
|
| 5 |
+
# modular_clipseg.py file directly. One of our CI enforces this.
|
| 6 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 7 |
+
# Copyright 2022 The OpenAI Team Authors and The HuggingFace Team. All rights reserved.
|
| 8 |
+
#
|
| 9 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 10 |
+
# you may not use this file except in compliance with the License.
|
| 11 |
+
# You may obtain a copy of the License at
|
| 12 |
+
#
|
| 13 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 14 |
+
#
|
| 15 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 16 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 17 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 18 |
+
# See the License for the specific language governing permissions and
|
| 19 |
+
# limitations under the License.
|
| 20 |
+
from huggingface_hub.dataclasses import strict
|
| 21 |
+
|
| 22 |
+
from ...configuration_utils import PreTrainedConfig
|
| 23 |
+
from ...utils import auto_docstring, logging
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
logger = logging.get_logger(__name__)
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
@auto_docstring(checkpoint="CIDAS/clipseg-rd64")
|
| 30 |
+
@strict
|
| 31 |
+
class CLIPSegTextConfig(PreTrainedConfig):
|
| 32 |
+
r"""
|
| 33 |
+
Example:
|
| 34 |
+
|
| 35 |
+
```python
|
| 36 |
+
>>> from transformers import CLIPSegTextConfig, CLIPSegTextModel
|
| 37 |
+
|
| 38 |
+
>>> # Initializing a CLIPSegTextConfig with CIDAS/clipseg-rd64 style configuration
|
| 39 |
+
>>> configuration = CLIPSegTextConfig()
|
| 40 |
+
|
| 41 |
+
>>> # Initializing a CLIPSegTextModel (with random weights) from the CIDAS/clipseg-rd64 style configuration
|
| 42 |
+
>>> model = CLIPSegTextModel(configuration)
|
| 43 |
+
|
| 44 |
+
>>> # Accessing the model configuration
|
| 45 |
+
>>> configuration = model.config
|
| 46 |
+
```"""
|
| 47 |
+
|
| 48 |
+
model_type = "clipseg_text_model"
|
| 49 |
+
base_config_key = "text_config"
|
| 50 |
+
|
| 51 |
+
vocab_size: int = 49408
|
| 52 |
+
hidden_size: int = 512
|
| 53 |
+
intermediate_size: int = 2048
|
| 54 |
+
num_hidden_layers: int = 12
|
| 55 |
+
num_attention_heads: int = 8
|
| 56 |
+
max_position_embeddings: int = 77
|
| 57 |
+
hidden_act: str = "quick_gelu"
|
| 58 |
+
layer_norm_eps: float | None = 1e-5
|
| 59 |
+
attention_dropout: int | float | None = 0.0
|
| 60 |
+
initializer_range: float = 0.02
|
| 61 |
+
initializer_factor: float | None = 1.0
|
| 62 |
+
|
| 63 |
+
# This differs from `CLIPSegTokenizer`'s default and from openai/clipseg
|
| 64 |
+
# See https://github.com/huggingface/transformers/pull/24773#issuecomment-1632287538
|
| 65 |
+
pad_token_id: int | None = 1
|
| 66 |
+
bos_token_id: int | None = 49406
|
| 67 |
+
eos_token_id: int | list[int] | None = 49407
|
| 68 |
+
|
| 69 |
+
def validate_architecture(self):
|
| 70 |
+
"""Part of `@strict`-powered validation. Validates the architecture of the config."""
|
| 71 |
+
if self.hidden_size % self.num_attention_heads != 0:
|
| 72 |
+
raise ValueError(
|
| 73 |
+
f"The hidden size ({self.hidden_size}) is not a multiple of the number of attention "
|
| 74 |
+
f"heads ({self.num_attention_heads})."
|
| 75 |
+
)
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
@auto_docstring(checkpoint="CIDAS/clipseg-rd64")
|
| 79 |
+
@strict
|
| 80 |
+
class CLIPSegVisionConfig(PreTrainedConfig):
|
| 81 |
+
r"""
|
| 82 |
+
Example:
|
| 83 |
+
|
| 84 |
+
```python
|
| 85 |
+
>>> from transformers import CLIPSegVisionConfig, CLIPSegVisionModel
|
| 86 |
+
|
| 87 |
+
>>> # Initializing a CLIPSegVisionConfig with CIDAS/clipseg-rd64 style configuration
|
| 88 |
+
>>> configuration = CLIPSegVisionConfig()
|
| 89 |
+
|
| 90 |
+
>>> # Initializing a CLIPSegVisionModel (with random weights) from the CIDAS/clipseg-rd64 style configuration
|
| 91 |
+
>>> model = CLIPSegVisionModel(configuration)
|
| 92 |
+
|
| 93 |
+
>>> # Accessing the model configuration
|
| 94 |
+
>>> configuration = model.config
|
| 95 |
+
```"""
|
| 96 |
+
|
| 97 |
+
model_type = "clipseg_vision_model"
|
| 98 |
+
base_config_key = "vision_config"
|
| 99 |
+
|
| 100 |
+
hidden_size: int = 768
|
| 101 |
+
intermediate_size: int = 3072
|
| 102 |
+
num_hidden_layers: int = 12
|
| 103 |
+
num_attention_heads: int = 12
|
| 104 |
+
num_channels: int = 3
|
| 105 |
+
image_size: int | list[int] | tuple[int, int] | None = 224
|
| 106 |
+
patch_size: int | list[int] | tuple[int, int] | None = 32
|
| 107 |
+
hidden_act: str = "quick_gelu"
|
| 108 |
+
layer_norm_eps: float = 1e-5
|
| 109 |
+
attention_dropout: int | float | None = 0.0
|
| 110 |
+
initializer_range: float = 0.02
|
| 111 |
+
initializer_factor: float = 1.0
|
| 112 |
+
|
| 113 |
+
def validate_architecture(self):
|
| 114 |
+
"""Part of `@strict`-powered validation. Validates the architecture of the config."""
|
| 115 |
+
if self.hidden_size % self.num_attention_heads != 0:
|
| 116 |
+
raise ValueError(
|
| 117 |
+
f"The hidden size ({self.hidden_size}) is not a multiple of the number of attention "
|
| 118 |
+
f"heads ({self.num_attention_heads})."
|
| 119 |
+
)
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
@auto_docstring(checkpoint="CIDAS/clipseg-rd64")
|
| 123 |
+
@strict
|
| 124 |
+
class CLIPSegConfig(PreTrainedConfig):
|
| 125 |
+
r"""
|
| 126 |
+
extract_layers (`list[int]`, *optional*, defaults to `[3, 6, 9]`):
|
| 127 |
+
Layers to extract when forwarding the query image through the frozen visual backbone of CLIP.
|
| 128 |
+
reduce_dim (`int`, *optional*, defaults to 64):
|
| 129 |
+
Dimensionality to reduce the CLIP vision embedding.
|
| 130 |
+
conditional_layer (`int`, *optional*, defaults to 0):
|
| 131 |
+
The layer to use of the Transformer encoder whose activations will be combined with the condition
|
| 132 |
+
embeddings using FiLM (Feature-wise Linear Modulation). If 0, the last layer is used.
|
| 133 |
+
use_complex_transposed_convolution (`bool`, *optional*, defaults to `False`):
|
| 134 |
+
Whether to use a more complex transposed convolution in the decoder, enabling more fine-grained
|
| 135 |
+
segmentation..
|
| 136 |
+
|
| 137 |
+
Example:
|
| 138 |
+
|
| 139 |
+
```python
|
| 140 |
+
>>> from transformers import CLIPSegConfig, CLIPSegModel
|
| 141 |
+
|
| 142 |
+
>>> # Initializing a CLIPSegConfig with CIDAS/clipseg-rd64 style configuration
|
| 143 |
+
>>> configuration = CLIPSegConfig()
|
| 144 |
+
|
| 145 |
+
>>> # Initializing a CLIPSegModel (with random weights) from the CIDAS/clipseg-rd64 style configuration
|
| 146 |
+
>>> model = CLIPSegModel(configuration)
|
| 147 |
+
|
| 148 |
+
>>> # Accessing the model configuration
|
| 149 |
+
>>> configuration = model.config
|
| 150 |
+
|
| 151 |
+
>>> # We can also initialize a CLIPSegConfig from a CLIPSegTextConfig and a CLIPSegVisionConfig
|
| 152 |
+
|
| 153 |
+
>>> # Initializing a CLIPSegText and CLIPSegVision configuration
|
| 154 |
+
>>> config_text = CLIPSegTextConfig()
|
| 155 |
+
>>> config_vision = CLIPSegVisionConfig()
|
| 156 |
+
|
| 157 |
+
>>> config = CLIPSegConfig(text_config=config_text, vision_config=config_vision)
|
| 158 |
+
```"""
|
| 159 |
+
|
| 160 |
+
model_type = "clipseg"
|
| 161 |
+
sub_configs = {"text_config": CLIPSegTextConfig, "vision_config": CLIPSegVisionConfig}
|
| 162 |
+
|
| 163 |
+
text_config: dict | CLIPSegTextConfig | None = None
|
| 164 |
+
vision_config: dict | CLIPSegVisionConfig | None = None
|
| 165 |
+
projection_dim: int | None = 512
|
| 166 |
+
logit_scale_init_value: float | int | None = 2.6592
|
| 167 |
+
initializer_factor: float | None = 1.0
|
| 168 |
+
|
| 169 |
+
extract_layers: list[int] | tuple[int, ...] = (3, 6, 9)
|
| 170 |
+
reduce_dim: int = 64
|
| 171 |
+
decoder_num_attention_heads: int = 4
|
| 172 |
+
decoder_attention_dropout: float | int = 0.0
|
| 173 |
+
decoder_hidden_act: str = "quick_gelu"
|
| 174 |
+
decoder_intermediate_size: int = 2048
|
| 175 |
+
conditional_layer: int = 0
|
| 176 |
+
use_complex_transposed_convolution: bool = False
|
| 177 |
+
|
| 178 |
+
def __post_init__(self, **kwargs):
|
| 179 |
+
if self.text_config is None:
|
| 180 |
+
text_config = {}
|
| 181 |
+
logger.info("`text_config` is `None`. Initializing the `CLIPSegTextConfig` with default values.")
|
| 182 |
+
elif isinstance(self.text_config, CLIPSegTextConfig):
|
| 183 |
+
text_config = self.text_config.to_dict()
|
| 184 |
+
else:
|
| 185 |
+
text_config = self.text_config
|
| 186 |
+
|
| 187 |
+
if self.vision_config is None:
|
| 188 |
+
vision_config = {}
|
| 189 |
+
logger.info("`vision_config` is `None`. initializing the `CLIPSegVisionConfig` with default values.")
|
| 190 |
+
elif isinstance(self.vision_config, CLIPSegVisionConfig):
|
| 191 |
+
vision_config = self.vision_config.to_dict()
|
| 192 |
+
else:
|
| 193 |
+
vision_config = self.vision_config
|
| 194 |
+
|
| 195 |
+
# For backward compatibility check keyword args
|
| 196 |
+
# Instead of simply assigning `[text|vision]_config_dict` to `[text|vision]_config`, we use the values in
|
| 197 |
+
# `[text|vision]_config_dict` to update the values in `[text|vision]_config`. The values should be same in most
|
| 198 |
+
# cases, but we don't want to break anything regarding `_config_dict` that existed before commit `8827e1b2`.
|
| 199 |
+
text_config_dict = kwargs.pop("text_config_dict", None)
|
| 200 |
+
vision_config_dict = kwargs.pop("vision_config_dict", None)
|
| 201 |
+
|
| 202 |
+
if text_config_dict is not None:
|
| 203 |
+
# This is the complete result when using `text_config_dict`.
|
| 204 |
+
_text_config_dict = CLIPSegTextConfig(**text_config_dict).to_dict()
|
| 205 |
+
|
| 206 |
+
# Give a warning if the values exist in both `_text_config_dict` and `text_config` but being different.
|
| 207 |
+
for key, value in _text_config_dict.items():
|
| 208 |
+
if key in text_config and value != text_config[key] and key != "transformers_version":
|
| 209 |
+
# If specified in `text_config_dict`
|
| 210 |
+
if key in text_config_dict:
|
| 211 |
+
message = (
|
| 212 |
+
f"`{key}` is found in both `text_config_dict` and `text_config` but with different values. "
|
| 213 |
+
f'The value `text_config_dict["{key}"]` will be used instead.'
|
| 214 |
+
)
|
| 215 |
+
# If inferred from default argument values (just to be super careful)
|
| 216 |
+
else:
|
| 217 |
+
message = (
|
| 218 |
+
f"`text_config_dict` is provided which will be used to initialize `CLIPTextConfig`. The "
|
| 219 |
+
f'value `text_config["{key}"]` will be overridden.'
|
| 220 |
+
)
|
| 221 |
+
logger.info(message)
|
| 222 |
+
|
| 223 |
+
# Update all values in `text_config` with the ones in `_text_config_dict`.
|
| 224 |
+
text_config.update(_text_config_dict)
|
| 225 |
+
|
| 226 |
+
if vision_config_dict is not None:
|
| 227 |
+
# This is the complete result when using `vision_config_dict`.
|
| 228 |
+
_vision_config_dict = CLIPSegVisionConfig(**vision_config_dict).to_dict()
|
| 229 |
+
# convert keys to string instead of integer
|
| 230 |
+
if "id2label" in _vision_config_dict:
|
| 231 |
+
_vision_config_dict["id2label"] = {
|
| 232 |
+
str(key): value for key, value in _vision_config_dict["id2label"].items()
|
| 233 |
+
}
|
| 234 |
+
|
| 235 |
+
# Give a warning if the values exist in both `_vision_config_dict` and `vision_config` but being different.
|
| 236 |
+
for key, value in _vision_config_dict.items():
|
| 237 |
+
if key in vision_config and value != vision_config[key] and key != "transformers_version":
|
| 238 |
+
# If specified in `vision_config_dict`
|
| 239 |
+
if key in vision_config_dict:
|
| 240 |
+
message = (
|
| 241 |
+
f"`{key}` is found in both `vision_config_dict` and `vision_config` but with different "
|
| 242 |
+
f'values. The value `vision_config_dict["{key}"]` will be used instead.'
|
| 243 |
+
)
|
| 244 |
+
# If inferred from default argument values (just to be super careful)
|
| 245 |
+
else:
|
| 246 |
+
message = (
|
| 247 |
+
f"`vision_config_dict` is provided which will be used to initialize `CLIPVisionConfig`. "
|
| 248 |
+
f'The value `vision_config["{key}"]` will be overridden.'
|
| 249 |
+
)
|
| 250 |
+
logger.info(message)
|
| 251 |
+
|
| 252 |
+
# Update all values in `vision_config` with the ones in `_vision_config_dict`.
|
| 253 |
+
vision_config.update(_vision_config_dict)
|
| 254 |
+
|
| 255 |
+
# Finally we can convert back our unified text/vision configs to `PretrainedConfig`
|
| 256 |
+
self.text_config = CLIPSegTextConfig(**text_config)
|
| 257 |
+
self.vision_config = CLIPSegVisionConfig(**vision_config)
|
| 258 |
+
|
| 259 |
+
super().__post_init__(**kwargs)
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
__all__ = ["CLIPSegConfig", "CLIPSegTextConfig", "CLIPSegVisionConfig"]
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/clipseg/modular_clipseg.py
ADDED
|
@@ -0,0 +1,681 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
"""PyTorch CLIPSeg model."""
|
| 15 |
+
|
| 16 |
+
import copy
|
| 17 |
+
import math
|
| 18 |
+
from dataclasses import dataclass
|
| 19 |
+
from typing import Any
|
| 20 |
+
|
| 21 |
+
import torch
|
| 22 |
+
from huggingface_hub.dataclasses import strict
|
| 23 |
+
from torch import nn
|
| 24 |
+
|
| 25 |
+
from ... import initialization as init
|
| 26 |
+
from ...modeling_outputs import BaseModelOutputWithPooling
|
| 27 |
+
from ...processing_utils import Unpack
|
| 28 |
+
from ...utils import ModelOutput, TransformersKwargs, auto_docstring
|
| 29 |
+
from ...utils.generic import can_return_tuple, merge_with_config_defaults
|
| 30 |
+
from ...utils.output_capturing import capture_outputs
|
| 31 |
+
from ..clip.configuration_clip import CLIPConfig, CLIPTextConfig, CLIPVisionConfig
|
| 32 |
+
from ..clip.modeling_clip import (
|
| 33 |
+
CLIPMLP,
|
| 34 |
+
CLIPAttention,
|
| 35 |
+
CLIPEncoder,
|
| 36 |
+
CLIPEncoderLayer,
|
| 37 |
+
CLIPModel,
|
| 38 |
+
CLIPOutput,
|
| 39 |
+
CLIPPreTrainedModel,
|
| 40 |
+
CLIPTextEmbeddings,
|
| 41 |
+
CLIPTextModel,
|
| 42 |
+
CLIPVisionEmbeddings,
|
| 43 |
+
CLIPVisionModel,
|
| 44 |
+
)
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
@auto_docstring(checkpoint="CIDAS/clipseg-rd64")
|
| 48 |
+
@strict
|
| 49 |
+
class CLIPSegTextConfig(CLIPTextConfig):
|
| 50 |
+
r"""
|
| 51 |
+
Example:
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
>>> from transformers import CLIPSegTextConfig, CLIPSegTextModel
|
| 55 |
+
|
| 56 |
+
>>> # Initializing a CLIPSegTextConfig with CIDAS/clipseg-rd64 style configuration
|
| 57 |
+
>>> configuration = CLIPSegTextConfig()
|
| 58 |
+
|
| 59 |
+
>>> # Initializing a CLIPSegTextModel (with random weights) from the CIDAS/clipseg-rd64 style configuration
|
| 60 |
+
>>> model = CLIPSegTextModel(configuration)
|
| 61 |
+
|
| 62 |
+
>>> # Accessing the model configuration
|
| 63 |
+
>>> configuration = model.config
|
| 64 |
+
```"""
|
| 65 |
+
|
| 66 |
+
projection_dim = AttributeError()
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
@auto_docstring(checkpoint="CIDAS/clipseg-rd64")
|
| 70 |
+
@strict
|
| 71 |
+
class CLIPSegVisionConfig(CLIPVisionConfig):
|
| 72 |
+
r"""
|
| 73 |
+
Example:
|
| 74 |
+
|
| 75 |
+
```python
|
| 76 |
+
>>> from transformers import CLIPSegVisionConfig, CLIPSegVisionModel
|
| 77 |
+
|
| 78 |
+
>>> # Initializing a CLIPSegVisionConfig with CIDAS/clipseg-rd64 style configuration
|
| 79 |
+
>>> configuration = CLIPSegVisionConfig()
|
| 80 |
+
|
| 81 |
+
>>> # Initializing a CLIPSegVisionModel (with random weights) from the CIDAS/clipseg-rd64 style configuration
|
| 82 |
+
>>> model = CLIPSegVisionModel(configuration)
|
| 83 |
+
|
| 84 |
+
>>> # Accessing the model configuration
|
| 85 |
+
>>> configuration = model.config
|
| 86 |
+
```"""
|
| 87 |
+
|
| 88 |
+
projection_dim = AttributeError()
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
@auto_docstring(checkpoint="CIDAS/clipseg-rd64")
|
| 92 |
+
@strict
|
| 93 |
+
class CLIPSegConfig(CLIPConfig):
|
| 94 |
+
r"""
|
| 95 |
+
extract_layers (`list[int]`, *optional*, defaults to `[3, 6, 9]`):
|
| 96 |
+
Layers to extract when forwarding the query image through the frozen visual backbone of CLIP.
|
| 97 |
+
reduce_dim (`int`, *optional*, defaults to 64):
|
| 98 |
+
Dimensionality to reduce the CLIP vision embedding.
|
| 99 |
+
conditional_layer (`int`, *optional*, defaults to 0):
|
| 100 |
+
The layer to use of the Transformer encoder whose activations will be combined with the condition
|
| 101 |
+
embeddings using FiLM (Feature-wise Linear Modulation). If 0, the last layer is used.
|
| 102 |
+
use_complex_transposed_convolution (`bool`, *optional*, defaults to `False`):
|
| 103 |
+
Whether to use a more complex transposed convolution in the decoder, enabling more fine-grained
|
| 104 |
+
segmentation..
|
| 105 |
+
|
| 106 |
+
Example:
|
| 107 |
+
|
| 108 |
+
```python
|
| 109 |
+
>>> from transformers import CLIPSegConfig, CLIPSegModel
|
| 110 |
+
|
| 111 |
+
>>> # Initializing a CLIPSegConfig with CIDAS/clipseg-rd64 style configuration
|
| 112 |
+
>>> configuration = CLIPSegConfig()
|
| 113 |
+
|
| 114 |
+
>>> # Initializing a CLIPSegModel (with random weights) from the CIDAS/clipseg-rd64 style configuration
|
| 115 |
+
>>> model = CLIPSegModel(configuration)
|
| 116 |
+
|
| 117 |
+
>>> # Accessing the model configuration
|
| 118 |
+
>>> configuration = model.config
|
| 119 |
+
|
| 120 |
+
>>> # We can also initialize a CLIPSegConfig from a CLIPSegTextConfig and a CLIPSegVisionConfig
|
| 121 |
+
|
| 122 |
+
>>> # Initializing a CLIPSegText and CLIPSegVision configuration
|
| 123 |
+
>>> config_text = CLIPSegTextConfig()
|
| 124 |
+
>>> config_vision = CLIPSegVisionConfig()
|
| 125 |
+
|
| 126 |
+
>>> config = CLIPSegConfig(text_config=config_text, vision_config=config_vision)
|
| 127 |
+
```"""
|
| 128 |
+
|
| 129 |
+
extract_layers: list[int] | tuple[int, ...] = (3, 6, 9)
|
| 130 |
+
reduce_dim: int = 64
|
| 131 |
+
decoder_num_attention_heads: int = 4
|
| 132 |
+
decoder_attention_dropout: float | int = 0.0
|
| 133 |
+
decoder_hidden_act: str = "quick_gelu"
|
| 134 |
+
decoder_intermediate_size: int = 2048
|
| 135 |
+
conditional_layer: int = 0
|
| 136 |
+
use_complex_transposed_convolution: bool = False
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
class CLIPSegOutput(CLIPOutput):
|
| 140 |
+
pass
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
@auto_docstring
|
| 144 |
+
@dataclass
|
| 145 |
+
class CLIPSegDecoderOutput(ModelOutput):
|
| 146 |
+
r"""
|
| 147 |
+
logits (`torch.FloatTensor` of shape `(batch_size, height, width)`):
|
| 148 |
+
Classification scores for each pixel.
|
| 149 |
+
hidden_states (`tuple(torch.FloatTensor)`, *optional*,):
|
| 150 |
+
Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.
|
| 151 |
+
Rreturned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`
|
| 152 |
+
attentions (`tuple(torch.FloatTensor)`, *optional*):
|
| 153 |
+
Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
|
| 154 |
+
heads. Returned when `output_attentions=True` is passed or when `config.output_attentions=True`
|
| 155 |
+
"""
|
| 156 |
+
|
| 157 |
+
logits: torch.FloatTensor | None = None
|
| 158 |
+
hidden_states: tuple[torch.FloatTensor, ...] | None = None
|
| 159 |
+
attentions: tuple[torch.FloatTensor, ...] | None = None
|
| 160 |
+
|
| 161 |
+
|
| 162 |
+
@auto_docstring
|
| 163 |
+
@dataclass
|
| 164 |
+
class CLIPSegImageSegmentationOutput(ModelOutput):
|
| 165 |
+
r"""
|
| 166 |
+
loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
|
| 167 |
+
Binary cross entropy loss for segmentation.
|
| 168 |
+
logits (`torch.FloatTensor` of shape `(batch_size, height, width)`):
|
| 169 |
+
Classification scores for each pixel.
|
| 170 |
+
conditional_embeddings (`torch.FloatTensor` of shape `(batch_size, projection_dim)`):
|
| 171 |
+
Conditional embeddings used for segmentation.
|
| 172 |
+
pooled_output (`torch.FloatTensor` of shape `(batch_size, embed_dim)`):
|
| 173 |
+
Pooled output of the [`CLIPSegVisionModel`].
|
| 174 |
+
vision_model_output (`BaseModelOutputWithPooling`):
|
| 175 |
+
The output of the [`CLIPSegVisionModel`].
|
| 176 |
+
decoder_output (`CLIPSegDecoderOutput`):
|
| 177 |
+
The output of the [`CLIPSegDecoder`].
|
| 178 |
+
"""
|
| 179 |
+
|
| 180 |
+
loss: torch.FloatTensor | None = None
|
| 181 |
+
logits: torch.FloatTensor | None = None
|
| 182 |
+
conditional_embeddings: torch.FloatTensor | None = None
|
| 183 |
+
pooled_output: torch.FloatTensor | None = None
|
| 184 |
+
vision_model_output: BaseModelOutputWithPooling = None
|
| 185 |
+
decoder_output: CLIPSegDecoderOutput = None
|
| 186 |
+
|
| 187 |
+
def to_tuple(self) -> tuple[Any]:
|
| 188 |
+
return tuple(v.to_tuple() if isinstance(v, ModelOutput) else v for v in self.values())
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
class CLIPSegVisionEmbeddings(CLIPVisionEmbeddings):
|
| 192 |
+
# Different default for `interpolate_pos_encoding` from CLIP
|
| 193 |
+
def forward(self, pixel_values: torch.FloatTensor, interpolate_pos_encoding=True) -> torch.Tensor:
|
| 194 |
+
super().forward(pixel_values, interpolate_pos_encoding)
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
class CLIPSegTextEmbeddings(CLIPTextEmbeddings):
|
| 198 |
+
pass
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
class CLIPSegAttention(CLIPAttention):
|
| 202 |
+
pass
|
| 203 |
+
|
| 204 |
+
|
| 205 |
+
class CLIPSegMLP(CLIPMLP):
|
| 206 |
+
pass
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
class CLIPSegEncoderLayer(CLIPEncoderLayer):
|
| 210 |
+
pass
|
| 211 |
+
|
| 212 |
+
|
| 213 |
+
class CLIPSegDecoderLayer(CLIPEncoderLayer):
|
| 214 |
+
"""
|
| 215 |
+
CLIPSeg decoder layer, which is identical to `CLIPSegEncoderLayer`, except that normalization is applied after
|
| 216 |
+
self-attention/MLP, rather than before.
|
| 217 |
+
"""
|
| 218 |
+
|
| 219 |
+
def forward(
|
| 220 |
+
self,
|
| 221 |
+
hidden_states: torch.Tensor,
|
| 222 |
+
attention_mask: torch.Tensor,
|
| 223 |
+
**kwargs,
|
| 224 |
+
) -> tuple[torch.FloatTensor]:
|
| 225 |
+
residual = hidden_states
|
| 226 |
+
|
| 227 |
+
hidden_states, _ = self.self_attn(
|
| 228 |
+
hidden_states=hidden_states,
|
| 229 |
+
attention_mask=attention_mask,
|
| 230 |
+
**kwargs,
|
| 231 |
+
)
|
| 232 |
+
|
| 233 |
+
hidden_states = residual + hidden_states
|
| 234 |
+
hidden_states = self.layer_norm1(hidden_states)
|
| 235 |
+
|
| 236 |
+
residual = hidden_states
|
| 237 |
+
hidden_states = self.mlp(hidden_states)
|
| 238 |
+
hidden_states = residual + hidden_states
|
| 239 |
+
hidden_states = self.layer_norm2(hidden_states)
|
| 240 |
+
|
| 241 |
+
return hidden_states
|
| 242 |
+
|
| 243 |
+
|
| 244 |
+
@auto_docstring
|
| 245 |
+
class CLIPSegPreTrainedModel(CLIPPreTrainedModel):
|
| 246 |
+
_can_record_outputs = {
|
| 247 |
+
"hidden_states": [CLIPSegEncoderLayer, CLIPSegDecoderLayer],
|
| 248 |
+
"attentions": CLIPSegAttention,
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
@torch.no_grad()
|
| 252 |
+
def _init_weights(self, module):
|
| 253 |
+
"""Initialize the weights"""
|
| 254 |
+
factor = self.config.initializer_factor
|
| 255 |
+
if isinstance(module, CLIPSegTextEmbeddings):
|
| 256 |
+
init.normal_(module.token_embedding.weight, mean=0.0, std=factor * 0.02)
|
| 257 |
+
init.normal_(module.position_embedding.weight, mean=0.0, std=factor * 0.02)
|
| 258 |
+
init.copy_(module.position_ids, torch.arange(module.position_ids.shape[-1]).expand((1, -1)))
|
| 259 |
+
elif isinstance(module, CLIPSegVisionEmbeddings):
|
| 260 |
+
init.normal_(module.class_embedding, mean=0.0, std=module.embed_dim**-0.5 * factor)
|
| 261 |
+
init.normal_(module.patch_embedding.weight, std=module.config.initializer_range * factor)
|
| 262 |
+
init.normal_(module.position_embedding.weight, std=module.config.initializer_range * factor)
|
| 263 |
+
init.copy_(module.position_ids, torch.arange(module.num_positions).expand((1, -1)))
|
| 264 |
+
elif isinstance(module, CLIPSegAttention):
|
| 265 |
+
in_proj_std = (module.embed_dim**-0.5) * ((2 * module.config.num_hidden_layers) ** -0.5) * factor
|
| 266 |
+
out_proj_std = (module.embed_dim**-0.5) * factor
|
| 267 |
+
init.normal_(module.q_proj.weight, std=in_proj_std)
|
| 268 |
+
init.normal_(module.k_proj.weight, std=in_proj_std)
|
| 269 |
+
init.normal_(module.v_proj.weight, std=in_proj_std)
|
| 270 |
+
init.normal_(module.out_proj.weight, std=out_proj_std)
|
| 271 |
+
elif isinstance(module, CLIPSegMLP):
|
| 272 |
+
in_proj_std = (module.config.hidden_size**-0.5) * ((2 * module.config.num_hidden_layers) ** -0.5) * factor
|
| 273 |
+
fc_std = (2 * module.config.hidden_size) ** -0.5 * factor
|
| 274 |
+
init.normal_(module.fc1.weight, std=fc_std)
|
| 275 |
+
init.normal_(module.fc2.weight, std=in_proj_std)
|
| 276 |
+
elif isinstance(module, CLIPSegModel):
|
| 277 |
+
init.normal_(
|
| 278 |
+
module.text_projection.weight,
|
| 279 |
+
std=module.text_embed_dim**-0.5 * factor,
|
| 280 |
+
)
|
| 281 |
+
init.normal_(
|
| 282 |
+
module.visual_projection.weight,
|
| 283 |
+
std=module.vision_embed_dim**-0.5 * factor,
|
| 284 |
+
)
|
| 285 |
+
|
| 286 |
+
if isinstance(module, nn.LayerNorm):
|
| 287 |
+
init.zeros_(module.bias)
|
| 288 |
+
init.ones_(module.weight)
|
| 289 |
+
if isinstance(module, nn.Linear) and module.bias is not None:
|
| 290 |
+
init.zeros_(module.bias)
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
class CLIPSegEncoder(CLIPEncoder):
|
| 294 |
+
pass
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
class CLIPSegDecoder(CLIPSegPreTrainedModel):
|
| 298 |
+
def __init__(self, config: CLIPSegConfig):
|
| 299 |
+
super().__init__(config)
|
| 300 |
+
|
| 301 |
+
self.conditional_layer = config.conditional_layer
|
| 302 |
+
|
| 303 |
+
self.film_mul = nn.Linear(config.projection_dim, config.reduce_dim)
|
| 304 |
+
self.film_add = nn.Linear(config.projection_dim, config.reduce_dim)
|
| 305 |
+
|
| 306 |
+
if config.use_complex_transposed_convolution:
|
| 307 |
+
transposed_kernels = (config.vision_config.patch_size // 4, config.vision_config.patch_size // 4)
|
| 308 |
+
|
| 309 |
+
self.transposed_convolution = nn.Sequential(
|
| 310 |
+
nn.Conv2d(config.reduce_dim, config.reduce_dim, kernel_size=3, padding=1),
|
| 311 |
+
nn.ReLU(),
|
| 312 |
+
nn.ConvTranspose2d(
|
| 313 |
+
config.reduce_dim,
|
| 314 |
+
config.reduce_dim // 2,
|
| 315 |
+
kernel_size=transposed_kernels[0],
|
| 316 |
+
stride=transposed_kernels[0],
|
| 317 |
+
),
|
| 318 |
+
nn.ReLU(),
|
| 319 |
+
nn.ConvTranspose2d(
|
| 320 |
+
config.reduce_dim // 2, 1, kernel_size=transposed_kernels[1], stride=transposed_kernels[1]
|
| 321 |
+
),
|
| 322 |
+
)
|
| 323 |
+
else:
|
| 324 |
+
self.transposed_convolution = nn.ConvTranspose2d(
|
| 325 |
+
config.reduce_dim, 1, config.vision_config.patch_size, stride=config.vision_config.patch_size
|
| 326 |
+
)
|
| 327 |
+
|
| 328 |
+
depth = len(config.extract_layers)
|
| 329 |
+
self.reduces = nn.ModuleList(
|
| 330 |
+
[nn.Linear(config.vision_config.hidden_size, config.reduce_dim) for _ in range(depth)]
|
| 331 |
+
)
|
| 332 |
+
|
| 333 |
+
decoder_config = copy.deepcopy(config.vision_config)
|
| 334 |
+
decoder_config.hidden_size = config.reduce_dim
|
| 335 |
+
decoder_config.num_attention_heads = config.decoder_num_attention_heads
|
| 336 |
+
decoder_config.intermediate_size = config.decoder_intermediate_size
|
| 337 |
+
decoder_config.hidden_act = "relu"
|
| 338 |
+
self.layers = nn.ModuleList([CLIPSegDecoderLayer(decoder_config) for _ in range(len(config.extract_layers))])
|
| 339 |
+
|
| 340 |
+
self.post_init()
|
| 341 |
+
|
| 342 |
+
@merge_with_config_defaults
|
| 343 |
+
@capture_outputs
|
| 344 |
+
@auto_docstring
|
| 345 |
+
def forward(
|
| 346 |
+
self,
|
| 347 |
+
hidden_states: tuple[torch.Tensor],
|
| 348 |
+
conditional_embeddings: torch.Tensor,
|
| 349 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 350 |
+
) -> CLIPSegDecoderOutput:
|
| 351 |
+
r"""
|
| 352 |
+
conditional_embeddings (`torch.FloatTensor` of shape `(batch_size, config.projection_dim)`, *optional*):
|
| 353 |
+
The conditional embeddings for the query images. If provided, the model will use this instead of computing
|
| 354 |
+
the embeddings from the conditional_pixel_values.
|
| 355 |
+
"""
|
| 356 |
+
activations = hidden_states[::-1]
|
| 357 |
+
|
| 358 |
+
output = None
|
| 359 |
+
for i, (activation, layer, reduce) in enumerate(zip(activations, self.layers, self.reduces)):
|
| 360 |
+
if output is not None:
|
| 361 |
+
output = reduce(activation) + output
|
| 362 |
+
else:
|
| 363 |
+
output = reduce(activation)
|
| 364 |
+
|
| 365 |
+
if i == self.conditional_layer:
|
| 366 |
+
output = self.film_mul(conditional_embeddings) * output.permute(1, 0, 2) + self.film_add(
|
| 367 |
+
conditional_embeddings
|
| 368 |
+
)
|
| 369 |
+
output = output.permute(1, 0, 2)
|
| 370 |
+
|
| 371 |
+
output = layer(output, attention_mask=None, **kwargs)
|
| 372 |
+
|
| 373 |
+
output = output[:, 1:, :].transpose(1, 2) # remove cls token and reshape to [batch_size, reduce_dim, seq_len]
|
| 374 |
+
|
| 375 |
+
size = int(math.sqrt(output.shape[2]))
|
| 376 |
+
|
| 377 |
+
batch_size = conditional_embeddings.shape[0]
|
| 378 |
+
output = output.view(batch_size, output.shape[1], size, size)
|
| 379 |
+
|
| 380 |
+
logits = self.transposed_convolution(output).squeeze(1)
|
| 381 |
+
|
| 382 |
+
return CLIPSegDecoderOutput(logits=logits)
|
| 383 |
+
|
| 384 |
+
|
| 385 |
+
class CLIPSegTextModel(CLIPTextModel):
|
| 386 |
+
def forward(self, **super_kwargs) -> tuple | BaseModelOutputWithPooling:
|
| 387 |
+
r"""
|
| 388 |
+
Examples:
|
| 389 |
+
|
| 390 |
+
```python
|
| 391 |
+
>>> from transformers import AutoTokenizer, CLIPSegTextModel
|
| 392 |
+
|
| 393 |
+
>>> tokenizer = AutoTokenizer.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 394 |
+
>>> model = CLIPSegTextModel.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 395 |
+
|
| 396 |
+
>>> inputs = tokenizer(["a photo of a cat", "a photo of a dog"], padding=True, return_tensors="pt")
|
| 397 |
+
|
| 398 |
+
>>> outputs = model(**inputs)
|
| 399 |
+
>>> last_hidden_state = outputs.last_hidden_state
|
| 400 |
+
>>> pooled_output = outputs.pooler_output # pooled (EOS token) states
|
| 401 |
+
```"""
|
| 402 |
+
return super().forward(**super_kwargs)
|
| 403 |
+
|
| 404 |
+
|
| 405 |
+
class CLIPSegVisionModel(CLIPVisionModel):
|
| 406 |
+
def forward(
|
| 407 |
+
self,
|
| 408 |
+
pixel_values: torch.FloatTensor | None,
|
| 409 |
+
interpolate_pos_encoding: bool | None = True,
|
| 410 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 411 |
+
) -> tuple | BaseModelOutputWithPooling:
|
| 412 |
+
r"""
|
| 413 |
+
Examples:
|
| 414 |
+
|
| 415 |
+
```python
|
| 416 |
+
>>> import httpx
|
| 417 |
+
>>> from io import BytesIO
|
| 418 |
+
>>> from PIL import Image
|
| 419 |
+
>>> from transformers import AutoProcessor, CLIPSegVisionModel
|
| 420 |
+
|
| 421 |
+
>>> processor = AutoProcessor.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 422 |
+
>>> model = CLIPSegVisionModel.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 423 |
+
|
| 424 |
+
>>> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 425 |
+
>>> with httpx.stream("GET", url) as response:
|
| 426 |
+
... image = Image.open(BytesIO(response.read()))
|
| 427 |
+
|
| 428 |
+
>>> inputs = processor(images=image, return_tensors="pt")
|
| 429 |
+
|
| 430 |
+
>>> outputs = model(**inputs)
|
| 431 |
+
>>> last_hidden_state = outputs.last_hidden_state
|
| 432 |
+
>>> pooled_output = outputs.pooler_output # pooled CLS states
|
| 433 |
+
```"""
|
| 434 |
+
return super().forward(pixel_values, interpolate_pos_encoding, **kwargs)
|
| 435 |
+
|
| 436 |
+
|
| 437 |
+
class CLIPSegModel(CLIPModel):
|
| 438 |
+
def get_text_features(self, **super_kwargs):
|
| 439 |
+
r"""
|
| 440 |
+
Examples:
|
| 441 |
+
|
| 442 |
+
```python
|
| 443 |
+
>>> import torch
|
| 444 |
+
>>> from transformers import AutoTokenizer, CLIPSegModel
|
| 445 |
+
|
| 446 |
+
>>> tokenizer = AutoTokenizer.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 447 |
+
>>> model = CLIPSegModel.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 448 |
+
|
| 449 |
+
>>> inputs = tokenizer(["a photo of a cat", "a photo of a dog"], padding=True, return_tensors="pt")
|
| 450 |
+
>>> with torch.inference_mode():
|
| 451 |
+
... text_features = model.get_text_features(**inputs)
|
| 452 |
+
```"""
|
| 453 |
+
return super().get_text_features(**super_kwargs)
|
| 454 |
+
|
| 455 |
+
def get_image_features(
|
| 456 |
+
self,
|
| 457 |
+
pixel_values: torch.FloatTensor,
|
| 458 |
+
interpolate_pos_encoding: bool = True,
|
| 459 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 460 |
+
) -> tuple | BaseModelOutputWithPooling:
|
| 461 |
+
r"""
|
| 462 |
+
Examples:
|
| 463 |
+
|
| 464 |
+
```python
|
| 465 |
+
>>> import torch
|
| 466 |
+
>>> from transformers import AutoProcessor, CLIPSegModel
|
| 467 |
+
>>> from transformers.image_utils import load_image
|
| 468 |
+
|
| 469 |
+
>>> processor = AutoProcessor.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 470 |
+
>>> model = CLIPSegModel.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 471 |
+
|
| 472 |
+
>>> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 473 |
+
>>> image = load_image(url)
|
| 474 |
+
|
| 475 |
+
>>> inputs = processor(images=image, return_tensors="pt")
|
| 476 |
+
|
| 477 |
+
>>> with torch.inference_mode():
|
| 478 |
+
... image_features = model.get_image_features(**inputs)
|
| 479 |
+
```"""
|
| 480 |
+
return super().get_image_features(pixel_values, interpolate_pos_encoding, **kwargs)
|
| 481 |
+
|
| 482 |
+
def forward(self, interpolate_pos_encoding: bool = True, **super_kwargs):
|
| 483 |
+
r"""
|
| 484 |
+
return_loss (`bool`, *optional*):
|
| 485 |
+
Whether or not to return the contrastive loss.
|
| 486 |
+
|
| 487 |
+
Examples:
|
| 488 |
+
|
| 489 |
+
```python
|
| 490 |
+
>>> import torch
|
| 491 |
+
>>> from transformers import AutoProcessor, CLIPSegModel
|
| 492 |
+
>>> from transformers.image_utils import load_image
|
| 493 |
+
|
| 494 |
+
>>> processor = AutoProcessor.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 495 |
+
>>> model = CLIPSegModel.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 496 |
+
|
| 497 |
+
>>> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 498 |
+
>>> image = load_image(url)
|
| 499 |
+
|
| 500 |
+
>>> inputs = processor(
|
| 501 |
+
... text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="pt", padding=True
|
| 502 |
+
... )
|
| 503 |
+
|
| 504 |
+
>>> with torch.inference_mode():
|
| 505 |
+
... outputs = model(**inputs)
|
| 506 |
+
>>> logits_per_image = outputs.logits_per_image # this is the image-text similarity score
|
| 507 |
+
>>> probs = logits_per_image.softmax(dim=1) # we can take the softmax to get the label probabilities
|
| 508 |
+
```"""
|
| 509 |
+
super().forward(interpolate_pos_encoding=interpolate_pos_encoding, **super_kwargs)
|
| 510 |
+
|
| 511 |
+
|
| 512 |
+
@auto_docstring(
|
| 513 |
+
custom_intro="""
|
| 514 |
+
CLIPSeg model with a Transformer-based decoder on top for zero-shot and one-shot image segmentation.
|
| 515 |
+
"""
|
| 516 |
+
)
|
| 517 |
+
class CLIPSegForImageSegmentation(CLIPSegPreTrainedModel):
|
| 518 |
+
config: CLIPSegConfig
|
| 519 |
+
|
| 520 |
+
def __init__(self, config: CLIPSegConfig):
|
| 521 |
+
super().__init__(config)
|
| 522 |
+
self.clip = CLIPSegModel(config)
|
| 523 |
+
self.extract_layers = config.extract_layers
|
| 524 |
+
self.decoder = CLIPSegDecoder(config)
|
| 525 |
+
|
| 526 |
+
self.post_init()
|
| 527 |
+
|
| 528 |
+
def get_conditional_embeddings(
|
| 529 |
+
self,
|
| 530 |
+
batch_size: int | None = None,
|
| 531 |
+
input_ids: torch.Tensor | None = None,
|
| 532 |
+
attention_mask: torch.Tensor | None = None,
|
| 533 |
+
position_ids: torch.Tensor | None = None,
|
| 534 |
+
conditional_pixel_values: torch.Tensor | None = None,
|
| 535 |
+
) -> torch.FloatTensor:
|
| 536 |
+
if input_ids is not None:
|
| 537 |
+
# compute conditional embeddings from texts
|
| 538 |
+
if len(input_ids) != batch_size:
|
| 539 |
+
raise ValueError("Make sure to pass as many prompt texts as there are query images")
|
| 540 |
+
with torch.no_grad():
|
| 541 |
+
conditional_embeddings = self.clip.get_text_features(
|
| 542 |
+
input_ids, attention_mask=attention_mask, position_ids=position_ids
|
| 543 |
+
).pooler_output
|
| 544 |
+
elif conditional_pixel_values is not None:
|
| 545 |
+
# compute conditional embeddings from images
|
| 546 |
+
if len(conditional_pixel_values) != batch_size:
|
| 547 |
+
raise ValueError("Make sure to pass as many prompt images as there are query images")
|
| 548 |
+
with torch.no_grad():
|
| 549 |
+
conditional_embeddings = self.clip.get_image_features(conditional_pixel_values).pooler_output
|
| 550 |
+
else:
|
| 551 |
+
raise ValueError(
|
| 552 |
+
"Invalid conditional, should be either provided as `input_ids` or `conditional_pixel_values`"
|
| 553 |
+
)
|
| 554 |
+
|
| 555 |
+
return conditional_embeddings
|
| 556 |
+
|
| 557 |
+
@can_return_tuple
|
| 558 |
+
@auto_docstring
|
| 559 |
+
def forward(
|
| 560 |
+
self,
|
| 561 |
+
input_ids: torch.FloatTensor | None = None,
|
| 562 |
+
pixel_values: torch.FloatTensor | None = None,
|
| 563 |
+
conditional_pixel_values: torch.FloatTensor | None = None,
|
| 564 |
+
conditional_embeddings: torch.FloatTensor | None = None,
|
| 565 |
+
attention_mask: torch.Tensor | None = None,
|
| 566 |
+
position_ids: torch.LongTensor | None = None,
|
| 567 |
+
labels: torch.LongTensor | None = None,
|
| 568 |
+
interpolate_pos_encoding: bool = True,
|
| 569 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 570 |
+
) -> tuple | CLIPSegOutput:
|
| 571 |
+
r"""
|
| 572 |
+
conditional_pixel_values (`torch.FloatTensor`, *optional*):
|
| 573 |
+
The pixel values of the conditional images.
|
| 574 |
+
conditional_embeddings (`torch.FloatTensor` of shape `(batch_size, config.projection_dim)`, *optional*):
|
| 575 |
+
The conditional embeddings for the query images. If provided, the model will use this instead of computing
|
| 576 |
+
the embeddings from the conditional_pixel_values.
|
| 577 |
+
labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*):
|
| 578 |
+
Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,
|
| 579 |
+
config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
|
| 580 |
+
`config.num_labels > 1` a classification loss is computed (Cross-Entropy).
|
| 581 |
+
|
| 582 |
+
Examples:
|
| 583 |
+
|
| 584 |
+
```python
|
| 585 |
+
>>> import torch
|
| 586 |
+
>>> from transformers import AutoProcessor, CLIPSegForImageSegmentation
|
| 587 |
+
>>> from transformers.image_utils import load_image
|
| 588 |
+
|
| 589 |
+
>>> processor = AutoProcessor.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 590 |
+
>>> model = CLIPSegForImageSegmentation.from_pretrained("CIDAS/clipseg-rd64-refined")
|
| 591 |
+
|
| 592 |
+
>>> url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 593 |
+
>>> image = load_image(url)
|
| 594 |
+
|
| 595 |
+
>>> texts = ["a cat", "a remote", "a blanket"]
|
| 596 |
+
>>> inputs = processor(text=texts, images=[image] * len(texts), padding=True, return_tensors="pt")
|
| 597 |
+
|
| 598 |
+
>>> with torch.inference_mode():
|
| 599 |
+
... outputs = model(**inputs)
|
| 600 |
+
|
| 601 |
+
>>> logits = outputs.logits
|
| 602 |
+
>>> print(logits.shape)
|
| 603 |
+
torch.Size([3, 352, 352])
|
| 604 |
+
```"""
|
| 605 |
+
# step 1: forward the query images through the frozen CLIP vision encoder
|
| 606 |
+
with torch.no_grad():
|
| 607 |
+
kwargs["output_hidden_states"] = True # required to extract layers for the stages
|
| 608 |
+
vision_outputs = self.clip.get_image_features(
|
| 609 |
+
pixel_values=pixel_values,
|
| 610 |
+
interpolate_pos_encoding=interpolate_pos_encoding,
|
| 611 |
+
**kwargs,
|
| 612 |
+
)
|
| 613 |
+
pooled_output = vision_outputs.pooler_output
|
| 614 |
+
|
| 615 |
+
hidden_states = vision_outputs.hidden_states
|
| 616 |
+
# we add +1 here as the hidden states also include the initial embeddings
|
| 617 |
+
activations = [hidden_states[i + 1] for i in self.extract_layers]
|
| 618 |
+
|
| 619 |
+
# update vision_outputs
|
| 620 |
+
vision_outputs = BaseModelOutputWithPooling(
|
| 621 |
+
last_hidden_state=vision_outputs.last_hidden_state,
|
| 622 |
+
pooler_output=vision_outputs.pooler_output,
|
| 623 |
+
hidden_states=vision_outputs.hidden_states,
|
| 624 |
+
attentions=vision_outputs.attentions,
|
| 625 |
+
)
|
| 626 |
+
|
| 627 |
+
# step 2: compute conditional embeddings, either from text, images or an own provided embedding
|
| 628 |
+
if conditional_embeddings is None:
|
| 629 |
+
conditional_embeddings = self.get_conditional_embeddings(
|
| 630 |
+
batch_size=pixel_values.shape[0],
|
| 631 |
+
input_ids=input_ids,
|
| 632 |
+
attention_mask=attention_mask,
|
| 633 |
+
position_ids=position_ids,
|
| 634 |
+
conditional_pixel_values=conditional_pixel_values,
|
| 635 |
+
)
|
| 636 |
+
else:
|
| 637 |
+
if conditional_embeddings.shape[0] != pixel_values.shape[0]:
|
| 638 |
+
raise ValueError(
|
| 639 |
+
"Make sure to pass as many conditional embeddings as there are query images in the batch"
|
| 640 |
+
)
|
| 641 |
+
if conditional_embeddings.shape[1] != self.config.projection_dim:
|
| 642 |
+
raise ValueError(
|
| 643 |
+
"Make sure that the feature dimension of the conditional embeddings matches"
|
| 644 |
+
" `config.projection_dim`."
|
| 645 |
+
)
|
| 646 |
+
|
| 647 |
+
# step 3: forward both the pooled output and the activations through the lightweight decoder to predict masks
|
| 648 |
+
decoder_outputs = self.decoder(
|
| 649 |
+
activations,
|
| 650 |
+
conditional_embeddings,
|
| 651 |
+
**kwargs,
|
| 652 |
+
)
|
| 653 |
+
logits = decoder_outputs.logits
|
| 654 |
+
|
| 655 |
+
loss = None
|
| 656 |
+
if labels is not None:
|
| 657 |
+
# move labels to the correct device to enable PP
|
| 658 |
+
labels = labels.to(logits.device)
|
| 659 |
+
loss_fn = nn.BCEWithLogitsLoss()
|
| 660 |
+
loss = loss_fn(logits, labels)
|
| 661 |
+
|
| 662 |
+
return CLIPSegImageSegmentationOutput(
|
| 663 |
+
loss=loss,
|
| 664 |
+
logits=logits,
|
| 665 |
+
conditional_embeddings=conditional_embeddings,
|
| 666 |
+
pooled_output=pooled_output,
|
| 667 |
+
vision_model_output=vision_outputs,
|
| 668 |
+
decoder_output=decoder_outputs,
|
| 669 |
+
)
|
| 670 |
+
|
| 671 |
+
|
| 672 |
+
__all__ = [
|
| 673 |
+
"CLIPSegConfig",
|
| 674 |
+
"CLIPSegTextConfig",
|
| 675 |
+
"CLIPSegVisionConfig",
|
| 676 |
+
"CLIPSegModel",
|
| 677 |
+
"CLIPSegPreTrainedModel",
|
| 678 |
+
"CLIPSegTextModel",
|
| 679 |
+
"CLIPSegVisionModel",
|
| 680 |
+
"CLIPSegForImageSegmentation",
|
| 681 |
+
]
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/clipseg/processing_clipseg.py
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2022 The HuggingFace Inc. team.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
"""
|
| 15 |
+
Image/Text processor class for CLIPSeg
|
| 16 |
+
"""
|
| 17 |
+
|
| 18 |
+
from ...processing_utils import ProcessorMixin
|
| 19 |
+
from ...tokenization_utils_base import BatchEncoding
|
| 20 |
+
from ...utils import auto_docstring
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
@auto_docstring
|
| 24 |
+
class CLIPSegProcessor(ProcessorMixin):
|
| 25 |
+
def __init__(self, image_processor=None, tokenizer=None, **kwargs):
|
| 26 |
+
super().__init__(image_processor, tokenizer)
|
| 27 |
+
|
| 28 |
+
@auto_docstring
|
| 29 |
+
def __call__(self, text=None, images=None, visual_prompt=None, return_tensors=None, **kwargs):
|
| 30 |
+
r"""
|
| 31 |
+
visual_prompt (`PIL.Image.Image`, `np.ndarray`, `torch.Tensor`, `list[PIL.Image.Image]`, `list[np.ndarray]`, `list[torch.Tensor]`):
|
| 32 |
+
The visual prompt image or batch of images to be prepared. Each visual prompt image can be a PIL image,
|
| 33 |
+
NumPy array or PyTorch tensor. In case of a NumPy array/PyTorch tensor, each image should be of shape
|
| 34 |
+
(C, H, W), where C is a number of channels, H and W are image height and width.
|
| 35 |
+
|
| 36 |
+
Returns:
|
| 37 |
+
[`BatchEncoding`]: A [`BatchEncoding`] with the following fields:
|
| 38 |
+
|
| 39 |
+
- **input_ids** -- List of token ids to be fed to a model. Returned when `text` is not `None`.
|
| 40 |
+
- **attention_mask** -- List of indices specifying which tokens should be attended to by the model (when
|
| 41 |
+
`return_attention_mask=True` or if *"attention_mask"* is in `self.model_input_names` and if `text` is not
|
| 42 |
+
`None`).
|
| 43 |
+
- **pixel_values** -- Pixel values to be fed to a model. Returned when `images` is not `None`.
|
| 44 |
+
"""
|
| 45 |
+
if text is None and visual_prompt is None and images is None:
|
| 46 |
+
raise ValueError("You have to specify either text, visual prompt or images.")
|
| 47 |
+
|
| 48 |
+
if text is not None and visual_prompt is not None:
|
| 49 |
+
raise ValueError("You have to specify exactly one type of prompt. Either text or visual prompt.")
|
| 50 |
+
|
| 51 |
+
output_kwargs = self._merge_kwargs(
|
| 52 |
+
self.valid_processor_kwargs, tokenizer_init_kwargs=self.tokenizer.init_kwargs, **kwargs
|
| 53 |
+
)
|
| 54 |
+
|
| 55 |
+
if text is not None:
|
| 56 |
+
encoding = self.tokenizer(text, return_tensors=return_tensors, **output_kwargs["text_kwargs"])
|
| 57 |
+
|
| 58 |
+
if visual_prompt is not None:
|
| 59 |
+
prompt_features = self.image_processor(
|
| 60 |
+
visual_prompt, return_tensors=return_tensors, **output_kwargs["images_kwargs"]
|
| 61 |
+
)
|
| 62 |
+
|
| 63 |
+
if images is not None:
|
| 64 |
+
image_features = self.image_processor(
|
| 65 |
+
images, return_tensors=return_tensors, **output_kwargs["images_kwargs"]
|
| 66 |
+
)
|
| 67 |
+
|
| 68 |
+
if visual_prompt is not None and images is not None:
|
| 69 |
+
encoding = {
|
| 70 |
+
"pixel_values": image_features.pixel_values,
|
| 71 |
+
"conditional_pixel_values": prompt_features.pixel_values,
|
| 72 |
+
}
|
| 73 |
+
return encoding
|
| 74 |
+
elif text is not None and images is not None:
|
| 75 |
+
encoding["pixel_values"] = image_features.pixel_values
|
| 76 |
+
return encoding
|
| 77 |
+
elif text is not None:
|
| 78 |
+
return encoding
|
| 79 |
+
elif visual_prompt is not None:
|
| 80 |
+
encoding = {
|
| 81 |
+
"conditional_pixel_values": prompt_features.pixel_values,
|
| 82 |
+
}
|
| 83 |
+
return encoding
|
| 84 |
+
else:
|
| 85 |
+
return BatchEncoding(data=dict(**image_features), tensor_type=return_tensors)
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
__all__ = ["CLIPSegProcessor"]
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/ernie4_5_vl_moe/image_processing_pil_ernie4_5_vl_moe.py
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 2 |
+
# This file was automatically generated from src/transformers/models/ernie4_5_vl_moe/modular_ernie4_5_vl_moe.py.
|
| 3 |
+
# Do NOT edit this file manually as any edits will be overwritten by the generation of
|
| 4 |
+
# the file from the modular. If any change should be done, please apply the change to the
|
| 5 |
+
# modular_ernie4_5_vl_moe.py file directly. One of our CI enforces this.
|
| 6 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 7 |
+
# Copyright 2025 Baidu and HuggingFace Inc. team. All rights reserved.
|
| 8 |
+
#
|
| 9 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 10 |
+
# you may not use this file except in compliance with the License.
|
| 11 |
+
# You may obtain a copy of the License at
|
| 12 |
+
#
|
| 13 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 14 |
+
#
|
| 15 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 16 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 17 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 18 |
+
# See the License for the specific language governing permissions and
|
| 19 |
+
# limitations under the License.
|
| 20 |
+
|
| 21 |
+
import math
|
| 22 |
+
|
| 23 |
+
import numpy as np
|
| 24 |
+
|
| 25 |
+
from ...image_processing_backends import PilBackend
|
| 26 |
+
from ...image_processing_utils import BatchFeature
|
| 27 |
+
from ...image_utils import OPENAI_CLIP_MEAN, OPENAI_CLIP_STD, ImageInput, PILImageResampling, SizeDict
|
| 28 |
+
from ...processing_utils import ImagesKwargs, Unpack
|
| 29 |
+
from ...utils import TensorType, auto_docstring, logging
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
logger = logging.get_logger(__name__)
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
class Ernie4_5_VLMoeImageProcessorKwargs(ImagesKwargs, total=False):
|
| 36 |
+
r"""
|
| 37 |
+
patch_size (`int`, *optional*, defaults to 14):
|
| 38 |
+
The spatial patch size of the vision encoder.
|
| 39 |
+
temporal_patch_size (`int`, *optional*):
|
| 40 |
+
The temporal patch size of the vision encoder. Unused in the image processor, only used for videos.
|
| 41 |
+
merge_size (`int`, *optional*, defaults to 2):
|
| 42 |
+
The merge size of the vision encoder to llm encoder.
|
| 43 |
+
"""
|
| 44 |
+
|
| 45 |
+
patch_size: int
|
| 46 |
+
temporal_patch_size: int
|
| 47 |
+
merge_size: int
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def smart_resize(
|
| 51 |
+
height: int, width: int, factor: int = 28, min_pixels: int = 56 * 56, max_pixels: int = 14 * 14 * 4 * 1280
|
| 52 |
+
):
|
| 53 |
+
"""Rescales the image so that the following conditions are met:
|
| 54 |
+
|
| 55 |
+
1. Both dimensions (height and width) are divisible by 'factor'.
|
| 56 |
+
|
| 57 |
+
2. The total number of pixels is within the range ['min_pixels', 'max_pixels'].
|
| 58 |
+
|
| 59 |
+
3. The aspect ratio of the image is maintained as closely as possible.
|
| 60 |
+
|
| 61 |
+
"""
|
| 62 |
+
if max(height, width) / min(height, width) > 200:
|
| 63 |
+
raise ValueError(
|
| 64 |
+
f"absolute aspect ratio must be smaller than 200, got {max(height, width) / min(height, width)}"
|
| 65 |
+
)
|
| 66 |
+
h_bar = round(height / factor) * factor
|
| 67 |
+
w_bar = round(width / factor) * factor
|
| 68 |
+
if h_bar * w_bar > max_pixels:
|
| 69 |
+
beta = math.sqrt((height * width) / max_pixels)
|
| 70 |
+
h_bar = max(factor, math.floor(height / beta / factor) * factor)
|
| 71 |
+
w_bar = max(factor, math.floor(width / beta / factor) * factor)
|
| 72 |
+
elif h_bar * w_bar < min_pixels:
|
| 73 |
+
beta = math.sqrt(min_pixels / (height * width))
|
| 74 |
+
h_bar = math.ceil(height * beta / factor) * factor
|
| 75 |
+
w_bar = math.ceil(width * beta / factor) * factor
|
| 76 |
+
return h_bar, w_bar
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
@auto_docstring
|
| 80 |
+
class Ernie4_5_VLMoeImageProcessorPil(PilBackend):
|
| 81 |
+
do_resize = True
|
| 82 |
+
resample = PILImageResampling.BICUBIC
|
| 83 |
+
size = {"shortest_edge": 56 * 56, "longest_edge": 28 * 28 * 6177}
|
| 84 |
+
default_to_square = False
|
| 85 |
+
do_rescale = True
|
| 86 |
+
rescale_factor = 1 / 255
|
| 87 |
+
do_normalize = True
|
| 88 |
+
image_mean = OPENAI_CLIP_MEAN
|
| 89 |
+
image_std = OPENAI_CLIP_STD
|
| 90 |
+
do_convert_rgb = True
|
| 91 |
+
patch_size = 14
|
| 92 |
+
temporal_patch_size = None # Unused
|
| 93 |
+
merge_size = 2
|
| 94 |
+
valid_kwargs = Ernie4_5_VLMoeImageProcessorKwargs
|
| 95 |
+
model_input_names = ["pixel_values", "image_grid_thw"]
|
| 96 |
+
|
| 97 |
+
def __init__(self, **kwargs: Unpack[Ernie4_5_VLMoeImageProcessorKwargs]):
|
| 98 |
+
super().__init__(**kwargs)
|
| 99 |
+
if self.size is not None:
|
| 100 |
+
if not self.size.shortest_edge or not self.size.longest_edge:
|
| 101 |
+
raise ValueError("size must contain 'shortest_edge' and 'longest_edge' keys.")
|
| 102 |
+
|
| 103 |
+
@auto_docstring
|
| 104 |
+
def preprocess(self, images: ImageInput, **kwargs: Unpack[Ernie4_5_VLMoeImageProcessorKwargs]) -> BatchFeature:
|
| 105 |
+
return super().preprocess(images, **kwargs)
|
| 106 |
+
|
| 107 |
+
def _standardize_kwargs(self, **kwargs) -> dict:
|
| 108 |
+
"""
|
| 109 |
+
Update kwargs that need further processing before being validated
|
| 110 |
+
Can be overridden by subclasses to customize the processing of kwargs.
|
| 111 |
+
"""
|
| 112 |
+
kwargs = super()._standardize_kwargs(**kwargs)
|
| 113 |
+
size = kwargs.get("size", self.size)
|
| 114 |
+
if not size.shortest_edge or not size.longest_edge:
|
| 115 |
+
raise ValueError("size must contain 'shortest_edge' and 'longest_edge' keys.")
|
| 116 |
+
|
| 117 |
+
return kwargs
|
| 118 |
+
|
| 119 |
+
def _preprocess(
|
| 120 |
+
self,
|
| 121 |
+
images: list[np.ndarray],
|
| 122 |
+
do_resize: bool,
|
| 123 |
+
size: SizeDict,
|
| 124 |
+
resample: "PILImageResampling | None",
|
| 125 |
+
do_rescale: bool,
|
| 126 |
+
rescale_factor: float,
|
| 127 |
+
do_normalize: bool,
|
| 128 |
+
image_mean: float | list[float] | None,
|
| 129 |
+
image_std: float | list[float] | None,
|
| 130 |
+
patch_size: int,
|
| 131 |
+
merge_size: int,
|
| 132 |
+
return_tensors: str | TensorType | None,
|
| 133 |
+
**kwargs,
|
| 134 |
+
) -> BatchFeature:
|
| 135 |
+
"""
|
| 136 |
+
Preprocess images one by one for PIL backend.
|
| 137 |
+
"""
|
| 138 |
+
processed_images = []
|
| 139 |
+
processed_grids = []
|
| 140 |
+
|
| 141 |
+
for image in images:
|
| 142 |
+
height, width = image.shape[-2:]
|
| 143 |
+
if do_resize:
|
| 144 |
+
resized_height, resized_width = smart_resize(
|
| 145 |
+
height=height,
|
| 146 |
+
width=width,
|
| 147 |
+
factor=patch_size * merge_size,
|
| 148 |
+
min_pixels=size.shortest_edge,
|
| 149 |
+
max_pixels=size.longest_edge,
|
| 150 |
+
)
|
| 151 |
+
image = self.resize(
|
| 152 |
+
image,
|
| 153 |
+
size=SizeDict(height=resized_height, width=resized_width),
|
| 154 |
+
resample=resample,
|
| 155 |
+
)
|
| 156 |
+
|
| 157 |
+
# Rescale and normalize
|
| 158 |
+
if do_rescale:
|
| 159 |
+
image = self.rescale(image, rescale_factor)
|
| 160 |
+
if do_normalize:
|
| 161 |
+
image = self.normalize(image, image_mean, image_std)
|
| 162 |
+
|
| 163 |
+
# Ensure float32 for patch processing
|
| 164 |
+
image_array = np.asarray(image, dtype=np.float32)
|
| 165 |
+
if image_array.ndim == 3: # (C, H, W)
|
| 166 |
+
image_array = np.expand_dims(image_array, axis=0) # (1, C, H, W)
|
| 167 |
+
if image_array.ndim == 4: # (B, C, H, W)
|
| 168 |
+
image_array = np.expand_dims(image_array, axis=1) # (B, T=1, C, H, W)
|
| 169 |
+
|
| 170 |
+
resized_height, resized_width = image_array.shape[-2:]
|
| 171 |
+
batch_size, grid_t, channel = image_array.shape[:3]
|
| 172 |
+
grid_h, grid_w = resized_height // patch_size, resized_width // patch_size
|
| 173 |
+
|
| 174 |
+
patches = image_array.reshape(
|
| 175 |
+
batch_size,
|
| 176 |
+
grid_t,
|
| 177 |
+
channel,
|
| 178 |
+
grid_h // merge_size,
|
| 179 |
+
merge_size,
|
| 180 |
+
patch_size,
|
| 181 |
+
grid_w // merge_size,
|
| 182 |
+
merge_size,
|
| 183 |
+
patch_size,
|
| 184 |
+
)
|
| 185 |
+
# Reorder dimensions to group grid and patch information for subsequent flattening.
|
| 186 |
+
# [batch, grid_t, grid_h/merge, grid_w/merge, merge, merge, channel, patch, patch]
|
| 187 |
+
patches = np.transpose(patches, (0, 1, 3, 6, 4, 7, 2, 5, 8))
|
| 188 |
+
|
| 189 |
+
flatten_patches = patches.reshape(
|
| 190 |
+
batch_size,
|
| 191 |
+
grid_t * grid_h * grid_w,
|
| 192 |
+
channel * patch_size * patch_size,
|
| 193 |
+
)
|
| 194 |
+
|
| 195 |
+
# Remove batch dimension and append: shape is (seq_len, hidden_dim)
|
| 196 |
+
processed_images.append(flatten_patches.squeeze(0))
|
| 197 |
+
processed_grids.append([grid_t, grid_h, grid_w])
|
| 198 |
+
|
| 199 |
+
# Concatenate all images along sequence dimension: (total_seq_len, hidden_dim)
|
| 200 |
+
pixel_values = np.concatenate(processed_images, axis=0)
|
| 201 |
+
image_grid_thw = np.array(processed_grids)
|
| 202 |
+
|
| 203 |
+
return BatchFeature(
|
| 204 |
+
data={"pixel_values": pixel_values, "image_grid_thw": image_grid_thw}, tensor_type=return_tensors
|
| 205 |
+
)
|
| 206 |
+
|
| 207 |
+
def get_number_of_image_patches(self, height: int, width: int, images_kwargs=None):
|
| 208 |
+
"""
|
| 209 |
+
A utility that returns number of image patches for a given image size.
|
| 210 |
+
|
| 211 |
+
Note: Do not remove this method! It is used by vLLM to infer the number of patches and placeholders
|
| 212 |
+
without an image input.
|
| 213 |
+
|
| 214 |
+
Args:
|
| 215 |
+
height (`int`):
|
| 216 |
+
Height of the input image.
|
| 217 |
+
width (`int`):
|
| 218 |
+
Width of the input image.
|
| 219 |
+
images_kwargs (`dict`, *optional*)
|
| 220 |
+
Any kwargs to override defaults of the image processor.
|
| 221 |
+
Returns:
|
| 222 |
+
`int`: Number of image patches per image.
|
| 223 |
+
"""
|
| 224 |
+
min_pixels = self.size["shortest_edge"]
|
| 225 |
+
max_pixels = self.size["longest_edge"]
|
| 226 |
+
patch_size = images_kwargs.get("patch_size", self.patch_size)
|
| 227 |
+
merge_size = images_kwargs.get("merge_size", self.merge_size)
|
| 228 |
+
|
| 229 |
+
factor = patch_size * merge_size
|
| 230 |
+
resized_height, resized_width = smart_resize(
|
| 231 |
+
height, width, factor, min_pixels=min_pixels, max_pixels=max_pixels
|
| 232 |
+
)
|
| 233 |
+
grid_h, grid_w = resized_height // patch_size, resized_width // patch_size
|
| 234 |
+
return grid_h * grid_w
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
class Ernie4_5_VL_MoeImageProcessorPil(Ernie4_5_VLMoeImageProcessorPil):
|
| 238 |
+
def __init__(self, *args, **kwargs):
|
| 239 |
+
logger.warning_once(
|
| 240 |
+
"`Ernie4_5_VL_MoeImageProcessorPil` is deprecated; please use `Ernie4_5_VLMoeImageProcessorPil` instead.",
|
| 241 |
+
)
|
| 242 |
+
super().__init__(*args, **kwargs)
|
| 243 |
+
|
| 244 |
+
|
| 245 |
+
__all__ = ["Ernie4_5_VL_MoeImageProcessorPil", "Ernie4_5_VLMoeImageProcessorPil"]
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/sam3_tracker/__init__.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2025 the HuggingFace Team. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
from typing import TYPE_CHECKING
|
| 16 |
+
|
| 17 |
+
from ...utils import _LazyModule
|
| 18 |
+
from ...utils.import_utils import define_import_structure
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
if TYPE_CHECKING:
|
| 22 |
+
from .configuration_sam3_tracker import *
|
| 23 |
+
from .modeling_sam3_tracker import *
|
| 24 |
+
from .processing_sam3_tracker import *
|
| 25 |
+
else:
|
| 26 |
+
import sys
|
| 27 |
+
|
| 28 |
+
_file = globals()["__file__"]
|
| 29 |
+
sys.modules[__name__] = _LazyModule(__name__, _file, define_import_structure(_file), module_spec=__spec__)
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/sam3_tracker/configuration_sam3_tracker.py
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 2 |
+
# This file was automatically generated from src/transformers/models/sam3_tracker/modular_sam3_tracker.py.
|
| 3 |
+
# Do NOT edit this file manually as any edits will be overwritten by the generation of
|
| 4 |
+
# the file from the modular. If any change should be done, please apply the change to the
|
| 5 |
+
# modular_sam3_tracker.py file directly. One of our CI enforces this.
|
| 6 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 7 |
+
# Copyright 2025 the HuggingFace Team. All rights reserved.
|
| 8 |
+
#
|
| 9 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 10 |
+
# you may not use this file except in compliance with the License.
|
| 11 |
+
# You may obtain a copy of the License at
|
| 12 |
+
#
|
| 13 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 14 |
+
#
|
| 15 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 16 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 17 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 18 |
+
# See the License for the specific language governing permissions and
|
| 19 |
+
# limitations under the License.
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
from huggingface_hub.dataclasses import strict
|
| 23 |
+
|
| 24 |
+
from ...configuration_utils import PreTrainedConfig
|
| 25 |
+
from ...utils import auto_docstring
|
| 26 |
+
from ..auto import CONFIG_MAPPING, AutoConfig
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
@auto_docstring(checkpoint="facebook/sam3")
|
| 30 |
+
@strict
|
| 31 |
+
class Sam3TrackerPromptEncoderConfig(PreTrainedConfig):
|
| 32 |
+
r"""
|
| 33 |
+
mask_input_channels (`int`, *optional*, defaults to 16):
|
| 34 |
+
The number of channels to be fed to the `MaskDecoder` module.
|
| 35 |
+
num_point_embeddings (`int`, *optional*, defaults to 4):
|
| 36 |
+
The number of point embeddings to be used.
|
| 37 |
+
scale (`float`, *optional*, defaults to 1):
|
| 38 |
+
The scale factor for the prompt encoder.
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
base_config_key = "prompt_encoder_config"
|
| 42 |
+
|
| 43 |
+
hidden_size: int = 256
|
| 44 |
+
|
| 45 |
+
image_size: int | list[int] | tuple[int, int] = 1008
|
| 46 |
+
patch_size: int | list[int] | tuple[int, int] = 14
|
| 47 |
+
mask_input_channels: int = 16
|
| 48 |
+
num_point_embeddings: int = 4
|
| 49 |
+
hidden_act: str = "gelu"
|
| 50 |
+
layer_norm_eps: float = 1e-6
|
| 51 |
+
scale: int = 1
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
@auto_docstring(checkpoint="facebook/sam3")
|
| 55 |
+
@strict
|
| 56 |
+
class Sam3TrackerMaskDecoderConfig(PreTrainedConfig):
|
| 57 |
+
r"""
|
| 58 |
+
mlp_dim (`int`, *optional*, defaults to 2048):
|
| 59 |
+
The dimension of the MLP in the two-way transformer.
|
| 60 |
+
attention_downsample_rate (`int`, *optional*, defaults to 2):
|
| 61 |
+
The downsample rate for the attention layers.
|
| 62 |
+
num_multimask_outputs (`int`, *optional*, defaults to 3):
|
| 63 |
+
The number of multimask outputs.
|
| 64 |
+
iou_head_depth (`int`, *optional*, defaults to 3):
|
| 65 |
+
The depth of the IoU head.
|
| 66 |
+
iou_head_hidden_dim (`int`, *optional*, defaults to 256):
|
| 67 |
+
The hidden dimension of the IoU head.
|
| 68 |
+
dynamic_multimask_via_stability (`bool`, *optional*, defaults to `True`):
|
| 69 |
+
Whether to use dynamic multimask via stability.
|
| 70 |
+
dynamic_multimask_stability_delta (`float`, *optional*, defaults to 0.05):
|
| 71 |
+
The stability delta for the dynamic multimask.
|
| 72 |
+
dynamic_multimask_stability_thresh (`float`, *optional*, defaults to 0.98):
|
| 73 |
+
The stability threshold for the dynamic multimask.
|
| 74 |
+
"""
|
| 75 |
+
|
| 76 |
+
base_config_key = "mask_decoder_config"
|
| 77 |
+
|
| 78 |
+
hidden_size: int = 256
|
| 79 |
+
hidden_act: str = "gelu"
|
| 80 |
+
mlp_dim: int = 2048
|
| 81 |
+
num_hidden_layers: int = 2
|
| 82 |
+
num_attention_heads: int = 8
|
| 83 |
+
attention_downsample_rate: int = 2
|
| 84 |
+
num_multimask_outputs: int = 3
|
| 85 |
+
iou_head_depth: int = 3
|
| 86 |
+
iou_head_hidden_dim: int = 256
|
| 87 |
+
dynamic_multimask_via_stability: bool = True
|
| 88 |
+
dynamic_multimask_stability_delta: float = 0.05
|
| 89 |
+
dynamic_multimask_stability_thresh: float = 0.98
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
@auto_docstring(checkpoint="facebook/sam3")
|
| 93 |
+
@strict
|
| 94 |
+
class Sam3TrackerConfig(PreTrainedConfig):
|
| 95 |
+
r"""
|
| 96 |
+
prompt_encoder_config (Union[`dict`, `Sam3TrackerPromptEncoderConfig`], *optional*):
|
| 97 |
+
Dictionary of configuration options used to initialize [`Sam3TrackerPromptEncoderConfig`].
|
| 98 |
+
mask_decoder_config (Union[`dict`, `Sam3TrackerMaskDecoderConfig`], *optional*):
|
| 99 |
+
Dictionary of configuration options used to initialize [`Sam3TrackerMaskDecoderConfig`].
|
| 100 |
+
|
| 101 |
+
Example:
|
| 102 |
+
|
| 103 |
+
```python
|
| 104 |
+
>>> from transformers import (
|
| 105 |
+
... Sam3TrackerVisionConfig,
|
| 106 |
+
... Sam3TrackerPromptEncoderConfig,
|
| 107 |
+
... Sam3TrackerMaskDecoderConfig,
|
| 108 |
+
... Sam3TrackerModel,
|
| 109 |
+
... )
|
| 110 |
+
|
| 111 |
+
>>> # Initializing a Sam3TrackerConfig with `"facebook/sam3_tracker.1_hiera_tiny"` style configuration
|
| 112 |
+
>>> configuration = Sam3TrackerConfig()
|
| 113 |
+
|
| 114 |
+
>>> # Initializing a Sam3TrackerModel (with random weights) from the `"facebook/sam3_tracker.1_hiera_tiny"` style configuration
|
| 115 |
+
>>> model = Sam3TrackerModel(configuration)
|
| 116 |
+
|
| 117 |
+
>>> # Accessing the model configuration
|
| 118 |
+
>>> configuration = model.config
|
| 119 |
+
|
| 120 |
+
>>> # We can also initialize a Sam3TrackerConfig from a Sam3TrackerVisionConfig, Sam3TrackerPromptEncoderConfig, and Sam3TrackerMaskDecoderConfig
|
| 121 |
+
>>> # Initializing SAM3_TRACKER vision encoder, memory attention, and memory encoder configurations
|
| 122 |
+
>>> vision_config = Sam3TrackerVisionConfig()
|
| 123 |
+
>>> prompt_encoder_config = Sam3TrackerPromptEncoderConfig()
|
| 124 |
+
>>> mask_decoder_config = Sam3TrackerMaskDecoderConfig()
|
| 125 |
+
|
| 126 |
+
>>> config = Sam3TrackerConfig(vision_config, prompt_encoder_config, mask_decoder_config)
|
| 127 |
+
```
|
| 128 |
+
"""
|
| 129 |
+
|
| 130 |
+
model_type = "sam3_tracker"
|
| 131 |
+
sub_configs = {
|
| 132 |
+
"vision_config": AutoConfig,
|
| 133 |
+
"prompt_encoder_config": Sam3TrackerPromptEncoderConfig,
|
| 134 |
+
"mask_decoder_config": Sam3TrackerMaskDecoderConfig,
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
vision_config: dict | PreTrainedConfig | None = None
|
| 138 |
+
prompt_encoder_config: dict | PreTrainedConfig | None = None
|
| 139 |
+
mask_decoder_config: dict | PreTrainedConfig | None = None
|
| 140 |
+
initializer_range: float = 0.02
|
| 141 |
+
|
| 142 |
+
def __post_init__(self, **kwargs):
|
| 143 |
+
if isinstance(self.vision_config, dict):
|
| 144 |
+
self.vision_config["model_type"] = self.vision_config.get("model_type", "sam3_vision_model")
|
| 145 |
+
self.vision_config = CONFIG_MAPPING[self.vision_config["model_type"]](**self.vision_config)
|
| 146 |
+
elif self.vision_config is None:
|
| 147 |
+
self.vision_config = CONFIG_MAPPING["sam3_vision_model"](
|
| 148 |
+
backbone_feature_sizes=[[288, 288], [144, 144], [72, 72]]
|
| 149 |
+
)
|
| 150 |
+
|
| 151 |
+
if isinstance(self.prompt_encoder_config, dict):
|
| 152 |
+
self.prompt_encoder_config = Sam3TrackerPromptEncoderConfig(**self.prompt_encoder_config)
|
| 153 |
+
elif self.prompt_encoder_config is None:
|
| 154 |
+
self.prompt_encoder_config = Sam3TrackerPromptEncoderConfig()
|
| 155 |
+
|
| 156 |
+
if isinstance(self.mask_decoder_config, dict):
|
| 157 |
+
self.mask_decoder_config = Sam3TrackerMaskDecoderConfig(**self.mask_decoder_config)
|
| 158 |
+
elif self.mask_decoder_config is None:
|
| 159 |
+
self.mask_decoder_config = Sam3TrackerMaskDecoderConfig()
|
| 160 |
+
|
| 161 |
+
super().__post_init__(**kwargs)
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
__all__ = ["Sam3TrackerConfig", "Sam3TrackerPromptEncoderConfig", "Sam3TrackerMaskDecoderConfig"]
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/sam3_tracker/modeling_sam3_tracker.py
ADDED
|
@@ -0,0 +1,1106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 2 |
+
# This file was automatically generated from src/transformers/models/sam3_tracker/modular_sam3_tracker.py.
|
| 3 |
+
# Do NOT edit this file manually as any edits will be overwritten by the generation of
|
| 4 |
+
# the file from the modular. If any change should be done, please apply the change to the
|
| 5 |
+
# modular_sam3_tracker.py file directly. One of our CI enforces this.
|
| 6 |
+
# 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
|
| 7 |
+
# Copyright 2025 the HuggingFace Team. All rights reserved.
|
| 8 |
+
#
|
| 9 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 10 |
+
# you may not use this file except in compliance with the License.
|
| 11 |
+
# You may obtain a copy of the License at
|
| 12 |
+
#
|
| 13 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 14 |
+
#
|
| 15 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 16 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 17 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 18 |
+
# See the License for the specific language governing permissions and
|
| 19 |
+
# limitations under the License.
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
from collections.abc import Callable
|
| 23 |
+
from dataclasses import dataclass
|
| 24 |
+
|
| 25 |
+
import numpy as np
|
| 26 |
+
import torch
|
| 27 |
+
import torch.nn as nn
|
| 28 |
+
import torch.nn.functional as F
|
| 29 |
+
from torch import Tensor
|
| 30 |
+
|
| 31 |
+
from ... import initialization as init
|
| 32 |
+
from ...activations import ACT2FN
|
| 33 |
+
from ...modeling_layers import GradientCheckpointingLayer
|
| 34 |
+
from ...modeling_outputs import BaseModelOutput, BaseModelOutputWithPooling
|
| 35 |
+
from ...modeling_utils import ALL_ATTENTION_FUNCTIONS, PreTrainedModel
|
| 36 |
+
from ...processing_utils import Unpack
|
| 37 |
+
from ...utils import ModelOutput, auto_docstring, can_return_tuple, logging
|
| 38 |
+
from ...utils.generic import TransformersKwargs, is_flash_attention_requested, merge_with_config_defaults
|
| 39 |
+
from ...utils.output_capturing import OutputRecorder, capture_outputs
|
| 40 |
+
from ..auto import AutoModel
|
| 41 |
+
from .configuration_sam3_tracker import Sam3TrackerConfig, Sam3TrackerMaskDecoderConfig, Sam3TrackerPromptEncoderConfig
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
logger = logging.get_logger(__name__)
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
@auto_docstring(custom_intro="Base class for the Sam3Tracker model's output.")
|
| 48 |
+
@dataclass
|
| 49 |
+
class Sam3TrackerImageSegmentationOutput(ModelOutput):
|
| 50 |
+
r"""
|
| 51 |
+
iou_scores (`torch.FloatTensor` of shape `(batch_size, point_batch_size, num_masks)`):
|
| 52 |
+
The Intersection over Union (IoU) scores of the predicted masks.
|
| 53 |
+
pred_masks (`torch.FloatTensor` of shape `(batch_size, point_batch_size, num_masks, height, width)`):
|
| 54 |
+
The predicted low-resolution masks. This is an alias for `low_res_masks`. These masks need to be post-processed
|
| 55 |
+
by the processor to be brought to the original image size.
|
| 56 |
+
object_score_logits (`torch.FloatTensor` of shape `(batch_size, point_batch_size, 1)`):
|
| 57 |
+
Logits for the object score, indicating if an object is present.
|
| 58 |
+
image_embeddings (`tuple(torch.FloatTensor)`):
|
| 59 |
+
The features from the FPN, which are used by the mask decoder. This is a tuple of `torch.FloatTensor` where each
|
| 60 |
+
tensor has shape `(batch_size, channels, height, width)`.
|
| 61 |
+
vision_hidden_states (`tuple(torch.FloatTensor)`, *optional*, returned when `output_hidden_states=True`):
|
| 62 |
+
Tuple of `torch.FloatTensor` (one for the output of each stage) of shape `(batch_size, height, width, hidden_size)`.
|
| 63 |
+
Hidden-states of the vision model at the output of each stage.
|
| 64 |
+
vision_attentions (`tuple(torch.FloatTensor)`, *optional*, returned when `output_attentions=True`):
|
| 65 |
+
Tuple of `torch.FloatTensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length, sequence_length)`.
|
| 66 |
+
Attentions weights of the vision model.
|
| 67 |
+
mask_decoder_attentions (`tuple(torch.FloatTensor)`, *optional*, returned when `output_attentions=True`):
|
| 68 |
+
Tuple of `torch.FloatTensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length, sequence_length)`.
|
| 69 |
+
Attentions weights of the mask decoder.
|
| 70 |
+
"""
|
| 71 |
+
|
| 72 |
+
iou_scores: torch.FloatTensor | None = None
|
| 73 |
+
pred_masks: torch.FloatTensor | None = None
|
| 74 |
+
object_score_logits: torch.FloatTensor | None = None
|
| 75 |
+
image_embeddings: tuple[torch.FloatTensor, ...] = None
|
| 76 |
+
vision_hidden_states: tuple[torch.FloatTensor, ...] | None = None
|
| 77 |
+
vision_attentions: tuple[torch.FloatTensor, ...] | None = None
|
| 78 |
+
mask_decoder_attentions: tuple[torch.FloatTensor, ...] | None = None
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
class Sam3TrackerFeedForward(nn.Module):
|
| 82 |
+
def __init__(
|
| 83 |
+
self,
|
| 84 |
+
input_dim: int,
|
| 85 |
+
hidden_dim: int,
|
| 86 |
+
output_dim: int,
|
| 87 |
+
num_layers: int,
|
| 88 |
+
activation: str = "relu",
|
| 89 |
+
sigmoid_output: bool = False,
|
| 90 |
+
):
|
| 91 |
+
super().__init__()
|
| 92 |
+
self.num_layers = num_layers
|
| 93 |
+
self.activation = ACT2FN[activation]
|
| 94 |
+
self.proj_in = nn.Linear(input_dim, hidden_dim)
|
| 95 |
+
self.proj_out = nn.Linear(hidden_dim, output_dim)
|
| 96 |
+
self.layers = nn.ModuleList([nn.Linear(hidden_dim, hidden_dim) for _ in range(num_layers - 2)])
|
| 97 |
+
self.sigmoid_output = sigmoid_output
|
| 98 |
+
|
| 99 |
+
def forward(self, hidden_states):
|
| 100 |
+
hidden_states = self.proj_in(hidden_states)
|
| 101 |
+
hidden_states = self.activation(hidden_states)
|
| 102 |
+
for layer in self.layers:
|
| 103 |
+
hidden_states = self.activation(layer(hidden_states))
|
| 104 |
+
|
| 105 |
+
hidden_states = self.proj_out(hidden_states)
|
| 106 |
+
if self.sigmoid_output:
|
| 107 |
+
hidden_states = F.sigmoid(hidden_states)
|
| 108 |
+
return hidden_states
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
@auto_docstring(
|
| 112 |
+
custom_intro="""
|
| 113 |
+
Segment Anything Model 3 (SAM 3) for generating segmentation masks, given an input image and
|
| 114 |
+
input points and labels, boxes, or masks.
|
| 115 |
+
"""
|
| 116 |
+
)
|
| 117 |
+
class Sam3TrackerPreTrainedModel(PreTrainedModel):
|
| 118 |
+
config_class = Sam3TrackerConfig
|
| 119 |
+
base_model_prefix = "sam3_tracker"
|
| 120 |
+
main_input_name = "pixel_values"
|
| 121 |
+
input_modalities = ("image",)
|
| 122 |
+
_supports_sdpa = True
|
| 123 |
+
_supports_flash_attn = True
|
| 124 |
+
_supports_attention_backend = True
|
| 125 |
+
_keys_to_ignore_on_load_unexpected = [
|
| 126 |
+
r"^memory_.*",
|
| 127 |
+
r"^mask_downsample.*",
|
| 128 |
+
r"^object_pointer_proj.*",
|
| 129 |
+
r"^temporal_positional_encoding_projection_layer.*",
|
| 130 |
+
"no_memory_positional_encoding",
|
| 131 |
+
"no_object_pointer",
|
| 132 |
+
"occlusion_spatial_embedding_parameter",
|
| 133 |
+
]
|
| 134 |
+
|
| 135 |
+
@torch.no_grad()
|
| 136 |
+
def _init_weights(self, module):
|
| 137 |
+
super()._init_weights(module)
|
| 138 |
+
if isinstance(module, Sam3TrackerModel):
|
| 139 |
+
if module.no_memory_embedding is not None:
|
| 140 |
+
init.zeros_(module.no_memory_embedding)
|
| 141 |
+
elif isinstance(module, Sam3TrackerPositionalEmbedding):
|
| 142 |
+
init.normal_(module.positional_embedding, std=module.scale)
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
class Sam3TrackerPositionalEmbedding(nn.Module):
|
| 146 |
+
def __init__(self, config: Sam3TrackerPromptEncoderConfig):
|
| 147 |
+
super().__init__()
|
| 148 |
+
self.scale = config.scale
|
| 149 |
+
positional_embedding = self.scale * torch.randn((2, config.hidden_size // 2))
|
| 150 |
+
self.register_buffer("positional_embedding", positional_embedding)
|
| 151 |
+
|
| 152 |
+
def forward(self, input_coords, input_shape=None):
|
| 153 |
+
"""Positionally encode points that are normalized to [0,1]."""
|
| 154 |
+
coordinates = input_coords.clone()
|
| 155 |
+
|
| 156 |
+
if input_shape is not None:
|
| 157 |
+
coordinates[:, :, :, 0] = coordinates[:, :, :, 0] / input_shape[1]
|
| 158 |
+
coordinates[:, :, :, 1] = coordinates[:, :, :, 1] / input_shape[0]
|
| 159 |
+
coordinates.to(torch.float32)
|
| 160 |
+
|
| 161 |
+
# assuming coords are in [0, 1]^2 square and have d_1 x ... x d_n x 2 shape
|
| 162 |
+
coordinates = 2 * coordinates - 1
|
| 163 |
+
coordinates = coordinates.to(self.positional_embedding.dtype)
|
| 164 |
+
coordinates = coordinates @ self.positional_embedding
|
| 165 |
+
coordinates = 2 * np.pi * coordinates
|
| 166 |
+
# outputs d_1 x ... x d_n x channel shape
|
| 167 |
+
return torch.cat([torch.sin(coordinates), torch.cos(coordinates)], dim=-1)
|
| 168 |
+
|
| 169 |
+
|
| 170 |
+
class Sam3TrackerMaskEmbedding(nn.Module):
|
| 171 |
+
def __init__(self, config: Sam3TrackerPromptEncoderConfig):
|
| 172 |
+
super().__init__()
|
| 173 |
+
self.mask_input_channels = config.mask_input_channels // 4
|
| 174 |
+
self.activation = ACT2FN[config.hidden_act]
|
| 175 |
+
self.conv1 = nn.Conv2d(1, self.mask_input_channels, kernel_size=2, stride=2)
|
| 176 |
+
self.conv2 = nn.Conv2d(self.mask_input_channels, config.mask_input_channels, kernel_size=2, stride=2)
|
| 177 |
+
self.conv3 = nn.Conv2d(config.mask_input_channels, config.hidden_size, kernel_size=1)
|
| 178 |
+
self.layer_norm1 = Sam3TrackerLayerNorm(
|
| 179 |
+
self.mask_input_channels, eps=config.layer_norm_eps, data_format="channels_first"
|
| 180 |
+
)
|
| 181 |
+
self.layer_norm2 = Sam3TrackerLayerNorm(
|
| 182 |
+
self.mask_input_channels * 4, eps=config.layer_norm_eps, data_format="channels_first"
|
| 183 |
+
)
|
| 184 |
+
|
| 185 |
+
def forward(self, masks):
|
| 186 |
+
hidden_states = self.conv1(masks)
|
| 187 |
+
hidden_states = self.layer_norm1(hidden_states)
|
| 188 |
+
hidden_states = self.activation(hidden_states)
|
| 189 |
+
|
| 190 |
+
hidden_states = self.conv2(hidden_states)
|
| 191 |
+
hidden_states = self.layer_norm2(hidden_states)
|
| 192 |
+
hidden_states = self.activation(hidden_states)
|
| 193 |
+
dense_embeddings = self.conv3(hidden_states)
|
| 194 |
+
return dense_embeddings
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
class Sam3TrackerPromptEncoder(nn.Module):
|
| 198 |
+
def __init__(self, config: Sam3TrackerPromptEncoderConfig):
|
| 199 |
+
super().__init__()
|
| 200 |
+
self.shared_embedding = Sam3TrackerPositionalEmbedding(config)
|
| 201 |
+
self.mask_embed = Sam3TrackerMaskEmbedding(config)
|
| 202 |
+
self.no_mask_embed = nn.Embedding(1, config.hidden_size)
|
| 203 |
+
|
| 204 |
+
self.image_embedding_size = (config.image_size // config.patch_size, config.image_size // config.patch_size)
|
| 205 |
+
self.mask_input_size = (4 * config.image_size // config.patch_size, 4 * config.image_size // config.patch_size)
|
| 206 |
+
self.input_image_size = config.image_size
|
| 207 |
+
|
| 208 |
+
self.point_embed = nn.Embedding(config.num_point_embeddings, config.hidden_size)
|
| 209 |
+
self.hidden_size = config.hidden_size
|
| 210 |
+
self.not_a_point_embed = nn.Embedding(1, config.hidden_size)
|
| 211 |
+
|
| 212 |
+
def _embed_points(self, points: torch.Tensor, labels: torch.Tensor, pad: bool) -> torch.Tensor:
|
| 213 |
+
"""Embeds point prompts."""
|
| 214 |
+
points = points + 0.5 # Shift to center of pixel
|
| 215 |
+
if pad:
|
| 216 |
+
points = torch.nn.functional.pad(points, (0, 0, 0, 1), mode="constant", value=0)
|
| 217 |
+
labels = torch.nn.functional.pad(labels, (0, 1), mode="constant", value=-1)
|
| 218 |
+
input_shape = (self.input_image_size, self.input_image_size)
|
| 219 |
+
point_embedding = self.shared_embedding(points, input_shape)
|
| 220 |
+
|
| 221 |
+
# torch.where and expanding the labels tensor is required by the ONNX export
|
| 222 |
+
point_embedding = torch.where(labels[..., None] == -1, self.not_a_point_embed.weight, point_embedding)
|
| 223 |
+
|
| 224 |
+
# This is required for the ONNX export. The dtype, device need to be explicitly
|
| 225 |
+
# specified as otherwise torch.onnx.export interprets as double
|
| 226 |
+
point_embedding = torch.where(
|
| 227 |
+
labels[..., None] != -10,
|
| 228 |
+
point_embedding,
|
| 229 |
+
torch.zeros_like(point_embedding),
|
| 230 |
+
)
|
| 231 |
+
|
| 232 |
+
# Add point embeddings for labels >= 0
|
| 233 |
+
point_embedding = point_embedding + self.point_embed(labels.clamp(min=0)) * (labels >= 0).unsqueeze(-1)
|
| 234 |
+
|
| 235 |
+
return point_embedding
|
| 236 |
+
|
| 237 |
+
def _embed_boxes(self, boxes: torch.Tensor) -> torch.Tensor:
|
| 238 |
+
"""Embeds box prompts."""
|
| 239 |
+
boxes = boxes + 0.5 # Shift to center of pixel
|
| 240 |
+
coords = boxes.view(*boxes.shape[:2], 2, 2)
|
| 241 |
+
# add padding point for consistency with the original implementation
|
| 242 |
+
coords = torch.nn.functional.pad(coords, (0, 0, 0, 1), mode="constant", value=0)
|
| 243 |
+
corner_embedding = self.shared_embedding(coords, (self.input_image_size, self.input_image_size))
|
| 244 |
+
corner_embedding[:, :, 0, :] += self.point_embed.weight[2]
|
| 245 |
+
corner_embedding[:, :, 1, :] += self.point_embed.weight[3]
|
| 246 |
+
corner_embedding[:, :, 2, :] = self.not_a_point_embed.weight.expand_as(corner_embedding[:, :, 2, :])
|
| 247 |
+
return corner_embedding
|
| 248 |
+
|
| 249 |
+
def forward(
|
| 250 |
+
self,
|
| 251 |
+
input_points: tuple[torch.Tensor, torch.Tensor] | None,
|
| 252 |
+
input_labels: torch.Tensor | None,
|
| 253 |
+
input_boxes: torch.Tensor | None,
|
| 254 |
+
input_masks: torch.Tensor | None,
|
| 255 |
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
| 256 |
+
"""
|
| 257 |
+
Embeds different types of prompts, returning both sparse and dense embeddings.
|
| 258 |
+
|
| 259 |
+
Args:
|
| 260 |
+
points (`torch.Tensor`, *optional*):
|
| 261 |
+
point coordinates and labels to embed.
|
| 262 |
+
boxes (`torch.Tensor`, *optional*):
|
| 263 |
+
boxes to embed
|
| 264 |
+
masks (`torch.Tensor`, *optional*):
|
| 265 |
+
masks to embed
|
| 266 |
+
"""
|
| 267 |
+
sparse_embeddings = None
|
| 268 |
+
batch_size = 1
|
| 269 |
+
if input_points is not None:
|
| 270 |
+
batch_size = input_points.shape[0]
|
| 271 |
+
if input_labels is None:
|
| 272 |
+
raise ValueError("If points are provided, labels must also be provided.")
|
| 273 |
+
point_embeddings = self._embed_points(input_points, input_labels, pad=(input_boxes is None))
|
| 274 |
+
sparse_embeddings = point_embeddings
|
| 275 |
+
if input_boxes is not None:
|
| 276 |
+
batch_size = input_boxes.shape[0]
|
| 277 |
+
box_embeddings = self._embed_boxes(input_boxes)
|
| 278 |
+
if sparse_embeddings is None:
|
| 279 |
+
sparse_embeddings = box_embeddings
|
| 280 |
+
else:
|
| 281 |
+
sparse_embeddings = torch.cat([sparse_embeddings, box_embeddings], dim=2)
|
| 282 |
+
if input_masks is not None:
|
| 283 |
+
dense_embeddings = self.mask_embed(input_masks)
|
| 284 |
+
else:
|
| 285 |
+
dense_embeddings = self.no_mask_embed.weight.reshape(1, -1, 1, 1).expand(
|
| 286 |
+
batch_size, -1, self.image_embedding_size[0], self.image_embedding_size[1]
|
| 287 |
+
)
|
| 288 |
+
|
| 289 |
+
return sparse_embeddings, dense_embeddings
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
def eager_attention_forward(
|
| 293 |
+
module: nn.Module,
|
| 294 |
+
query: torch.Tensor,
|
| 295 |
+
key: torch.Tensor,
|
| 296 |
+
value: torch.Tensor,
|
| 297 |
+
attention_mask: torch.Tensor | None,
|
| 298 |
+
scaling: float,
|
| 299 |
+
dropout: float = 0.0,
|
| 300 |
+
**kwargs,
|
| 301 |
+
):
|
| 302 |
+
attn_weights = torch.matmul(query, key.transpose(2, 3)) * scaling
|
| 303 |
+
if attention_mask is not None:
|
| 304 |
+
attn_weights = attn_weights + attention_mask
|
| 305 |
+
|
| 306 |
+
attn_weights = nn.functional.softmax(attn_weights, dim=-1, dtype=torch.float32).to(query.dtype)
|
| 307 |
+
attn_weights = nn.functional.dropout(attn_weights, p=dropout, training=module.training)
|
| 308 |
+
attn_output = torch.matmul(attn_weights, value)
|
| 309 |
+
attn_output = attn_output.transpose(1, 2).contiguous()
|
| 310 |
+
|
| 311 |
+
return attn_output, attn_weights
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
class Sam3TrackerAttention(nn.Module):
|
| 315 |
+
"""
|
| 316 |
+
SAM3_TRACKER's attention layer that allows for downscaling the size of the embedding after projection to queries, keys, and
|
| 317 |
+
values.
|
| 318 |
+
"""
|
| 319 |
+
|
| 320 |
+
def __init__(self, config, downsample_rate=None):
|
| 321 |
+
super().__init__()
|
| 322 |
+
downsample_rate = config.attention_downsample_rate if downsample_rate is None else downsample_rate
|
| 323 |
+
self.config = config
|
| 324 |
+
self.hidden_size = config.hidden_size
|
| 325 |
+
self.internal_dim = config.hidden_size // downsample_rate
|
| 326 |
+
self.num_attention_heads = config.num_attention_heads
|
| 327 |
+
self.head_dim = self.internal_dim // config.num_attention_heads
|
| 328 |
+
self.scaling = self.head_dim**-0.5
|
| 329 |
+
self.is_causal = False
|
| 330 |
+
|
| 331 |
+
self.q_proj = nn.Linear(self.hidden_size, self.internal_dim)
|
| 332 |
+
self.k_proj = nn.Linear(self.hidden_size, self.internal_dim)
|
| 333 |
+
self.v_proj = nn.Linear(self.hidden_size, self.internal_dim)
|
| 334 |
+
self.o_proj = nn.Linear(self.internal_dim, self.hidden_size)
|
| 335 |
+
|
| 336 |
+
def forward(
|
| 337 |
+
self,
|
| 338 |
+
query: torch.Tensor,
|
| 339 |
+
key: torch.Tensor,
|
| 340 |
+
value: torch.Tensor,
|
| 341 |
+
attention_similarity: torch.Tensor | None = None,
|
| 342 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 343 |
+
) -> tuple[torch.Tensor, torch.Tensor]:
|
| 344 |
+
# Input projections
|
| 345 |
+
batch_size, point_batch_size = query.shape[:2]
|
| 346 |
+
new_shape = (batch_size * point_batch_size, -1, self.num_attention_heads, self.head_dim)
|
| 347 |
+
|
| 348 |
+
query = self.q_proj(query).view(*new_shape).transpose(1, 2)
|
| 349 |
+
key = self.k_proj(key).view(*new_shape).transpose(1, 2)
|
| 350 |
+
value = self.v_proj(value).view(*new_shape).transpose(1, 2)
|
| 351 |
+
|
| 352 |
+
attention_interface: Callable = ALL_ATTENTION_FUNCTIONS.get_interface(
|
| 353 |
+
self.config._attn_implementation, eager_attention_forward
|
| 354 |
+
)
|
| 355 |
+
|
| 356 |
+
if is_flash_attention_requested(self.config) and attention_similarity is not None:
|
| 357 |
+
# Target guided masks are represented as float masks and are incompatible with Flash Attention
|
| 358 |
+
# Fallback to SDPA for this call only so the rest of the model can still benefit from FA
|
| 359 |
+
attention_interface = ALL_ATTENTION_FUNCTIONS["sdpa"]
|
| 360 |
+
logger.warning_once(
|
| 361 |
+
"Falling back to SDPA for target-guided attention because "
|
| 362 |
+
"Flash Attention does not support additive bias masks."
|
| 363 |
+
)
|
| 364 |
+
|
| 365 |
+
attn_output, attn_weights = attention_interface(
|
| 366 |
+
self,
|
| 367 |
+
query,
|
| 368 |
+
key,
|
| 369 |
+
value,
|
| 370 |
+
attention_mask=attention_similarity,
|
| 371 |
+
dropout=0.0,
|
| 372 |
+
scaling=self.scaling,
|
| 373 |
+
is_causal=self.is_causal,
|
| 374 |
+
**kwargs,
|
| 375 |
+
)
|
| 376 |
+
|
| 377 |
+
attn_output = attn_output.reshape(
|
| 378 |
+
batch_size, point_batch_size, -1, self.num_attention_heads * self.head_dim
|
| 379 |
+
).contiguous()
|
| 380 |
+
attn_output = self.o_proj(attn_output)
|
| 381 |
+
|
| 382 |
+
return attn_output, attn_weights
|
| 383 |
+
|
| 384 |
+
|
| 385 |
+
class Sam3TrackerTwoWayAttentionBlock(GradientCheckpointingLayer):
|
| 386 |
+
def __init__(self, config: Sam3TrackerMaskDecoderConfig, skip_first_layer_pe: bool = False):
|
| 387 |
+
"""
|
| 388 |
+
A transformer block with four layers:
|
| 389 |
+
(1) self-attention of sparse inputs (2) cross attention of sparse inputs -> dense inputs (3) mlp block on
|
| 390 |
+
sparse inputs (4) cross attention of dense inputs -> sparse inputs
|
| 391 |
+
|
| 392 |
+
Arguments:
|
| 393 |
+
config (`Sam3TrackerMaskDecoderConfig`):
|
| 394 |
+
The configuration file used to instantiate the block
|
| 395 |
+
attention_downsample_rate (*optionalk*, int, defaults to 2):
|
| 396 |
+
The downsample ratio of the block used to reduce the inner dim of the attention.
|
| 397 |
+
skip_first_layer_pe (*optional*, bool, defaults to `False`):
|
| 398 |
+
Whether or not to skip the addition of the query_point_embedding on the first layer.
|
| 399 |
+
"""
|
| 400 |
+
super().__init__()
|
| 401 |
+
self.self_attn = Sam3TrackerAttention(config, downsample_rate=1)
|
| 402 |
+
self.layer_norm1 = nn.LayerNorm(config.hidden_size)
|
| 403 |
+
|
| 404 |
+
self.cross_attn_token_to_image = Sam3TrackerAttention(config)
|
| 405 |
+
self.layer_norm2 = nn.LayerNorm(config.hidden_size)
|
| 406 |
+
|
| 407 |
+
self.mlp = Sam3TrackerFeedForward(
|
| 408 |
+
config.hidden_size, config.mlp_dim, config.hidden_size, num_layers=config.num_hidden_layers
|
| 409 |
+
)
|
| 410 |
+
self.layer_norm3 = nn.LayerNorm(config.hidden_size)
|
| 411 |
+
|
| 412 |
+
self.layer_norm4 = nn.LayerNorm(config.hidden_size)
|
| 413 |
+
self.cross_attn_image_to_token = Sam3TrackerAttention(config)
|
| 414 |
+
|
| 415 |
+
self.skip_first_layer_pe = skip_first_layer_pe
|
| 416 |
+
|
| 417 |
+
def forward(
|
| 418 |
+
self,
|
| 419 |
+
queries: Tensor,
|
| 420 |
+
keys: Tensor,
|
| 421 |
+
query_point_embedding: Tensor,
|
| 422 |
+
key_point_embedding: Tensor,
|
| 423 |
+
attention_similarity: Tensor,
|
| 424 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 425 |
+
):
|
| 426 |
+
# Self attention block
|
| 427 |
+
if self.skip_first_layer_pe:
|
| 428 |
+
queries, _ = self.self_attn(query=queries, key=queries, value=queries)
|
| 429 |
+
else:
|
| 430 |
+
query = queries + query_point_embedding
|
| 431 |
+
attn_out, _ = self.self_attn(query=query, key=query, value=queries)
|
| 432 |
+
queries = queries + attn_out
|
| 433 |
+
queries = self.layer_norm1(queries)
|
| 434 |
+
|
| 435 |
+
# Cross attention block, tokens attending to image embedding
|
| 436 |
+
query = queries + query_point_embedding
|
| 437 |
+
key = keys + key_point_embedding
|
| 438 |
+
|
| 439 |
+
attn_out, _ = self.cross_attn_token_to_image(
|
| 440 |
+
query=query, key=key, value=keys, attention_similarity=attention_similarity
|
| 441 |
+
)
|
| 442 |
+
queries = queries + attn_out
|
| 443 |
+
|
| 444 |
+
queries = self.layer_norm2(queries)
|
| 445 |
+
|
| 446 |
+
# MLP block
|
| 447 |
+
mlp_out = self.mlp(queries)
|
| 448 |
+
queries = queries + mlp_out
|
| 449 |
+
queries = self.layer_norm3(queries)
|
| 450 |
+
|
| 451 |
+
# Cross attention block, image embedding attending to tokens
|
| 452 |
+
query = queries + query_point_embedding
|
| 453 |
+
key = keys + key_point_embedding
|
| 454 |
+
|
| 455 |
+
attn_out, _ = self.cross_attn_image_to_token(query=key, key=query, value=queries)
|
| 456 |
+
keys = keys + attn_out
|
| 457 |
+
|
| 458 |
+
keys = self.layer_norm4(keys)
|
| 459 |
+
return queries, keys, attn_out
|
| 460 |
+
|
| 461 |
+
|
| 462 |
+
class Sam3TrackerTwoWayTransformer(nn.Module):
|
| 463 |
+
def __init__(self, config: Sam3TrackerMaskDecoderConfig):
|
| 464 |
+
super().__init__()
|
| 465 |
+
self.config = config
|
| 466 |
+
|
| 467 |
+
self.num_hidden_layers = config.num_hidden_layers
|
| 468 |
+
self.layers = nn.ModuleList()
|
| 469 |
+
|
| 470 |
+
for i in range(self.num_hidden_layers):
|
| 471 |
+
self.layers.append(Sam3TrackerTwoWayAttentionBlock(config, skip_first_layer_pe=(i == 0)))
|
| 472 |
+
|
| 473 |
+
self.final_attn_token_to_image = Sam3TrackerAttention(config)
|
| 474 |
+
self.layer_norm_final_attn = nn.LayerNorm(config.hidden_size)
|
| 475 |
+
|
| 476 |
+
def forward(
|
| 477 |
+
self,
|
| 478 |
+
point_embeddings: Tensor,
|
| 479 |
+
image_embeddings: Tensor,
|
| 480 |
+
image_positional_embeddings: Tensor,
|
| 481 |
+
attention_similarity: Tensor,
|
| 482 |
+
target_embedding=None,
|
| 483 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 484 |
+
) -> tuple | BaseModelOutput:
|
| 485 |
+
if image_embeddings is None:
|
| 486 |
+
raise ValueError("You have to specify an image_embedding")
|
| 487 |
+
|
| 488 |
+
image_embeddings = image_embeddings.flatten(2).transpose(1, 2).unsqueeze(1)
|
| 489 |
+
image_positional_embeddings = image_positional_embeddings.flatten(2).transpose(1, 2).unsqueeze(1)
|
| 490 |
+
|
| 491 |
+
# Prepare queries
|
| 492 |
+
queries = point_embeddings
|
| 493 |
+
keys = image_embeddings
|
| 494 |
+
|
| 495 |
+
# Apply transformer blocks and final layernorm
|
| 496 |
+
for layer in self.layers:
|
| 497 |
+
if target_embedding is not None:
|
| 498 |
+
queries += target_embedding
|
| 499 |
+
|
| 500 |
+
queries, keys, _ = layer(
|
| 501 |
+
queries=queries,
|
| 502 |
+
keys=keys,
|
| 503 |
+
query_point_embedding=point_embeddings,
|
| 504 |
+
key_point_embedding=image_positional_embeddings,
|
| 505 |
+
attention_similarity=attention_similarity,
|
| 506 |
+
**kwargs,
|
| 507 |
+
)
|
| 508 |
+
# Apply the final attention layer from the points to the image
|
| 509 |
+
query = queries + point_embeddings
|
| 510 |
+
key = keys + image_positional_embeddings
|
| 511 |
+
|
| 512 |
+
attn_out, _ = self.final_attn_token_to_image(query=query, key=key, value=keys)
|
| 513 |
+
|
| 514 |
+
queries = queries + attn_out
|
| 515 |
+
queries = self.layer_norm_final_attn(queries)
|
| 516 |
+
return queries, keys
|
| 517 |
+
|
| 518 |
+
|
| 519 |
+
class Sam3TrackerLayerNorm(nn.LayerNorm):
|
| 520 |
+
r"""LayerNorm that supports two data formats: channels_last (default) or channels_first.
|
| 521 |
+
The ordering of the dimensions in the inputs. channels_last corresponds to inputs with shape (batch_size, height,
|
| 522 |
+
width, channels) while channels_first corresponds to inputs with shape (batch_size, channels, height, width).
|
| 523 |
+
"""
|
| 524 |
+
|
| 525 |
+
def __init__(self, normalized_shape, *, eps=1e-6, data_format="channels_last", **kwargs):
|
| 526 |
+
super().__init__(normalized_shape, eps=eps, **kwargs)
|
| 527 |
+
if data_format not in ["channels_last", "channels_first"]:
|
| 528 |
+
raise NotImplementedError(f"Unsupported data format: {data_format}")
|
| 529 |
+
self.data_format = data_format
|
| 530 |
+
|
| 531 |
+
def forward(self, features: torch.Tensor) -> torch.Tensor:
|
| 532 |
+
"""
|
| 533 |
+
Args:
|
| 534 |
+
features: Tensor of shape (batch_size, channels, height, width) OR (batch_size, height, width, channels)
|
| 535 |
+
"""
|
| 536 |
+
if self.data_format == "channels_first":
|
| 537 |
+
features = features.permute(0, 2, 3, 1)
|
| 538 |
+
features = super().forward(features)
|
| 539 |
+
features = features.permute(0, 3, 1, 2)
|
| 540 |
+
else:
|
| 541 |
+
features = super().forward(features)
|
| 542 |
+
return features
|
| 543 |
+
|
| 544 |
+
|
| 545 |
+
class Sam3TrackerMaskDecoder(nn.Module):
|
| 546 |
+
def __init__(self, config: Sam3TrackerMaskDecoderConfig):
|
| 547 |
+
super().__init__()
|
| 548 |
+
self.config = config
|
| 549 |
+
self.hidden_size = config.hidden_size
|
| 550 |
+
|
| 551 |
+
self.num_multimask_outputs = config.num_multimask_outputs
|
| 552 |
+
self.num_mask_tokens = config.num_multimask_outputs + 1
|
| 553 |
+
|
| 554 |
+
self.iou_token = nn.Embedding(1, self.hidden_size)
|
| 555 |
+
self.mask_tokens = nn.Embedding(self.num_mask_tokens, self.hidden_size)
|
| 556 |
+
|
| 557 |
+
self.transformer = Sam3TrackerTwoWayTransformer(config)
|
| 558 |
+
|
| 559 |
+
# should we create a new class for this?
|
| 560 |
+
self.upscale_conv1 = nn.ConvTranspose2d(self.hidden_size, self.hidden_size // 4, kernel_size=2, stride=2)
|
| 561 |
+
self.upscale_conv2 = nn.ConvTranspose2d(self.hidden_size // 4, self.hidden_size // 8, kernel_size=2, stride=2)
|
| 562 |
+
self.upscale_layer_norm = Sam3TrackerLayerNorm(self.hidden_size // 4, data_format="channels_first")
|
| 563 |
+
self.activation = nn.GELU()
|
| 564 |
+
|
| 565 |
+
mlps_list = []
|
| 566 |
+
for _ in range(self.num_mask_tokens):
|
| 567 |
+
mlps_list += [Sam3TrackerFeedForward(self.hidden_size, self.hidden_size, self.hidden_size // 8, 3)]
|
| 568 |
+
self.output_hypernetworks_mlps = nn.ModuleList(mlps_list)
|
| 569 |
+
self.iou_prediction_head = Sam3TrackerFeedForward(
|
| 570 |
+
self.hidden_size,
|
| 571 |
+
config.iou_head_hidden_dim,
|
| 572 |
+
self.num_mask_tokens,
|
| 573 |
+
config.iou_head_depth,
|
| 574 |
+
sigmoid_output=True,
|
| 575 |
+
)
|
| 576 |
+
|
| 577 |
+
self.conv_s0 = nn.Conv2d(config.hidden_size, config.hidden_size // 8, kernel_size=1, stride=1)
|
| 578 |
+
self.conv_s1 = nn.Conv2d(config.hidden_size, config.hidden_size // 4, kernel_size=1, stride=1)
|
| 579 |
+
|
| 580 |
+
self.obj_score_token = nn.Embedding(1, self.hidden_size)
|
| 581 |
+
self.pred_obj_score_head = Sam3TrackerFeedForward(self.hidden_size, self.hidden_size, 1, 3)
|
| 582 |
+
|
| 583 |
+
self.dynamic_multimask_via_stability = config.dynamic_multimask_via_stability
|
| 584 |
+
self.dynamic_multimask_stability_delta = config.dynamic_multimask_stability_delta
|
| 585 |
+
self.dynamic_multimask_stability_thresh = config.dynamic_multimask_stability_thresh
|
| 586 |
+
|
| 587 |
+
def forward(
|
| 588 |
+
self,
|
| 589 |
+
image_embeddings: torch.Tensor,
|
| 590 |
+
image_positional_embeddings: torch.Tensor,
|
| 591 |
+
sparse_prompt_embeddings: torch.Tensor,
|
| 592 |
+
dense_prompt_embeddings: torch.Tensor,
|
| 593 |
+
multimask_output: bool,
|
| 594 |
+
high_resolution_features: list[torch.Tensor],
|
| 595 |
+
attention_similarity: torch.Tensor | None = None,
|
| 596 |
+
target_embedding: torch.Tensor | None = None,
|
| 597 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 598 |
+
) -> tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]:
|
| 599 |
+
"""
|
| 600 |
+
Predict masks given image and prompt embeddings.
|
| 601 |
+
|
| 602 |
+
Args:
|
| 603 |
+
image_embeddings (`torch.Tensor`):
|
| 604 |
+
The embeddings from the image encoder.
|
| 605 |
+
image_positional_embeddings (`torch.Tensor`):
|
| 606 |
+
Positional encoding with the shape of image_embeddings.
|
| 607 |
+
sparse_prompt_embeddings (`torch.Tensor`):
|
| 608 |
+
The embeddings of the points and boxes.
|
| 609 |
+
dense_prompt_embeddings (`torch.Tensor`):
|
| 610 |
+
The embeddings of the mask inputs.
|
| 611 |
+
multimask_output (`bool`):
|
| 612 |
+
Whether to return multiple masks or a single mask.
|
| 613 |
+
high_resolution_features (`list[torch.Tensor]`, *optional*):
|
| 614 |
+
The high-resolution features from the vision encoder.
|
| 615 |
+
attention_similarity (`torch.Tensor`, *optional*):
|
| 616 |
+
The attention similarity tensor.
|
| 617 |
+
target_embedding (`torch.Tensor`, *optional*):
|
| 618 |
+
The target embedding.
|
| 619 |
+
"""
|
| 620 |
+
batch_size, num_channels, height, width = image_embeddings.shape
|
| 621 |
+
point_batch_size = sparse_prompt_embeddings.shape[1]
|
| 622 |
+
# Concatenate output tokens
|
| 623 |
+
output_tokens = torch.cat(
|
| 624 |
+
[
|
| 625 |
+
self.obj_score_token.weight,
|
| 626 |
+
self.iou_token.weight,
|
| 627 |
+
self.mask_tokens.weight,
|
| 628 |
+
],
|
| 629 |
+
dim=0,
|
| 630 |
+
)
|
| 631 |
+
output_tokens = output_tokens.repeat(batch_size, point_batch_size, 1, 1)
|
| 632 |
+
|
| 633 |
+
if sparse_prompt_embeddings.shape[0] != 0:
|
| 634 |
+
tokens = torch.cat((output_tokens, sparse_prompt_embeddings), dim=2)
|
| 635 |
+
else:
|
| 636 |
+
tokens = output_tokens
|
| 637 |
+
point_embeddings = tokens.to(self.iou_token.weight.dtype)
|
| 638 |
+
|
| 639 |
+
# Expand per-image data in batch direction to be per-mask
|
| 640 |
+
image_embeddings = image_embeddings + dense_prompt_embeddings
|
| 641 |
+
image_embeddings = image_embeddings.repeat_interleave(point_batch_size, dim=0)
|
| 642 |
+
image_positional_embeddings = image_positional_embeddings.repeat_interleave(point_batch_size, 0)
|
| 643 |
+
# Run the transformer
|
| 644 |
+
point_embeddings, image_embeddings = self.transformer(
|
| 645 |
+
point_embeddings=point_embeddings,
|
| 646 |
+
image_embeddings=image_embeddings,
|
| 647 |
+
image_positional_embeddings=image_positional_embeddings,
|
| 648 |
+
attention_similarity=attention_similarity,
|
| 649 |
+
target_embedding=target_embedding,
|
| 650 |
+
**kwargs,
|
| 651 |
+
)
|
| 652 |
+
iou_token_out = point_embeddings[:, :, 1, :]
|
| 653 |
+
mask_tokens_out = point_embeddings[:, :, 2 : (2 + self.num_mask_tokens), :]
|
| 654 |
+
|
| 655 |
+
# Upscale mask embeddings and predict masks using the mask tokens
|
| 656 |
+
image_embeddings = image_embeddings.transpose(2, 3).view(
|
| 657 |
+
batch_size * point_batch_size, num_channels, height, width
|
| 658 |
+
)
|
| 659 |
+
|
| 660 |
+
feat_s0, feat_s1 = high_resolution_features
|
| 661 |
+
feat_s0 = feat_s0.repeat_interleave(point_batch_size, dim=0)
|
| 662 |
+
feat_s1 = feat_s1.repeat_interleave(point_batch_size, dim=0)
|
| 663 |
+
upscaled_embedding = self.upscale_conv1(image_embeddings) + feat_s1
|
| 664 |
+
upscaled_embedding = self.activation(self.upscale_layer_norm(upscaled_embedding))
|
| 665 |
+
upscaled_embedding = self.activation(self.upscale_conv2(upscaled_embedding) + feat_s0)
|
| 666 |
+
|
| 667 |
+
hyper_in_list: list[torch.Tensor] = []
|
| 668 |
+
for i in range(self.num_mask_tokens):
|
| 669 |
+
current_mlp = self.output_hypernetworks_mlps[i]
|
| 670 |
+
hyper_in_list += [current_mlp(mask_tokens_out[:, :, i, :])]
|
| 671 |
+
hyper_in = torch.stack(hyper_in_list, dim=2)
|
| 672 |
+
|
| 673 |
+
_, num_channels, height, width = upscaled_embedding.shape
|
| 674 |
+
upscaled_embedding = upscaled_embedding.view(batch_size, point_batch_size, num_channels, height * width)
|
| 675 |
+
masks = (hyper_in @ upscaled_embedding).view(batch_size, point_batch_size, -1, height, width)
|
| 676 |
+
|
| 677 |
+
# Generate mask quality predictions
|
| 678 |
+
iou_pred = self.iou_prediction_head(iou_token_out)
|
| 679 |
+
object_score_logits = self.pred_obj_score_head(point_embeddings[:, :, 0, :])
|
| 680 |
+
|
| 681 |
+
# Select the correct mask or masks for output
|
| 682 |
+
if multimask_output:
|
| 683 |
+
mask_slice = slice(1, None)
|
| 684 |
+
masks = masks[:, :, mask_slice, :, :]
|
| 685 |
+
iou_pred = iou_pred[:, :, mask_slice]
|
| 686 |
+
elif self.dynamic_multimask_via_stability and not self.training:
|
| 687 |
+
mask_slice = slice(0, 1)
|
| 688 |
+
masks, iou_pred = self._dynamic_multimask_via_stability(masks, iou_pred)
|
| 689 |
+
else:
|
| 690 |
+
mask_slice = slice(0, 1)
|
| 691 |
+
masks = masks[:, :, mask_slice, :, :]
|
| 692 |
+
iou_pred = iou_pred[:, :, mask_slice]
|
| 693 |
+
|
| 694 |
+
sam_tokens_out = mask_tokens_out[:, :, mask_slice] # [b, 3, c] shape
|
| 695 |
+
|
| 696 |
+
return masks, iou_pred, sam_tokens_out, object_score_logits
|
| 697 |
+
|
| 698 |
+
def _get_stability_scores(self, mask_logits):
|
| 699 |
+
"""
|
| 700 |
+
Compute stability scores of the mask logits based on the IoU between upper and
|
| 701 |
+
lower thresholds.
|
| 702 |
+
"""
|
| 703 |
+
mask_logits = mask_logits.flatten(-2)
|
| 704 |
+
stability_delta = self.dynamic_multimask_stability_delta
|
| 705 |
+
area_i = torch.sum(mask_logits > stability_delta, dim=-1).float()
|
| 706 |
+
area_u = torch.sum(mask_logits > -stability_delta, dim=-1).float()
|
| 707 |
+
stability_scores = torch.where(area_u > 0, area_i / area_u, 1.0)
|
| 708 |
+
return stability_scores
|
| 709 |
+
|
| 710 |
+
def _dynamic_multimask_via_stability(self, all_mask_logits, all_iou_scores):
|
| 711 |
+
"""
|
| 712 |
+
When outputting a single mask, if the stability score from the current single-mask
|
| 713 |
+
output (based on output token 0) falls below a threshold, we instead select from
|
| 714 |
+
multi-mask outputs (based on output token 1~3) the mask with the highest predicted
|
| 715 |
+
IoU score. This is intended to ensure a valid mask for both clicking and tracking.
|
| 716 |
+
"""
|
| 717 |
+
# The best mask from multimask output tokens (1~3)
|
| 718 |
+
multimask_logits = all_mask_logits[:, :, 1:, :, :]
|
| 719 |
+
multimask_iou_scores = all_iou_scores[:, :, 1:]
|
| 720 |
+
best_scores_inds = torch.argmax(multimask_iou_scores, dim=-1) # [B, P]
|
| 721 |
+
best_scores_inds_expanded = best_scores_inds.unsqueeze(-1).unsqueeze(-1).unsqueeze(-1)
|
| 722 |
+
best_scores_inds_expanded = best_scores_inds_expanded.expand(
|
| 723 |
+
-1, -1, 1, multimask_logits.size(-2), multimask_logits.size(-1)
|
| 724 |
+
)
|
| 725 |
+
best_multimask_logits = torch.gather(multimask_logits, 2, best_scores_inds_expanded) # [B, P, 1, H, W]
|
| 726 |
+
best_multimask_iou_scores = torch.gather(multimask_iou_scores, 2, best_scores_inds.unsqueeze(-1)) # [B, P, 1]
|
| 727 |
+
|
| 728 |
+
# The mask from singlemask output token 0 and its stability score
|
| 729 |
+
singlemask_logits = all_mask_logits[:, :, 0:1, :, :]
|
| 730 |
+
singlemask_iou_scores = all_iou_scores[:, :, 0:1]
|
| 731 |
+
stability_scores = self._get_stability_scores(singlemask_logits)
|
| 732 |
+
is_stable = stability_scores >= self.dynamic_multimask_stability_thresh
|
| 733 |
+
|
| 734 |
+
# Dynamically fall back to best multimask output upon low stability scores.
|
| 735 |
+
mask_logits_out = torch.where(
|
| 736 |
+
is_stable[..., None, None].expand_as(singlemask_logits),
|
| 737 |
+
singlemask_logits,
|
| 738 |
+
best_multimask_logits,
|
| 739 |
+
)
|
| 740 |
+
iou_scores_out = torch.where(
|
| 741 |
+
is_stable.expand_as(singlemask_iou_scores),
|
| 742 |
+
singlemask_iou_scores,
|
| 743 |
+
best_multimask_iou_scores,
|
| 744 |
+
)
|
| 745 |
+
return mask_logits_out, iou_scores_out
|
| 746 |
+
|
| 747 |
+
|
| 748 |
+
@auto_docstring(custom_intro="Base class for the vision encoder's outputs.")
|
| 749 |
+
@dataclass
|
| 750 |
+
class Sam3TrackerVisionEncoderOutput(BaseModelOutputWithPooling):
|
| 751 |
+
r"""
|
| 752 |
+
last_hidden_state (`torch.FloatTensor` of shape `(batch_size, height, width, hidden_size)`):
|
| 753 |
+
Sequence of hidden-states at the output of the last layer of the model.
|
| 754 |
+
hidden_states (`tuple(torch.FloatTensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
|
| 755 |
+
Tuple of `torch.FloatTensor` (one for the output of the embeddings, if the model has an embedding layer, +
|
| 756 |
+
one for the output of each stage) of shape `(batch_size, height, width, hidden_size)`. Hidden-states of the
|
| 757 |
+
model at the output of each stage.
|
| 758 |
+
attentions (`tuple(torch.FloatTensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
|
| 759 |
+
Tuple of `torch.FloatTensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
|
| 760 |
+
sequence_length)`. Attentions weights after the attention softmax, used to compute the weighted average in
|
| 761 |
+
the self-attention heads.
|
| 762 |
+
fpn_hidden_states (`tuple(torch.FloatTensor)`):
|
| 763 |
+
Tuple of `torch.FloatTensor` (one for each feature level, from high to low resolution) of shape
|
| 764 |
+
`(batch_size, hidden_size, height, width)`. Feature maps from the Feature Pyramid Network neck.
|
| 765 |
+
fpn_position_encoding (`tuple(torch.FloatTensor)`):
|
| 766 |
+
Tuple of `torch.FloatTensor` (one for each feature level, from high to low resolution) of shape
|
| 767 |
+
`(batch_size, hidden_size, height, width)`. Positional encodings corresponding to the `fpn_hidden_states`.
|
| 768 |
+
"""
|
| 769 |
+
|
| 770 |
+
fpn_hidden_states: torch.FloatTensor | None = None
|
| 771 |
+
fpn_position_encoding: torch.FloatTensor | None = None
|
| 772 |
+
|
| 773 |
+
|
| 774 |
+
@auto_docstring(
|
| 775 |
+
custom_intro="""
|
| 776 |
+
Segment Anything Model 2 (SAM 2) for generating segmentation masks, given an input image and
|
| 777 |
+
input points and labels, boxes, or masks.
|
| 778 |
+
"""
|
| 779 |
+
)
|
| 780 |
+
class Sam3TrackerModel(Sam3TrackerPreTrainedModel):
|
| 781 |
+
input_modalities = ("image", "text")
|
| 782 |
+
_can_record_outputs = {"mask_decoder_attentions": OutputRecorder(Sam3TrackerTwoWayAttentionBlock, index=2)}
|
| 783 |
+
_tied_weights_keys = {}
|
| 784 |
+
_base_model_prefix = "tracker_model"
|
| 785 |
+
_keys_to_ignore_on_load_unexpected = [
|
| 786 |
+
r"^detector_model.",
|
| 787 |
+
r"^memory_.*",
|
| 788 |
+
r"^mask_downsample.*",
|
| 789 |
+
r"^object_pointer_proj.*",
|
| 790 |
+
r"^temporal_positional_encoding_projection_layer.*",
|
| 791 |
+
"no_memory_positional_encoding",
|
| 792 |
+
"no_object_pointer",
|
| 793 |
+
"occlusion_spatial_embedding_parameter",
|
| 794 |
+
]
|
| 795 |
+
|
| 796 |
+
def __init__(self, config: Sam3TrackerConfig):
|
| 797 |
+
# loading from a sam3_video config
|
| 798 |
+
if hasattr(config, "tracker_config") and config.tracker_config is not None:
|
| 799 |
+
if isinstance(config.tracker_config, dict):
|
| 800 |
+
config.tracker_config = Sam3TrackerConfig(**config.tracker_config)
|
| 801 |
+
config = config.tracker_config
|
| 802 |
+
super().__init__(config)
|
| 803 |
+
self.shared_image_embedding = Sam3TrackerPositionalEmbedding(config.prompt_encoder_config)
|
| 804 |
+
self.vision_encoder = AutoModel.from_config(config.vision_config)
|
| 805 |
+
self.prompt_encoder = Sam3TrackerPromptEncoder(config.prompt_encoder_config)
|
| 806 |
+
# The module using it is not a PreTrainedModel subclass so we need this
|
| 807 |
+
config.mask_decoder_config._attn_implementation = config._attn_implementation
|
| 808 |
+
self.mask_decoder = Sam3TrackerMaskDecoder(config.mask_decoder_config)
|
| 809 |
+
|
| 810 |
+
self.backbone_feature_sizes = config.vision_config.backbone_feature_sizes
|
| 811 |
+
# a single token to indicate no memory embedding from previous frames
|
| 812 |
+
self.hidden_dim = config.vision_config.fpn_hidden_size
|
| 813 |
+
self.no_memory_embedding = torch.nn.Parameter(torch.zeros(1, 1, self.hidden_dim))
|
| 814 |
+
|
| 815 |
+
self.post_init()
|
| 816 |
+
|
| 817 |
+
def get_input_embeddings(self):
|
| 818 |
+
return self.vision_encoder.get_input_embeddings()
|
| 819 |
+
|
| 820 |
+
def get_image_wide_positional_embeddings(self) -> torch.Tensor:
|
| 821 |
+
size = self.prompt_encoder.image_embedding_size
|
| 822 |
+
target_device = self.shared_image_embedding.positional_embedding.device
|
| 823 |
+
target_dtype = self.shared_image_embedding.positional_embedding.dtype
|
| 824 |
+
grid = torch.ones(size, device=target_device, dtype=target_dtype)
|
| 825 |
+
y_embed = grid.cumsum(dim=0) - 0.5
|
| 826 |
+
x_embed = grid.cumsum(dim=1) - 0.5
|
| 827 |
+
y_embed = y_embed / size[0]
|
| 828 |
+
x_embed = x_embed / size[1]
|
| 829 |
+
|
| 830 |
+
positional_embedding = self.shared_image_embedding(torch.stack([x_embed, y_embed], dim=-1))
|
| 831 |
+
return positional_embedding.permute(2, 0, 1).unsqueeze(0) # channel x height x width
|
| 832 |
+
|
| 833 |
+
@torch.no_grad()
|
| 834 |
+
def get_image_embeddings(
|
| 835 |
+
self,
|
| 836 |
+
pixel_values: torch.FloatTensor,
|
| 837 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 838 |
+
) -> list[torch.Tensor]:
|
| 839 |
+
r"""
|
| 840 |
+
Returns the image embeddings by passing the pixel values through the vision encoder.
|
| 841 |
+
|
| 842 |
+
Args:
|
| 843 |
+
pixel_values (`torch.FloatTensor` of shape `(batch_size, num_channels, height, width)`):
|
| 844 |
+
Input pixel values
|
| 845 |
+
"""
|
| 846 |
+
batch_size = pixel_values.shape[0]
|
| 847 |
+
image_outputs = self.get_image_features(pixel_values, return_dict=True, **kwargs)
|
| 848 |
+
feature_maps = image_outputs.fpn_hidden_states
|
| 849 |
+
|
| 850 |
+
# add no memory embedding to the last feature map
|
| 851 |
+
feature_maps[-1] = feature_maps[-1] + self.no_memory_embedding
|
| 852 |
+
|
| 853 |
+
# reshape feature maps to the same shape as the backbone feature sizes
|
| 854 |
+
image_embeddings = [
|
| 855 |
+
feat.permute(1, 2, 0).view(batch_size, -1, *feat_size)
|
| 856 |
+
for feat, feat_size in zip(feature_maps, self.backbone_feature_sizes)
|
| 857 |
+
]
|
| 858 |
+
|
| 859 |
+
return image_embeddings
|
| 860 |
+
|
| 861 |
+
@torch.no_grad()
|
| 862 |
+
def get_prompt_embeddings(
|
| 863 |
+
self,
|
| 864 |
+
input_points: torch.FloatTensor | None = None,
|
| 865 |
+
input_labels: torch.LongTensor | None = None,
|
| 866 |
+
input_boxes: torch.FloatTensor | None = None,
|
| 867 |
+
input_masks: torch.LongTensor | None = None,
|
| 868 |
+
):
|
| 869 |
+
r"""
|
| 870 |
+
Returns the prompt embeddings by passing the input points, labels, boxes and masks through the prompt encoder.
|
| 871 |
+
|
| 872 |
+
Args:
|
| 873 |
+
input_points (`torch.FloatTensor` of shape `(batch_size, point_batch_size, num_points_per_image, 2)`):
|
| 874 |
+
Optional input points for the prompt encoder. The padding of the point is automatically done by the
|
| 875 |
+
processor. `point_batch_size` refers to the number of masks that we want the model to predict per
|
| 876 |
+
point. The model will output `point_batch_size` times 3 masks in total.
|
| 877 |
+
input_labels (`torch.LongTensor` of shape `(batch_size, point_batch_size, num_points_per_image)`):
|
| 878 |
+
Optional input labels for the prompt encoder. The padding of the labels is automatically done by the
|
| 879 |
+
processor, or can be fed by the user.
|
| 880 |
+
input_boxes (`torch.FloatTensor` of shape `(batch_size, num_boxes_per_image, 4)`):
|
| 881 |
+
Optional input boxes for the prompt encoder. The padding of the boxes is automatically done by the
|
| 882 |
+
processor. users can also pass manually the input boxes.
|
| 883 |
+
input_masks (`torch.LongTensor` of shape `(batch_size, image_size, image_size)`):
|
| 884 |
+
Optional input masks for the prompt encoder.
|
| 885 |
+
"""
|
| 886 |
+
prompt_output = self.prompt_encoder(
|
| 887 |
+
input_points=input_points,
|
| 888 |
+
input_labels=input_labels,
|
| 889 |
+
input_boxes=input_boxes,
|
| 890 |
+
input_masks=input_masks,
|
| 891 |
+
)
|
| 892 |
+
return prompt_output
|
| 893 |
+
|
| 894 |
+
@merge_with_config_defaults
|
| 895 |
+
@capture_outputs
|
| 896 |
+
@auto_docstring
|
| 897 |
+
def forward(
|
| 898 |
+
self,
|
| 899 |
+
pixel_values: torch.FloatTensor | None = None,
|
| 900 |
+
input_points: torch.FloatTensor | None = None,
|
| 901 |
+
input_labels: torch.LongTensor | None = None,
|
| 902 |
+
input_boxes: torch.FloatTensor | None = None,
|
| 903 |
+
input_masks: torch.LongTensor | None = None,
|
| 904 |
+
image_embeddings: torch.FloatTensor | None = None,
|
| 905 |
+
multimask_output: bool = True,
|
| 906 |
+
attention_similarity: torch.FloatTensor | None = None,
|
| 907 |
+
target_embedding: torch.FloatTensor | None = None,
|
| 908 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 909 |
+
) -> Sam3TrackerImageSegmentationOutput:
|
| 910 |
+
r"""
|
| 911 |
+
input_points (`torch.FloatTensor` of shape `(batch_size, num_points, 2)`):
|
| 912 |
+
Input 2D spatial points, this is used by the prompt encoder to encode the prompt. Generally yields to much
|
| 913 |
+
better results. The points can be obtained by passing a list of list of list to the processor that will
|
| 914 |
+
create corresponding `torch` tensors of dimension 4. The first dimension is the image batch size, the
|
| 915 |
+
second dimension is the point batch size (i.e. how many segmentation masks do we want the model to predict
|
| 916 |
+
per input point), the third dimension is the number of points per segmentation mask (it is possible to pass
|
| 917 |
+
multiple points for a single mask), and the last dimension is the x (vertical) and y (horizontal)
|
| 918 |
+
coordinates of the point. If a different number of points is passed either for each image, or for each
|
| 919 |
+
mask, the processor will create "PAD" points that will correspond to the (0, 0) coordinate, and the
|
| 920 |
+
computation of the embedding will be skipped for these points using the labels.
|
| 921 |
+
input_labels (`torch.LongTensor` of shape `(batch_size, point_batch_size, num_points)`):
|
| 922 |
+
Input labels for the points, this is used by the prompt encoder to encode the prompt. According to the
|
| 923 |
+
official implementation, there are 3 types of labels
|
| 924 |
+
|
| 925 |
+
- `1`: the point is a point that contains the object of interest
|
| 926 |
+
- `0`: the point is a point that does not contain the object of interest
|
| 927 |
+
- `-1`: the point corresponds to the background
|
| 928 |
+
|
| 929 |
+
We added the label:
|
| 930 |
+
|
| 931 |
+
- `-10`: the point is a padding point, thus should be ignored by the prompt encoder
|
| 932 |
+
|
| 933 |
+
The padding labels should be automatically done by the processor.
|
| 934 |
+
input_boxes (`torch.FloatTensor` of shape `(batch_size, num_boxes, 4)`):
|
| 935 |
+
Input boxes for the points, this is used by the prompt encoder to encode the prompt. Generally yields to
|
| 936 |
+
much better generated masks. The boxes can be obtained by passing a list of list of list to the processor,
|
| 937 |
+
that will generate a `torch` tensor, with each dimension corresponding respectively to the image batch
|
| 938 |
+
size, the number of boxes per image and the coordinates of the top left and bottom right point of the box.
|
| 939 |
+
In the order (`x1`, `y1`, `x2`, `y2`):
|
| 940 |
+
|
| 941 |
+
- `x1`: the x coordinate of the top left point of the input box
|
| 942 |
+
- `y1`: the y coordinate of the top left point of the input box
|
| 943 |
+
- `x2`: the x coordinate of the bottom right point of the input box
|
| 944 |
+
- `y2`: the y coordinate of the bottom right point of the input box
|
| 945 |
+
input_masks (`torch.FloatTensor` of shape `(batch_size, image_size, image_size)`):
|
| 946 |
+
SAM model also accepts segmentation masks as input. The mask will be embedded by the prompt encoder to
|
| 947 |
+
generate a corresponding embedding, that will be fed later on to the mask decoder. These masks needs to be
|
| 948 |
+
manually fed by the user, and they need to be of shape (`batch_size`, `image_size`, `image_size`).
|
| 949 |
+
image_embeddings (`torch.FloatTensor` of shape `(batch_size, output_channels, window_size, window_size)`):
|
| 950 |
+
Image embeddings, this is used by the mask decoder to generate masks and iou scores. For more memory
|
| 951 |
+
efficient computation, users can first retrieve the image embeddings using the `get_image_embeddings`
|
| 952 |
+
method, and then feed them to the `forward` method instead of feeding the `pixel_values`.
|
| 953 |
+
multimask_output (`bool`, *optional*):
|
| 954 |
+
In the original implementation and paper, the model always outputs 3 masks per image (or per point / per
|
| 955 |
+
bounding box if relevant). However, it is possible to just output a single mask, that corresponds to the
|
| 956 |
+
"best" mask, by specifying `multimask_output=False`.
|
| 957 |
+
attention_similarity (`torch.FloatTensor`, *optional*):
|
| 958 |
+
Attention similarity tensor, to be provided to the mask decoder for target-guided attention in case the
|
| 959 |
+
model is used for personalization as introduced in [PerSAM](https://huggingface.co/papers/2305.03048).
|
| 960 |
+
target_embedding (`torch.FloatTensor`, *optional*):
|
| 961 |
+
Embedding of the target concept, to be provided to the mask decoder for target-semantic prompting in case
|
| 962 |
+
the model is used for personalization as introduced in [PerSAM](https://huggingface.co/papers/2305.03048).
|
| 963 |
+
|
| 964 |
+
Example:
|
| 965 |
+
|
| 966 |
+
```python
|
| 967 |
+
>>> from PIL import Image
|
| 968 |
+
>>> import httpx
|
| 969 |
+
>>> from io import BytesIO
|
| 970 |
+
>>> from transformers import AutoModel, AutoProcessor
|
| 971 |
+
|
| 972 |
+
>>> model = AutoModel.from_pretrained("danelcsb/sam3_tracker.1_hiera_tiny")
|
| 973 |
+
>>> processor = AutoProcessor.from_pretrained("danelcsb/sam3_tracker.1_hiera_tiny")
|
| 974 |
+
|
| 975 |
+
>>> url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/sam-car.png"
|
| 976 |
+
>>> with httpx.stream("GET", url) as response:
|
| 977 |
+
... raw_image = Image.open(BytesIO(response.read())).convert("RGB")
|
| 978 |
+
>>> input_points = [[[400, 650]]] # 2D location of a window on the car
|
| 979 |
+
>>> inputs = processor(images=raw_image, input_points=input_points, return_tensors="pt")
|
| 980 |
+
|
| 981 |
+
>>> # Get segmentation mask
|
| 982 |
+
>>> outputs = model(**inputs)
|
| 983 |
+
|
| 984 |
+
>>> # Postprocess masks
|
| 985 |
+
>>> masks = processor.post_process_masks(
|
| 986 |
+
... outputs.pred_masks, inputs["original_sizes"]
|
| 987 |
+
... )
|
| 988 |
+
```
|
| 989 |
+
"""
|
| 990 |
+
if not ((pixel_values is None) ^ (image_embeddings is None)):
|
| 991 |
+
raise ValueError("Exactly one of pixel_values or image_embeddings must be provided.")
|
| 992 |
+
if input_points is not None and input_boxes is not None:
|
| 993 |
+
if input_points.shape[1] != input_boxes.shape[1]:
|
| 994 |
+
raise ValueError(
|
| 995 |
+
f"You should provide as many bounding boxes as input points per box. Got {input_points.shape[1]} and {input_boxes.shape[1]}."
|
| 996 |
+
)
|
| 997 |
+
|
| 998 |
+
image_positional_embeddings = self.get_image_wide_positional_embeddings()
|
| 999 |
+
# repeat with batch size
|
| 1000 |
+
batch_size = pixel_values.shape[0] if pixel_values is not None else image_embeddings[-1].shape[0]
|
| 1001 |
+
image_positional_embeddings = image_positional_embeddings.repeat(batch_size, 1, 1, 1)
|
| 1002 |
+
|
| 1003 |
+
vision_attentions = None
|
| 1004 |
+
vision_hidden_states = None
|
| 1005 |
+
|
| 1006 |
+
if pixel_values is not None:
|
| 1007 |
+
image_outputs: Sam3TrackerVisionEncoderOutput = self.get_image_features(
|
| 1008 |
+
pixel_values, return_dict=True, **kwargs
|
| 1009 |
+
)
|
| 1010 |
+
feature_maps = image_outputs.fpn_hidden_states
|
| 1011 |
+
vision_hidden_states = image_outputs.hidden_states
|
| 1012 |
+
vision_attentions = image_outputs.attentions
|
| 1013 |
+
|
| 1014 |
+
# add no memory embedding to the last feature map
|
| 1015 |
+
feature_maps[-1] = feature_maps[-1] + self.no_memory_embedding
|
| 1016 |
+
|
| 1017 |
+
# reshape feature maps to the same shape as the backbone feature sizes
|
| 1018 |
+
image_embeddings = [
|
| 1019 |
+
feat.permute(1, 2, 0).view(batch_size, -1, *feat_size)
|
| 1020 |
+
for feat, feat_size in zip(feature_maps, self.backbone_feature_sizes)
|
| 1021 |
+
]
|
| 1022 |
+
|
| 1023 |
+
if input_points is not None and input_labels is None:
|
| 1024 |
+
input_labels = torch.ones_like(input_points[:, :, :, 0], dtype=torch.int, device=input_points.device)
|
| 1025 |
+
|
| 1026 |
+
if input_points is None and input_boxes is None:
|
| 1027 |
+
# If no points are provide, pad with an empty point (with label -1)
|
| 1028 |
+
input_points = torch.zeros(
|
| 1029 |
+
batch_size, 1, 1, 2, dtype=image_embeddings[-1].dtype, device=image_embeddings[-1].device
|
| 1030 |
+
)
|
| 1031 |
+
input_labels = -torch.ones(batch_size, 1, 1, dtype=torch.int32, device=image_embeddings[-1].device)
|
| 1032 |
+
|
| 1033 |
+
if input_masks is not None:
|
| 1034 |
+
# If mask_inputs is provided, downsize it into low-res mask input if needed
|
| 1035 |
+
# and feed it as a dense mask prompt into the SAM mask encoder
|
| 1036 |
+
if input_masks.shape[-2:] != self.prompt_encoder.mask_input_size:
|
| 1037 |
+
input_masks = F.interpolate(
|
| 1038 |
+
input_masks.float(),
|
| 1039 |
+
size=self.prompt_encoder.mask_input_size,
|
| 1040 |
+
align_corners=False,
|
| 1041 |
+
mode="bilinear",
|
| 1042 |
+
antialias=True, # use antialias for downsampling
|
| 1043 |
+
).to(input_masks.dtype)
|
| 1044 |
+
|
| 1045 |
+
sparse_embeddings, dense_embeddings = self.prompt_encoder(
|
| 1046 |
+
input_points=input_points,
|
| 1047 |
+
input_labels=input_labels,
|
| 1048 |
+
input_boxes=input_boxes,
|
| 1049 |
+
input_masks=input_masks,
|
| 1050 |
+
)
|
| 1051 |
+
low_res_multimasks, iou_scores, _, object_score_logits = self.mask_decoder(
|
| 1052 |
+
image_embeddings=image_embeddings[-1],
|
| 1053 |
+
image_positional_embeddings=image_positional_embeddings,
|
| 1054 |
+
sparse_prompt_embeddings=sparse_embeddings,
|
| 1055 |
+
dense_prompt_embeddings=dense_embeddings,
|
| 1056 |
+
multimask_output=multimask_output,
|
| 1057 |
+
high_resolution_features=image_embeddings[:-1],
|
| 1058 |
+
attention_similarity=attention_similarity,
|
| 1059 |
+
target_embedding=target_embedding,
|
| 1060 |
+
**kwargs,
|
| 1061 |
+
)
|
| 1062 |
+
|
| 1063 |
+
return Sam3TrackerImageSegmentationOutput(
|
| 1064 |
+
iou_scores=iou_scores,
|
| 1065 |
+
pred_masks=low_res_multimasks,
|
| 1066 |
+
object_score_logits=object_score_logits,
|
| 1067 |
+
image_embeddings=image_embeddings,
|
| 1068 |
+
vision_hidden_states=vision_hidden_states,
|
| 1069 |
+
vision_attentions=vision_attentions,
|
| 1070 |
+
)
|
| 1071 |
+
|
| 1072 |
+
@can_return_tuple
|
| 1073 |
+
@auto_docstring
|
| 1074 |
+
def get_image_features(
|
| 1075 |
+
self,
|
| 1076 |
+
pixel_values: torch.FloatTensor,
|
| 1077 |
+
**kwargs: Unpack[TransformersKwargs],
|
| 1078 |
+
) -> tuple | Sam3TrackerVisionEncoderOutput:
|
| 1079 |
+
r"""
|
| 1080 |
+
pixel_values (`torch.FloatTensor`):
|
| 1081 |
+
Input pixel values of shape `(batch_size, num_channels, height, width)`.
|
| 1082 |
+
"""
|
| 1083 |
+
vision_outputs: Sam3TrackerVisionEncoderOutput = self.vision_encoder(pixel_values, return_dict=True, **kwargs)
|
| 1084 |
+
|
| 1085 |
+
feature_maps = vision_outputs.fpn_hidden_states
|
| 1086 |
+
feature_maps_position_embeddings = vision_outputs.fpn_position_encoding
|
| 1087 |
+
|
| 1088 |
+
# precompute projected level 0 and level 1 features in SAM decoder
|
| 1089 |
+
# to avoid running it again on every SAM click
|
| 1090 |
+
feature_maps = list(feature_maps)
|
| 1091 |
+
feature_maps[0] = self.mask_decoder.conv_s0(feature_maps[0])
|
| 1092 |
+
feature_maps[1] = self.mask_decoder.conv_s1(feature_maps[1])
|
| 1093 |
+
|
| 1094 |
+
# flatten NxCxHxW to HWxNxC
|
| 1095 |
+
feature_maps = [feature_map.flatten(2).permute(2, 0, 1) for feature_map in feature_maps]
|
| 1096 |
+
feature_maps_position_embeddings = [
|
| 1097 |
+
feature_maps_position_embeddings.flatten(2).permute(2, 0, 1)
|
| 1098 |
+
for feature_maps_position_embeddings in feature_maps_position_embeddings
|
| 1099 |
+
]
|
| 1100 |
+
vision_outputs.fpn_hidden_states = feature_maps
|
| 1101 |
+
vision_outputs.fpn_position_encoding = feature_maps_position_embeddings
|
| 1102 |
+
|
| 1103 |
+
return vision_outputs
|
| 1104 |
+
|
| 1105 |
+
|
| 1106 |
+
__all__ = ["Sam3TrackerModel", "Sam3TrackerPreTrainedModel"]
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/transformers/models/sam3_tracker/modular_sam3_tracker.py
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2025 the HuggingFace Team. All rights reserved.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
import torch
|
| 17 |
+
from huggingface_hub.dataclasses import strict
|
| 18 |
+
|
| 19 |
+
from ... import initialization as init
|
| 20 |
+
from ...configuration_utils import PreTrainedConfig
|
| 21 |
+
from ...modeling_utils import PreTrainedModel
|
| 22 |
+
from ...utils import auto_docstring
|
| 23 |
+
from ..auto import CONFIG_MAPPING, AutoModel
|
| 24 |
+
from ..sam2.configuration_sam2 import (
|
| 25 |
+
Sam2Config,
|
| 26 |
+
Sam2MaskDecoderConfig,
|
| 27 |
+
Sam2PromptEncoderConfig,
|
| 28 |
+
)
|
| 29 |
+
from ..sam2.modeling_sam2 import (
|
| 30 |
+
Sam2Attention,
|
| 31 |
+
Sam2FeedForward,
|
| 32 |
+
Sam2ImageSegmentationOutput,
|
| 33 |
+
Sam2LayerNorm,
|
| 34 |
+
Sam2MaskDecoder,
|
| 35 |
+
Sam2MaskEmbedding,
|
| 36 |
+
Sam2Model,
|
| 37 |
+
Sam2PositionalEmbedding,
|
| 38 |
+
Sam2PreTrainedModel,
|
| 39 |
+
Sam2PromptEncoder,
|
| 40 |
+
Sam2TwoWayAttentionBlock,
|
| 41 |
+
Sam2TwoWayTransformer,
|
| 42 |
+
)
|
| 43 |
+
from ..sam2.processing_sam2 import Sam2Processor
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
@auto_docstring(checkpoint="facebook/sam3")
|
| 47 |
+
@strict
|
| 48 |
+
class Sam3TrackerPromptEncoderConfig(Sam2PromptEncoderConfig):
|
| 49 |
+
r"""
|
| 50 |
+
mask_input_channels (`int`, *optional*, defaults to 16):
|
| 51 |
+
The number of channels to be fed to the `MaskDecoder` module.
|
| 52 |
+
num_point_embeddings (`int`, *optional*, defaults to 4):
|
| 53 |
+
The number of point embeddings to be used.
|
| 54 |
+
scale (`float`, *optional*, defaults to 1):
|
| 55 |
+
The scale factor for the prompt encoder.
|
| 56 |
+
"""
|
| 57 |
+
|
| 58 |
+
base_config_key = "prompt_encoder_config"
|
| 59 |
+
|
| 60 |
+
image_size: int | list[int] | tuple[int, int] = 1008
|
| 61 |
+
patch_size: int | list[int] | tuple[int, int] = 14
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
class Sam3TrackerProcessor(Sam2Processor):
|
| 65 |
+
pass
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
@auto_docstring(checkpoint="facebook/sam3")
|
| 69 |
+
@strict
|
| 70 |
+
class Sam3TrackerMaskDecoderConfig(Sam2MaskDecoderConfig):
|
| 71 |
+
pass
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
@auto_docstring(checkpoint="facebook/sam3")
|
| 75 |
+
@strict
|
| 76 |
+
class Sam3TrackerConfig(Sam2Config):
|
| 77 |
+
r"""
|
| 78 |
+
prompt_encoder_config (Union[`dict`, `Sam3TrackerPromptEncoderConfig`], *optional*):
|
| 79 |
+
Dictionary of configuration options used to initialize [`Sam3TrackerPromptEncoderConfig`].
|
| 80 |
+
mask_decoder_config (Union[`dict`, `Sam3TrackerMaskDecoderConfig`], *optional*):
|
| 81 |
+
Dictionary of configuration options used to initialize [`Sam3TrackerMaskDecoderConfig`].
|
| 82 |
+
|
| 83 |
+
Example:
|
| 84 |
+
|
| 85 |
+
```python
|
| 86 |
+
>>> from transformers import (
|
| 87 |
+
... Sam3TrackerVisionConfig,
|
| 88 |
+
... Sam3TrackerPromptEncoderConfig,
|
| 89 |
+
... Sam3TrackerMaskDecoderConfig,
|
| 90 |
+
... Sam3TrackerModel,
|
| 91 |
+
... )
|
| 92 |
+
|
| 93 |
+
>>> # Initializing a Sam3TrackerConfig with `"facebook/sam3_tracker.1_hiera_tiny"` style configuration
|
| 94 |
+
>>> configuration = Sam3TrackerConfig()
|
| 95 |
+
|
| 96 |
+
>>> # Initializing a Sam3TrackerModel (with random weights) from the `"facebook/sam3_tracker.1_hiera_tiny"` style configuration
|
| 97 |
+
>>> model = Sam3TrackerModel(configuration)
|
| 98 |
+
|
| 99 |
+
>>> # Accessing the model configuration
|
| 100 |
+
>>> configuration = model.config
|
| 101 |
+
|
| 102 |
+
>>> # We can also initialize a Sam3TrackerConfig from a Sam3TrackerVisionConfig, Sam3TrackerPromptEncoderConfig, and Sam3TrackerMaskDecoderConfig
|
| 103 |
+
>>> # Initializing SAM3_TRACKER vision encoder, memory attention, and memory encoder configurations
|
| 104 |
+
>>> vision_config = Sam3TrackerVisionConfig()
|
| 105 |
+
>>> prompt_encoder_config = Sam3TrackerPromptEncoderConfig()
|
| 106 |
+
>>> mask_decoder_config = Sam3TrackerMaskDecoderConfig()
|
| 107 |
+
|
| 108 |
+
>>> config = Sam3TrackerConfig(vision_config, prompt_encoder_config, mask_decoder_config)
|
| 109 |
+
```
|
| 110 |
+
"""
|
| 111 |
+
|
| 112 |
+
def __post_init__(self, **kwargs):
|
| 113 |
+
if isinstance(self.vision_config, dict):
|
| 114 |
+
self.vision_config["model_type"] = self.vision_config.get("model_type", "sam3_vision_model")
|
| 115 |
+
self.vision_config = CONFIG_MAPPING[self.vision_config["model_type"]](**self.vision_config)
|
| 116 |
+
elif self.vision_config is None:
|
| 117 |
+
self.vision_config = CONFIG_MAPPING["sam3_vision_model"](
|
| 118 |
+
backbone_feature_sizes=[[288, 288], [144, 144], [72, 72]]
|
| 119 |
+
)
|
| 120 |
+
|
| 121 |
+
if isinstance(self.prompt_encoder_config, dict):
|
| 122 |
+
self.prompt_encoder_config = Sam3TrackerPromptEncoderConfig(**self.prompt_encoder_config)
|
| 123 |
+
elif self.prompt_encoder_config is None:
|
| 124 |
+
self.prompt_encoder_config = Sam3TrackerPromptEncoderConfig()
|
| 125 |
+
|
| 126 |
+
if isinstance(self.mask_decoder_config, dict):
|
| 127 |
+
self.mask_decoder_config = Sam3TrackerMaskDecoderConfig(**self.mask_decoder_config)
|
| 128 |
+
elif self.mask_decoder_config is None:
|
| 129 |
+
self.mask_decoder_config = Sam3TrackerMaskDecoderConfig()
|
| 130 |
+
|
| 131 |
+
PreTrainedConfig.__post_init__(**kwargs)
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
class Sam3TrackerImageSegmentationOutput(Sam2ImageSegmentationOutput):
|
| 135 |
+
pass
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
class Sam3TrackerFeedForward(Sam2FeedForward):
|
| 139 |
+
pass
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
@auto_docstring(
|
| 143 |
+
custom_intro="""
|
| 144 |
+
Segment Anything Model 3 (SAM 3) for generating segmentation masks, given an input image and
|
| 145 |
+
input points and labels, boxes, or masks.
|
| 146 |
+
"""
|
| 147 |
+
)
|
| 148 |
+
class Sam3TrackerPreTrainedModel(Sam2PreTrainedModel):
|
| 149 |
+
@torch.no_grad()
|
| 150 |
+
def _init_weights(self, module):
|
| 151 |
+
PreTrainedModel._init_weights(module)
|
| 152 |
+
if isinstance(module, Sam3TrackerModel):
|
| 153 |
+
if module.no_memory_embedding is not None:
|
| 154 |
+
init.zeros_(module.no_memory_embedding)
|
| 155 |
+
elif isinstance(module, Sam3TrackerPositionalEmbedding):
|
| 156 |
+
init.normal_(module.positional_embedding, std=module.scale)
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
class Sam3TrackerPositionalEmbedding(Sam2PositionalEmbedding):
|
| 160 |
+
pass
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
class Sam3TrackerMaskEmbedding(Sam2MaskEmbedding):
|
| 164 |
+
pass
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
class Sam3TrackerPromptEncoder(Sam2PromptEncoder):
|
| 168 |
+
pass
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
class Sam3TrackerAttention(Sam2Attention):
|
| 172 |
+
pass
|
| 173 |
+
|
| 174 |
+
|
| 175 |
+
class Sam3TrackerTwoWayAttentionBlock(Sam2TwoWayAttentionBlock):
|
| 176 |
+
pass
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
class Sam3TrackerTwoWayTransformer(Sam2TwoWayTransformer):
|
| 180 |
+
pass
|
| 181 |
+
|
| 182 |
+
|
| 183 |
+
class Sam3TrackerLayerNorm(Sam2LayerNorm):
|
| 184 |
+
pass
|
| 185 |
+
|
| 186 |
+
|
| 187 |
+
class Sam3TrackerMaskDecoder(Sam2MaskDecoder):
|
| 188 |
+
pass
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
class Sam3TrackerModel(Sam2Model):
|
| 192 |
+
_base_model_prefix = "tracker_model"
|
| 193 |
+
_keys_to_ignore_on_load_unexpected = [
|
| 194 |
+
r"^detector_model.",
|
| 195 |
+
r"^memory_.*",
|
| 196 |
+
r"^mask_downsample.*",
|
| 197 |
+
r"^object_pointer_proj.*",
|
| 198 |
+
r"^temporal_positional_encoding_projection_layer.*",
|
| 199 |
+
"no_memory_positional_encoding",
|
| 200 |
+
"no_object_pointer",
|
| 201 |
+
"occlusion_spatial_embedding_parameter",
|
| 202 |
+
]
|
| 203 |
+
|
| 204 |
+
def __init__(self, config: Sam3TrackerConfig):
|
| 205 |
+
# loading from a sam3_video config
|
| 206 |
+
if hasattr(config, "tracker_config") and config.tracker_config is not None:
|
| 207 |
+
if isinstance(config.tracker_config, dict):
|
| 208 |
+
config.tracker_config = Sam3TrackerConfig(**config.tracker_config)
|
| 209 |
+
config = config.tracker_config
|
| 210 |
+
Sam3TrackerPreTrainedModel.__init__(config)
|
| 211 |
+
self.shared_image_embedding = Sam3TrackerPositionalEmbedding(config.prompt_encoder_config)
|
| 212 |
+
self.vision_encoder = AutoModel.from_config(config.vision_config)
|
| 213 |
+
self.prompt_encoder = Sam3TrackerPromptEncoder(config.prompt_encoder_config)
|
| 214 |
+
# The module using it is not a PreTrainedModel subclass so we need this
|
| 215 |
+
config.mask_decoder_config._attn_implementation = config._attn_implementation
|
| 216 |
+
self.mask_decoder = Sam3TrackerMaskDecoder(config.mask_decoder_config)
|
| 217 |
+
|
| 218 |
+
self.backbone_feature_sizes = config.vision_config.backbone_feature_sizes
|
| 219 |
+
# a single token to indicate no memory embedding from previous frames
|
| 220 |
+
self.hidden_dim = config.vision_config.fpn_hidden_size
|
| 221 |
+
self.no_memory_embedding = torch.nn.Parameter(torch.zeros(1, 1, self.hidden_dim))
|
| 222 |
+
|
| 223 |
+
self.post_init()
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
__all__ = [
|
| 227 |
+
"Sam3TrackerConfig",
|
| 228 |
+
"Sam3TrackerPromptEncoderConfig",
|
| 229 |
+
"Sam3TrackerMaskDecoderConfig",
|
| 230 |
+
"Sam3TrackerProcessor",
|
| 231 |
+
"Sam3TrackerModel",
|
| 232 |
+
"Sam3TrackerPreTrainedModel",
|
| 233 |
+
]
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/logs/debug_langflowalg_learnedembed_single_gpu_20260530_213823.log
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[W530 21:38:29.679686368 Utils.hpp:136] Warning: Environment variable NCCL_ASYNC_ERROR_HANDLING is deprecated; use TORCH_NCCL_ASYNC_ERROR_HANDLING instead (function operator())
|
| 2 |
+
NCCL version 2.25.1+cuda12.8
|
| 3 |
+
[rank0]:[W530 21:38:30.182058535 Utils.hpp:111] Warning: Environment variable NCCL_ASYNC_ERROR_HANDLING is deprecated; use TORCH_NCCL_ASYNC_ERROR_HANDLING instead (function operator())
|
| 4 |
+
Muon: 57 2D params; Nesterov-AdamW: 78 other params
|
| 5 |
+
{
|
| 6 |
+
"cache_path": "cache/owt_t5_llmclean_qwen36_35b_articlefull_pack1023_10k_appendeos1.pt",
|
| 7 |
+
"tokenizer_path": "/e2e-data/evad-tech-vla/wanghan58/models/hf/t5-small/tokenizer.json",
|
| 8 |
+
"out_dir": "runs/debug_langflowalg_learnedembed_single_gpu_20260530_213823",
|
| 9 |
+
"subset_size": 16,
|
| 10 |
+
"resume": "",
|
| 11 |
+
"steps": 1,
|
| 12 |
+
"batch_size": 1,
|
| 13 |
+
"grad_accum": 1,
|
| 14 |
+
"num_workers": 0,
|
| 15 |
+
"lr": 3.90625e-06,
|
| 16 |
+
"blr": 0.001,
|
| 17 |
+
"min_lr": 0.0,
|
| 18 |
+
"lr_schedule": "constant",
|
| 19 |
+
"warmup_steps": 8,
|
| 20 |
+
"warmup_epochs": 0.5,
|
| 21 |
+
"optimizer": "muon",
|
| 22 |
+
"weight_decay": 0.0,
|
| 23 |
+
"adam_beta1": 0.9,
|
| 24 |
+
"adam_beta2": 0.95,
|
| 25 |
+
"adam_eps": 1e-08,
|
| 26 |
+
"grad_clip": 1.0,
|
| 27 |
+
"log_every": 1,
|
| 28 |
+
"save_every": 1,
|
| 29 |
+
"dim": 768,
|
| 30 |
+
"layers": 12,
|
| 31 |
+
"heads": 12,
|
| 32 |
+
"mlp_dim": 3072,
|
| 33 |
+
"time_tokens": 4,
|
| 34 |
+
"token_embed_init": "random",
|
| 35 |
+
"token_embed_model_path": "/e2e-data/evad-tech-vla/wanghan58/models/hf/t5-small",
|
| 36 |
+
"token_embed_dim": 768,
|
| 37 |
+
"freeze_token_embed": 0,
|
| 38 |
+
"concat_self_cond": 1,
|
| 39 |
+
"self_cond_prob": 0.5,
|
| 40 |
+
"use_bias": 1,
|
| 41 |
+
"gamma_loc": 4.723,
|
| 42 |
+
"gamma_scale": 0.852,
|
| 43 |
+
"gamma_cutoff": 1e-05,
|
| 44 |
+
"seed": 1234,
|
| 45 |
+
"loader_batches_per_rank": 16,
|
| 46 |
+
"optimizer_steps_per_epoch": 16,
|
| 47 |
+
"steps_per_epoch": 16,
|
| 48 |
+
"effective_batch_size": 1
|
| 49 |
+
}
|
| 50 |
+
[data] cache=cache/owt_t5_llmclean_qwen36_35b_articlefull_pack1023_10k_appendeos1.pt rows=16 length=1024 vocab=32100 bos=1:</s> eos=1:</s>
|
| 51 |
+
[langflow_style] gamma=Gumbel(loc=4.723, scale=0.852) cutoff=1e-05 range=[2.6412,14.5320] use_bias=True self_cond_prob=0.5 concat=True
|
| 52 |
+
[optim] optimizer=muon lr=3.906250e-06 blr=1.000000e-03 effective_batch=1 warmup_steps=8 lr_schedule=constant
|
| 53 |
+
[embed] init=random dim=768 freeze=False model_path=/e2e-data/evad-tech-vla/wanghan58/models/hf/t5-small
|
| 54 |
+
step=1 loss=10.5276 gamma=4.1065 self_cond_use=0.000 lr=4.883e-07 pos0_bos_p=0.0001 last_eos_p=0.0000
|
| 55 |
+
[rank0]:[W530 21:38:32.536296296 ProcessGroupNCCL.cpp:1487] Warning: WARNING: destroy_process_group() was not called before program exit, which can leak resources. For more info, please see https://pytorch.org/docs/stable/distributed.html#shutdown (function operator())
|
| 56 |
+
[exit] 2026-05-30T21:38:34+00:00 rc=0 run=debug_langflowalg_learnedembed_single_gpu_20260530_213823
|