Run this model with HF Jobs
Run yl4300/TAU-R1-Classifier on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/yl4300/TAU-R1-Classifier. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/yl4300/TAU-R1-Classifier on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use yl4300/TAU-R1-Classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yl4300/TAU-R1-Classifier with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("yl4300/TAU-R1-Classifier") model = AutoModelForMultimodalLM.from_pretrained("yl4300/TAU-R1-Classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse filesFiles changed (23)
- .gitattributes+1
- added_tokens.jsonAdded+28
- chat_template.jinjaAdded+120
- config.jsonAdded+68
- generation_config.jsonAdded+12
- global_step76/bf16_zero_pp_rank_0_mp_rank_00_optim_states.ptAdded+3
- global_step76/bf16_zero_pp_rank_1_mp_rank_00_optim_states.ptAdded+3
- global_step76/zero_pp_rank_0_mp_rank_00_model_states.ptAdded+3
- global_step76/zero_pp_rank_1_mp_rank_00_model_states.ptAdded+3
- latestAdded+1
- merges.txtAdded
- model.safetensorsAdded+3
- preprocessor_config.jsonAdded+39
- rng_state_0.pthAdded+3
- rng_state_1.pthAdded+3
- special_tokens_map.jsonAdded+31
- tokenizer.jsonAdded+3
- tokenizer_config.jsonAdded+242
- trainer_state.jsonAdded+2010
- training_args.binAdded+3
- video_preprocessor_config.jsonAdded+41
- vocab.jsonAdded
- zero_to_fp32.pyAdded+760
32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text12345678910111213141516171819202122232425262728{ "</think>": 151668, "</tool_call>": 151658, "</tool_response>": 151666, "<think>": 151667, "<tool_call>": 151657, "<tool_response>": 151665, "<|box_end|>": 151649, "<|box_start|>": 151648, "<|endoftext|>": 151643, "<|file_sep|>": 151664, "<|fim_middle|>": 151660, "<|fim_pad|>": 151662, "<|fim_prefix|>": 151659, "<|fim_suffix|>": 151661, "<|im_end|>": 151645, "<|im_start|>": 151644, "<|image_pad|>": 151655, "<|object_ref_end|>": 151647, "<|object_ref_start|>": 151646, "<|quad_end|>": 151651, "<|quad_start|>": 151650, "<|repo_name|>": 151663, "<|video_pad|>": 151656, "<|vision_end|>": 151653, "<|vision_pad|>": 151654, "<|vision_start|>": 151652}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120{%- if tools %} {{- '<|im_start|>system\n' }} {%- if messages[0].role == 'system' %} {%- if messages[0].content is string %} {{- messages[0].content }} {%- else %} {%- for content in messages[0].content %} {%- if 'text' in content %} {{- content.text }} {%- endif %} {%- endfor %} {%- endif %} {{- '\n\n' }} {%- endif %} {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }} {%- for tool in tools %} {{- "\n" }} {{- tool | tojson }} {%- endfor %} {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}{%- else %} {%- if messages[0].role == 'system' %} {{- '<|im_start|>system\n' }} {%- if messages[0].content is string %} {{- messages[0].content }} {%- else %} {%- for content in messages[0].content %} {%- if 'text' in content %} {{- content.text }} {%- endif %} {%- endfor %} {%- endif %} {{- '<|im_end|>\n' }} {%- endif %}{%- endif %}{%- set image_count = namespace(value=0) %}{%- set video_count = namespace(value=0) %}{%- for message in messages %} {%- if message.role == "user" %} {{- '<|im_start|>' + message.role + '\n' }} {%- if message.content is string %} {{- message.content }} {%- else %} {%- for content in message.content %} {%- if content.type == 'image' or 'image' in content or 'image_url' in content %} {%- set image_count.value = image_count.value + 1 %} {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%} <|vision_start|><|image_pad|><|vision_end|> {%- elif content.type == 'video' or 'video' in content %} {%- set video_count.value = video_count.value + 1 %} {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%} <|vision_start|><|video_pad|><|vision_end|> {%- elif 'text' in content %} {{- content.text }} {%- endif %} {%- endfor %} {%- endif %} {{- '<|im_end|>\n' }} {%- elif message.role == "assistant" %} {{- '<|im_start|>' + message.role + '\n' }} {%- if message.content is string %} {{- message.content }} {%- else %} {%- for content_item in message.content %} {%- if 'text' in content_item %} {{- content_item.text }} {%- endif %} {%- endfor %} {%- endif %} {%- if message.tool_calls %} {%- for tool_call in message.tool_calls %} {%- if (loop.first and message.content) or (not loop.first) %} {{- '\n' }} {%- endif %} {%- if tool_call.function %} {%- set tool_call = tool_call.function %} {%- endif %} {{- '<tool_call>\n{"name": "' }} {{- tool_call.name }} {{- '", "arguments": ' }} {%- if tool_call.arguments is string %} {{- tool_call.arguments }} {%- else %} {{- tool_call.arguments | tojson }} {%- endif %} {{- '}\n</tool_call>' }} {%- endfor %} {%- endif %} {{- '<|im_end|>\n' }} {%- elif message.role == "tool" %} {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} {{- '<|im_start|>user' }} {%- endif %} {{- '\n<tool_response>\n' }} {%- if message.content is string %} {{- message.content }} {%- else %} {%- for content in message.content %} {%- if content.type == 'image' or 'image' in content or 'image_url' in content %} {%- set image_count.value = image_count.value + 1 %} {%- if add_vision_id %}Picture {{ image_count.value }}: {% endif -%} <|vision_start|><|image_pad|><|vision_end|> {%- elif content.type == 'video' or 'video' in content %} {%- set video_count.value = video_count.value + 1 %} {%- if add_vision_id %}Video {{ video_count.value }}: {% endif -%} <|vision_start|><|video_pad|><|vision_end|> {%- elif 'text' in content %} {{- content.text }} {%- endif %} {%- endfor %} {%- endif %} {{- '\n</tool_response>' }} {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} {{- '<|im_end|>\n' }} {%- endif %} {%- endif %}{%- endfor %}{%- if add_generation_prompt %} {{- '<|im_start|>assistant\n' }}{%- endif %}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768{ "architectures": [ "Qwen3VLForConditionalGeneration" ], "dtype": "bfloat16", "eos_token_id": 151645, "image_token_id": 151655, "model_type": "qwen3_vl", "pad_token_id": 151643, "text_config": { "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 151643, "dtype": "bfloat16", "eos_token_id": 151645, "head_dim": 128, "hidden_act": "silu", "hidden_size": 2048, "initializer_range": 0.02, "intermediate_size": 6144, "max_position_embeddings": 262144, "model_type": "qwen3_vl_text", "num_attention_heads": 16, "num_hidden_layers": 28, "num_key_value_heads": 8, "rms_norm_eps": 1e-06, "rope_scaling": { "mrope_interleaved": true, "mrope_section": [ 24, 20, 20 ], "rope_type": "default" }, "rope_theta": 5000000, "tie_word_embeddings": true, "use_cache": true, "vocab_size": 151936 }, "tie_word_embeddings": true, "transformers_version": "4.57.3", "use_cache": false, "video_token_id": 151656, "vision_config": { "deepstack_visual_indexes": [ 5, 11, 17 ], "depth": 24, "dtype": "bfloat16", "hidden_act": "gelu_pytorch_tanh", "hidden_size": 1024, "in_channels": 3, "initializer_range": 0.02, "intermediate_size": 4096, "model_type": "qwen3_vl", "num_heads": 16, "num_position_embeddings": 2304, "out_hidden_size": 2048, "patch_size": 16, "spatial_merge_size": 2, "temporal_patch_size": 2 }, "vision_end_token_id": 151653, "vision_start_token_id": 151652}123456789101112{ "do_sample": true, "eos_token_id": [ 151645, 151645, 151643 ], "pad_token_id": 151643, "top_k": 20, "top_p": 0.9, "transformers_version": "4.57.3"}123version https://git-lfs.github.com/spec/v1oid sha256:569bdc35496565bdc5f676cc5f48a322ea822dbe0129ff76fc01e7ed28d8ba0asize 12765197525123version https://git-lfs.github.com/spec/v1oid sha256:c429858b6694dd6ab147efd6d9e51001064d3453aa4eabe46d70c4eb1d5db47bsize 12765197525123version https://git-lfs.github.com/spec/v1oid sha256:791720740e8d26d51af2242cab96288bc32397537dd000f9e514a8b38bb85f39size 324550123version https://git-lfs.github.com/spec/v1oid sha256:6a658ef394ec4ccfc43bedffe5e9075dcf4e656ecb628e3b1bb0a6e743af8501size 3244861global_step76123version https://git-lfs.github.com/spec/v1oid sha256:b779c1c44b83ff988938552f58e58c94517bd7bc4ef812e49f2f75c4b4fa30basize 4255140312123456789101112131415161718192021222324252627282930313233343536373839{ "crop_size": null, "data_format": "channels_first", "default_to_square": true, "device": null, "disable_grouping": null, "do_center_crop": null, "do_convert_rgb": true, "do_normalize": true, "do_pad": null, "do_rescale": true, "do_resize": false, "image_mean": [ 0.5, 0.5, 0.5 ], "image_processor_type": "Qwen2VLImageProcessorFast", "image_std": [ 0.5, 0.5, 0.5 ], "input_data_format": null, "max_pixels": null, "merge_size": 2, "min_pixels": null, "pad_size": null, "patch_size": 16, "processor_class": "Qwen3VLProcessor", "resample": 3, "rescale_factor": 0.00392156862745098, "return_tensors": null, "size": { "longest_edge": 16777216, "shortest_edge": 65536 }, "temporal_patch_size": 2}123version https://git-lfs.github.com/spec/v1oid sha256:82b224e97d8d0135b61bca335d64ebf98c6f2be0754f8f3ab300ae85b55af3a6size 14917123version https://git-lfs.github.com/spec/v1oid sha256:f0cddf327ed5065d8d64ea91d8b2566dec0b03bfb705e674d7ecdd7fbd1113eesize 1491712345678910111213141516171819202122232425262728293031{ "additional_special_tokens": [ "<|im_start|>", "<|im_end|>", "<|object_ref_start|>", "<|object_ref_end|>", "<|box_start|>", "<|box_end|>", "<|quad_start|>", "<|quad_end|>", "<|vision_start|>", "<|vision_end|>", "<|vision_pad|>", "<|image_pad|>", "<|video_pad|>" ], "eos_token": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123version https://git-lfs.github.com/spec/v1oid sha256:67cc0080ffd7555f723f423c27cfef314e1ad9d335c8b79f465c5faba1ed478bsize 11422821123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242{ "add_bos_token": false, "add_prefix_space": false, "added_tokens_decoder": { "151643": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151644": { "content": "<|im_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151645": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151646": { "content": "<|object_ref_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151647": { "content": "<|object_ref_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151648": { "content": "<|box_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151649": { "content": "<|box_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151650": { "content": "<|quad_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151651": { "content": "<|quad_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151652": { "content": "<|vision_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151653": { "content": "<|vision_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151654": { "content": "<|vision_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151655": { "content": "<|image_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151656": { "content": "<|video_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151657": { "content": "<tool_call>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151658": { "content": "</tool_call>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151659": { "content": "<|fim_prefix|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151660": { "content": "<|fim_middle|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151661": { "content": "<|fim_suffix|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151662": { "content": "<|fim_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151663": { "content": "<|repo_name|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151664": { "content": "<|file_sep|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151665": { "content": "<tool_response>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151666": { "content": "</tool_response>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151667": { "content": "<think>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151668": { "content": "</think>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false } }, "additional_special_tokens": [ "<|im_start|>", "<|im_end|>", "<|object_ref_start|>", "<|object_ref_end|>", "<|box_start|>", "<|box_end|>", "<|quad_start|>", "<|quad_end|>", "<|vision_start|>", "<|vision_end|>", "<|vision_pad|>", "<|image_pad|>", "<|video_pad|>" ], "bos_token": null, "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "errors": "replace", "extra_special_tokens": {}, "model_max_length": 262144, "pad_token": "<|endoftext|>", "padding_side": "left", "processor_class": "Qwen3VLProcessor", "split_special_tokens": false, "tokenizer_class": "Qwen2Tokenizer", "unk_token": null, "use_fast": true}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010{ "best_global_step": null, "best_metric": null, "best_model_checkpoint": null, "epoch": 1.0133333333333334, "eval_steps": 500, "global_step": 76, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.1675567626953125, "epoch": 0.013333333333333334, "frac_reward_zero_std": 0.75, "grad_norm": 27.889081954956055, "learning_rate": 0.0, "loss": -0.0, "num_tokens": 57308.0, "reward": 0.671875, "reward_std": 0.28125, "rewards/category_reward_func/mean": 0.671875, "rewards/category_reward_func/std": 1.273835301399231, "step": 1 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.1007843017578125, "epoch": 0.02666666666666667, "frac_reward_zero_std": 0.75, "grad_norm": 19.59115982055664, "learning_rate": 2.153382790366965e-07, "loss": -0.0, "num_tokens": 99008.0, "reward": 0.671875, "reward_std": 0.28125, "rewards/category_reward_func/mean": 0.671875, "rewards/category_reward_func/std": 1.273835301399231, "step": 2 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.2137451171875, "epoch": 0.04, "frac_reward_zero_std": 0.75, "grad_norm": 15.223323822021484, "learning_rate": 3.4130309724299266e-07, "loss": -0.0, "num_tokens": 124196.0, "reward": 1.359375, "reward_std": 0.28125, "rewards/category_reward_func/mean": 1.359375, "rewards/category_reward_func/std": 0.5625, "step": 3 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.1277008056640625, "epoch": 0.05333333333333334, "frac_reward_zero_std": 0.75, "grad_norm": 17.724227905273438, "learning_rate": 4.30676558073393e-07, "loss": -0.0, "num_tokens": 165020.0, "reward": 1.359375, "reward_std": 0.28125, "rewards/category_reward_func/mean": 1.359375, "rewards/category_reward_func/std": 0.5625, "step": 4 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.198822021484375, "epoch": 0.06666666666666667, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 5e-07, "loss": 0.0, "num_tokens": 241172.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 5 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.175628662109375, "epoch": 0.08, "frac_reward_zero_std": 0.75, "grad_norm": 19.26618003845215, "learning_rate": 5.566413762796892e-07, "loss": 0.0, "num_tokens": 293140.0, "reward": 0.421875, "reward_std": 0.34375, "rewards/category_reward_func/mean": 0.421875, "rewards/category_reward_func/std": 1.273835301399231, "step": 6 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.175262451171875, "epoch": 0.09333333333333334, "frac_reward_zero_std": 0.75, "grad_norm": 16.38401985168457, "learning_rate": 6.045309775610838e-07, "loss": 0.0, "num_tokens": 352196.0, "reward": 1.21875, "reward_std": 0.32475951313972473, "rewards/category_reward_func/mean": 1.21875, "rewards/category_reward_func/std": 0.7685213088989258, "step": 7 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.221466064453125, "epoch": 0.10666666666666667, "frac_reward_zero_std": 0.75, "grad_norm": 21.485958099365234, "learning_rate": 6.460148371100895e-07, "loss": 0.0, "num_tokens": 396284.0, "reward": 1.21875, "reward_std": 0.32475951313972473, "rewards/category_reward_func/mean": 1.21875, "rewards/category_reward_func/std": 0.7685213088989258, "step": 8 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.14752197265625, "epoch": 0.12, "frac_reward_zero_std": 0.5, "grad_norm": 38.9441032409668, "learning_rate": 6.826061944859853e-07, "loss": -0.0, "num_tokens": 430332.0, "reward": 1.1875, "reward_std": 0.625, "rewards/category_reward_func/mean": 1.1875, "rewards/category_reward_func/std": 0.8587782382965088, "step": 9 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.26763916015625, "epoch": 0.13333333333333333, "frac_reward_zero_std": 0.25, "grad_norm": 48.07648849487305, "learning_rate": 7.153382790366966e-07, "loss": 0.0, "num_tokens": 468928.0, "reward": 0.328125, "reward_std": 0.65625, "rewards/category_reward_func/mean": 0.328125, "rewards/category_reward_func/std": 1.2237876653671265, "step": 10 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.091400146484375, "epoch": 0.14666666666666667, "frac_reward_zero_std": 0.5, "grad_norm": 63.72185516357422, "learning_rate": 7.449480512024891e-07, "loss": 0.0, "num_tokens": 499832.0, "reward": 0.65625, "reward_std": 0.5625, "rewards/category_reward_func/mean": 0.65625, "rewards/category_reward_func/std": 1.125, "step": 11 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.2340087890625, "epoch": 0.16, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 7.719796553163857e-07, "loss": 0.0, "num_tokens": 550096.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 12 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.1494903564453125, "epoch": 0.17333333333333334, "frac_reward_zero_std": 0.25, "grad_norm": 49.42058563232422, "learning_rate": 7.968463205835412e-07, "loss": 0.0, "num_tokens": 589668.0, "reward": 0.46875, "reward_std": 0.9925506114959717, "rewards/category_reward_func/mean": 0.46875, "rewards/category_reward_func/std": 1.2209115028381348, "step": 13 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.169189453125, "epoch": 0.18666666666666668, "frac_reward_zero_std": 0.25, "grad_norm": 48.9026985168457, "learning_rate": 8.198692565977803e-07, "loss": 0.0, "num_tokens": 619500.0, "reward": 0.515625, "reward_std": 0.9307689666748047, "rewards/category_reward_func/mean": 0.515625, "rewards/category_reward_func/std": 1.1527819633483887, "step": 14 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.201019287109375, "epoch": 0.2, "frac_reward_zero_std": 0.75, "grad_norm": 44.559425354003906, "learning_rate": 8.413030972429927e-07, "loss": 0.0, "num_tokens": 665544.0, "reward": -0.046875, "reward_std": 0.28125, "rewards/category_reward_func/mean": -0.046875, "rewards/category_reward_func/std": 1.0771055221557617, "step": 15 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.22216796875, "epoch": 0.21333333333333335, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 8.61353116146786e-07, "loss": 0.0, "num_tokens": 711584.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 16 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.0984649658203125, "epoch": 0.22666666666666666, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 8.801872138612941e-07, "loss": 0.0, "num_tokens": 761108.0, "reward": 0.9375, "reward_std": 0.0, "rewards/category_reward_func/mean": 0.9375, "rewards/category_reward_func/std": 1.0062305927276611, "step": 17 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.23809814453125, "epoch": 0.24, "frac_reward_zero_std": 0.75, "grad_norm": 29.925472259521484, "learning_rate": 8.979444735226818e-07, "loss": 0.0, "num_tokens": 800464.0, "reward": 1.21875, "reward_std": 0.32475951313972473, "rewards/category_reward_func/mean": 1.21875, "rewards/category_reward_func/std": 0.7685213088989258, "step": 18 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.1519927978515625, "epoch": 0.25333333333333335, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 9.147414002175752e-07, "loss": 0.0, "num_tokens": 858768.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 19 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.2058868408203125, "epoch": 0.26666666666666666, "frac_reward_zero_std": 0.75, "grad_norm": 23.14743423461914, "learning_rate": 9.306765580733931e-07, "loss": 0.0, "num_tokens": 918644.0, "reward": 1.328125, "reward_std": 0.34375, "rewards/category_reward_func/mean": 1.328125, "rewards/category_reward_func/std": 0.6875, "step": 20 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.1350860595703125, "epoch": 0.28, "frac_reward_zero_std": 0.25, "grad_norm": 36.214595794677734, "learning_rate": 9.458340748040765e-07, "loss": -0.0, "num_tokens": 954748.0, "reward": 0.796875, "reward_std": 0.84375, "rewards/category_reward_func/mean": 0.796875, "rewards/category_reward_func/std": 1.0771055221557617, "step": 21 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.178436279296875, "epoch": 0.29333333333333333, "frac_reward_zero_std": 0.5, "grad_norm": 31.41033363342285, "learning_rate": 9.602863302391857e-07, "loss": 0.0, "num_tokens": 987760.0, "reward": 0.515625, "reward_std": 0.65625, "rewards/category_reward_func/mean": 0.515625, "rewards/category_reward_func/std": 1.333756446838379, "step": 22 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.157470703125, "epoch": 0.30666666666666664, "frac_reward_zero_std": 0.5, "grad_norm": 29.780487060546875, "learning_rate": 9.740960467331898e-07, "loss": 0.0, "num_tokens": 1042116.0, "reward": 0.609375, "reward_std": 0.6060094833374023, "rewards/category_reward_func/mean": 0.609375, "rewards/category_reward_func/std": 1.2005858421325684, "step": 23 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.099609375, "epoch": 0.32, "frac_reward_zero_std": 0.5, "grad_norm": 20.054729461669922, "learning_rate": 9.873179343530824e-07, "loss": -0.0, "num_tokens": 1083348.0, "reward": 1.21875, "reward_std": 0.5625, "rewards/category_reward_func/mean": 1.21875, "rewards/category_reward_func/std": 0.7685213088989258, "step": 24 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.133087158203125, "epoch": 0.3333333333333333, "frac_reward_zero_std": 0.5, "grad_norm": 49.41580581665039, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1133176.0, "reward": 0.9375, "reward_std": 0.5625, "rewards/category_reward_func/mean": 0.9375, "rewards/category_reward_func/std": 1.0062305927276611, "step": 25 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.0871124267578125, "epoch": 0.3466666666666667, "frac_reward_zero_std": 0.75, "grad_norm": 29.15717124938965, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1164928.0, "reward": 0.65625, "reward_std": 0.32475951313972473, "rewards/category_reward_func/mean": 0.65625, "rewards/category_reward_func/std": 1.125, "step": 26 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.075164794921875, "epoch": 0.36, "frac_reward_zero_std": 0.5, "grad_norm": 46.123504638671875, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1199224.0, "reward": 0.25, "reward_std": 0.6495190262794495, "rewards/category_reward_func/mean": 0.25, "rewards/category_reward_func/std": 1.3038405179977417, "step": 27 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.289825439453125, "epoch": 0.37333333333333335, "frac_reward_zero_std": 0.5, "grad_norm": 76.34833526611328, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 1221156.0, "reward": 0.515625, "reward_std": 0.6060094833374023, "rewards/category_reward_func/mean": 0.515625, "rewards/category_reward_func/std": 1.1527819633483887, "step": 28 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.135528564453125, "epoch": 0.38666666666666666, "frac_reward_zero_std": 0.5, "grad_norm": 52.0339469909668, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1254016.0, "reward": 0.796875, "reward_std": 0.6060094833374023, "rewards/category_reward_func/mean": 0.796875, "rewards/category_reward_func/std": 1.0771055221557617, "step": 29 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.202178955078125, "epoch": 0.4, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1321252.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 30 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.174652099609375, "epoch": 0.41333333333333333, "frac_reward_zero_std": 0.75, "grad_norm": 18.99894142150879, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1357452.0, "reward": 1.21875, "reward_std": 0.32475951313972473, "rewards/category_reward_func/mean": 1.21875, "rewards/category_reward_func/std": 0.7685213088989258, "step": 31 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.221099853515625, "epoch": 0.4266666666666667, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1411864.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 32 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.216094970703125, "epoch": 0.44, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1454212.0, "reward": 0.9375, "reward_std": 0.0, "rewards/category_reward_func/mean": 0.9375, "rewards/category_reward_func/std": 1.0062305927276611, "step": 33 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.24285888671875, "epoch": 0.4533333333333333, "frac_reward_zero_std": 0.5, "grad_norm": 24.658159255981445, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1491820.0, "reward": 0.109375, "reward_std": 0.6060094833374023, "rewards/category_reward_func/mean": 0.109375, "rewards/category_reward_func/std": 1.281173825263977, "step": 34 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.271026611328125, "epoch": 0.4666666666666667, "frac_reward_zero_std": 0.75, "grad_norm": 29.675661087036133, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 1543328.0, "reward": 1.359375, "reward_std": 0.28125, "rewards/category_reward_func/mean": 1.359375, "rewards/category_reward_func/std": 0.5625, "step": 35 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.20477294921875, "epoch": 0.48, "frac_reward_zero_std": 0.5, "grad_norm": 34.019290924072266, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1581208.0, "reward": 0.9375, "reward_std": 0.5625, "rewards/category_reward_func/mean": 0.9375, "rewards/category_reward_func/std": 1.0062305927276611, "step": 36 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.163177490234375, "epoch": 0.49333333333333335, "frac_reward_zero_std": 0.75, "grad_norm": 27.8812255859375, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 1614672.0, "reward": 1.359375, "reward_std": 0.28125, "rewards/category_reward_func/mean": 1.359375, "rewards/category_reward_func/std": 0.5625, "step": 37 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.0792388916015625, "epoch": 0.5066666666666667, "frac_reward_zero_std": 0.25, "grad_norm": 30.810190200805664, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1656416.0, "reward": 0.65625, "reward_std": 0.8872594833374023, "rewards/category_reward_func/mean": 0.65625, "rewards/category_reward_func/std": 1.125, "step": 38 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.2446746826171875, "epoch": 0.52, "frac_reward_zero_std": 0.75, "grad_norm": 21.632761001586914, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1709100.0, "reward": 1.078125, "reward_std": 0.28125, "rewards/category_reward_func/mean": 1.078125, "rewards/category_reward_func/std": 0.9070039987564087, "step": 39 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.181365966796875, "epoch": 0.5333333333333333, "frac_reward_zero_std": 0.5, "grad_norm": 21.632286071777344, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 1755020.0, "reward": 1.21875, "reward_std": 0.5625, "rewards/category_reward_func/mean": 1.21875, "rewards/category_reward_func/std": 0.7685213088989258, "step": 40 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.157623291015625, "epoch": 0.5466666666666666, "frac_reward_zero_std": 0.5, "grad_norm": 28.650922775268555, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1786396.0, "reward": 0.796875, "reward_std": 0.6060094833374023, "rewards/category_reward_func/mean": 0.796875, "rewards/category_reward_func/std": 1.0771055221557617, "step": 41 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.1880950927734375, "epoch": 0.56, "frac_reward_zero_std": 0.25, "grad_norm": 46.74673080444336, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1805832.0, "reward": 0.375, "reward_std": 0.8872594833374023, "rewards/category_reward_func/mean": 0.375, "rewards/category_reward_func/std": 1.1618950366973877, "step": 42 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.205352783203125, "epoch": 0.5733333333333334, "frac_reward_zero_std": 0.0, "grad_norm": 57.66422653198242, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1828832.0, "reward": 0.234375, "reward_std": 1.1685094833374023, "rewards/category_reward_func/mean": 0.234375, "rewards/category_reward_func/std": 1.1527819633483887, "step": 43 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.43341064453125, "epoch": 0.5866666666666667, "frac_reward_zero_std": 0.75, "grad_norm": 22.34069061279297, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1882088.0, "reward": 1.125, "reward_std": 0.4330126941204071, "rewards/category_reward_func/mean": 1.125, "rewards/category_reward_func/std": 1.0246951580047607, "step": 44 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.317779541015625, "epoch": 0.6, "frac_reward_zero_std": 0.5, "grad_norm": 20.323429107666016, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 1935288.0, "reward": 0.9375, "reward_std": 0.5625, "rewards/category_reward_func/mean": 0.9375, "rewards/category_reward_func/std": 1.0062305927276611, "step": 45 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.321075439453125, "epoch": 0.6133333333333333, "frac_reward_zero_std": 0.25, "grad_norm": 143.27099609375, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 1960884.0, "reward": 0.796875, "reward_std": 0.9307689666748047, "rewards/category_reward_func/mean": 0.796875, "rewards/category_reward_func/std": 1.0771055221557617, "step": 46 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.469451904296875, "epoch": 0.6266666666666667, "frac_reward_zero_std": 0.5, "grad_norm": 34.52668762207031, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 2022248.0, "reward": 0.984375, "reward_std": 0.7142627239227295, "rewards/category_reward_func/mean": 0.984375, "rewards/category_reward_func/std": 1.1197795867919922, "step": 47 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.20635986328125, "epoch": 0.64, "frac_reward_zero_std": 0.75, "grad_norm": 14.806098937988281, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 2073196.0, "reward": 1.359375, "reward_std": 0.28125, "rewards/category_reward_func/mean": 1.359375, "rewards/category_reward_func/std": 0.5625, "step": 48 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.25537109375, "epoch": 0.6533333333333333, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2147716.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 49 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.28509521484375, "epoch": 0.6666666666666666, "frac_reward_zero_std": 0.5, "grad_norm": 30.238126754760742, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2198480.0, "reward": 1.03125, "reward_std": 0.6997594833374023, "rewards/category_reward_func/mean": 1.03125, "rewards/category_reward_func/std": 1.0201103687286377, "step": 50 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.242279052734375, "epoch": 0.68, "frac_reward_zero_std": 0.75, "grad_norm": 23.85097312927246, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2254876.0, "reward": 1.125, "reward_std": 0.4330126941204071, "rewards/category_reward_func/mean": 1.125, "rewards/category_reward_func/std": 1.0246951580047607, "step": 51 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.44366455078125, "epoch": 0.6933333333333334, "frac_reward_zero_std": 0.75, "grad_norm": 18.61939811706543, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 2291896.0, "reward": 0.234375, "reward_std": 0.28125, "rewards/category_reward_func/mean": 0.234375, "rewards/category_reward_func/std": 1.1527819633483887, "step": 52 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.39569091796875, "epoch": 0.7066666666666667, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2345988.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 53 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.429656982421875, "epoch": 0.72, "frac_reward_zero_std": 0.75, "grad_norm": 19.174150466918945, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2382980.0, "reward": 1.21875, "reward_std": 0.32475951313972473, "rewards/category_reward_func/mean": 1.21875, "rewards/category_reward_func/std": 0.7685213088989258, "step": 54 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.2694091796875, "epoch": 0.7333333333333333, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2433172.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 55 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.37933349609375, "epoch": 0.7466666666666667, "frac_reward_zero_std": 0.75, "grad_norm": 11.9332857131958, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 2472316.0, "reward": 1.359375, "reward_std": 0.28125, "rewards/category_reward_func/mean": 1.359375, "rewards/category_reward_func/std": 0.5625, "step": 56 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.4208984375, "epoch": 0.76, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2524856.0, "reward": 0.8125, "reward_std": 0.0, "rewards/category_reward_func/mean": 0.8125, "rewards/category_reward_func/std": 1.229837417602539, "step": 57 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.561767578125, "epoch": 0.7733333333333333, "frac_reward_zero_std": 0.75, "grad_norm": 11.59165096282959, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2571776.0, "reward": 1.078125, "reward_std": 0.28125, "rewards/category_reward_func/mean": 1.078125, "rewards/category_reward_func/std": 0.9070039987564087, "step": 58 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.3621826171875, "epoch": 0.7866666666666666, "frac_reward_zero_std": 0.5, "grad_norm": 19.301597595214844, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 2606296.0, "reward": 1.21875, "reward_std": 0.5625, "rewards/category_reward_func/mean": 1.21875, "rewards/category_reward_func/std": 0.7685213088989258, "step": 59 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.36553955078125, "epoch": 0.8, "frac_reward_zero_std": 0.75, "grad_norm": 10.53289794921875, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2654164.0, "reward": 1.078125, "reward_std": 0.28125, "rewards/category_reward_func/mean": 1.078125, "rewards/category_reward_func/std": 0.9070039987564087, "step": 60 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.2923583984375, "epoch": 0.8133333333333334, "frac_reward_zero_std": 0.5, "grad_norm": 99.41712188720703, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 2698972.0, "reward": 1.078125, "reward_std": 0.6060094833374023, "rewards/category_reward_func/mean": 1.078125, "rewards/category_reward_func/std": 0.9070039987564087, "step": 61 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.400146484375, "epoch": 0.8266666666666667, "frac_reward_zero_std": 0.5, "grad_norm": 21.47633934020996, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 2734224.0, "reward": 0.65625, "reward_std": 0.5625, "rewards/category_reward_func/mean": 0.65625, "rewards/category_reward_func/std": 1.125, "step": 62 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.38702392578125, "epoch": 0.84, "frac_reward_zero_std": 0.5, "grad_norm": 29.996910095214844, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 2774124.0, "reward": 1.078125, "reward_std": 0.6060094833374023, "rewards/category_reward_func/mean": 1.078125, "rewards/category_reward_func/std": 0.9070039987564087, "step": 63 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.38385009765625, "epoch": 0.8533333333333334, "frac_reward_zero_std": 0.75, "grad_norm": 15.907926559448242, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2833568.0, "reward": 1.21875, "reward_std": 0.32475951313972473, "rewards/category_reward_func/mean": 1.21875, "rewards/category_reward_func/std": 0.7685213088989258, "step": 64 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.3819580078125, "epoch": 0.8666666666666667, "frac_reward_zero_std": 0.0, "grad_norm": 46.19581604003906, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2860380.0, "reward": 0.234375, "reward_std": 1.1685094833374023, "rewards/category_reward_func/mean": 0.234375, "rewards/category_reward_func/std": 1.1527819633483887, "step": 65 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.35260009765625, "epoch": 0.88, "frac_reward_zero_std": 0.5, "grad_norm": 22.587528228759766, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 2909180.0, "reward": 1.21875, "reward_std": 0.5625, "rewards/category_reward_func/mean": 1.21875, "rewards/category_reward_func/std": 0.7685213088989258, "step": 66 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.392333984375, "epoch": 0.8933333333333333, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2947732.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 67 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.422607421875, "epoch": 0.9066666666666666, "frac_reward_zero_std": 0.5, "grad_norm": 20.867935180664062, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 2960580.0, "reward": 0.515625, "reward_std": 0.6060094833374023, "rewards/category_reward_func/mean": 0.515625, "rewards/category_reward_func/std": 1.1527819633483887, "step": 68 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.3450927734375, "epoch": 0.92, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 2997376.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 69 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.4351806640625, "epoch": 0.9333333333333333, "frac_reward_zero_std": 0.75, "grad_norm": 21.277936935424805, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 3071648.0, "reward": 1.3125, "reward_std": 0.375, "rewards/category_reward_func/mean": 1.3125, "rewards/category_reward_func/std": 0.75, "step": 70 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.454345703125, "epoch": 0.9466666666666667, "frac_reward_zero_std": 0.5, "grad_norm": 11.43299674987793, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 3131384.0, "reward": 0.65625, "reward_std": 0.5625, "rewards/category_reward_func/mean": 0.65625, "rewards/category_reward_func/std": 1.125, "step": 71 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.323486328125, "epoch": 0.96, "frac_reward_zero_std": 0.75, "grad_norm": 11.89018726348877, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 3172224.0, "reward": 0.671875, "reward_std": 0.28125, "rewards/category_reward_func/mean": 0.671875, "rewards/category_reward_func/std": 1.273835301399231, "step": 72 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.457763671875, "epoch": 0.9733333333333334, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 3207712.0, "reward": 0.125, "reward_std": 0.0, "rewards/category_reward_func/mean": 0.125, "rewards/category_reward_func/std": 1.4200940132141113, "step": 73 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.28741455078125, "epoch": 0.9866666666666667, "frac_reward_zero_std": 0.5, "grad_norm": 23.053607940673828, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 3234472.0, "reward": 1.21875, "reward_std": 0.5625, "rewards/category_reward_func/mean": 1.21875, "rewards/category_reward_func/std": 0.7685213088989258, "step": 74 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.346923828125, "epoch": 1.0, "frac_reward_zero_std": 1.0, "grad_norm": 0.0, "learning_rate": 1e-06, "loss": 0.0, "num_tokens": 3272428.0, "reward": 1.5, "reward_std": 0.0, "rewards/category_reward_func/mean": 1.5, "rewards/category_reward_func/std": 0.0, "step": 75 }, { "clip_ratio/high_max": 0.0, "clip_ratio/high_mean": 0.0, "clip_ratio/low_mean": 0.0, "clip_ratio/low_min": 0.0, "clip_ratio/region_mean": 0.0, "completions/clipped_ratio": 0.0, "completions/max_length": 2.0, "completions/max_terminated_length": 2.0, "completions/mean_length": 2.0, "completions/mean_terminated_length": 2.0, "completions/min_length": 2.0, "completions/min_terminated_length": 2.0, "entropy": 0.29266357421875, "epoch": 1.0133333333333334, "frac_reward_zero_std": 0.75, "grad_norm": 11.529069900512695, "learning_rate": 1e-06, "loss": -0.0, "num_tokens": 3302836.0, "reward": 0.796875, "reward_std": 0.28125, "rewards/category_reward_func/mean": 0.796875, "rewards/category_reward_func/std": 1.0771055221557617, "step": 76 } ], "logging_steps": 1.0, "max_steps": 225, "num_input_tokens_seen": 3302836, "num_train_epochs": 3, "save_steps": 38, "stateful_callbacks": { "TrainerControl": { "args": { "should_epoch_stop": false, "should_evaluate": false, "should_log": false, "should_save": true, "should_training_stop": false }, "attributes": {} } }, "total_flos": 0.0, "train_batch_size": 1, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:7b29f58ddbd633fb1b5ef0b9ec91ae14bba0d537804180c4f80afc001245b2b0size 104491234567891011121314151617181920212223242526272829303132333435363738394041{ "crop_size": null, "data_format": "channels_first", "default_to_square": true, "device": null, "do_center_crop": null, "do_convert_rgb": true, "do_normalize": true, "do_rescale": true, "do_resize": true, "do_sample_frames": true, "fps": 2, "image_mean": [ 0.5, 0.5, 0.5 ], "image_std": [ 0.5, 0.5, 0.5 ], "input_data_format": null, "max_frames": 768, "merge_size": 2, "min_frames": 4, "num_frames": null, "pad_size": null, "patch_size": 16, "processor_class": "Qwen3VLProcessor", "resample": 3, "rescale_factor": 0.00392156862745098, "return_metadata": false, "size": { "longest_edge": 25165824, "shortest_edge": 4096 }, "temporal_patch_size": 2, "video_metadata": null, "video_processor_type": "Qwen3VLVideoProcessor"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760#!/usr/bin/env python
# Copyright (c) Microsoft Corporation.# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
# This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets# copied into the top level checkpoint dir, so the user can easily do the conversion at any point in# the future. Once extracted, the weights don't require DeepSpeed and can be used in any# application.## example:# python zero_to_fp32.py . output_dir/# or# python zero_to_fp32.py . output_dir/ --safe_serialization
import argparseimport torchimport globimport mathimport osimport reimport gcimport jsonimport numpy as npfrom tqdm import tqdmfrom collections import OrderedDictfrom dataclasses import dataclass
# while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with# DeepSpeed data structures it has to be available in the current python environment.from deepspeed.utils import loggerfrom deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS, FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES, FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
@dataclassclass zero_model_state: buffers: dict() param_shapes: dict() shared_params: list ds_version: int frozen_param_shapes: dict() frozen_param_fragments: dict()
debug = 0
# load to cpudevice = torch.device('cpu')
def atoi(text): return int(text) if text.isdigit() else text
def natural_keys(text): ''' alist.sort(key=natural_keys) sorts in human order http://nedbatchelder.com/blog/200712/human_sorting.html (See Toothy's implementation in the comments) ''' return [atoi(c) for c in re.split(r'(\d+)', text)]
def get_model_state_file(checkpoint_dir, zero_stage): if not os.path.isdir(checkpoint_dir): raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
# there should be only one file if zero_stage <= 2: file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt") elif zero_stage == 3: file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
if not os.path.exists(file): raise FileNotFoundError(f"can't find model states file at '{file}'")
return file
def get_checkpoint_files(checkpoint_dir, glob_pattern): # XXX: need to test that this simple glob rule works for multi-node setup too ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
if len(ckpt_files) == 0: raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
return ckpt_files
def get_optim_files(checkpoint_dir): return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
def get_model_state_files(checkpoint_dir): return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
def parse_model_states(files): zero_model_states = [] for file in files: state_dict = torch.load(file, map_location=device, weights_only=False)
if BUFFER_NAMES not in state_dict: raise ValueError(f"{file} is not a model state checkpoint") buffer_names = state_dict[BUFFER_NAMES] if debug: print("Found buffers:", buffer_names)
# recover just the buffers while restoring them to fp32 if they were saved in fp16 buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names} param_shapes = state_dict[PARAM_SHAPES]
# collect parameters that are included in param_shapes param_names = [] for s in param_shapes: for name in s.keys(): param_names.append(name)
# update with frozen parameters frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None) if frozen_param_shapes is not None: if debug: print(f"Found frozen_param_shapes: {frozen_param_shapes}") param_names += list(frozen_param_shapes.keys())
# handle shared params shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
ds_version = state_dict.get(DS_VERSION, None)
frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
z_model_state = zero_model_state(buffers=buffers, param_shapes=param_shapes, shared_params=shared_params, ds_version=ds_version, frozen_param_shapes=frozen_param_shapes, frozen_param_fragments=frozen_param_fragments) zero_model_states.append(z_model_state)
return zero_model_states
def parse_optim_states(files, ds_checkpoint_dir): total_files = len(files) state_dicts = [] for f in tqdm(files, desc='Loading checkpoint shards'): state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False) # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights # and also handle the case where it was already removed by another helper script state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None) state_dicts.append(state_dict)
if ZERO_STAGE not in state_dicts[0][OPTIMIZER_STATE_DICT]: raise ValueError(f"{files[0]} is not a zero checkpoint") zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE] world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
# For ZeRO-2 each param group can have different partition_count as data parallelism for expert # parameters can be different from data parallelism for non-expert parameters. So we can just # use the max of the partition_count to get the dp world_size.
if type(world_size) is list: world_size = max(world_size)
if world_size != total_files: raise ValueError( f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. " "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes." )
# the groups are named differently in each stage if zero_stage <= 2: fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS elif zero_stage == 3: fp32_groups_key = FP32_FLAT_GROUPS else: raise ValueError(f"unknown zero stage {zero_stage}")
fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))] return zero_stage, world_size, fp32_flat_groups
def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters): """ Returns fp32 state_dict reconstructed from ds checkpoint
Args: - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
""" print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
optim_files = get_optim_files(ds_checkpoint_dir) zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir) print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
model_files = get_model_state_files(ds_checkpoint_dir)
zero_model_states = parse_model_states(model_files) print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
if zero_stage <= 2: return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states, exclude_frozen_parameters) elif zero_stage == 3: return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states, exclude_frozen_parameters)
def _zero2_merge_frozen_params(state_dict, zero_model_states): if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0: return
frozen_param_shapes = zero_model_states[0].frozen_param_shapes frozen_param_fragments = zero_model_states[0].frozen_param_fragments
if debug: num_elem = sum(s.numel() for s in frozen_param_shapes.values()) print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
wanted_params = len(frozen_param_shapes) wanted_numel = sum(s.numel() for s in frozen_param_shapes.values()) avail_numel = sum([p.numel() for p in frozen_param_fragments.values()]) print(f'Frozen params: Have {avail_numel} numels to process.') print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
total_params = 0 total_numel = 0 for name, shape in frozen_param_shapes.items(): total_params += 1 unpartitioned_numel = shape.numel() total_numel += unpartitioned_numel
state_dict[name] = frozen_param_fragments[name]
if debug: print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
def _has_callable(obj, fn): attr = getattr(obj, fn, None) return callable(attr)
def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states): param_shapes = zero_model_states[0].param_shapes
# Reconstruction protocol: # # XXX: document this
if debug: for i in range(world_size): for j in range(len(fp32_flat_groups[0])): print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
# XXX: memory usage doubles here (zero2) num_param_groups = len(fp32_flat_groups[0]) merged_single_partition_of_fp32_groups = [] for i in range(num_param_groups): merged_partitions = [sd[i] for sd in fp32_flat_groups] full_single_fp32_vector = torch.cat(merged_partitions, 0) merged_single_partition_of_fp32_groups.append(full_single_fp32_vector) avail_numel = sum( [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
if debug: wanted_params = sum([len(shapes) for shapes in param_shapes]) wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes]) # not asserting if there is a mismatch due to possible padding print(f"Have {avail_numel} numels to process.") print(f"Need {wanted_numel} numels in {wanted_params} params.")
# params # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support # out-of-core computing solution total_numel = 0 total_params = 0 for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups): offset = 0 avail_numel = full_single_fp32_vector.numel() for name, shape in shapes.items():
unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape) total_numel += unpartitioned_numel total_params += 1
if debug: print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ") state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape) offset += unpartitioned_numel
# Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex # paddings performed in the code it's almost impossible to predict the exact numbers w/o the # live optimizer object, so we are checking that the numbers are within the right range align_to = 2 * world_size
def zero2_align(x): return align_to * math.ceil(x / align_to)
if debug: print(f"original offset={offset}, avail_numel={avail_numel}")
offset = zero2_align(offset) avail_numel = zero2_align(avail_numel)
if debug: print(f"aligned offset={offset}, avail_numel={avail_numel}")
# Sanity check if offset != avail_numel: raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states, exclude_frozen_parameters): state_dict = OrderedDict()
# buffers buffers = zero_model_states[0].buffers state_dict.update(buffers) if debug: print(f"added {len(buffers)} buffers")
if not exclude_frozen_parameters: _zero2_merge_frozen_params(state_dict, zero_model_states)
_zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
# recover shared parameters for pair in zero_model_states[0].shared_params: if pair[1] in state_dict: state_dict[pair[0]] = state_dict[pair[1]]
return state_dict
def zero3_partitioned_param_info(unpartitioned_numel, world_size): remainder = unpartitioned_numel % world_size padding_numel = (world_size - remainder) if remainder else 0 partitioned_numel = math.ceil(unpartitioned_numel / world_size) return partitioned_numel, padding_numel
def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states): if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0: return
if debug: for i in range(world_size): num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values()) print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
frozen_param_shapes = zero_model_states[0].frozen_param_shapes wanted_params = len(frozen_param_shapes) wanted_numel = sum(s.numel() for s in frozen_param_shapes.values()) avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size print(f'Frozen params: Have {avail_numel} numels to process.') print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
total_params = 0 total_numel = 0 for name, shape in zero_model_states[0].frozen_param_shapes.items(): total_params += 1 unpartitioned_numel = shape.numel() total_numel += unpartitioned_numel
param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states) state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
if debug: print( f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}" )
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
class GatheredTensor: """ A pseudo tensor that collects partitioned weights. It is more memory efficient when there are multiple groups. """
def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape): self.flat_groups = flat_groups self.flat_groups_offset = flat_groups_offset self.offset = offset self.partitioned_numel = partitioned_numel self.shape = shape self.dtype = self.flat_groups[0][0].dtype
def contiguous(self): """ Merge partitioned weights from flat_groups into a single tensor. """ end_idx = self.offset + self.partitioned_numel world_size = len(self.flat_groups) pad_flat_param_chunks = []
for rank_i in range(world_size): # for each rank, we need to collect weights from related group/groups flat_groups_at_rank_i = self.flat_groups[rank_i] start_group_id = None end_group_id = None for group_id in range(len(self.flat_groups_offset)): if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]: start_group_id = group_id if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]: end_group_id = group_id break # collect weights from related group/groups for group_id in range(start_group_id, end_group_id + 1): flat_tensor = flat_groups_at_rank_i[group_id] start_offset = self.offset - self.flat_groups_offset[group_id] end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id] pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
# collect weights from all ranks pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0) param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous() return param
def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states): param_shapes = zero_model_states[0].param_shapes avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
# Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each # param, re-consolidating each param, while dealing with padding if any
# merge list of dicts, preserving order param_shapes = {k: v for d in param_shapes for k, v in d.items()}
if debug: for i in range(world_size): print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
wanted_params = len(param_shapes) wanted_numel = sum(shape.numel() for shape in param_shapes.values()) # not asserting if there is a mismatch due to possible padding avail_numel = fp32_flat_groups[0].numel() * world_size print(f"Trainable params: Have {avail_numel} numels to process.") print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
# params # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support # out-of-core computing solution offset = 0 total_numel = 0 total_params = 0 flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]])) for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'): unpartitioned_numel = shape.numel() total_numel += unpartitioned_numel total_params += 1 partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
if debug: print( f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}" )
# memory efficient tensor tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape) state_dict[name] = tensor offset += partitioned_numel
offset *= world_size
# Sanity check if offset != avail_numel: raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states, exclude_frozen_parameters): state_dict = OrderedDict()
# buffers buffers = zero_model_states[0].buffers state_dict.update(buffers) if debug: print(f"added {len(buffers)} buffers")
if not exclude_frozen_parameters: _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
_zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
# recover shared parameters for pair in zero_model_states[0].shared_params: if pair[1] in state_dict: state_dict[pair[0]] = state_dict[pair[1]]
return state_dict
def to_torch_tensor(state_dict, return_empty_tensor=False): """ Convert state_dict of GatheredTensor to torch tensor """ torch_state_dict = {} converted_tensors = {} for name, tensor in state_dict.items(): tensor_id = id(tensor) if tensor_id in converted_tensors: # shared tensors shared_tensor = torch_state_dict[converted_tensors[tensor_id]] torch_state_dict[name] = shared_tensor else: converted_tensors[tensor_id] = name if return_empty_tensor: torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype) else: torch_state_dict[name] = tensor.contiguous() return torch_state_dict
def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None, exclude_frozen_parameters=False, lazy_mode=False): """ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example via a model hub.
Args: - ``checkpoint_dir``: path to the desired checkpoint folder - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14`` - ``exclude_frozen_parameters``: exclude frozen parameters - ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient. Convert the pesduo tensor to torch tensor by ``.contiguous()``
Returns: - pytorch ``state_dict``
A typical usage might be ::
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint # do the training and checkpoint saving state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu model = model.cpu() # move to cpu model.load_state_dict(state_dict) # submit to model hub or save the model to share with others
In this example the ``model`` will no longer be usable in the deepspeed context of the same application. i.e. you will need to re-initialize the deepspeed engine, since ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
Note: the above usage may not work if your application doesn't have sufficient free CPU memory. You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with the checkpoint. Or you can load state_dict in lazy mode ::
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu for name, lazy_tensor in state_dict.item(): tensor = lazy_tensor.contiguous() # to cpu print(name, tensor) # del tensor to release memory if it no longer in use """ if tag is None: latest_path = os.path.join(checkpoint_dir, 'latest') if os.path.isfile(latest_path): with open(latest_path, 'r') as fd: tag = fd.read().strip() else: raise ValueError(f"Unable to find 'latest' file at {latest_path}")
ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
if not os.path.isdir(ds_checkpoint_dir): raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters) if lazy_mode: return state_dict else: return to_torch_tensor(state_dict)
def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_dir, max_shard_size="5GB", safe_serialization=False, tag=None, exclude_frozen_parameters=False): """ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
Args: - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``) - ``output_dir``: directory to the pytorch fp32 state_dict output files - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`). - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14`` - ``exclude_frozen_parameters``: exclude frozen parameters """
# Dependency pre-check if safe_serialization: try: from safetensors.torch import save_file except ImportError: print('If you want to use `safe_serialization`, please `pip install safetensors`') raise if max_shard_size is not None: try: from huggingface_hub import split_torch_state_dict_into_shards except ImportError: print('If you want to use `max_shard_size`, please `pip install huggingface_hub`') raise
# Convert zero checkpoint to state_dict state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag, exclude_frozen_parameters, lazy_mode=True)
# Shard the model if it is too big. weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin" if max_shard_size is not None: filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors") # an memory-efficient approach for sharding empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True) state_dict_split = split_torch_state_dict_into_shards(empty_state_dict, filename_pattern=filename_pattern, max_shard_size=max_shard_size) else: from collections import namedtuple StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"]) state_dict_split = StateDictSplit(is_sharded=False, filename_to_tensors={weights_name: list(state_dict.keys())})
# Save the model by shard os.makedirs(output_dir, exist_ok=True) filename_to_tensors = state_dict_split.filename_to_tensors.items() for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"): shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors} shard_state_dict = to_torch_tensor(shard_state_dict) output_path = os.path.join(output_dir, shard_file) if safe_serialization: save_file(shard_state_dict, output_path, metadata={"format": "pt"}) else: torch.save(shard_state_dict, output_path) # release the memory of current shard for tensor_name in list(shard_state_dict.keys()): del state_dict[tensor_name] del shard_state_dict[tensor_name] del shard_state_dict gc.collect()
# Save index if sharded if state_dict_split.is_sharded: index = { "metadata": state_dict_split.metadata, "weight_map": state_dict_split.tensor_to_filename, } save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json" save_index_file = os.path.join(output_dir, save_index_file) with open(save_index_file, "w", encoding="utf-8") as f: content = json.dumps(index, indent=2, sort_keys=True) + "\n" f.write(content)
def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None): """ 1. Put the provided model to cpu 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` 3. Load it into the provided model
Args: - ``model``: the model object to update - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``) - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
Returns: - ``model`: modified model
Make sure you have plenty of CPU memory available before you call this function. If you don't have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it conveniently placed for you in the checkpoint folder.
A typical usage might be ::
from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir) # submit to model hub or save the model to share with others
Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context of the same application. i.e. you will need to re-initialize the deepspeed engine, since ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
""" logger.info("Extracting fp32 weights") state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
logger.info("Overwriting model with fp32 weights") model = model.cpu() model.load_state_dict(state_dict, strict=False)
return model
if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("checkpoint_dir", type=str, help="path to the desired checkpoint folder, e.g., path/checkpoint-12") parser.add_argument("output_dir", type=str, help="directory to the pytorch fp32 state_dict output files" "(e.g. path/checkpoint-12-output/)") parser.add_argument( "--max_shard_size", type=str, default="5GB", help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size" "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`" "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances" "without CPU OOM issues.") parser.add_argument( "--safe_serialization", default=False, action='store_true', help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).") parser.add_argument("-t", "--tag", type=str, default=None, help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1") parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters") parser.add_argument("-d", "--debug", action='store_true', help="enable debug") args = parser.parse_args()
debug = args.debug
convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir, args.output_dir, max_shard_size=args.max_shard_size, safe_serialization=args.safe_serialization, tag=args.tag, exclude_frozen_parameters=args.exclude_frozen_parameters).gitattributes+1
added_tokens.jsonAdded+28
chat_template.jinjaAdded+120
config.jsonAdded+68
generation_config.jsonAdded+12
global_step76/bf16_zero_pp_rank_0_mp_rank_00_optim_states.ptAdded+3
global_step76/bf16_zero_pp_rank_1_mp_rank_00_optim_states.ptAdded+3
global_step76/zero_pp_rank_0_mp_rank_00_model_states.ptAdded+3
global_step76/zero_pp_rank_1_mp_rank_00_model_states.ptAdded+3
latestAdded+1
merges.txtAdded
model.safetensorsAdded+3
preprocessor_config.jsonAdded+39
rng_state_0.pthAdded+3
rng_state_1.pthAdded+3
special_tokens_map.jsonAdded+31
tokenizer.jsonAdded+3
tokenizer_config.jsonAdded+242
trainer_state.jsonAdded+2010
training_args.binAdded+3
video_preprocessor_config.jsonAdded+41
vocab.jsonAdded
zero_to_fp32.pyAdded+760