Add files using upload-large-folder tool
Browse files- LTA_openwebtext_dualt/logs/cmp_owt100k_dirichlet_wrongfix_softce_ddit_6x384_len128_gbs256_steps100000_parallel.log +0 -0
- LTA_openwebtext_dualt/logs/lta_lm1b_logisticnormal_linearmean_categorical_fullvocab_c1024_fullycoupled_flmpack_onehot_hardce_ddit_small_len128_gbs512_4gpu_1m_nw0.launcher.log +127 -0
- LTA_openwebtext_dualt/logs/lta_owt_c1024_len1024_t0to1_lowk64plus_cleanbridge_buf1000_gbs128_4gpu_2k.nohup +85 -0
- LTA_openwebtext_dualt/logs/lta_owt_gpt2cached_len1024_ddit768x12_elfopt_only_muon_ema_gbs512_8gpu_1m_20260513_032747.log +92 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/__init__.py +204 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/audio_to_audio.py +30 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/base.py +167 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/chat_completion.py +347 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/feature_extraction.py +36 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/fill_mask.py +47 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/image_classification.py +43 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/image_text_to_image.py +67 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/table_question_answering.py +62 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/text_classification.py +41 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/text_to_video.py +46 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/video_classification.py +45 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/visual_question_answering.py +49 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/zero_shot_object_detection.py +50 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/logs/owt_t5_elftokenized_full_len1024_C1_to_1024_pow1_d768_l12_h12_gbs512_2x8gpu_50ep_lr3e3_ema0p9999_elfopt_not5_bottleneck256_unfixed_norm_stateprobadd_selfcond_ce_fast_20260612_050225.log +0 -0
- LTA_openwebtext_dualt/mini_owt_logdirichlet/logs/owt_t5_llmclean_qwen36_35b_articlefull_10k_len1024_C1_to_1024_pow1_d768_l12_h12_gbs512_8gpu_40k_elfopt_t5embed_unfixed_selfcond_ce_20260530_220906.log +0 -0
LTA_openwebtext_dualt/logs/cmp_owt100k_dirichlet_wrongfix_softce_ddit_6x384_len128_gbs256_steps100000_parallel.log
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
LTA_openwebtext_dualt/logs/lta_lm1b_logisticnormal_linearmean_categorical_fullvocab_c1024_fullycoupled_flmpack_onehot_hardce_ddit_small_len128_gbs512_4gpu_1m_nw0.launcher.log
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[launch] method=logisticnormal_linearmean_categorical_fullvocab_c1024_fullycoupled host=di-20260411014000-djqhq time=2026-05-07T18:00:05+00:00
|
| 2 |
+
[launch] cwd=/e2e-data/evad-tech-vla/wanghan58/workspace/LTA_openwebtext_dualt
|
| 3 |
+
[launch] run_name=lta_lm1b_logisticnormal_linearmean_categorical_fullvocab_c1024_fullycoupled_flmpack_onehot_hardce_ddit_small_len128_gbs512_4gpu_1m_nw0
|
| 4 |
+
[launch] save_dir=runs/lta_lm1b_logisticnormal_linearmean_categorical_fullvocab_c1024_fullycoupled_flmpack_onehot_hardce_ddit_small_len128_gbs512_4gpu_1m_nw0
|
| 5 |
+
[launch] log_file=logs/lta_lm1b_logisticnormal_linearmean_categorical_fullvocab_c1024_fullycoupled_flmpack_onehot_hardce_ddit_small_len128_gbs512_4gpu_1m_nw0.log
|
| 6 |
+
|
| 7 |
+
*****************************************
|
| 8 |
+
Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
|
| 9 |
+
*****************************************
|
| 10 |
+
NCCL version 2.25.1+cuda12.8
|
| 11 |
+
{
|
| 12 |
+
"device": "cuda:0",
|
| 13 |
+
"rank": 0,
|
| 14 |
+
"world_size": 4,
|
| 15 |
+
"samples": "wrapped_stream",
|
| 16 |
+
"vocab_size": 30522,
|
| 17 |
+
"save_dir": "runs/lta_lm1b_logisticnormal_linearmean_categorical_fullvocab_c1024_fullycoupled_flmpack_onehot_hardce_ddit_small_len128_gbs512_4gpu_1m_nw0",
|
| 18 |
+
"batch_size": 64,
|
| 19 |
+
"grad_accum": 2,
|
| 20 |
+
"effective_batch_size": 512,
|
| 21 |
+
"global_batch_size": 512,
|
| 22 |
+
"lr_schedule": "constant_warmup",
|
| 23 |
+
"warmup_steps": 2500,
|
| 24 |
+
"adam_beta1": 0.9,
|
| 25 |
+
"adam_beta2": 0.999,
|
| 26 |
+
"adam_eps": 1e-08,
|
| 27 |
+
"model_type": "ddit",
|
| 28 |
+
"dual_t": true,
|
| 29 |
+
"corrupt_t_mode": "same",
|
| 30 |
+
"corrupt_min_t": 0.0,
|
| 31 |
+
"corrupt_max_t": 1.0,
|
| 32 |
+
"dirichlet_endpoint_mode": "categorical_dual_t",
|
| 33 |
+
"dirichlet_semantic_t_mode": "same",
|
| 34 |
+
"dirichlet_semantic_t_value": 0.0,
|
| 35 |
+
"categorical_wrong_from_full_vocab": true,
|
| 36 |
+
"simplex_bridge_sampler": "logistic_normal_linear_mean",
|
| 37 |
+
"logistic_normal_sigma_min": 0.18,
|
| 38 |
+
"logistic_normal_sigma_max": 2.2,
|
| 39 |
+
"logistic_normal_tau_min": 0.65,
|
| 40 |
+
"logistic_normal_tau_max": 1.15,
|
| 41 |
+
"torch_compile": false,
|
| 42 |
+
"compile_mode": "max-autotune",
|
| 43 |
+
"state_format": "prob",
|
| 44 |
+
"target_loss": "hard_ce",
|
| 45 |
+
"meanflow_weight": 0.0,
|
| 46 |
+
"bridge_noise_init": "logistic_normal",
|
| 47 |
+
"noise_sigma": -1.0,
|
| 48 |
+
"wrap": true,
|
| 49 |
+
"wrap_mode": "stream",
|
| 50 |
+
"wrap_record_buffer_size": 200,
|
| 51 |
+
"openwebtext_split": "all",
|
| 52 |
+
"detokenizer": "auto",
|
| 53 |
+
"resolved_detokenizer": "lm1b",
|
| 54 |
+
"num_workers": 0,
|
| 55 |
+
"latest_every": 1000,
|
| 56 |
+
"resume_path": ""
|
| 57 |
+
}
|
| 58 |
+
step=100 micro_steps=200 elapsed=33.7s lr=1.212000e-05 loss_all=10.1645 acc_all=0.5433 loss_corrupt=10.1710 acc_corrupt=0.3656 corrupt_frac=0.5489 loss=10.1710 loss_recon=10.1710 loss_meanflow=0.0000 mean_model_t=0.5004 mean_corrupt_t=0.5004 wrong_frac=0.4963 init_acc_corrupt=0.4923 init_gold_top10=0.4993 init_gold_top100=0.5039
|
| 59 |
+
step=200 micro_steps=400 elapsed=32.1s lr=2.412000e-05 loss_all=8.9418 acc_all=0.1305 loss_corrupt=8.9447 acc_corrupt=0.0986 corrupt_frac=0.5503 loss=8.9447 loss_recon=8.9447 loss_meanflow=0.0000 mean_model_t=0.5021 mean_corrupt_t=0.5021 wrong_frac=0.4978 init_acc_corrupt=0.4912 init_gold_top10=0.4979 init_gold_top100=0.5023
|
| 60 |
+
step=300 micro_steps=600 elapsed=32.1s lr=3.612000e-05 loss_all=6.9768 acc_all=0.1485 loss_corrupt=7.0881 acc_corrupt=0.1136 corrupt_frac=0.5541 loss=7.0881 loss_recon=7.0881 loss_meanflow=0.0000 mean_model_t=0.5008 mean_corrupt_t=0.5008 wrong_frac=0.4990 init_acc_corrupt=0.4898 init_gold_top10=0.4966 init_gold_top100=0.5011
|
| 61 |
+
step=400 micro_steps=800 elapsed=32.2s lr=4.812000e-05 loss_all=3.6665 acc_all=0.5435 loss_corrupt=4.7788 acc_corrupt=0.3888 corrupt_frac=0.5525 loss=4.7788 loss_recon=4.7788 loss_meanflow=0.0000 mean_model_t=0.5025 mean_corrupt_t=0.5025 wrong_frac=0.4996 init_acc_corrupt=0.4892 init_gold_top10=0.4960 init_gold_top100=0.5005
|
| 62 |
+
step=500 micro_steps=1000 elapsed=32.2s lr=6.012000e-05 loss_all=2.3262 acc_all=0.7071 loss_corrupt=3.7839 acc_corrupt=0.5148 corrupt_frac=0.5524 loss=3.7839 loss_recon=3.7839 loss_meanflow=0.0000 mean_model_t=0.4993 mean_corrupt_t=0.4993 wrong_frac=0.5015 init_acc_corrupt=0.4869 init_gold_top10=0.4939 init_gold_top100=0.4985
|
| 63 |
+
step=600 micro_steps=1200 elapsed=32.2s lr=7.212000e-05 loss_all=2.0390 acc_all=0.7353 loss_corrupt=3.4621 acc_corrupt=0.5424 corrupt_frac=0.5500 loss=3.4621 loss_recon=3.4621 loss_meanflow=0.0000 mean_model_t=0.4995 mean_corrupt_t=0.4995 wrong_frac=0.5005 init_acc_corrupt=0.4882 init_gold_top10=0.4950 init_gold_top100=0.4995
|
| 64 |
+
step=700 micro_steps=1400 elapsed=32.2s lr=8.412000e-05 loss_all=1.9037 acc_all=0.7466 loss_corrupt=3.2809 acc_corrupt=0.5560 corrupt_frac=0.5486 loss=3.2809 loss_recon=3.2809 loss_meanflow=0.0000 mean_model_t=0.4990 mean_corrupt_t=0.4990 wrong_frac=0.5002 init_acc_corrupt=0.4884 init_gold_top10=0.4953 init_gold_top100=0.4998
|
| 65 |
+
step=800 micro_steps=1600 elapsed=32.1s lr=9.612000e-05 loss_all=1.8368 acc_all=0.7513 loss_corrupt=3.1706 acc_corrupt=0.5644 corrupt_frac=0.5505 loss=3.1706 loss_recon=3.1706 loss_meanflow=0.0000 mean_model_t=0.4990 mean_corrupt_t=0.4990 wrong_frac=0.5002 init_acc_corrupt=0.4884 init_gold_top10=0.4954 init_gold_top100=0.4998
|
| 66 |
+
step=900 micro_steps=1800 elapsed=32.2s lr=1.081200e-04 loss_all=1.7957 acc_all=0.7535 loss_corrupt=3.1140 acc_corrupt=0.5668 corrupt_frac=0.5487 loss=3.1140 loss_recon=3.1140 loss_meanflow=0.0000 mean_model_t=0.4992 mean_corrupt_t=0.4992 wrong_frac=0.5027 init_acc_corrupt=0.4857 init_gold_top10=0.4927 init_gold_top100=0.4973
|
| 67 |
+
step=1000 micro_steps=2000 elapsed=32.1s lr=1.201200e-04 loss_all=1.7723 acc_all=0.7540 loss_corrupt=3.0474 acc_corrupt=0.5718 corrupt_frac=0.5531 loss=3.0474 loss_recon=3.0474 loss_meanflow=0.0000 mean_model_t=0.4954 mean_corrupt_t=0.4954 wrong_frac=0.5041 init_acc_corrupt=0.4845 init_gold_top10=0.4913 init_gold_top100=0.4961
|
| 68 |
+
step=1100 micro_steps=2200 elapsed=33.6s lr=1.321200e-04 loss_all=1.7107 acc_all=0.7603 loss_corrupt=2.9532 acc_corrupt=0.5815 corrupt_frac=0.5514 loss=2.9532 loss_recon=2.9532 loss_meanflow=0.0000 mean_model_t=0.5021 mean_corrupt_t=0.5021 wrong_frac=0.4960 init_acc_corrupt=0.4932 init_gold_top10=0.4997 init_gold_top100=0.5042
|
| 69 |
+
step=1200 micro_steps=2400 elapsed=32.1s lr=1.441200e-04 loss_all=1.6886 acc_all=0.7618 loss_corrupt=2.9234 acc_corrupt=0.5834 corrupt_frac=0.5499 loss=2.9234 loss_recon=2.9234 loss_meanflow=0.0000 mean_model_t=0.5036 mean_corrupt_t=0.5036 wrong_frac=0.4975 init_acc_corrupt=0.4914 init_gold_top10=0.4980 init_gold_top100=0.5025
|
| 70 |
+
step=1300 micro_steps=2600 elapsed=32.1s lr=1.561200e-04 loss_all=1.6636 acc_all=0.7640 loss_corrupt=2.8729 acc_corrupt=0.5880 corrupt_frac=0.5504 loss=2.8729 loss_recon=2.8729 loss_meanflow=0.0000 mean_model_t=0.5037 mean_corrupt_t=0.5037 wrong_frac=0.4960 init_acc_corrupt=0.4930 init_gold_top10=0.4997 init_gold_top100=0.5041
|
| 71 |
+
step=1400 micro_steps=2800 elapsed=32.1s lr=1.681200e-04 loss_all=1.6454 acc_all=0.7659 loss_corrupt=2.8562 acc_corrupt=0.5891 corrupt_frac=0.5462 loss=2.8562 loss_recon=2.8562 loss_meanflow=0.0000 mean_model_t=0.5015 mean_corrupt_t=0.5015 wrong_frac=0.4978 init_acc_corrupt=0.4908 init_gold_top10=0.4978 init_gold_top100=0.5023
|
| 72 |
+
step=1500 micro_steps=3000 elapsed=32.1s lr=1.801200e-04 loss_all=1.6487 acc_all=0.7642 loss_corrupt=2.8300 acc_corrupt=0.5910 corrupt_frac=0.5519 loss=2.8300 loss_recon=2.8300 loss_meanflow=0.0000 mean_model_t=0.5007 mean_corrupt_t=0.5007 wrong_frac=0.4967 init_acc_corrupt=0.4922 init_gold_top10=0.4990 init_gold_top100=0.5035
|
| 73 |
+
step=1600 micro_steps=3200 elapsed=32.2s lr=1.921200e-04 loss_all=1.6357 acc_all=0.7651 loss_corrupt=2.8133 acc_corrupt=0.5920 corrupt_frac=0.5504 loss=2.8133 loss_recon=2.8133 loss_meanflow=0.0000 mean_model_t=0.5011 mean_corrupt_t=0.5011 wrong_frac=0.4992 init_acc_corrupt=0.4896 init_gold_top10=0.4963 init_gold_top100=0.5008
|
| 74 |
+
step=1700 micro_steps=3400 elapsed=32.1s lr=2.041200e-04 loss_all=1.6167 acc_all=0.7668 loss_corrupt=2.7754 acc_corrupt=0.5956 corrupt_frac=0.5497 loss=2.7754 loss_recon=2.7754 loss_meanflow=0.0000 mean_model_t=0.5012 mean_corrupt_t=0.5012 wrong_frac=0.4969 init_acc_corrupt=0.4919 init_gold_top10=0.4987 init_gold_top100=0.5032
|
| 75 |
+
step=1800 micro_steps=3600 elapsed=32.1s lr=2.161200e-04 loss_all=1.6118 acc_all=0.7670 loss_corrupt=2.7677 acc_corrupt=0.5959 corrupt_frac=0.5490 loss=2.7677 loss_recon=2.7677 loss_meanflow=0.0000 mean_model_t=0.4992 mean_corrupt_t=0.4992 wrong_frac=0.4991 init_acc_corrupt=0.4894 init_gold_top10=0.4963 init_gold_top100=0.5009
|
| 76 |
+
step=1900 micro_steps=3800 elapsed=32.1s lr=2.281200e-04 loss_all=1.5905 acc_all=0.7690 loss_corrupt=2.7400 acc_corrupt=0.5984 corrupt_frac=0.5471 loss=2.7400 loss_recon=2.7400 loss_meanflow=0.0000 mean_model_t=0.4995 mean_corrupt_t=0.4995 wrong_frac=0.4992 init_acc_corrupt=0.4894 init_gold_top10=0.4963 init_gold_top100=0.5009
|
| 77 |
+
step=2000 micro_steps=4000 elapsed=32.1s lr=2.401200e-04 loss_all=1.5999 acc_all=0.7667 loss_corrupt=2.7239 acc_corrupt=0.5995 corrupt_frac=0.5547 loss=2.7239 loss_recon=2.7239 loss_meanflow=0.0000 mean_model_t=0.4999 mean_corrupt_t=0.4999 wrong_frac=0.4999 init_acc_corrupt=0.4888 init_gold_top10=0.4956 init_gold_top100=0.5002
|
| 78 |
+
step=2100 micro_steps=4200 elapsed=33.5s lr=2.521200e-04 loss_all=1.5770 acc_all=0.7691 loss_corrupt=2.7072 acc_corrupt=0.6004 corrupt_frac=0.5501 loss=2.7072 loss_recon=2.7072 loss_meanflow=0.0000 mean_model_t=0.4987 mean_corrupt_t=0.4987 wrong_frac=0.5014 init_acc_corrupt=0.4873 init_gold_top10=0.4942 init_gold_top100=0.4987
|
| 79 |
+
step=2200 micro_steps=4400 elapsed=32.1s lr=2.641200e-04 loss_all=1.5405 acc_all=0.7737 loss_corrupt=2.6464 acc_corrupt=0.6083 corrupt_frac=0.5497 loss=2.6464 loss_recon=2.6464 loss_meanflow=0.0000 mean_model_t=0.5043 mean_corrupt_t=0.5043 wrong_frac=0.4950 init_acc_corrupt=0.4938 init_gold_top10=0.5006 init_gold_top100=0.5051
|
| 80 |
+
step=2300 micro_steps=4600 elapsed=32.1s lr=2.761200e-04 loss_all=1.5372 acc_all=0.7734 loss_corrupt=2.6522 acc_corrupt=0.6061 corrupt_frac=0.5471 loss=2.6522 loss_recon=2.6522 loss_meanflow=0.0000 mean_model_t=0.5005 mean_corrupt_t=0.5005 wrong_frac=0.5012 init_acc_corrupt=0.4875 init_gold_top10=0.4944 init_gold_top100=0.4990
|
| 81 |
+
step=2400 micro_steps=4800 elapsed=32.1s lr=2.881200e-04 loss_all=1.5456 acc_all=0.7718 loss_corrupt=2.6467 acc_corrupt=0.6063 corrupt_frac=0.5525 loss=2.6467 loss_recon=2.6467 loss_meanflow=0.0000 mean_model_t=0.4997 mean_corrupt_t=0.4997 wrong_frac=0.5011 init_acc_corrupt=0.4875 init_gold_top10=0.4944 init_gold_top100=0.4991
|
| 82 |
+
step=2500 micro_steps=5000 elapsed=32.0s lr=3.000000e-04 loss_all=1.5094 acc_all=0.7760 loss_corrupt=2.6095 acc_corrupt=0.6098 corrupt_frac=0.5460 loss=2.6095 loss_recon=2.6095 loss_meanflow=0.0000 mean_model_t=0.4982 mean_corrupt_t=0.4982 wrong_frac=0.5001 init_acc_corrupt=0.4885 init_gold_top10=0.4954 init_gold_top100=0.4999
|
| 83 |
+
step=2600 micro_steps=5200 elapsed=32.1s lr=3.000000e-04 loss_all=1.5078 acc_all=0.7758 loss_corrupt=2.5903 acc_corrupt=0.6120 corrupt_frac=0.5509 loss=2.5903 loss_recon=2.5903 loss_meanflow=0.0000 mean_model_t=0.4994 mean_corrupt_t=0.4994 wrong_frac=0.4994 init_acc_corrupt=0.4892 init_gold_top10=0.4961 init_gold_top100=0.5007
|
| 84 |
+
step=2700 micro_steps=5400 elapsed=32.1s lr=3.000000e-04 loss_all=1.5007 acc_all=0.7764 loss_corrupt=2.5900 acc_corrupt=0.6113 corrupt_frac=0.5489 loss=2.5900 loss_recon=2.5900 loss_meanflow=0.0000 mean_model_t=0.5002 mean_corrupt_t=0.5002 wrong_frac=0.5004 init_acc_corrupt=0.4885 init_gold_top10=0.4952 init_gold_top100=0.4997
|
| 85 |
+
step=2800 micro_steps=5600 elapsed=32.1s lr=3.000000e-04 loss_all=1.4679 acc_all=0.7805 loss_corrupt=2.5478 acc_corrupt=0.6162 corrupt_frac=0.5472 loss=2.5478 loss_recon=2.5478 loss_meanflow=0.0000 mean_model_t=0.5018 mean_corrupt_t=0.5018 wrong_frac=0.4977 init_acc_corrupt=0.4909 init_gold_top10=0.4978 init_gold_top100=0.5023
|
| 86 |
+
step=2900 micro_steps=5800 elapsed=32.1s lr=3.000000e-04 loss_all=1.4539 acc_all=0.7822 loss_corrupt=2.5214 acc_corrupt=0.6193 corrupt_frac=0.5481 loss=2.5214 loss_recon=2.5214 loss_meanflow=0.0000 mean_model_t=0.5021 mean_corrupt_t=0.5021 wrong_frac=0.4967 init_acc_corrupt=0.4921 init_gold_top10=0.4989 init_gold_top100=0.5033
|
| 87 |
+
step=3000 micro_steps=6000 elapsed=32.1s lr=3.000000e-04 loss_all=1.4724 acc_all=0.7793 loss_corrupt=2.5567 acc_corrupt=0.6138 corrupt_frac=0.5484 loss=2.5567 loss_recon=2.5567 loss_meanflow=0.0000 mean_model_t=0.4967 mean_corrupt_t=0.4967 wrong_frac=0.5032 init_acc_corrupt=0.4854 init_gold_top10=0.4922 init_gold_top100=0.4969
|
| 88 |
+
step=3100 micro_steps=6200 elapsed=33.7s lr=3.000000e-04 loss_all=1.4427 acc_all=0.7830 loss_corrupt=2.5009 acc_corrupt=0.6208 corrupt_frac=0.5492 loss=2.5009 loss_recon=2.5009 loss_meanflow=0.0000 mean_model_t=0.5036 mean_corrupt_t=0.5036 wrong_frac=0.4967 init_acc_corrupt=0.4921 init_gold_top10=0.4988 init_gold_top100=0.5033
|
| 89 |
+
step=3200 micro_steps=6400 elapsed=32.2s lr=3.000000e-04 loss_all=1.4411 acc_all=0.7829 loss_corrupt=2.5122 acc_corrupt=0.6186 corrupt_frac=0.5470 loss=2.5122 loss_recon=2.5122 loss_meanflow=0.0000 mean_model_t=0.5012 mean_corrupt_t=0.5012 wrong_frac=0.5008 init_acc_corrupt=0.4879 init_gold_top10=0.4948 init_gold_top100=0.4993
|
| 90 |
+
step=3300 micro_steps=6600 elapsed=32.2s lr=3.000000e-04 loss_all=1.4424 acc_all=0.7825 loss_corrupt=2.5125 acc_corrupt=0.6182 corrupt_frac=0.5477 loss=2.5125 loss_recon=2.5125 loss_meanflow=0.0000 mean_model_t=0.4977 mean_corrupt_t=0.4977 wrong_frac=0.5028 init_acc_corrupt=0.4857 init_gold_top10=0.4926 init_gold_top100=0.4973
|
| 91 |
+
step=3400 micro_steps=6800 elapsed=32.2s lr=3.000000e-04 loss_all=1.4111 acc_all=0.7869 loss_corrupt=2.4540 acc_corrupt=0.6265 corrupt_frac=0.5486 loss=2.4540 loss_recon=2.4540 loss_meanflow=0.0000 mean_model_t=0.5032 mean_corrupt_t=0.5032 wrong_frac=0.4946 init_acc_corrupt=0.4944 init_gold_top10=0.5011 init_gold_top100=0.5055
|
| 92 |
+
step=3500 micro_steps=7000 elapsed=32.1s lr=3.000000e-04 loss_all=1.4202 acc_all=0.7849 loss_corrupt=2.4856 acc_corrupt=0.6206 corrupt_frac=0.5455 loss=2.4856 loss_recon=2.4856 loss_meanflow=0.0000 mean_model_t=0.4976 mean_corrupt_t=0.4976 wrong_frac=0.5027 init_acc_corrupt=0.4857 init_gold_top10=0.4927 init_gold_top100=0.4974
|
| 93 |
+
step=3600 micro_steps=7200 elapsed=32.1s lr=3.000000e-04 loss_all=1.4081 acc_all=0.7865 loss_corrupt=2.4649 acc_corrupt=0.6233 corrupt_frac=0.5459 loss=2.4649 loss_recon=2.4649 loss_meanflow=0.0000 mean_model_t=0.4991 mean_corrupt_t=0.4991 wrong_frac=0.4999 init_acc_corrupt=0.4888 init_gold_top10=0.4955 init_gold_top100=0.5001
|
| 94 |
+
W0507 18:19:39.536000 353386 torch/distributed/elastic/agent/server/api.py:719] Received 15 death signal, shutting down workers
|
| 95 |
+
W0507 18:19:39.537000 353386 torch/distributed/elastic/multiprocessing/api.py:898] Sending process 353453 closing signal SIGTERM
|
| 96 |
+
W0507 18:19:39.537000 353386 torch/distributed/elastic/multiprocessing/api.py:898] Sending process 353454 closing signal SIGTERM
|
| 97 |
+
W0507 18:19:39.538000 353386 torch/distributed/elastic/multiprocessing/api.py:898] Sending process 353455 closing signal SIGTERM
|
| 98 |
+
W0507 18:19:39.538000 353386 torch/distributed/elastic/multiprocessing/api.py:898] Sending process 353456 closing signal SIGTERM
|
| 99 |
+
Traceback (most recent call last):
|
| 100 |
+
File "<frozen runpy>", line 198, in _run_module_as_main
|
| 101 |
+
File "<frozen runpy>", line 88, in _run_code
|
| 102 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 922, in <module>
|
| 103 |
+
main()
|
| 104 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/multiprocessing/errors/__init__.py", line 355, in wrapper
|
| 105 |
+
return f(*args, **kwargs)
|
| 106 |
+
^^^^^^^^^^^^^^^^^^
|
| 107 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 918, in main
|
| 108 |
+
run(args)
|
| 109 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/run.py", line 909, in run
|
| 110 |
+
elastic_launch(
|
| 111 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 139, in __call__
|
| 112 |
+
return launch_agent(self._config, self._entrypoint, list(args))
|
| 113 |
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| 114 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/launcher/api.py", line 261, in launch_agent
|
| 115 |
+
result = agent.run()
|
| 116 |
+
^^^^^^^^^^^
|
| 117 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/metrics/api.py", line 137, in wrapper
|
| 118 |
+
result = f(*args, **kwargs)
|
| 119 |
+
^^^^^^^^^^^^^^^^^^
|
| 120 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 711, in run
|
| 121 |
+
result = self._invoke_run(role)
|
| 122 |
+
^^^^^^^^^^^^^^^^^^^^^^
|
| 123 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/agent/server/api.py", line 870, in _invoke_run
|
| 124 |
+
time.sleep(monitor_interval)
|
| 125 |
+
File "/usr/local/lib/python3.12/dist-packages/torch/distributed/elastic/multiprocessing/api.py", line 84, in _terminate_process_handler
|
| 126 |
+
raise SignalException(f"Process {os.getpid()} got signal: {sigval}", sigval=sigval)
|
| 127 |
+
torch.distributed.elastic.multiprocessing.api.SignalException: Process 353386 got signal: 15
|
LTA_openwebtext_dualt/logs/lta_owt_c1024_len1024_t0to1_lowk64plus_cleanbridge_buf1000_gbs128_4gpu_2k.nohup
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[launch] owt low-t-cut low-k 100-step pilot
|
| 2 |
+
[launch] run_name=lta_owt_c1024_len1024_t0to1_lowk64plus_cleanbridge_buf1000_gbs128_4gpu_2k
|
| 3 |
+
[launch] save_dir=runs/lta_owt_c1024_len1024_t0to1_lowk64plus_cleanbridge_buf1000_gbs128_4gpu_2k
|
| 4 |
+
[launch] t=0.0..1.0 mask=0.01..1.0
|
| 5 |
+
[launch] mixture original=0.0 lowk=1.0 all=0.0
|
| 6 |
+
[launch] clean_state_mode=bridge
|
| 7 |
+
|
| 8 |
+
*****************************************
|
| 9 |
+
Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
|
| 10 |
+
*****************************************
|
| 11 |
+
NCCL version 2.25.1+cuda12.8
|
| 12 |
+
{
|
| 13 |
+
"device": "cuda:0",
|
| 14 |
+
"rank": 0,
|
| 15 |
+
"world_size": 4,
|
| 16 |
+
"samples": "wrapped_stream_online_shuffle:1000",
|
| 17 |
+
"vocab_size": 50257,
|
| 18 |
+
"save_dir": "runs/lta_owt_c1024_len1024_t0to1_lowk64plus_cleanbridge_buf1000_gbs128_4gpu_2k",
|
| 19 |
+
"batch_size": 16,
|
| 20 |
+
"grad_accum": 2,
|
| 21 |
+
"effective_batch_size": 128,
|
| 22 |
+
"global_batch_size": 128,
|
| 23 |
+
"lr_schedule": "constant_warmup",
|
| 24 |
+
"warmup_steps": 100,
|
| 25 |
+
"adam_beta1": 0.9,
|
| 26 |
+
"adam_beta2": 0.999,
|
| 27 |
+
"adam_eps": 1e-08,
|
| 28 |
+
"model_type": "ddit",
|
| 29 |
+
"dual_t": true,
|
| 30 |
+
"corrupt_t_mode": "same",
|
| 31 |
+
"corrupt_min_t": 0.0,
|
| 32 |
+
"corrupt_max_t": 1.0,
|
| 33 |
+
"dirichlet_endpoint_mode": "categorical_dual_t",
|
| 34 |
+
"dirichlet_semantic_t_mode": "same",
|
| 35 |
+
"dirichlet_semantic_t_value": 0.0,
|
| 36 |
+
"categorical_wrong_from_full_vocab": true,
|
| 37 |
+
"simplex_bridge_sampler": "dirichlet",
|
| 38 |
+
"logistic_normal_sigma_min": 0.18,
|
| 39 |
+
"logistic_normal_sigma_max": 2.2,
|
| 40 |
+
"logistic_normal_tau_min": 0.65,
|
| 41 |
+
"logistic_normal_tau_max": 1.15,
|
| 42 |
+
"torch_compile": false,
|
| 43 |
+
"compile_mode": "max-autotune",
|
| 44 |
+
"state_format": "prob",
|
| 45 |
+
"target_loss": "hard_ce",
|
| 46 |
+
"meanflow_weight": 0.0,
|
| 47 |
+
"bridge_noise_init": "logistic_normal",
|
| 48 |
+
"noise_sigma": -1.0,
|
| 49 |
+
"wrap": true,
|
| 50 |
+
"wrap_mode": "stream",
|
| 51 |
+
"wrap_record_buffer_size": 200,
|
| 52 |
+
"owt_cached_chunks": false,
|
| 53 |
+
"owt_chunk_cache_dir": "",
|
| 54 |
+
"owt_chunk_cache_rebuild": false,
|
| 55 |
+
"owt_chunk_cache_write_batch": 4096,
|
| 56 |
+
"online_chunk_shuffle": true,
|
| 57 |
+
"online_chunk_shuffle_buffer": 1000,
|
| 58 |
+
"openwebtext_split": "train_minus_100k",
|
| 59 |
+
"detokenizer": "auto",
|
| 60 |
+
"resolved_detokenizer": null,
|
| 61 |
+
"num_workers": 0,
|
| 62 |
+
"latest_every": 500,
|
| 63 |
+
"resume_path": ""
|
| 64 |
+
}
|
| 65 |
+
step=100 micro_steps=200 elapsed=105.3s lr=3.000000e-04 loss_all=8.1603 acc_all=0.2428 loss_corrupt=8.2249 acc_corrupt=0.2239 corrupt_frac=0.8529 loss=8.2249 loss_recon=8.2249 loss_meanflow=0.0000 mean_model_t=0.5013 mean_corrupt_t=0.5013 wrong_frac=0.4990 init_acc_corrupt=0.4665 init_gold_top10=0.4953 init_gold_top100=0.5251
|
| 66 |
+
step=200 micro_steps=400 elapsed=101.2s lr=3.000000e-04 loss_all=4.0894 acc_all=0.5048 loss_corrupt=4.4452 acc_corrupt=0.4609 corrupt_frac=0.8555 loss=4.4452 loss_recon=4.4452 loss_meanflow=0.0000 mean_model_t=0.4963 mean_corrupt_t=0.4963 wrong_frac=0.5040 init_acc_corrupt=0.4616 init_gold_top10=0.4904 init_gold_top100=0.5198
|
| 67 |
+
step=300 micro_steps=600 elapsed=102.1s lr=3.000000e-04 loss_all=3.8334 acc_all=0.5283 loss_corrupt=4.1803 acc_corrupt=0.4854 corrupt_frac=0.8540 loss=4.1803 loss_recon=4.1803 loss_meanflow=0.0000 mean_model_t=0.5010 mean_corrupt_t=0.5010 wrong_frac=0.4986 init_acc_corrupt=0.4673 init_gold_top10=0.4959 init_gold_top100=0.5249
|
| 68 |
+
step=400 micro_steps=800 elapsed=101.3s lr=3.000000e-04 loss_all=3.6010 acc_all=0.5477 loss_corrupt=3.9351 acc_corrupt=0.5057 corrupt_frac=0.8540 loss=3.9351 loss_recon=3.9351 loss_meanflow=0.0000 mean_model_t=0.5092 mean_corrupt_t=0.5092 wrong_frac=0.4904 init_acc_corrupt=0.4760 init_gold_top10=0.5043 init_gold_top100=0.5332
|
| 69 |
+
step=500 micro_steps=1000 elapsed=101.6s lr=3.000000e-04 loss_all=3.5088 acc_all=0.5530 loss_corrupt=3.8326 acc_corrupt=0.5115 corrupt_frac=0.8551 loss=3.8326 loss_recon=3.8326 loss_meanflow=0.0000 mean_model_t=0.5078 mean_corrupt_t=0.5078 wrong_frac=0.4921 init_acc_corrupt=0.4738 init_gold_top10=0.5027 init_gold_top100=0.5309
|
| 70 |
+
step=600 micro_steps=1200 elapsed=121.0s lr=3.000000e-04 loss_all=3.5477 acc_all=0.5448 loss_corrupt=3.8690 acc_corrupt=0.5034 corrupt_frac=0.8546 loss=3.8690 loss_recon=3.8690 loss_meanflow=0.0000 mean_model_t=0.4973 mean_corrupt_t=0.4973 wrong_frac=0.5028 init_acc_corrupt=0.4617 init_gold_top10=0.4912 init_gold_top100=0.5216
|
| 71 |
+
step=700 micro_steps=1400 elapsed=151.2s lr=3.000000e-04 loss_all=3.4579 acc_all=0.5530 loss_corrupt=3.7778 acc_corrupt=0.5112 corrupt_frac=0.8540 loss=3.7778 loss_recon=3.7778 loss_meanflow=0.0000 mean_model_t=0.5022 mean_corrupt_t=0.5022 wrong_frac=0.4988 init_acc_corrupt=0.4661 init_gold_top10=0.4956 init_gold_top100=0.5251
|
| 72 |
+
step=800 micro_steps=1600 elapsed=101.6s lr=3.000000e-04 loss_all=3.3878 acc_all=0.5601 loss_corrupt=3.6868 acc_corrupt=0.5205 corrupt_frac=0.8564 loss=3.6868 loss_recon=3.6868 loss_meanflow=0.0000 mean_model_t=0.5055 mean_corrupt_t=0.5055 wrong_frac=0.4933 init_acc_corrupt=0.4730 init_gold_top10=0.5013 init_gold_top100=0.5302
|
| 73 |
+
step=900 micro_steps=1800 elapsed=101.6s lr=3.000000e-04 loss_all=3.4095 acc_all=0.5549 loss_corrupt=3.7220 acc_corrupt=0.5133 corrupt_frac=0.8515 loss=3.7220 loss_recon=3.7220 loss_meanflow=0.0000 mean_model_t=0.4971 mean_corrupt_t=0.4971 wrong_frac=0.5024 init_acc_corrupt=0.4637 init_gold_top10=0.4917 init_gold_top100=0.5223
|
| 74 |
+
step=1000 micro_steps=2000 elapsed=150.6s lr=3.000000e-04 loss_all=3.4462 acc_all=0.5495 loss_corrupt=3.7466 acc_corrupt=0.5093 corrupt_frac=0.8552 loss=3.7466 loss_recon=3.7466 loss_meanflow=0.0000 mean_model_t=0.4921 mean_corrupt_t=0.4921 wrong_frac=0.5076 init_acc_corrupt=0.4575 init_gold_top10=0.4863 init_gold_top100=0.5181
|
| 75 |
+
step=1100 micro_steps=2200 elapsed=137.7s lr=3.000000e-04 loss_all=3.3705 acc_all=0.5575 loss_corrupt=3.6763 acc_corrupt=0.5165 corrupt_frac=0.8529 loss=3.6763 loss_recon=3.6763 loss_meanflow=0.0000 mean_model_t=0.4963 mean_corrupt_t=0.4963 wrong_frac=0.5031 init_acc_corrupt=0.4619 init_gold_top10=0.4911 init_gold_top100=0.5209
|
| 76 |
+
step=1200 micro_steps=2400 elapsed=101.7s lr=3.000000e-04 loss_all=3.3290 acc_all=0.5614 loss_corrupt=3.6456 acc_corrupt=0.5187 corrupt_frac=0.8546 loss=3.6456 loss_recon=3.6456 loss_meanflow=0.0000 mean_model_t=0.4982 mean_corrupt_t=0.4982 wrong_frac=0.5023 init_acc_corrupt=0.4630 init_gold_top10=0.4921 init_gold_top100=0.5221
|
| 77 |
+
step=1300 micro_steps=2600 elapsed=101.5s lr=3.000000e-04 loss_all=3.3538 acc_all=0.5572 loss_corrupt=3.6600 acc_corrupt=0.5157 corrupt_frac=0.8554 loss=3.6600 loss_recon=3.6600 loss_meanflow=0.0000 mean_model_t=0.4943 mean_corrupt_t=0.4943 wrong_frac=0.5056 init_acc_corrupt=0.4591 init_gold_top10=0.4888 init_gold_top100=0.5192
|
| 78 |
+
step=1400 micro_steps=2800 elapsed=101.7s lr=3.000000e-04 loss_all=3.3495 acc_all=0.5595 loss_corrupt=3.6461 acc_corrupt=0.5193 corrupt_frac=0.8568 loss=3.6461 loss_recon=3.6461 loss_meanflow=0.0000 mean_model_t=0.4980 mean_corrupt_t=0.4980 wrong_frac=0.5018 init_acc_corrupt=0.4625 init_gold_top10=0.4922 init_gold_top100=0.5239
|
| 79 |
+
step=1500 micro_steps=3000 elapsed=102.7s lr=3.000000e-04 loss_all=3.2241 acc_all=0.5725 loss_corrupt=3.5293 acc_corrupt=0.5309 corrupt_frac=0.8553 loss=3.5293 loss_recon=3.5293 loss_meanflow=0.0000 mean_model_t=0.5072 mean_corrupt_t=0.5072 wrong_frac=0.4926 init_acc_corrupt=0.4732 init_gold_top10=0.5020 init_gold_top100=0.5305
|
| 80 |
+
step=1600 micro_steps=3200 elapsed=152.8s lr=3.000000e-04 loss_all=3.2893 acc_all=0.5636 loss_corrupt=3.5949 acc_corrupt=0.5217 corrupt_frac=0.8537 loss=3.5949 loss_recon=3.5949 loss_meanflow=0.0000 mean_model_t=0.4976 mean_corrupt_t=0.4976 wrong_frac=0.5025 init_acc_corrupt=0.4617 init_gold_top10=0.4918 init_gold_top100=0.5222
|
| 81 |
+
step=1700 micro_steps=3400 elapsed=190.0s lr=3.000000e-04 loss_all=3.2442 acc_all=0.5687 loss_corrupt=3.5504 acc_corrupt=0.5266 corrupt_frac=0.8535 loss=3.5504 loss_recon=3.5504 loss_meanflow=0.0000 mean_model_t=0.5021 mean_corrupt_t=0.5021 wrong_frac=0.4979 init_acc_corrupt=0.4670 init_gold_top10=0.4966 init_gold_top100=0.5258
|
| 82 |
+
step=1800 micro_steps=3600 elapsed=103.1s lr=3.000000e-04 loss_all=3.2934 acc_all=0.5620 loss_corrupt=3.5990 acc_corrupt=0.5200 corrupt_frac=0.8535 loss=3.5990 loss_recon=3.5990 loss_meanflow=0.0000 mean_model_t=0.4942 mean_corrupt_t=0.4942 wrong_frac=0.5053 init_acc_corrupt=0.4599 init_gold_top10=0.4888 init_gold_top100=0.5191
|
| 83 |
+
step=1900 micro_steps=3800 elapsed=102.9s lr=3.000000e-04 loss_all=3.2194 acc_all=0.5701 loss_corrupt=3.5194 acc_corrupt=0.5286 corrupt_frac=0.8545 loss=3.5194 loss_recon=3.5194 loss_meanflow=0.0000 mean_model_t=0.5006 mean_corrupt_t=0.5006 wrong_frac=0.4989 init_acc_corrupt=0.4664 init_gold_top10=0.4955 init_gold_top100=0.5250
|
| 84 |
+
step=2000 micro_steps=4000 elapsed=103.0s lr=3.000000e-04 loss_all=3.2098 acc_all=0.5715 loss_corrupt=3.5113 acc_corrupt=0.5298 corrupt_frac=0.8547 loss=3.5113 loss_recon=3.5113 loss_meanflow=0.0000 mean_model_t=0.5035 mean_corrupt_t=0.5035 wrong_frac=0.4971 init_acc_corrupt=0.4693 init_gold_top10=0.4973 init_gold_top100=0.5262
|
| 85 |
+
scripts/launch_lta_owt_c1024_fullycoupled_4gpu_len1024_lowtcut_lowk_100step.sh: line 137: --dirichlet_endpoint_mode: command not found
|
LTA_openwebtext_dualt/logs/lta_owt_gpt2cached_len1024_ddit768x12_elfopt_only_muon_ema_gbs512_8gpu_1m_20260513_032747.log
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"device": "cuda:0",
|
| 3 |
+
"rank": 0,
|
| 4 |
+
"world_size": 1,
|
| 5 |
+
"samples": "owt_cached_chunks:8734897",
|
| 6 |
+
"vocab_size": 50257,
|
| 7 |
+
"tokenizer_vocab_size": 50257,
|
| 8 |
+
"save_dir": "runs/lta_owt_gpt2cached_len1024_ddit768x12_elfopt_only_muon_ema_gbs512_8gpu_1m_20260513_032747",
|
| 9 |
+
"batch_size": 32,
|
| 10 |
+
"grad_accum": 16,
|
| 11 |
+
"effective_batch_size": 512,
|
| 12 |
+
"global_batch_size": 512,
|
| 13 |
+
"lr_schedule": "constant_warmup",
|
| 14 |
+
"optimizer": "muon",
|
| 15 |
+
"warmup_steps": 2000,
|
| 16 |
+
"min_lr": 0.0,
|
| 17 |
+
"weight_decay": 0.0,
|
| 18 |
+
"adamw_param_groups": "nanogpt",
|
| 19 |
+
"adam_beta1": 0.9,
|
| 20 |
+
"adam_beta2": 0.95,
|
| 21 |
+
"adam_eps": 1e-08,
|
| 22 |
+
"muon_momentum": 0.95,
|
| 23 |
+
"muon_ns_steps": 5,
|
| 24 |
+
"muon_update_scale": 1.0,
|
| 25 |
+
"ema_decay": 0.9999,
|
| 26 |
+
"ema_start_step": 0,
|
| 27 |
+
"model_type": "ddit",
|
| 28 |
+
"dual_t": true,
|
| 29 |
+
"corrupt_t_mode": "same",
|
| 30 |
+
"corrupt_min_t": 0.0,
|
| 31 |
+
"corrupt_max_t": 1.0,
|
| 32 |
+
"prefix_block_prob": 0.0,
|
| 33 |
+
"prefix_block_len": 128,
|
| 34 |
+
"dirichlet_endpoint_mode": "categorical_dual_t",
|
| 35 |
+
"dirichlet_semantic_t_mode": "same",
|
| 36 |
+
"dirichlet_semantic_t_value": 0.0,
|
| 37 |
+
"categorical_wrong_from_full_vocab": true,
|
| 38 |
+
"categorical_wrong_from_batch_valid_tokens": false,
|
| 39 |
+
"mask_mixture_original_prob": 0.0,
|
| 40 |
+
"mask_mixture_lowk_prob": 0.0,
|
| 41 |
+
"mask_mixture_lowcorrupt_prob": 0.0,
|
| 42 |
+
"mask_mixture_block_prob": 0.0,
|
| 43 |
+
"mask_mixture_all_prob": 0.0,
|
| 44 |
+
"mask_mixture_lowk_clean_tokens": "1,2,4,8,16,32,64",
|
| 45 |
+
"mask_mixture_lowcorrupt_tokens": "1,2,4,8,16,32,64",
|
| 46 |
+
"mask_mixture_block_tokens": "64,128",
|
| 47 |
+
"simplex_bridge_sampler": "dirichlet",
|
| 48 |
+
"logistic_normal_sigma_min": 0.18,
|
| 49 |
+
"logistic_normal_sigma_max": 2.2,
|
| 50 |
+
"logistic_normal_tau_min": 0.65,
|
| 51 |
+
"logistic_normal_tau_max": 1.15,
|
| 52 |
+
"torch_compile": false,
|
| 53 |
+
"compile_mode": "max-autotune",
|
| 54 |
+
"state_format": "prob",
|
| 55 |
+
"target_loss": "hard_ce",
|
| 56 |
+
"meanflow_weight": 0.0,
|
| 57 |
+
"bridge_noise_init": "logistic_normal",
|
| 58 |
+
"noise_sigma": -1.0,
|
| 59 |
+
"allow_tf32": true,
|
| 60 |
+
"activation_checkpointing": true,
|
| 61 |
+
"activation_checkpoint_interval": 1,
|
| 62 |
+
"ddp_static_graph": false,
|
| 63 |
+
"ddp_gradient_as_bucket_view": true,
|
| 64 |
+
"blocking_data_transfer": false,
|
| 65 |
+
"dataloader_prefetch_factor": 4,
|
| 66 |
+
"full_train_stats": false,
|
| 67 |
+
"wrap": true,
|
| 68 |
+
"wrap_mode": "stream",
|
| 69 |
+
"wrap_record_buffer_size": 200,
|
| 70 |
+
"owt_cached_chunks": true,
|
| 71 |
+
"owt_chunk_cache_dir": "/e2e-data/evad-tech-vla/wanghan58/data/small_benchmarks/langflow_2604_11748/openwebtext_lta_cached_chunks/gpt2_len1024_train_minus_100k",
|
| 72 |
+
"owt_chunk_cache_rebuild": false,
|
| 73 |
+
"owt_chunk_cache_write_batch": 4096,
|
| 74 |
+
"owt_exact_repeat_per_chunk": 0,
|
| 75 |
+
"online_chunk_shuffle": false,
|
| 76 |
+
"online_chunk_shuffle_buffer": 10000,
|
| 77 |
+
"openwebtext_split": "train_minus_100k",
|
| 78 |
+
"detokenizer": "auto",
|
| 79 |
+
"resolved_detokenizer": null,
|
| 80 |
+
"num_workers": 1,
|
| 81 |
+
"latest_every": 5000,
|
| 82 |
+
"resume_path": ""
|
| 83 |
+
}
|
| 84 |
+
step=50 micro_steps=800 elapsed=571.2s lr=5.100000e-05 loss_all=10.8125 acc_all=0.5605 loss_corrupt=10.8125 acc_corrupt=0.3880 corrupt_frac=0.5761 loss=10.8125 loss_recon=10.8125 loss_meanflow=0.0000 mean_model_t=0.4831 mean_corrupt_t=0.4831 mean_loss_t_weight=1.0000 prior_center_loss_beta=0.0000 wrong_frac=0.4951 init_acc_corrupt=0.4676 init_gold_top10=0.4988 init_gold_top100=0.5335
|
| 85 |
+
step=100 micro_steps=1600 elapsed=570.4s lr=1.010000e-04 loss_all=10.7564 acc_all=0.5739 loss_corrupt=10.7781 acc_corrupt=0.3814 corrupt_frac=0.5033 loss=10.7781 loss_recon=10.7781 loss_meanflow=0.0000 mean_model_t=0.4987 mean_corrupt_t=0.4987 mean_loss_t_weight=1.0000 prior_center_loss_beta=0.0000 wrong_frac=0.4954 init_acc_corrupt=0.4742 init_gold_top10=0.4992 init_gold_top100=0.5288
|
| 86 |
+
step=150 micro_steps=2400 elapsed=570.4s lr=1.510000e-04 loss_all=10.6733 acc_all=0.5642 loss_corrupt=10.7260 acc_corrupt=0.3500 corrupt_frac=0.5002 loss=10.7260 loss_recon=10.7260 loss_meanflow=0.0000 mean_model_t=0.5064 mean_corrupt_t=0.5064 mean_loss_t_weight=1.0000 prior_center_loss_beta=0.0000 wrong_frac=0.5343 init_acc_corrupt=0.4266 init_gold_top10=0.4587 init_gold_top100=0.4930
|
| 87 |
+
step=200 micro_steps=3200 elapsed=570.5s lr=2.010000e-04 loss_all=10.5303 acc_all=0.5759 loss_corrupt=10.5970 acc_corrupt=0.4295 corrupt_frac=0.5151 loss=10.5970 loss_recon=10.5970 loss_meanflow=0.0000 mean_model_t=0.5509 mean_corrupt_t=0.5509 mean_loss_t_weight=1.0000 prior_center_loss_beta=0.0000 wrong_frac=0.4047 init_acc_corrupt=0.5650 init_gold_top10=0.5911 init_gold_top100=0.6175
|
| 88 |
+
step=250 micro_steps=4000 elapsed=570.6s lr=2.510000e-04 loss_all=10.3466 acc_all=0.5599 loss_corrupt=10.4928 acc_corrupt=0.3590 corrupt_frac=0.4792 loss=10.4928 loss_recon=10.4928 loss_meanflow=0.0000 mean_model_t=0.5542 mean_corrupt_t=0.5542 mean_loss_t_weight=1.0000 prior_center_loss_beta=0.0000 wrong_frac=0.4766 init_acc_corrupt=0.4833 init_gold_top10=0.5175 init_gold_top100=0.5533
|
| 89 |
+
step=300 micro_steps=4800 elapsed=570.4s lr=3.010000e-04 loss_all=10.1577 acc_all=0.5103 loss_corrupt=10.3788 acc_corrupt=0.3098 corrupt_frac=0.4810 loss=10.3788 loss_recon=10.3788 loss_meanflow=0.0000 mean_model_t=0.4728 mean_corrupt_t=0.4728 mean_loss_t_weight=1.0000 prior_center_loss_beta=0.0000 wrong_frac=0.5348 init_acc_corrupt=0.4165 init_gold_top10=0.4597 init_gold_top100=0.4903
|
| 90 |
+
step=350 micro_steps=5600 elapsed=570.5s lr=3.510000e-04 loss_all=9.9247 acc_all=0.4639 loss_corrupt=10.2645 acc_corrupt=0.2476 corrupt_frac=0.5316 loss=10.2645 loss_recon=10.2645 loss_meanflow=0.0000 mean_model_t=0.4559 mean_corrupt_t=0.4559 mean_loss_t_weight=1.0000 prior_center_loss_beta=0.0000 wrong_frac=0.6194 init_acc_corrupt=0.3267 init_gold_top10=0.3700 init_gold_top100=0.4187
|
| 91 |
+
step=400 micro_steps=6400 elapsed=571.0s lr=4.010000e-04 loss_all=9.6225 acc_all=0.4531 loss_corrupt=9.8933 acc_corrupt=0.3268 corrupt_frac=0.6250 loss=9.8933 loss_recon=9.8933 loss_meanflow=0.0000 mean_model_t=0.5057 mean_corrupt_t=0.5057 mean_loss_t_weight=1.0000 prior_center_loss_beta=0.0000 wrong_frac=0.4999 init_acc_corrupt=0.4570 init_gold_top10=0.4944 init_gold_top100=0.5211
|
| 92 |
+
step=450 micro_steps=7200 elapsed=570.9s lr=4.510000e-04 loss_all=9.1788 acc_all=0.4718 loss_corrupt=9.5245 acc_corrupt=0.3493 corrupt_frac=0.6076 loss=9.5245 loss_recon=9.5245 loss_meanflow=0.0000 mean_model_t=0.5421 mean_corrupt_t=0.5421 mean_loss_t_weight=1.0000 prior_center_loss_beta=0.0000 wrong_frac=0.4807 init_acc_corrupt=0.4938 init_gold_top10=0.5117 init_gold_top100=0.5420
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/__init__.py
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is auto-generated by `utils/generate_inference_types.py`.
|
| 2 |
+
# Do not modify it manually.
|
| 3 |
+
#
|
| 4 |
+
# ruff: noqa: F401
|
| 5 |
+
|
| 6 |
+
from .audio_classification import (
|
| 7 |
+
AudioClassificationInput,
|
| 8 |
+
AudioClassificationOutputElement,
|
| 9 |
+
AudioClassificationOutputTransform,
|
| 10 |
+
AudioClassificationParameters,
|
| 11 |
+
)
|
| 12 |
+
from .audio_to_audio import AudioToAudioInput, AudioToAudioOutputElement
|
| 13 |
+
from .automatic_speech_recognition import (
|
| 14 |
+
AutomaticSpeechRecognitionEarlyStoppingEnum,
|
| 15 |
+
AutomaticSpeechRecognitionGenerationParameters,
|
| 16 |
+
AutomaticSpeechRecognitionInput,
|
| 17 |
+
AutomaticSpeechRecognitionOutput,
|
| 18 |
+
AutomaticSpeechRecognitionOutputChunk,
|
| 19 |
+
AutomaticSpeechRecognitionParameters,
|
| 20 |
+
)
|
| 21 |
+
from .base import BaseInferenceType
|
| 22 |
+
from .chat_completion import (
|
| 23 |
+
ChatCompletionInput,
|
| 24 |
+
ChatCompletionInputFunctionDefinition,
|
| 25 |
+
ChatCompletionInputFunctionName,
|
| 26 |
+
ChatCompletionInputGrammarType,
|
| 27 |
+
ChatCompletionInputJSONSchema,
|
| 28 |
+
ChatCompletionInputMessage,
|
| 29 |
+
ChatCompletionInputMessageChunk,
|
| 30 |
+
ChatCompletionInputMessageChunkType,
|
| 31 |
+
ChatCompletionInputResponseFormatJSONObject,
|
| 32 |
+
ChatCompletionInputResponseFormatJSONSchema,
|
| 33 |
+
ChatCompletionInputResponseFormatText,
|
| 34 |
+
ChatCompletionInputStreamOptions,
|
| 35 |
+
ChatCompletionInputTool,
|
| 36 |
+
ChatCompletionInputToolCall,
|
| 37 |
+
ChatCompletionInputToolChoiceClass,
|
| 38 |
+
ChatCompletionInputToolChoiceEnum,
|
| 39 |
+
ChatCompletionInputURL,
|
| 40 |
+
ChatCompletionOutput,
|
| 41 |
+
ChatCompletionOutputComplete,
|
| 42 |
+
ChatCompletionOutputFunctionDefinition,
|
| 43 |
+
ChatCompletionOutputLogprob,
|
| 44 |
+
ChatCompletionOutputLogprobs,
|
| 45 |
+
ChatCompletionOutputMessage,
|
| 46 |
+
ChatCompletionOutputToolCall,
|
| 47 |
+
ChatCompletionOutputTopLogprob,
|
| 48 |
+
ChatCompletionOutputUsage,
|
| 49 |
+
ChatCompletionStreamOutput,
|
| 50 |
+
ChatCompletionStreamOutputChoice,
|
| 51 |
+
ChatCompletionStreamOutputDelta,
|
| 52 |
+
ChatCompletionStreamOutputDeltaToolCall,
|
| 53 |
+
ChatCompletionStreamOutputFunction,
|
| 54 |
+
ChatCompletionStreamOutputLogprob,
|
| 55 |
+
ChatCompletionStreamOutputLogprobs,
|
| 56 |
+
ChatCompletionStreamOutputTopLogprob,
|
| 57 |
+
ChatCompletionStreamOutputUsage,
|
| 58 |
+
)
|
| 59 |
+
from .depth_estimation import DepthEstimationInput, DepthEstimationOutput
|
| 60 |
+
from .document_question_answering import (
|
| 61 |
+
DocumentQuestionAnsweringInput,
|
| 62 |
+
DocumentQuestionAnsweringInputData,
|
| 63 |
+
DocumentQuestionAnsweringOutputElement,
|
| 64 |
+
DocumentQuestionAnsweringParameters,
|
| 65 |
+
)
|
| 66 |
+
from .feature_extraction import FeatureExtractionInput, FeatureExtractionInputTruncationDirection
|
| 67 |
+
from .fill_mask import FillMaskInput, FillMaskOutputElement, FillMaskParameters
|
| 68 |
+
from .image_classification import (
|
| 69 |
+
ImageClassificationInput,
|
| 70 |
+
ImageClassificationOutputElement,
|
| 71 |
+
ImageClassificationOutputTransform,
|
| 72 |
+
ImageClassificationParameters,
|
| 73 |
+
)
|
| 74 |
+
from .image_segmentation import (
|
| 75 |
+
ImageSegmentationInput,
|
| 76 |
+
ImageSegmentationOutputElement,
|
| 77 |
+
ImageSegmentationParameters,
|
| 78 |
+
ImageSegmentationSubtask,
|
| 79 |
+
)
|
| 80 |
+
from .image_text_to_image import (
|
| 81 |
+
ImageTextToImageInput,
|
| 82 |
+
ImageTextToImageOutput,
|
| 83 |
+
ImageTextToImageParameters,
|
| 84 |
+
ImageTextToImageTargetSize,
|
| 85 |
+
)
|
| 86 |
+
from .image_text_to_video import (
|
| 87 |
+
ImageTextToVideoInput,
|
| 88 |
+
ImageTextToVideoOutput,
|
| 89 |
+
ImageTextToVideoParameters,
|
| 90 |
+
ImageTextToVideoTargetSize,
|
| 91 |
+
)
|
| 92 |
+
from .image_to_image import ImageToImageInput, ImageToImageOutput, ImageToImageParameters, ImageToImageTargetSize
|
| 93 |
+
from .image_to_text import (
|
| 94 |
+
ImageToTextEarlyStoppingEnum,
|
| 95 |
+
ImageToTextGenerationParameters,
|
| 96 |
+
ImageToTextInput,
|
| 97 |
+
ImageToTextOutput,
|
| 98 |
+
ImageToTextParameters,
|
| 99 |
+
)
|
| 100 |
+
from .image_to_video import ImageToVideoInput, ImageToVideoOutput, ImageToVideoParameters, ImageToVideoTargetSize
|
| 101 |
+
from .object_detection import (
|
| 102 |
+
ObjectDetectionBoundingBox,
|
| 103 |
+
ObjectDetectionInput,
|
| 104 |
+
ObjectDetectionOutputElement,
|
| 105 |
+
ObjectDetectionParameters,
|
| 106 |
+
)
|
| 107 |
+
from .question_answering import (
|
| 108 |
+
QuestionAnsweringInput,
|
| 109 |
+
QuestionAnsweringInputData,
|
| 110 |
+
QuestionAnsweringOutputElement,
|
| 111 |
+
QuestionAnsweringParameters,
|
| 112 |
+
)
|
| 113 |
+
from .sentence_similarity import SentenceSimilarityInput, SentenceSimilarityInputData
|
| 114 |
+
from .summarization import (
|
| 115 |
+
SummarizationInput,
|
| 116 |
+
SummarizationOutput,
|
| 117 |
+
SummarizationParameters,
|
| 118 |
+
SummarizationTruncationStrategy,
|
| 119 |
+
)
|
| 120 |
+
from .table_question_answering import (
|
| 121 |
+
Padding,
|
| 122 |
+
TableQuestionAnsweringInput,
|
| 123 |
+
TableQuestionAnsweringInputData,
|
| 124 |
+
TableQuestionAnsweringOutputElement,
|
| 125 |
+
TableQuestionAnsweringParameters,
|
| 126 |
+
)
|
| 127 |
+
from .text2text_generation import (
|
| 128 |
+
Text2TextGenerationInput,
|
| 129 |
+
Text2TextGenerationOutput,
|
| 130 |
+
Text2TextGenerationParameters,
|
| 131 |
+
Text2TextGenerationTruncationStrategy,
|
| 132 |
+
)
|
| 133 |
+
from .text_classification import (
|
| 134 |
+
TextClassificationInput,
|
| 135 |
+
TextClassificationOutputElement,
|
| 136 |
+
TextClassificationOutputTransform,
|
| 137 |
+
TextClassificationParameters,
|
| 138 |
+
)
|
| 139 |
+
from .text_generation import (
|
| 140 |
+
TextGenerationInput,
|
| 141 |
+
TextGenerationInputGenerateParameters,
|
| 142 |
+
TextGenerationInputGrammarType,
|
| 143 |
+
TextGenerationOutput,
|
| 144 |
+
TextGenerationOutputBestOfSequence,
|
| 145 |
+
TextGenerationOutputDetails,
|
| 146 |
+
TextGenerationOutputFinishReason,
|
| 147 |
+
TextGenerationOutputPrefillToken,
|
| 148 |
+
TextGenerationOutputToken,
|
| 149 |
+
TextGenerationStreamOutput,
|
| 150 |
+
TextGenerationStreamOutputStreamDetails,
|
| 151 |
+
TextGenerationStreamOutputToken,
|
| 152 |
+
TypeEnum,
|
| 153 |
+
)
|
| 154 |
+
from .text_to_audio import (
|
| 155 |
+
TextToAudioEarlyStoppingEnum,
|
| 156 |
+
TextToAudioGenerationParameters,
|
| 157 |
+
TextToAudioInput,
|
| 158 |
+
TextToAudioOutput,
|
| 159 |
+
TextToAudioParameters,
|
| 160 |
+
)
|
| 161 |
+
from .text_to_image import TextToImageInput, TextToImageOutput, TextToImageParameters
|
| 162 |
+
from .text_to_speech import (
|
| 163 |
+
TextToSpeechEarlyStoppingEnum,
|
| 164 |
+
TextToSpeechGenerationParameters,
|
| 165 |
+
TextToSpeechInput,
|
| 166 |
+
TextToSpeechOutput,
|
| 167 |
+
TextToSpeechParameters,
|
| 168 |
+
)
|
| 169 |
+
from .text_to_video import TextToVideoInput, TextToVideoOutput, TextToVideoParameters
|
| 170 |
+
from .token_classification import (
|
| 171 |
+
TokenClassificationAggregationStrategy,
|
| 172 |
+
TokenClassificationInput,
|
| 173 |
+
TokenClassificationOutputElement,
|
| 174 |
+
TokenClassificationParameters,
|
| 175 |
+
)
|
| 176 |
+
from .translation import TranslationInput, TranslationOutput, TranslationParameters, TranslationTruncationStrategy
|
| 177 |
+
from .video_classification import (
|
| 178 |
+
VideoClassificationInput,
|
| 179 |
+
VideoClassificationOutputElement,
|
| 180 |
+
VideoClassificationOutputTransform,
|
| 181 |
+
VideoClassificationParameters,
|
| 182 |
+
)
|
| 183 |
+
from .visual_question_answering import (
|
| 184 |
+
VisualQuestionAnsweringInput,
|
| 185 |
+
VisualQuestionAnsweringInputData,
|
| 186 |
+
VisualQuestionAnsweringOutputElement,
|
| 187 |
+
VisualQuestionAnsweringParameters,
|
| 188 |
+
)
|
| 189 |
+
from .zero_shot_classification import (
|
| 190 |
+
ZeroShotClassificationInput,
|
| 191 |
+
ZeroShotClassificationOutputElement,
|
| 192 |
+
ZeroShotClassificationParameters,
|
| 193 |
+
)
|
| 194 |
+
from .zero_shot_image_classification import (
|
| 195 |
+
ZeroShotImageClassificationInput,
|
| 196 |
+
ZeroShotImageClassificationOutputElement,
|
| 197 |
+
ZeroShotImageClassificationParameters,
|
| 198 |
+
)
|
| 199 |
+
from .zero_shot_object_detection import (
|
| 200 |
+
ZeroShotObjectDetectionBoundingBox,
|
| 201 |
+
ZeroShotObjectDetectionInput,
|
| 202 |
+
ZeroShotObjectDetectionOutputElement,
|
| 203 |
+
ZeroShotObjectDetectionParameters,
|
| 204 |
+
)
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/audio_to_audio.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from typing import Any
|
| 7 |
+
|
| 8 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
@dataclass_with_extra
|
| 12 |
+
class AudioToAudioInput(BaseInferenceType):
|
| 13 |
+
"""Inputs for Audio to Audio inference"""
|
| 14 |
+
|
| 15 |
+
inputs: Any
|
| 16 |
+
"""The input audio data"""
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
@dataclass_with_extra
|
| 20 |
+
class AudioToAudioOutputElement(BaseInferenceType):
|
| 21 |
+
"""Outputs of inference for the Audio To Audio task
|
| 22 |
+
A generated audio file with its label.
|
| 23 |
+
"""
|
| 24 |
+
|
| 25 |
+
blob: Any
|
| 26 |
+
"""The generated audio file."""
|
| 27 |
+
content_type: str
|
| 28 |
+
"""The content type of audio file."""
|
| 29 |
+
label: str
|
| 30 |
+
"""The label of the audio file."""
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/base.py
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2024 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 |
+
"""Contains a base class for all inference types."""
|
| 15 |
+
|
| 16 |
+
import inspect
|
| 17 |
+
import json
|
| 18 |
+
import types
|
| 19 |
+
from dataclasses import asdict, dataclass
|
| 20 |
+
from typing import Any, TypeVar, get_args
|
| 21 |
+
|
| 22 |
+
from typing_extensions import dataclass_transform
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
T = TypeVar("T", bound="BaseInferenceType")
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def _repr_with_extra(self):
|
| 29 |
+
fields = list(self.__dataclass_fields__.keys())
|
| 30 |
+
other_fields = list(k for k in self.__dict__ if k not in fields)
|
| 31 |
+
return f"{self.__class__.__name__}({', '.join(f'{k}={self.__dict__[k]!r}' for k in fields + other_fields)})"
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
@dataclass_transform()
|
| 35 |
+
def dataclass_with_extra(cls: type[T]) -> type[T]:
|
| 36 |
+
"""Decorator to add a custom __repr__ method to a dataclass, showing all fields, including extra ones.
|
| 37 |
+
|
| 38 |
+
This decorator only works with dataclasses that inherit from `BaseInferenceType`.
|
| 39 |
+
"""
|
| 40 |
+
cls = dataclass(cls)
|
| 41 |
+
cls.__repr__ = _repr_with_extra # type: ignore[method-assign]
|
| 42 |
+
return cls
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
@dataclass
|
| 46 |
+
class BaseInferenceType(dict):
|
| 47 |
+
"""Base class for all inference types.
|
| 48 |
+
|
| 49 |
+
Object is a dataclass and a dict for backward compatibility but plan is to remove the dict part in the future.
|
| 50 |
+
|
| 51 |
+
Handle parsing from dict, list and json strings in a permissive way to ensure future-compatibility (e.g. all fields
|
| 52 |
+
are made optional, and non-expected fields are added as dict attributes).
|
| 53 |
+
"""
|
| 54 |
+
|
| 55 |
+
@classmethod
|
| 56 |
+
def parse_obj_as_list(cls: type[T], data: bytes | str | list | dict) -> list[T]:
|
| 57 |
+
"""Alias to parse server response and return a single instance.
|
| 58 |
+
|
| 59 |
+
See `parse_obj` for more details.
|
| 60 |
+
"""
|
| 61 |
+
output = cls.parse_obj(data)
|
| 62 |
+
if not isinstance(output, list):
|
| 63 |
+
raise ValueError(f"Invalid input data for {cls}. Expected a list, but got {type(output)}.")
|
| 64 |
+
return output
|
| 65 |
+
|
| 66 |
+
@classmethod
|
| 67 |
+
def parse_obj_as_instance(cls: type[T], data: bytes | str | list | dict) -> T:
|
| 68 |
+
"""Alias to parse server response and return a single instance.
|
| 69 |
+
|
| 70 |
+
See `parse_obj` for more details.
|
| 71 |
+
"""
|
| 72 |
+
output = cls.parse_obj(data)
|
| 73 |
+
if isinstance(output, list):
|
| 74 |
+
raise ValueError(f"Invalid input data for {cls}. Expected a single instance, but got a list.")
|
| 75 |
+
return output
|
| 76 |
+
|
| 77 |
+
@classmethod
|
| 78 |
+
def parse_obj(cls: type[T], data: bytes | str | list | dict) -> list[T] | T:
|
| 79 |
+
"""Parse server response as a dataclass or list of dataclasses.
|
| 80 |
+
|
| 81 |
+
To enable future-compatibility, we want to handle cases where the server return more fields than expected.
|
| 82 |
+
In such cases, we don't want to raise an error but still create the dataclass object. Remaining fields are
|
| 83 |
+
added as dict attributes.
|
| 84 |
+
"""
|
| 85 |
+
# Parse server response (from bytes)
|
| 86 |
+
if isinstance(data, bytes):
|
| 87 |
+
data = data.decode()
|
| 88 |
+
if isinstance(data, str):
|
| 89 |
+
data = json.loads(data)
|
| 90 |
+
|
| 91 |
+
# If a list, parse each item individually
|
| 92 |
+
if isinstance(data, list):
|
| 93 |
+
return [cls.parse_obj(d) for d in data] # type: ignore
|
| 94 |
+
|
| 95 |
+
# At this point, we expect a dict
|
| 96 |
+
if not isinstance(data, dict):
|
| 97 |
+
raise ValueError(f"Invalid data type: {type(data)}")
|
| 98 |
+
|
| 99 |
+
init_values = {}
|
| 100 |
+
other_values = {}
|
| 101 |
+
for key, value in data.items():
|
| 102 |
+
key = normalize_key(key)
|
| 103 |
+
if key in cls.__dataclass_fields__ and cls.__dataclass_fields__[key].init:
|
| 104 |
+
if isinstance(value, dict) or isinstance(value, list):
|
| 105 |
+
field_type = cls.__dataclass_fields__[key].type
|
| 106 |
+
|
| 107 |
+
# if `field_type` is a `BaseInferenceType`, parse it
|
| 108 |
+
if inspect.isclass(field_type) and issubclass(field_type, BaseInferenceType):
|
| 109 |
+
value = field_type.parse_obj(value)
|
| 110 |
+
|
| 111 |
+
# otherwise, recursively parse nested dataclasses (if possible)
|
| 112 |
+
# `get_args` returns handle Union and Optional for us
|
| 113 |
+
else:
|
| 114 |
+
expected_types = get_args(field_type)
|
| 115 |
+
for expected_type in expected_types:
|
| 116 |
+
if (
|
| 117 |
+
isinstance(expected_type, types.GenericAlias) and expected_type.__origin__ is list
|
| 118 |
+
) or getattr(expected_type, "_name", None) == "List":
|
| 119 |
+
expected_type = get_args(expected_type)[
|
| 120 |
+
0
|
| 121 |
+
] # assume same type for all items in the list
|
| 122 |
+
if inspect.isclass(expected_type) and issubclass(expected_type, BaseInferenceType):
|
| 123 |
+
value = expected_type.parse_obj(value)
|
| 124 |
+
break
|
| 125 |
+
init_values[key] = value
|
| 126 |
+
else:
|
| 127 |
+
other_values[key] = value
|
| 128 |
+
|
| 129 |
+
# Make all missing fields default to None
|
| 130 |
+
# => ensure that dataclass initialization will never fail even if the server does not return all fields.
|
| 131 |
+
for key in cls.__dataclass_fields__:
|
| 132 |
+
if key not in init_values:
|
| 133 |
+
init_values[key] = None
|
| 134 |
+
|
| 135 |
+
# Initialize dataclass with expected values
|
| 136 |
+
item = cls(**init_values)
|
| 137 |
+
|
| 138 |
+
# Add remaining fields as dict attributes
|
| 139 |
+
item.update(other_values)
|
| 140 |
+
|
| 141 |
+
# Add remaining fields as extra dataclass fields.
|
| 142 |
+
# They won't be part of the dataclass fields but will be accessible as attributes.
|
| 143 |
+
# Use @dataclass_with_extra to show them in __repr__.
|
| 144 |
+
item.__dict__.update(other_values)
|
| 145 |
+
return item
|
| 146 |
+
|
| 147 |
+
def __post_init__(self):
|
| 148 |
+
self.update(asdict(self))
|
| 149 |
+
|
| 150 |
+
def __setitem__(self, __key: Any, __value: Any) -> None:
|
| 151 |
+
# Hacky way to keep dataclass values in sync when dict is updated
|
| 152 |
+
super().__setitem__(__key, __value)
|
| 153 |
+
if __key in self.__dataclass_fields__ and getattr(self, __key, None) != __value:
|
| 154 |
+
self.__setattr__(__key, __value)
|
| 155 |
+
return
|
| 156 |
+
|
| 157 |
+
def __setattr__(self, __name: str, __value: Any) -> None:
|
| 158 |
+
# Hacky way to keep dict values is sync when dataclass is updated
|
| 159 |
+
super().__setattr__(__name, __value)
|
| 160 |
+
if self.get(__name) != __value:
|
| 161 |
+
self[__name] = __value
|
| 162 |
+
return
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
def normalize_key(key: str) -> str:
|
| 166 |
+
# e.g "content-type" -> "content_type", "Accept" -> "accept"
|
| 167 |
+
return key.replace("-", "_").replace(" ", "_").lower()
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/chat_completion.py
ADDED
|
@@ -0,0 +1,347 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from typing import Any, Literal, Union
|
| 7 |
+
|
| 8 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
@dataclass_with_extra
|
| 12 |
+
class ChatCompletionInputURL(BaseInferenceType):
|
| 13 |
+
url: str
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
ChatCompletionInputMessageChunkType = Literal["text", "image_url"]
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
@dataclass_with_extra
|
| 20 |
+
class ChatCompletionInputMessageChunk(BaseInferenceType):
|
| 21 |
+
type: "ChatCompletionInputMessageChunkType"
|
| 22 |
+
image_url: ChatCompletionInputURL | None = None
|
| 23 |
+
text: str | None = None
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
@dataclass_with_extra
|
| 27 |
+
class ChatCompletionInputFunctionDefinition(BaseInferenceType):
|
| 28 |
+
name: str
|
| 29 |
+
parameters: Any
|
| 30 |
+
description: str | None = None
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
@dataclass_with_extra
|
| 34 |
+
class ChatCompletionInputToolCall(BaseInferenceType):
|
| 35 |
+
function: ChatCompletionInputFunctionDefinition
|
| 36 |
+
id: str
|
| 37 |
+
type: str
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
@dataclass_with_extra
|
| 41 |
+
class ChatCompletionInputMessage(BaseInferenceType):
|
| 42 |
+
role: str
|
| 43 |
+
content: list[ChatCompletionInputMessageChunk] | str | None = None
|
| 44 |
+
name: str | None = None
|
| 45 |
+
tool_calls: list[ChatCompletionInputToolCall] | None = None
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
@dataclass_with_extra
|
| 49 |
+
class ChatCompletionInputJSONSchema(BaseInferenceType):
|
| 50 |
+
name: str
|
| 51 |
+
"""
|
| 52 |
+
The name of the response format.
|
| 53 |
+
"""
|
| 54 |
+
description: str | None = None
|
| 55 |
+
"""
|
| 56 |
+
A description of what the response format is for, used by the model to determine
|
| 57 |
+
how to respond in the format.
|
| 58 |
+
"""
|
| 59 |
+
schema: dict[str, object] | None = None
|
| 60 |
+
"""
|
| 61 |
+
The schema for the response format, described as a JSON Schema object. Learn how
|
| 62 |
+
to build JSON schemas [here](https://json-schema.org/).
|
| 63 |
+
"""
|
| 64 |
+
strict: bool | None = None
|
| 65 |
+
"""
|
| 66 |
+
Whether to enable strict schema adherence when generating the output. If set to
|
| 67 |
+
true, the model will always follow the exact schema defined in the `schema`
|
| 68 |
+
field.
|
| 69 |
+
"""
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
@dataclass_with_extra
|
| 73 |
+
class ChatCompletionInputResponseFormatText(BaseInferenceType):
|
| 74 |
+
type: Literal["text"]
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
@dataclass_with_extra
|
| 78 |
+
class ChatCompletionInputResponseFormatJSONSchema(BaseInferenceType):
|
| 79 |
+
type: Literal["json_schema"]
|
| 80 |
+
json_schema: ChatCompletionInputJSONSchema
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
@dataclass_with_extra
|
| 84 |
+
class ChatCompletionInputResponseFormatJSONObject(BaseInferenceType):
|
| 85 |
+
type: Literal["json_object"]
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
ChatCompletionInputGrammarType = Union[
|
| 89 |
+
ChatCompletionInputResponseFormatText,
|
| 90 |
+
ChatCompletionInputResponseFormatJSONSchema,
|
| 91 |
+
ChatCompletionInputResponseFormatJSONObject,
|
| 92 |
+
]
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
@dataclass_with_extra
|
| 96 |
+
class ChatCompletionInputStreamOptions(BaseInferenceType):
|
| 97 |
+
include_usage: bool | None = None
|
| 98 |
+
"""If set, an additional chunk will be streamed before the data: [DONE] message. The usage
|
| 99 |
+
field on this chunk shows the token usage statistics for the entire request, and the
|
| 100 |
+
choices field will always be an empty array. All other chunks will also include a usage
|
| 101 |
+
field, but with a null value.
|
| 102 |
+
"""
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
@dataclass_with_extra
|
| 106 |
+
class ChatCompletionInputFunctionName(BaseInferenceType):
|
| 107 |
+
name: str
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
@dataclass_with_extra
|
| 111 |
+
class ChatCompletionInputToolChoiceClass(BaseInferenceType):
|
| 112 |
+
function: ChatCompletionInputFunctionName
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
ChatCompletionInputToolChoiceEnum = Literal["auto", "none", "required"]
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
@dataclass_with_extra
|
| 119 |
+
class ChatCompletionInputTool(BaseInferenceType):
|
| 120 |
+
function: ChatCompletionInputFunctionDefinition
|
| 121 |
+
type: str
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
@dataclass_with_extra
|
| 125 |
+
class ChatCompletionInput(BaseInferenceType):
|
| 126 |
+
"""Chat Completion Input.
|
| 127 |
+
Auto-generated from TGI specs.
|
| 128 |
+
For more details, check out
|
| 129 |
+
https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
|
| 130 |
+
"""
|
| 131 |
+
|
| 132 |
+
messages: list[ChatCompletionInputMessage]
|
| 133 |
+
"""A list of messages comprising the conversation so far."""
|
| 134 |
+
frequency_penalty: float | None = None
|
| 135 |
+
"""Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing
|
| 136 |
+
frequency in the text so far,
|
| 137 |
+
decreasing the model's likelihood to repeat the same line verbatim.
|
| 138 |
+
"""
|
| 139 |
+
logit_bias: list[float] | None = None
|
| 140 |
+
"""UNUSED
|
| 141 |
+
Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON
|
| 142 |
+
object that maps tokens
|
| 143 |
+
(specified by their token ID in the tokenizer) to an associated bias value from -100 to
|
| 144 |
+
100. Mathematically,
|
| 145 |
+
the bias is added to the logits generated by the model prior to sampling. The exact
|
| 146 |
+
effect will vary per model,
|
| 147 |
+
but values between -1 and 1 should decrease or increase likelihood of selection; values
|
| 148 |
+
like -100 or 100 should
|
| 149 |
+
result in a ban or exclusive selection of the relevant token.
|
| 150 |
+
"""
|
| 151 |
+
logprobs: bool | None = None
|
| 152 |
+
"""Whether to return log probabilities of the output tokens or not. If true, returns the log
|
| 153 |
+
probabilities of each
|
| 154 |
+
output token returned in the content of message.
|
| 155 |
+
"""
|
| 156 |
+
max_tokens: int | None = None
|
| 157 |
+
"""The maximum number of tokens that can be generated in the chat completion."""
|
| 158 |
+
model: str | None = None
|
| 159 |
+
"""[UNUSED] ID of the model to use. See the model endpoint compatibility table for details
|
| 160 |
+
on which models work with the Chat API.
|
| 161 |
+
"""
|
| 162 |
+
n: int | None = None
|
| 163 |
+
"""UNUSED
|
| 164 |
+
How many chat completion choices to generate for each input message. Note that you will
|
| 165 |
+
be charged based on the
|
| 166 |
+
number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
|
| 167 |
+
"""
|
| 168 |
+
presence_penalty: float | None = None
|
| 169 |
+
"""Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they
|
| 170 |
+
appear in the text so far,
|
| 171 |
+
increasing the model's likelihood to talk about new topics
|
| 172 |
+
"""
|
| 173 |
+
response_format: ChatCompletionInputGrammarType | None = None
|
| 174 |
+
seed: int | None = None
|
| 175 |
+
stop: list[str] | None = None
|
| 176 |
+
"""Up to 4 sequences where the API will stop generating further tokens."""
|
| 177 |
+
stream: bool | None = None
|
| 178 |
+
stream_options: ChatCompletionInputStreamOptions | None = None
|
| 179 |
+
temperature: float | None = None
|
| 180 |
+
"""What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the
|
| 181 |
+
output more random, while
|
| 182 |
+
lower values like 0.2 will make it more focused and deterministic.
|
| 183 |
+
We generally recommend altering this or `top_p` but not both.
|
| 184 |
+
"""
|
| 185 |
+
tool_choice: Union[ChatCompletionInputToolChoiceClass, "ChatCompletionInputToolChoiceEnum"] | None = None
|
| 186 |
+
tool_prompt: str | None = None
|
| 187 |
+
"""A prompt to be appended before the tools"""
|
| 188 |
+
tools: list[ChatCompletionInputTool] | None = None
|
| 189 |
+
"""A list of tools the model may call. Currently, only functions are supported as a tool.
|
| 190 |
+
Use this to provide a list of
|
| 191 |
+
functions the model may generate JSON inputs for.
|
| 192 |
+
"""
|
| 193 |
+
top_logprobs: int | None = None
|
| 194 |
+
"""An integer between 0 and 5 specifying the number of most likely tokens to return at each
|
| 195 |
+
token position, each with
|
| 196 |
+
an associated log probability. logprobs must be set to true if this parameter is used.
|
| 197 |
+
"""
|
| 198 |
+
top_p: float | None = None
|
| 199 |
+
"""An alternative to sampling with temperature, called nucleus sampling, where the model
|
| 200 |
+
considers the results of the
|
| 201 |
+
tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10%
|
| 202 |
+
probability mass are considered.
|
| 203 |
+
"""
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
@dataclass_with_extra
|
| 207 |
+
class ChatCompletionOutputTopLogprob(BaseInferenceType):
|
| 208 |
+
logprob: float
|
| 209 |
+
token: str
|
| 210 |
+
|
| 211 |
+
|
| 212 |
+
@dataclass_with_extra
|
| 213 |
+
class ChatCompletionOutputLogprob(BaseInferenceType):
|
| 214 |
+
logprob: float
|
| 215 |
+
token: str
|
| 216 |
+
top_logprobs: list[ChatCompletionOutputTopLogprob]
|
| 217 |
+
|
| 218 |
+
|
| 219 |
+
@dataclass_with_extra
|
| 220 |
+
class ChatCompletionOutputLogprobs(BaseInferenceType):
|
| 221 |
+
content: list[ChatCompletionOutputLogprob]
|
| 222 |
+
|
| 223 |
+
|
| 224 |
+
@dataclass_with_extra
|
| 225 |
+
class ChatCompletionOutputFunctionDefinition(BaseInferenceType):
|
| 226 |
+
arguments: str
|
| 227 |
+
name: str
|
| 228 |
+
description: str | None = None
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
@dataclass_with_extra
|
| 232 |
+
class ChatCompletionOutputToolCall(BaseInferenceType):
|
| 233 |
+
function: ChatCompletionOutputFunctionDefinition
|
| 234 |
+
id: str
|
| 235 |
+
type: str
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
@dataclass_with_extra
|
| 239 |
+
class ChatCompletionOutputMessage(BaseInferenceType):
|
| 240 |
+
role: str
|
| 241 |
+
content: str | None = None
|
| 242 |
+
reasoning: str | None = None
|
| 243 |
+
tool_call_id: str | None = None
|
| 244 |
+
tool_calls: list[ChatCompletionOutputToolCall] | None = None
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
@dataclass_with_extra
|
| 248 |
+
class ChatCompletionOutputComplete(BaseInferenceType):
|
| 249 |
+
finish_reason: str
|
| 250 |
+
index: int
|
| 251 |
+
message: ChatCompletionOutputMessage
|
| 252 |
+
logprobs: ChatCompletionOutputLogprobs | None = None
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
@dataclass_with_extra
|
| 256 |
+
class ChatCompletionOutputUsage(BaseInferenceType):
|
| 257 |
+
completion_tokens: int
|
| 258 |
+
prompt_tokens: int
|
| 259 |
+
total_tokens: int
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
@dataclass_with_extra
|
| 263 |
+
class ChatCompletionOutput(BaseInferenceType):
|
| 264 |
+
"""Chat Completion Output.
|
| 265 |
+
Auto-generated from TGI specs.
|
| 266 |
+
For more details, check out
|
| 267 |
+
https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
|
| 268 |
+
"""
|
| 269 |
+
|
| 270 |
+
choices: list[ChatCompletionOutputComplete]
|
| 271 |
+
created: int
|
| 272 |
+
id: str
|
| 273 |
+
model: str
|
| 274 |
+
system_fingerprint: str
|
| 275 |
+
usage: ChatCompletionOutputUsage
|
| 276 |
+
|
| 277 |
+
|
| 278 |
+
@dataclass_with_extra
|
| 279 |
+
class ChatCompletionStreamOutputFunction(BaseInferenceType):
|
| 280 |
+
arguments: str
|
| 281 |
+
name: str | None = None
|
| 282 |
+
|
| 283 |
+
|
| 284 |
+
@dataclass_with_extra
|
| 285 |
+
class ChatCompletionStreamOutputDeltaToolCall(BaseInferenceType):
|
| 286 |
+
function: ChatCompletionStreamOutputFunction
|
| 287 |
+
id: str
|
| 288 |
+
index: int
|
| 289 |
+
type: str
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
@dataclass_with_extra
|
| 293 |
+
class ChatCompletionStreamOutputDelta(BaseInferenceType):
|
| 294 |
+
role: str
|
| 295 |
+
content: str | None = None
|
| 296 |
+
reasoning: str | None = None
|
| 297 |
+
tool_call_id: str | None = None
|
| 298 |
+
tool_calls: list[ChatCompletionStreamOutputDeltaToolCall] | None = None
|
| 299 |
+
|
| 300 |
+
|
| 301 |
+
@dataclass_with_extra
|
| 302 |
+
class ChatCompletionStreamOutputTopLogprob(BaseInferenceType):
|
| 303 |
+
logprob: float
|
| 304 |
+
token: str
|
| 305 |
+
|
| 306 |
+
|
| 307 |
+
@dataclass_with_extra
|
| 308 |
+
class ChatCompletionStreamOutputLogprob(BaseInferenceType):
|
| 309 |
+
logprob: float
|
| 310 |
+
token: str
|
| 311 |
+
top_logprobs: list[ChatCompletionStreamOutputTopLogprob]
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
@dataclass_with_extra
|
| 315 |
+
class ChatCompletionStreamOutputLogprobs(BaseInferenceType):
|
| 316 |
+
content: list[ChatCompletionStreamOutputLogprob]
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
@dataclass_with_extra
|
| 320 |
+
class ChatCompletionStreamOutputChoice(BaseInferenceType):
|
| 321 |
+
delta: ChatCompletionStreamOutputDelta
|
| 322 |
+
index: int
|
| 323 |
+
finish_reason: str | None = None
|
| 324 |
+
logprobs: ChatCompletionStreamOutputLogprobs | None = None
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
@dataclass_with_extra
|
| 328 |
+
class ChatCompletionStreamOutputUsage(BaseInferenceType):
|
| 329 |
+
completion_tokens: int
|
| 330 |
+
prompt_tokens: int
|
| 331 |
+
total_tokens: int
|
| 332 |
+
|
| 333 |
+
|
| 334 |
+
@dataclass_with_extra
|
| 335 |
+
class ChatCompletionStreamOutput(BaseInferenceType):
|
| 336 |
+
"""Chat Completion Stream Output.
|
| 337 |
+
Auto-generated from TGI specs.
|
| 338 |
+
For more details, check out
|
| 339 |
+
https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tgi-import.ts.
|
| 340 |
+
"""
|
| 341 |
+
|
| 342 |
+
choices: list[ChatCompletionStreamOutputChoice]
|
| 343 |
+
created: int
|
| 344 |
+
id: str
|
| 345 |
+
model: str
|
| 346 |
+
system_fingerprint: str
|
| 347 |
+
usage: ChatCompletionStreamOutputUsage | None = None
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/feature_extraction.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from typing import Literal, Optional
|
| 7 |
+
|
| 8 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
FeatureExtractionInputTruncationDirection = Literal["left", "right"]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
@dataclass_with_extra
|
| 15 |
+
class FeatureExtractionInput(BaseInferenceType):
|
| 16 |
+
"""Feature Extraction Input.
|
| 17 |
+
Auto-generated from TEI specs.
|
| 18 |
+
For more details, check out
|
| 19 |
+
https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-tei-import.ts.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
inputs: list[str] | str
|
| 23 |
+
"""The text or list of texts to embed."""
|
| 24 |
+
normalize: bool | None = None
|
| 25 |
+
prompt_name: str | None = None
|
| 26 |
+
"""The name of the prompt that should be used by for encoding. If not set, no prompt
|
| 27 |
+
will be applied.
|
| 28 |
+
Must be a key in the `sentence-transformers` configuration `prompts` dictionary.
|
| 29 |
+
For example if ``prompt_name`` is "query" and the ``prompts`` is {"query": "query: ",
|
| 30 |
+
...},
|
| 31 |
+
then the sentence "What is the capital of France?" will be encoded as
|
| 32 |
+
"query: What is the capital of France?" because the prompt text will be prepended before
|
| 33 |
+
any text to encode.
|
| 34 |
+
"""
|
| 35 |
+
truncate: bool | None = None
|
| 36 |
+
truncation_direction: Optional["FeatureExtractionInputTruncationDirection"] = None
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/fill_mask.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from typing import Any
|
| 7 |
+
|
| 8 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
@dataclass_with_extra
|
| 12 |
+
class FillMaskParameters(BaseInferenceType):
|
| 13 |
+
"""Additional inference parameters for Fill Mask"""
|
| 14 |
+
|
| 15 |
+
targets: list[str] | None = None
|
| 16 |
+
"""When passed, the model will limit the scores to the passed targets instead of looking up
|
| 17 |
+
in the whole vocabulary. If the provided targets are not in the model vocab, they will be
|
| 18 |
+
tokenized and the first resulting token will be used (with a warning, and that might be
|
| 19 |
+
slower).
|
| 20 |
+
"""
|
| 21 |
+
top_k: int | None = None
|
| 22 |
+
"""When passed, overrides the number of predictions to return."""
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
@dataclass_with_extra
|
| 26 |
+
class FillMaskInput(BaseInferenceType):
|
| 27 |
+
"""Inputs for Fill Mask inference"""
|
| 28 |
+
|
| 29 |
+
inputs: str
|
| 30 |
+
"""The text with masked tokens"""
|
| 31 |
+
parameters: FillMaskParameters | None = None
|
| 32 |
+
"""Additional inference parameters for Fill Mask"""
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
@dataclass_with_extra
|
| 36 |
+
class FillMaskOutputElement(BaseInferenceType):
|
| 37 |
+
"""Outputs of inference for the Fill Mask task"""
|
| 38 |
+
|
| 39 |
+
score: float
|
| 40 |
+
"""The corresponding probability"""
|
| 41 |
+
sequence: str
|
| 42 |
+
"""The corresponding input with the mask token prediction."""
|
| 43 |
+
token: int
|
| 44 |
+
"""The predicted token id (to replace the masked one)."""
|
| 45 |
+
token_str: Any
|
| 46 |
+
fill_mask_output_token_str: str | None = None
|
| 47 |
+
"""The predicted token (to replace the masked one)."""
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/image_classification.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from typing import Literal, Optional
|
| 7 |
+
|
| 8 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
ImageClassificationOutputTransform = Literal["sigmoid", "softmax", "none"]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
@dataclass_with_extra
|
| 15 |
+
class ImageClassificationParameters(BaseInferenceType):
|
| 16 |
+
"""Additional inference parameters for Image Classification"""
|
| 17 |
+
|
| 18 |
+
function_to_apply: Optional["ImageClassificationOutputTransform"] = None
|
| 19 |
+
"""The function to apply to the model outputs in order to retrieve the scores."""
|
| 20 |
+
top_k: int | None = None
|
| 21 |
+
"""When specified, limits the output to the top K most probable classes."""
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
@dataclass_with_extra
|
| 25 |
+
class ImageClassificationInput(BaseInferenceType):
|
| 26 |
+
"""Inputs for Image Classification inference"""
|
| 27 |
+
|
| 28 |
+
inputs: str
|
| 29 |
+
"""The input image data as a base64-encoded string. If no `parameters` are provided, you can
|
| 30 |
+
also provide the image data as a raw bytes payload.
|
| 31 |
+
"""
|
| 32 |
+
parameters: ImageClassificationParameters | None = None
|
| 33 |
+
"""Additional inference parameters for Image Classification"""
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
@dataclass_with_extra
|
| 37 |
+
class ImageClassificationOutputElement(BaseInferenceType):
|
| 38 |
+
"""Outputs of inference for the Image Classification task"""
|
| 39 |
+
|
| 40 |
+
label: str
|
| 41 |
+
"""The predicted class label."""
|
| 42 |
+
score: float
|
| 43 |
+
"""The corresponding probability."""
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/image_text_to_image.py
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from typing import Any
|
| 7 |
+
|
| 8 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
@dataclass_with_extra
|
| 12 |
+
class ImageTextToImageTargetSize(BaseInferenceType):
|
| 13 |
+
"""The size in pixels of the output image. This parameter is only supported by some
|
| 14 |
+
providers and for specific models. It will be ignored when unsupported.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
height: int
|
| 18 |
+
width: int
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
@dataclass_with_extra
|
| 22 |
+
class ImageTextToImageParameters(BaseInferenceType):
|
| 23 |
+
"""Additional inference parameters for Image Text To Image"""
|
| 24 |
+
|
| 25 |
+
guidance_scale: float | None = None
|
| 26 |
+
"""For diffusion models. A higher guidance scale value encourages the model to generate
|
| 27 |
+
images closely linked to the text prompt at the expense of lower image quality.
|
| 28 |
+
"""
|
| 29 |
+
negative_prompt: str | None = None
|
| 30 |
+
"""One prompt to guide what NOT to include in image generation."""
|
| 31 |
+
num_inference_steps: int | None = None
|
| 32 |
+
"""For diffusion models. The number of denoising steps. More denoising steps usually lead to
|
| 33 |
+
a higher quality image at the expense of slower inference.
|
| 34 |
+
"""
|
| 35 |
+
prompt: str | None = None
|
| 36 |
+
"""The text prompt to guide the image generation. Either this or inputs (image) must be
|
| 37 |
+
provided.
|
| 38 |
+
"""
|
| 39 |
+
seed: int | None = None
|
| 40 |
+
"""Seed for the random number generator."""
|
| 41 |
+
target_size: ImageTextToImageTargetSize | None = None
|
| 42 |
+
"""The size in pixels of the output image. This parameter is only supported by some
|
| 43 |
+
providers and for specific models. It will be ignored when unsupported.
|
| 44 |
+
"""
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
@dataclass_with_extra
|
| 48 |
+
class ImageTextToImageInput(BaseInferenceType):
|
| 49 |
+
"""Inputs for Image Text To Image inference. Either inputs (image) or prompt (in parameters)
|
| 50 |
+
must be provided, or both.
|
| 51 |
+
"""
|
| 52 |
+
|
| 53 |
+
inputs: str | None = None
|
| 54 |
+
"""The input image data as a base64-encoded string. If no `parameters` are provided, you can
|
| 55 |
+
also provide the image data as a raw bytes payload. Either this or prompt must be
|
| 56 |
+
provided.
|
| 57 |
+
"""
|
| 58 |
+
parameters: ImageTextToImageParameters | None = None
|
| 59 |
+
"""Additional inference parameters for Image Text To Image"""
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
@dataclass_with_extra
|
| 63 |
+
class ImageTextToImageOutput(BaseInferenceType):
|
| 64 |
+
"""Outputs of inference for the Image Text To Image task"""
|
| 65 |
+
|
| 66 |
+
image: Any
|
| 67 |
+
"""The generated image returned as raw bytes in the payload."""
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/table_question_answering.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from typing import Literal, Optional
|
| 7 |
+
|
| 8 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
@dataclass_with_extra
|
| 12 |
+
class TableQuestionAnsweringInputData(BaseInferenceType):
|
| 13 |
+
"""One (table, question) pair to answer"""
|
| 14 |
+
|
| 15 |
+
question: str
|
| 16 |
+
"""The question to be answered about the table"""
|
| 17 |
+
table: dict[str, list[str]]
|
| 18 |
+
"""The table to serve as context for the questions"""
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
Padding = Literal["do_not_pad", "longest", "max_length"]
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
@dataclass_with_extra
|
| 25 |
+
class TableQuestionAnsweringParameters(BaseInferenceType):
|
| 26 |
+
"""Additional inference parameters for Table Question Answering"""
|
| 27 |
+
|
| 28 |
+
padding: Optional["Padding"] = None
|
| 29 |
+
"""Activates and controls padding."""
|
| 30 |
+
sequential: bool | None = None
|
| 31 |
+
"""Whether to do inference sequentially or as a batch. Batching is faster, but models like
|
| 32 |
+
SQA require the inference to be done sequentially to extract relations within sequences,
|
| 33 |
+
given their conversational nature.
|
| 34 |
+
"""
|
| 35 |
+
truncation: bool | None = None
|
| 36 |
+
"""Activates and controls truncation."""
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
@dataclass_with_extra
|
| 40 |
+
class TableQuestionAnsweringInput(BaseInferenceType):
|
| 41 |
+
"""Inputs for Table Question Answering inference"""
|
| 42 |
+
|
| 43 |
+
inputs: TableQuestionAnsweringInputData
|
| 44 |
+
"""One (table, question) pair to answer"""
|
| 45 |
+
parameters: TableQuestionAnsweringParameters | None = None
|
| 46 |
+
"""Additional inference parameters for Table Question Answering"""
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
@dataclass_with_extra
|
| 50 |
+
class TableQuestionAnsweringOutputElement(BaseInferenceType):
|
| 51 |
+
"""Outputs of inference for the Table Question Answering task"""
|
| 52 |
+
|
| 53 |
+
answer: str
|
| 54 |
+
"""The answer of the question given the table. If there is an aggregator, the answer will be
|
| 55 |
+
preceded by `AGGREGATOR >`.
|
| 56 |
+
"""
|
| 57 |
+
cells: list[str]
|
| 58 |
+
"""list of strings made up of the answer cell values."""
|
| 59 |
+
coordinates: list[list[int]]
|
| 60 |
+
"""Coordinates of the cells of the answers."""
|
| 61 |
+
aggregator: str | None = None
|
| 62 |
+
"""If the model has an aggregator, this returns the aggregator."""
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/text_classification.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from typing import Literal, Optional
|
| 7 |
+
|
| 8 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
TextClassificationOutputTransform = Literal["sigmoid", "softmax", "none"]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
@dataclass_with_extra
|
| 15 |
+
class TextClassificationParameters(BaseInferenceType):
|
| 16 |
+
"""Additional inference parameters for Text Classification"""
|
| 17 |
+
|
| 18 |
+
function_to_apply: Optional["TextClassificationOutputTransform"] = None
|
| 19 |
+
"""The function to apply to the model outputs in order to retrieve the scores."""
|
| 20 |
+
top_k: int | None = None
|
| 21 |
+
"""When specified, limits the output to the top K most probable classes."""
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
@dataclass_with_extra
|
| 25 |
+
class TextClassificationInput(BaseInferenceType):
|
| 26 |
+
"""Inputs for Text Classification inference"""
|
| 27 |
+
|
| 28 |
+
inputs: str
|
| 29 |
+
"""The text to classify"""
|
| 30 |
+
parameters: TextClassificationParameters | None = None
|
| 31 |
+
"""Additional inference parameters for Text Classification"""
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
@dataclass_with_extra
|
| 35 |
+
class TextClassificationOutputElement(BaseInferenceType):
|
| 36 |
+
"""Outputs of inference for the Text Classification task"""
|
| 37 |
+
|
| 38 |
+
label: str
|
| 39 |
+
"""The predicted class label."""
|
| 40 |
+
score: float
|
| 41 |
+
"""The corresponding probability."""
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/text_to_video.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from typing import Any
|
| 7 |
+
|
| 8 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
@dataclass_with_extra
|
| 12 |
+
class TextToVideoParameters(BaseInferenceType):
|
| 13 |
+
"""Additional inference parameters for Text To Video"""
|
| 14 |
+
|
| 15 |
+
guidance_scale: float | None = None
|
| 16 |
+
"""A higher guidance scale value encourages the model to generate videos closely linked to
|
| 17 |
+
the text prompt, but values too high may cause saturation and other artifacts.
|
| 18 |
+
"""
|
| 19 |
+
negative_prompt: list[str] | None = None
|
| 20 |
+
"""One or several prompt to guide what NOT to include in video generation."""
|
| 21 |
+
num_frames: float | None = None
|
| 22 |
+
"""The num_frames parameter determines how many video frames are generated."""
|
| 23 |
+
num_inference_steps: int | None = None
|
| 24 |
+
"""The number of denoising steps. More denoising steps usually lead to a higher quality
|
| 25 |
+
video at the expense of slower inference.
|
| 26 |
+
"""
|
| 27 |
+
seed: int | None = None
|
| 28 |
+
"""Seed for the random number generator."""
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
@dataclass_with_extra
|
| 32 |
+
class TextToVideoInput(BaseInferenceType):
|
| 33 |
+
"""Inputs for Text To Video inference"""
|
| 34 |
+
|
| 35 |
+
inputs: str
|
| 36 |
+
"""The input text data (sometimes called "prompt")"""
|
| 37 |
+
parameters: TextToVideoParameters | None = None
|
| 38 |
+
"""Additional inference parameters for Text To Video"""
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
@dataclass_with_extra
|
| 42 |
+
class TextToVideoOutput(BaseInferenceType):
|
| 43 |
+
"""Outputs of inference for the Text To Video task"""
|
| 44 |
+
|
| 45 |
+
video: Any
|
| 46 |
+
"""The generated video returned as raw bytes in the payload."""
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/video_classification.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from typing import Any, Literal, Optional
|
| 7 |
+
|
| 8 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
VideoClassificationOutputTransform = Literal["sigmoid", "softmax", "none"]
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
@dataclass_with_extra
|
| 15 |
+
class VideoClassificationParameters(BaseInferenceType):
|
| 16 |
+
"""Additional inference parameters for Video Classification"""
|
| 17 |
+
|
| 18 |
+
frame_sampling_rate: int | None = None
|
| 19 |
+
"""The sampling rate used to select frames from the video."""
|
| 20 |
+
function_to_apply: Optional["VideoClassificationOutputTransform"] = None
|
| 21 |
+
"""The function to apply to the model outputs in order to retrieve the scores."""
|
| 22 |
+
num_frames: int | None = None
|
| 23 |
+
"""The number of sampled frames to consider for classification."""
|
| 24 |
+
top_k: int | None = None
|
| 25 |
+
"""When specified, limits the output to the top K most probable classes."""
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
@dataclass_with_extra
|
| 29 |
+
class VideoClassificationInput(BaseInferenceType):
|
| 30 |
+
"""Inputs for Video Classification inference"""
|
| 31 |
+
|
| 32 |
+
inputs: Any
|
| 33 |
+
"""The input video data"""
|
| 34 |
+
parameters: VideoClassificationParameters | None = None
|
| 35 |
+
"""Additional inference parameters for Video Classification"""
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
@dataclass_with_extra
|
| 39 |
+
class VideoClassificationOutputElement(BaseInferenceType):
|
| 40 |
+
"""Outputs of inference for the Video Classification task"""
|
| 41 |
+
|
| 42 |
+
label: str
|
| 43 |
+
"""The predicted class label."""
|
| 44 |
+
score: float
|
| 45 |
+
"""The corresponding probability."""
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/visual_question_answering.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from typing import Any
|
| 7 |
+
|
| 8 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
@dataclass_with_extra
|
| 12 |
+
class VisualQuestionAnsweringInputData(BaseInferenceType):
|
| 13 |
+
"""One (image, question) pair to answer"""
|
| 14 |
+
|
| 15 |
+
image: Any
|
| 16 |
+
"""The image."""
|
| 17 |
+
question: str
|
| 18 |
+
"""The question to answer based on the image."""
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
@dataclass_with_extra
|
| 22 |
+
class VisualQuestionAnsweringParameters(BaseInferenceType):
|
| 23 |
+
"""Additional inference parameters for Visual Question Answering"""
|
| 24 |
+
|
| 25 |
+
top_k: int | None = None
|
| 26 |
+
"""The number of answers to return (will be chosen by order of likelihood). Note that we
|
| 27 |
+
return less than topk answers if there are not enough options available within the
|
| 28 |
+
context.
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
@dataclass_with_extra
|
| 33 |
+
class VisualQuestionAnsweringInput(BaseInferenceType):
|
| 34 |
+
"""Inputs for Visual Question Answering inference"""
|
| 35 |
+
|
| 36 |
+
inputs: VisualQuestionAnsweringInputData
|
| 37 |
+
"""One (image, question) pair to answer"""
|
| 38 |
+
parameters: VisualQuestionAnsweringParameters | None = None
|
| 39 |
+
"""Additional inference parameters for Visual Question Answering"""
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
@dataclass_with_extra
|
| 43 |
+
class VisualQuestionAnsweringOutputElement(BaseInferenceType):
|
| 44 |
+
"""Outputs of inference for the Visual Question Answering task"""
|
| 45 |
+
|
| 46 |
+
score: float
|
| 47 |
+
"""The associated score / probability"""
|
| 48 |
+
answer: str | None = None
|
| 49 |
+
"""The answer to the question"""
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/.venv_qwen35_uv/lib/python3.12/site-packages/huggingface_hub/inference/_generated/types/zero_shot_object_detection.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Inference code generated from the JSON schema spec in @huggingface/tasks.
|
| 2 |
+
#
|
| 3 |
+
# See:
|
| 4 |
+
# - script: https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/scripts/inference-codegen.ts
|
| 5 |
+
# - specs: https://github.com/huggingface/huggingface.js/tree/main/packages/tasks/src/tasks.
|
| 6 |
+
from .base import BaseInferenceType, dataclass_with_extra
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
@dataclass_with_extra
|
| 10 |
+
class ZeroShotObjectDetectionParameters(BaseInferenceType):
|
| 11 |
+
"""Additional inference parameters for Zero Shot Object Detection"""
|
| 12 |
+
|
| 13 |
+
candidate_labels: list[str]
|
| 14 |
+
"""The candidate labels for this image"""
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
@dataclass_with_extra
|
| 18 |
+
class ZeroShotObjectDetectionInput(BaseInferenceType):
|
| 19 |
+
"""Inputs for Zero Shot Object Detection inference"""
|
| 20 |
+
|
| 21 |
+
inputs: str
|
| 22 |
+
"""The input image data as a base64-encoded string."""
|
| 23 |
+
parameters: ZeroShotObjectDetectionParameters
|
| 24 |
+
"""Additional inference parameters for Zero Shot Object Detection"""
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
@dataclass_with_extra
|
| 28 |
+
class ZeroShotObjectDetectionBoundingBox(BaseInferenceType):
|
| 29 |
+
"""The predicted bounding box. Coordinates are relative to the top left corner of the input
|
| 30 |
+
image.
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
xmax: int
|
| 34 |
+
xmin: int
|
| 35 |
+
ymax: int
|
| 36 |
+
ymin: int
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
@dataclass_with_extra
|
| 40 |
+
class ZeroShotObjectDetectionOutputElement(BaseInferenceType):
|
| 41 |
+
"""Outputs of inference for the Zero Shot Object Detection task"""
|
| 42 |
+
|
| 43 |
+
box: ZeroShotObjectDetectionBoundingBox
|
| 44 |
+
"""The predicted bounding box. Coordinates are relative to the top left corner of the input
|
| 45 |
+
image.
|
| 46 |
+
"""
|
| 47 |
+
label: str
|
| 48 |
+
"""A candidate label"""
|
| 49 |
+
score: float
|
| 50 |
+
"""The associated score / probability"""
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/logs/owt_t5_elftokenized_full_len1024_C1_to_1024_pow1_d768_l12_h12_gbs512_2x8gpu_50ep_lr3e3_ema0p9999_elfopt_not5_bottleneck256_unfixed_norm_stateprobadd_selfcond_ce_fast_20260612_050225.log
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
LTA_openwebtext_dualt/mini_owt_logdirichlet/logs/owt_t5_llmclean_qwen36_35b_articlefull_10k_len1024_C1_to_1024_pow1_d768_l12_h12_gbs512_8gpu_40k_elfopt_t5embed_unfixed_selfcond_ce_20260530_220906.log
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|