{"metadata":{"kernelspec":{"display_name":"Python 3 (ipykernel)","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.13.11"},"kaggle":{"accelerator":"nvidiaTeslaT4","dataSources":[{"sourceType":"competition","sourceId":121150,"databundleVersionId":15833391,"isSourceIdPinned":false},{"sourceType":"datasetVersion","sourceId":14410665,"datasetId":9203761,"databundleVersionId":15226414},{"sourceType":"datasetVersion","sourceId":14376272,"datasetId":9181082,"databundleVersionId":15188111}],"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":true},"papermill":{"default_parameters":{},"duration":1628.717817,"end_time":"2026-01-07T10:49:24.250158","environment_variables":{},"exception":null,"input_path":"__notebook__.ipynb","output_path":"__notebook__.ipynb","parameters":{},"start_time":"2026-01-07T10:22:15.532341","version":"2.6.0"},"widgets":{"application/vnd.jupyter.widget-state+json":{"state":{"056efb5e40234beea1bbb6dc9461bdba":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"069e5cd0670845f28126f1499fa3dbaa":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"06e754ba8bc749049fb1411243288eba":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_88d8c85b84104ddeadbc2ce740cbc114","placeholder":"​","style":"IPY_MODEL_dc78926ec9164f34b7221ea4d23fbc22","tabbable":null,"tooltip":null,"value":"special_tokens_map.json: "}},"0bc9a307b3de4e55b54da9582f889ee1":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"0fe026661bf841ffab9fdac3af3209a2":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":"20px"}},"158f97c8a01d43ff8aacd82cc2879eb4":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"1b002fb6c57a4c908357de0933b26030":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":"20px"}},"1d0283bbe2804e09aff113dd68e6311b":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_f347521b9c524b4aacd0f0cddbd6770b","placeholder":"​","style":"IPY_MODEL_e8b2a17726f54ba2a64137d3301e89dc","tabbable":null,"tooltip":null,"value":" 2.59k/? [00:00&lt;00:00, 277kB/s]"}},"1d0a44ce07f0468eae724af9010e8898":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_bcc99c8b1d0d4d3d935603e6b5f8c591","IPY_MODEL_e2273ad4050b40fc9eca4c708d10871e","IPY_MODEL_cbd854dedc0a4dadb774b4cca72594d5"],"layout":"IPY_MODEL_9b67d001a05b404a8d52388854b1fb67","tabbable":null,"tooltip":null}},"2081cb195a8048029b0ce49a2461c095":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"23a741bf0b0f43ef881f5257f4d095a4":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"25a1d50d9a38425fba1b2ff091b811b7":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"2662cb46a4874f94901c253f39181d64":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_6c842970a0c746ed8f9ca293603509c5","placeholder":"​","style":"IPY_MODEL_7865d45471794770be7cea581cfc7edb","tabbable":null,"tooltip":null,"value":"Map: 100%"}},"2a2901e7e44b46ab9d7fb0db535d8910":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_705670dea4ec4657a4462e5228c336a7","placeholder":"​","style":"IPY_MODEL_84a433eea30245abaf494756dd1dbce9","tabbable":null,"tooltip":null,"value":"Downloading builder script: "}},"2b3067aaf48545a699e5a23351f0d747":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_5daf1df0ef4a42ffa0a58aeea6d2dced","max":721,"min":0,"orientation":"horizontal","style":"IPY_MODEL_d35f5f5ab10f49429d91bd5a201725c8","tabbable":null,"tooltip":null,"value":721}},"2d44a56c619341fc93739ee961f64958":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"325eb569f8f64380a725ed4fe1376e36":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"3620768767a240b3ad3f5593c237aa56":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_1b002fb6c57a4c908357de0933b26030","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_0bc9a307b3de4e55b54da9582f889ee1","tabbable":null,"tooltip":null,"value":1}},"3c599ec7e2e24047bb5a2f9d34c71622":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_cb9351354d62430086a38c3f52353a3b","placeholder":"​","style":"IPY_MODEL_86ba667421154ba6a06a8e49e0b1556c","tabbable":null,"tooltip":null,"value":" 157/157 [00:00&lt;00:00, 891.06 examples/s]"}},"3d8f41e532b94526a7262f81f1ae0e2f":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_2662cb46a4874f94901c253f39181d64","IPY_MODEL_4822526bdcc6465d82ba277b4077ce15","IPY_MODEL_3c599ec7e2e24047bb5a2f9d34c71622"],"layout":"IPY_MODEL_9c58e49561a84ffba4d75e14169bcbde","tabbable":null,"tooltip":null}},"3db0f2e3030540baa2e4141549b60422":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"4610374e364046079e6269e8f893b4e7":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"4637a47f036b4704b0e72384eb2645f7":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_64e9380b84bf457ca861d6e13f494ea1","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_25a1d50d9a38425fba1b2ff091b811b7","tabbable":null,"tooltip":null,"value":1}},"4822526bdcc6465d82ba277b4077ce15":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_a07b692bd55d4be58c2a1d92018dbb63","max":157,"min":0,"orientation":"horizontal","style":"IPY_MODEL_ddf5767886fb4a1b81122fab6463d04c","tabbable":null,"tooltip":null,"value":157}},"4828de47c9e34375b57a2da4c4d00dde":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"56cfdb1fcc46475187fbccbb97e3be71":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"58988e2f53d54c5485efb2cf1c407cfa":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_9a794326841f4b3f91f93b1d3905e8cd","placeholder":"​","style":"IPY_MODEL_3db0f2e3030540baa2e4141549b60422","tabbable":null,"tooltip":null,"value":"tokenizer_config.json: "}},"5daf1df0ef4a42ffa0a58aeea6d2dced":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"61bd385b2c8a4d8eb2720810fcf09ec8":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"641f9fd9961a4d3791db31ba208e5381":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_4828de47c9e34375b57a2da4c4d00dde","placeholder":"​","style":"IPY_MODEL_056efb5e40234beea1bbb6dc9461bdba","tabbable":null,"tooltip":null,"value":"config.json: 100%"}},"64e9380b84bf457ca861d6e13f494ea1":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":"20px"}},"6c842970a0c746ed8f9ca293603509c5":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"6d8ae50a220c45f3a68936aa78144b88":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_58988e2f53d54c5485efb2cf1c407cfa","IPY_MODEL_f719c29444d641d696bf5a37b9bbffaa","IPY_MODEL_1d0283bbe2804e09aff113dd68e6311b"],"layout":"IPY_MODEL_db954b9fafcf4b88ac348727b767491c","tabbable":null,"tooltip":null}},"705670dea4ec4657a4462e5228c336a7":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"70c87d3d3a6048e28bc9fa5f21e5bc59":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"717b869cadf543639d4ad9cece29e098":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_641f9fd9961a4d3791db31ba208e5381","IPY_MODEL_2b3067aaf48545a699e5a23351f0d747","IPY_MODEL_c040a95027674360b28f2e0c4c667753"],"layout":"IPY_MODEL_aac07d9705f4459ab647d4212fcfc402","tabbable":null,"tooltip":null}},"7865d45471794770be7cea581cfc7edb":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"84a433eea30245abaf494756dd1dbce9":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"86ba667421154ba6a06a8e49e0b1556c":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"88d8c85b84104ddeadbc2ce740cbc114":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"8c171c5754b145a786edc67bcbe5b940":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"8ca106fc73184219b51f156fabda41ae":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_0fe026661bf841ffab9fdac3af3209a2","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_f22649ed3a9c4dc693053d6719e6cd95","tabbable":null,"tooltip":null,"value":1}},"955e3c15a6334154b5acb74956e5b5c2":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_b36cb55dc9ce4d39ab846165ab3df3b6","placeholder":"​","style":"IPY_MODEL_e13e58518b10427b958151a287e05542","tabbable":null,"tooltip":null,"value":" 8.15k/? [00:00&lt;00:00, 886kB/s]"}},"9a794326841f4b3f91f93b1d3905e8cd":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"9b67d001a05b404a8d52388854b1fb67":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"9c58e49561a84ffba4d75e14169bcbde":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"a07b692bd55d4be58c2a1d92018dbb63":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"a46109d3b05e4832beb2a8c025071c27":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_dba896f6c1f147a7861d977cfeaa3d36","placeholder":"​","style":"IPY_MODEL_2d44a56c619341fc93739ee961f64958","tabbable":null,"tooltip":null,"value":"Downloading builder script: "}},"aac07d9705f4459ab647d4212fcfc402":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"b06e9e92c1c9407a96a6dca217702442":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"b36cb55dc9ce4d39ab846165ab3df3b6":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"b430cdc02b224e4682c5c0ec17b365d2":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":"20px"}},"bcc99c8b1d0d4d3d935603e6b5f8c591":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_23a741bf0b0f43ef881f5257f4d095a4","placeholder":"​","style":"IPY_MODEL_2081cb195a8048029b0ce49a2461c095","tabbable":null,"tooltip":null,"value":"Map: 100%"}},"beed18cdc5634f12bb837369f87ab013":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_2a2901e7e44b46ab9d7fb0db535d8910","IPY_MODEL_3620768767a240b3ad3f5593c237aa56","IPY_MODEL_d2785d6fbce84008a7170a3bea404ce0"],"layout":"IPY_MODEL_b06e9e92c1c9407a96a6dca217702442","tabbable":null,"tooltip":null}},"c040a95027674360b28f2e0c4c667753":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_61bd385b2c8a4d8eb2720810fcf09ec8","placeholder":"​","style":"IPY_MODEL_4610374e364046079e6269e8f893b4e7","tabbable":null,"tooltip":null,"value":" 721/721 [00:00&lt;00:00, 97.3kB/s]"}},"c9bd79eab48948f1883a64678ffd5474":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"c9d2198a2e1c47d1bcd57a0a6734389b":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"cb9351354d62430086a38c3f52353a3b":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"cbd854dedc0a4dadb774b4cca72594d5":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_c9d2198a2e1c47d1bcd57a0a6734389b","placeholder":"​","style":"IPY_MODEL_325eb569f8f64380a725ed4fe1376e36","tabbable":null,"tooltip":null,"value":" 2808/2808 [00:03&lt;00:00, 899.81 examples/s]"}},"d2785d6fbce84008a7170a3bea404ce0":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_70c87d3d3a6048e28bc9fa5f21e5bc59","placeholder":"​","style":"IPY_MODEL_8c171c5754b145a786edc67bcbe5b940","tabbable":null,"tooltip":null,"value":" 9.01k/? [00:00&lt;00:00, 1.00MB/s]"}},"d35f5f5ab10f49429d91bd5a201725c8":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"d625fce6a6684b179b699e4a2ad83da4":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_06e754ba8bc749049fb1411243288eba","IPY_MODEL_4637a47f036b4704b0e72384eb2645f7","IPY_MODEL_fb03fa4d236b42ce97f101f6bce4ac4f"],"layout":"IPY_MODEL_fbe06b7fff2f4f54ab049fa778989f8b","tabbable":null,"tooltip":null}},"d9a42820e49943fc9f9b4c7db75cca7a":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HBoxModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_a46109d3b05e4832beb2a8c025071c27","IPY_MODEL_8ca106fc73184219b51f156fabda41ae","IPY_MODEL_955e3c15a6334154b5acb74956e5b5c2"],"layout":"IPY_MODEL_158f97c8a01d43ff8aacd82cc2879eb4","tabbable":null,"tooltip":null}},"db954b9fafcf4b88ac348727b767491c":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"dba896f6c1f147a7861d977cfeaa3d36":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"dc78926ec9164f34b7221ea4d23fbc22":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"ddf5767886fb4a1b81122fab6463d04c":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"e071609690ff4043b49605bac52fd741":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"e13e58518b10427b958151a287e05542":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"e2273ad4050b40fc9eca4c708d10871e":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_56cfdb1fcc46475187fbccbb97e3be71","max":2808,"min":0,"orientation":"horizontal","style":"IPY_MODEL_e3255e87658e42798db5b512a3e2d984","tabbable":null,"tooltip":null,"value":2808}},"e3255e87658e42798db5b512a3e2d984":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"e8b2a17726f54ba2a64137d3301e89dc":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","background":null,"description_width":"","font_size":null,"text_color":null}},"f22649ed3a9c4dc693053d6719e6cd95":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"ProgressStyleModel","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"f347521b9c524b4aacd0f0cddbd6770b":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"f719c29444d641d696bf5a37b9bbffaa":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"FloatProgressModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"ProgressView","bar_style":"success","description":"","description_allow_html":false,"layout":"IPY_MODEL_b430cdc02b224e4682c5c0ec17b365d2","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_e071609690ff4043b49605bac52fd741","tabbable":null,"tooltip":null,"value":1}},"fb03fa4d236b42ce97f101f6bce4ac4f":{"model_module":"@jupyter-widgets/controls","model_module_version":"2.0.0","model_name":"HTMLModel","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"2.0.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"2.0.0","_view_name":"HTMLView","description":"","description_allow_html":false,"layout":"IPY_MODEL_c9bd79eab48948f1883a64678ffd5474","placeholder":"​","style":"IPY_MODEL_069e5cd0670845f28126f1499fa3dbaa","tabbable":null,"tooltip":null,"value":" 2.50k/? [00:00&lt;00:00, 234kB/s]"}},"fbe06b7fff2f4f54ab049fa778989f8b":{"model_module":"@jupyter-widgets/base","model_module_version":"2.0.0","model_name":"LayoutModel","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"2.0.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"2.0.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border_bottom":null,"border_left":null,"border_right":null,"border_top":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}}},"version_major":2,"version_minor":0}}},"nbformat_minor":4,"nbformat":4,"cells":[{"id":"c409496b","cell_type":"markdown","source":"# Configuration","metadata":{"papermill":{"duration":0.011661,"end_time":"2026-01-07T10:22:18.128534","exception":false,"start_time":"2026-01-07T10:22:18.116873","status":"completed"},"tags":[]}},{"id":"701bc954","cell_type":"code","source":"import os\nimport gc\nimport re\nimport pandas as pd\nimport numpy as np\nimport torch\nfrom sklearn.model_selection import train_test_split\nfrom datasets import Dataset\nfrom transformers import (\n    AutoTokenizer, \n    AutoModelForSeq2SeqLM, \n    DataCollatorForSeq2Seq, \n    Seq2SeqTrainingArguments, \n    Seq2SeqTrainer\n)\nimport random\nfrom sentence_transformers import SentenceTransformer, util\nimport evaluate\nimport re\nimport numpy as np\nimport pandas as pd\nfrom typing import List\nfrom datasets import Dataset\nfrom peft import get_peft_model\nfrom transformers import BitsAndBytesConfig,TorchAoConfig, AutoModelForSeq2SeqLM, AutoTokenizer, Seq2SeqTrainingArguments, Seq2SeqTrainer, DataCollatorForSeq2Seq , EarlyStoppingCallback\nfrom peft import LoraModel, LoraConfig\nimport os\nimport gc\nimport re\nimport pandas as pd\nimport numpy as np\nimport torch\nfrom sklearn.model_selection import train_test_split\nfrom datasets import Dataset\nfrom transformers import (\n    AutoTokenizer, \n    AutoModelForSeq2SeqLM, \n    DataCollatorForSeq2Seq, \n    Seq2SeqTrainingArguments, \n    Seq2SeqTrainer\n)\nfrom sentence_transformers import SentenceTransformer, util\nimport evaluate,math\nfrom peft import prepare_model_for_kbit_training\nfrom tqdm import tqdm\nimport sentencepiece as spm\nfrom transformers import T5Tokenizer\nfrom transformers import EarlyStoppingCallback\nfrom tqdm import tqdm\nfrom transformers import TrainingArguments\nfrom transformers import Trainer","metadata":{"papermill":{"duration":32.355252,"end_time":"2026-01-07T10:22:55.459025","exception":false,"start_time":"2026-01-07T10:22:23.103773","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"259bd2dc-32d2-4b37-be15-bae33dbc5ac9","cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null},{"id":"11854e22","cell_type":"code","source":"class Config:\n    \"\"\"Configuration for ByT5 Akkadian-to-English Machine Translation\"\"\"\n    # ====== Model Configuration ======\n    MODEL_NAME = \"google/byt5-base\" #\"google/byt5-base\"\n    # PRETRAINED_DIR = None  # Set to a path to resume training; None to start from scratch\n    PRETRAINED_DIR = None\n    MAX_LENGTH = 512\n    MAX_LENGTH_LABELS = 768\n    MAX_LENGTH_INFER = 768\n    # ====== Training Configuration ======\n    INPUT_DIR = \"./\"\n    SEED = 42\n    EPOCHS = 30\n    LEARNING_RATE = 2e-4\n    TRAIN_BATCH_SIZE = 4    # per_device_train_batch_size\n    EVAL_BATCH_SIZE = 4    # per_device_eval_batch_size\n    GRADIENT_ACCUMULATION_STEPS = 2\n    OUTPUT_DIR = \"./byt5-akkadian-model-xavier-stage2-newtry\"\n    \n    # ====== Inference & Upload Configuration ======\n    MAKE_SUBMISSION = False   # Set to True to run inference on test set\n    UPLOAD_MODEL = False     # Set to True to upload model to Kaggle\n    KAGGLE_USERNAME = \"<redacted>\"\n    KAGGLE_KEY = \"<redacted>\"\n    DATASET_NAME = \"byt5-akkadian-model-private\"","metadata":{"papermill":{"duration":0.02017,"end_time":"2026-01-07T10:22:55.492848","exception":false,"start_time":"2026-01-07T10:22:55.472678","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"9f92fcf8","cell_type":"code","source":"# Fix the seed (for reproducibility).\ndef seed_everything(seed=42):\n    torch.manual_seed(seed)\n    np.random.seed(seed)\n    torch.cuda.manual_seed(seed)\n\nseed_everything(Config.SEED)","metadata":{"papermill":{"duration":0.024181,"end_time":"2026-01-07T10:22:55.52967","exception":false,"start_time":"2026-01-07T10:22:55.505489","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"66320ca7-18b0-4857-b7f4-f44af7c18716","cell_type":"code","source":"def preprocess_input_text(text):\n    # Handle NaN\n    if pd.isna(text):\n        return \"\"\n\n    # Convert to string\n    cleaned_text = str(text)\n\n    # Replace gaps\n    cleaned_text = re.compile(r\"(\\.{3,}|…+|……)\").sub(\"<big_gap>\", cleaned_text)\n    cleaned_text = re.compile(r\"(xx+|\\s+x\\s+)\").sub(\"<gap>\", cleaned_text)\n\n    return cleaned_text\n# https://www.kaggle.com/code/pshikk/ffn-lora-deep-past\n_V2 = re.compile(r\"([aAeEiIuU])(?:2|₂)\")\n_V3 = re.compile(r\"([aAeEiIuU])(?:3|₃)\")\n_ACUTE = str.maketrans({\"a\":\"á\",\"e\":\"é\",\"i\":\"í\",\"u\":\"ú\",\"A\":\"Á\",\"E\":\"É\",\"I\":\"Í\",\"U\":\"Ú\"})\n_GRAVE = str.maketrans({\"a\":\"à\",\"e\":\"è\",\"i\":\"ì\",\"u\":\"ù\",\"A\":\"À\",\"E\":\"È\",\"I\":\"Ì\",\"U\":\"Ù\"})\n\ndef _ascii_to_diacritics(s: str) -> str:\n    s = s.replace(\"sz\", \"š\").replace(\"SZ\", \"Š\")\n    s = s.replace(\"s,\", \"ṣ\").replace(\"S,\", \"Ṣ\")\n    s = s.replace(\"t,\", \"ṭ\").replace(\"T,\", \"Ṭ\")\n    s = _V2.sub(lambda m: m.group(1).translate(_ACUTE), s)\n    s = _V3.sub(lambda m: m.group(1).translate(_GRAVE), s)\n    return s\n\n\n_ALLOWED_FRACS = [\n    (1/6, \"0.16666\"), (1/4, \"0.25\"), (1/3, \"0.33333\"),\n    (1/2, \"0.5\"), (2/3, \"0.66666\"), (3/4, \"0.75\"), (5/6, \"0.83333\"),\n]\n_FRAC_TOL = 2e-3\n_FLOAT_RE = re.compile(r\"(?<![\\w/])(\\d+\\.\\d{4,})(?![\\w/])\")\n\ndef _canon_decimal(x: float) -> str:\n    ip = int(math.floor(x + 1e-12))\n    frac = x - ip\n    best = min(_ALLOWED_FRACS, key=lambda t: abs(frac - t[0]))\n\n    if abs(frac - best[0]) <= _FRAC_TOL:\n        dec = best[1]\n        if ip == 0:\n            return dec\n        return f\"{ip}{dec[1:]}\" if dec.startswith(\"0.\") else f\"{ip}+{dec}\"\n\n    return f\"{x:.5f}\".rstrip(\"0\").rstrip(\".\")\n\n\n_TAG_BIGGAP_RE = re.compile(r\"<\\s*big[\\s_\\-]*gap\\s*>\", re.I)\n_TAG_GAP_RE    = re.compile(r\"<\\s*gap\\s*>\", re.I)\n_BARE_BIGGAP   = re.compile(r\"\\bbig[\\s_\\-]*gap\\b\", re.I)\n_ELLIPSIS_RE   = re.compile(r\"(?:\\.{3,}|…+|\\[\\.+\\])\")\n_BRACKET_X_RE  = re.compile(r\"(\\[\\s*x\\s*\\]|\\(\\s*x\\s*\\))\", re.I)\n_XTOKEN_RUN_RE = re.compile(r\"\\bx(?:\\s+x)+\\b\", re.I)\n_XRUN_RE       = re.compile(r\"(?<!\\w)x{2,}(?!\\w)\", re.I)\n_XTOK_RE       = re.compile(r\"(?<!\\w)x(?!\\w)\", re.I)\n_WS_RE         = re.compile(r\"\\s+\")\n\n_GAP_UNIFIED_RE = re.compile(\n    r\"<\\s*big[\\s_\\-]*gap\\s*>\"\n    r\"|<\\s*gap\\s*>\"\n    r\"|\\bbig[\\s_\\-]*gap\\b\"\n    r\"|\\bx(?:\\s+x)+\\b\"\n    r\"|\\.{3,}|…+|\\[\\.+\\]\"\n    r\"|\\[\\s*x\\s*\\]|\\(\\s*x\\s*\\)\"\n    r\"|(?<!\\w)x{2,}(?!\\w)\"\n    r\"|(?<!\\w)x(?!\\w)\"\n    r\"|\\(\\s*large\\s+break\\s*\\)\"\n    r\"|\\(\\s*break\\s*\\)\"\n    r\"|\\(\\s*\\d+\\s+broken\\s+lines?\\s*\\)\",\n    re.I\n)\n\ndef _normalize_gaps_vec(ser: pd.Series) -> pd.Series:\n    return ser.str.replace(_GAP_UNIFIED_RE, \"<gap>\", regex=True)\n\n\n_CHAR_TRANS = str.maketrans({\n    \"ḫ\":\"h\",\"Ḫ\":\"H\",\"ʾ\":\"\",\n    \"₀\":\"0\",\"₁\":\"1\",\"₂\":\"2\",\"₃\":\"3\",\"₄\":\"4\",\n    \"₅\":\"5\",\"₆\":\"6\",\"₇\":\"7\",\"₈\":\"8\",\"₉\":\"9\",\n    \"—\":\"-\",\"–\":\"-\",\n})\n_SUB_X = \"ₓ\"\n\n_UNICODE_UPPER = r\"A-ZŠṬṢḪ\\u00C0-\\u00D6\\u00D8-\\u00DE\\u0160\\u1E00-\\u1EFF\"\n_UNICODE_LOWER = r\"a-zšṭṣḫ\\u00E0-\\u00F6\\u00F8-\\u00FF\\u0161\\u1E01-\\u1EFF\"\n\n_DET_UPPER_RE = re.compile(r\"\\(([\" + _UNICODE_UPPER + r\"0-9]{1,6})\\)\")\n_DET_LOWER_RE = re.compile(r\"\\(([\" + _UNICODE_LOWER + r\"]{1,4})\\)\")\n\n_PN_RE = re.compile(r\"\\bPN\\b\")\n_KUBABBAR_RE = re.compile(r\"KÙ\\.B\\.\")\n\n_EXACT_FRAC_RE = re.compile(r\"0\\.8333|0\\.6666|0\\.3333|0\\.1666|0\\.625|0\\.75|0\\.25|0\\.5\")\n_EXACT_FRAC_MAP = {\n    \"0.8333\": \"⅚\", \"0.6666\": \"⅔\", \"0.3333\": \"⅓\", \"0.1666\": \"⅙\",\n    \"0.625\": \"⅝\", \"0.75\": \"¾\", \"0.25\": \"¼\", \"0.5\": \"½\",\n}\n\ndef _frac_repl(m: re.Match) -> str:\n    return _EXACT_FRAC_MAP[m.group(0)]\n\n\nclass OptimizedPreprocessor:\n    def preprocess_batch(self, texts: List[str]) -> List[str]:\n        ser = pd.Series(texts).fillna(\"\").astype(str)\n        ser = ser.apply(_ascii_to_diacritics)\n\n        # Uppercase determinatives are unwrapped, lowercase ones are converted to braces.\n        ser = ser.str.replace(_DET_UPPER_RE, r\"\\1\", regex=True)\n        ser = ser.str.replace(_DET_LOWER_RE, r\"{\\1}\", regex=True)\n\n        ser = _normalize_gaps_vec(ser)\n        ser = ser.str.translate(_CHAR_TRANS)\n        ser = ser.str.replace(_SUB_X, \"\", regex=False)\n        ser = ser.str.replace(_KUBABBAR_RE, \"KÙ.BABBAR\", regex=True)\n        ser = ser.str.replace(_EXACT_FRAC_RE, _frac_repl, regex=True)\n        ser = ser.str.replace(_FLOAT_RE, lambda m: _canon_decimal(float(m.group(1))), regex=True)\n        ser = ser.str.replace(_WS_RE, \" \", regex=True).str.strip()\n        return ser.tolist()    ","metadata":{},"outputs":[],"execution_count":null},{"id":"0d63aecd-7666-4264-8368-7a3f1c7f30f1","cell_type":"code","source":"def clean_translation(text):\n\n    # remove brackets\n    text = re.sub(r\"\\[|\\]\", \"\", text)\n    text = re.sub(r\"[()]\", \"\", text)\n\n    # remove uncertainty markers\n    text = text.replace(\"?\", \"\")\n\n    # remove backslash\n    text = text.replace(\"\\\\\", \"\")\n\n    # keep only first word in slash alternatives\n    text = re.sub(r\"\\s*/\\s*\\w+\", \"\", text)\n\n    # normalize spaces\n    text = re.sub(r\"\\s+\", \" \", text)\n\n    return text.strip()","metadata":{},"outputs":[],"execution_count":null},{"id":"ec1d02b0","cell_type":"code","source":"INPUT_DIR = Config.INPUT_DIR\ntrain_df = pd.read_csv(f\"{INPUT_DIR}/published_texts.csv\",encoding=\"utf-8\",encoding_errors=\"ignore\")\ntest_df = pd.read_csv(f\"{INPUT_DIR}/val_200.csv\")\n# newdf = pd.read_csv(r'newtrain_data.csv')\n# train_df = pd.concat([train_df,newdf],axis=0)\n# train_df = train_df.reset_index(drop=True)","metadata":{"papermill":{"duration":0.078658,"end_time":"2026-01-07T10:22:55.620919","exception":false,"start_time":"2026-01-07T10:22:55.542261","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"8eb1b33f-744a-4d65-9adf-5a8827b80339","cell_type":"code","source":"preprocessing_text = OptimizedPreprocessor()\ntrain_df[\"transliteration\"] = preprocessing_text.preprocess_batch(train_df['transliteration'].to_list()) #train_df[\"transliteration\"].apply(lambda x:preprocess_input_text(x))\ntest_df[\"transliteration\"] = preprocessing_text.preprocess_batch(test_df['transliteration'].to_list()) #train_df[\"transliteration\"].apply(lambda x:preprocess_input_text(x))\n# train_df[\"translation\"] = train_df['translation'].apply(lambda x:clean_translation(x)) #to_list()) #train_df[\"transliteration\"].apply(lambda x:preprocess_input_text(x))\n# test_df[\"translation\"] = test_df['translation'].apply(lambda x:clean_translation(x))","metadata":{},"outputs":[],"execution_count":null},{"id":"18737801","cell_type":"code","source":"print(f\"Original Train Data: {len(train_df)} docs\")\nprint(f\"Original Train Data: {len(test_df)} docs\")","metadata":{"papermill":{"duration":0.01853,"end_time":"2026-01-07T10:22:55.651756","exception":false,"start_time":"2026-01-07T10:22:55.633226","status":"completed"},"tags":[]},"outputs":[],"execution_count":null},{"id":"ede0d431-b311-4de2-9e1c-136973b34cc7","cell_type":"code","source":"# train_df['translation'][0]","metadata":{},"outputs":[],"execution_count":null},{"id":"4c5130fe-1922-4603-9c6a-bcf2629e6077","cell_type":"code","source":"train_df['transliteration'][872]","metadata":{},"outputs":[],"execution_count":null},{"id":"aa8d52c4-feeb-47e2-826a-871f35a6b31c","cell_type":"code","source":"print(f\"Training from scratch using {Config.MODEL_NAME}...\")\ntokenizer = AutoTokenizer.from_pretrained(Config.MODEL_NAME)\nmodel = AutoModelForSeq2SeqLM.from_pretrained(Config.MODEL_NAME)\nprint(\"✓ Base model loaded successfully\")","metadata":{},"outputs":[],"execution_count":null},{"id":"6d44aded-9063-4482-84f6-4db2ad86988d","cell_type":"code","source":"model.config","metadata":{},"outputs":[],"execution_count":null},{"id":"9be9e790-5fab-4720-87b8-40a47170dec2","cell_type":"code","source":"from transformers import T5Config, T5ForConditionalGeneration","metadata":{},"outputs":[],"execution_count":null},{"id":"66684c56-2836-42cb-ba15-a51fa7c3d108","cell_type":"code","source":"config = {\n  \"architectures\": [\n    \"T5ForConditionalGeneration\"\n  ],\n  \"classifier_dropout\": 0.0,\n  \"d_ff\": 3968,\n  \"d_kv\": 64,\n  \"d_model\": 1536,\n  \"decoder_start_token_id\": 0,\n  \"dense_act_fn\": \"gelu_new\",\n  \"dropout_rate\": 0.1,\n  \"dtype\": \"float32\",\n  \"eos_token_id\": 1,\n  \"feed_forward_proj\": \"gated-gelu\",\n  \"gradient_checkpointing\": False,\n  \"initializer_factor\": 1.0,\n  \"is_encoder_decoder\": True,\n  \"is_gated_act\": True,\n  \"layer_norm_epsilon\": 1e-06,\n  \"model_type\": \"t5\",\n  \"num_decoder_layers\": 3,\n  \"num_heads\": 8,\n  \"num_layers\": 12,\n  \"output_past\": True,\n  \"pad_token_id\": 0,\n  \"relative_attention_max_distance\": 128,\n  \"relative_attention_num_buckets\": 32,\n  \"tie_word_embeddings\": False,\n  \"tokenizer_class\": \"ByT5Tokenizer\",\n  \"transformers_version\": \"4.57.1\",\n  \"use_cache\": True,\n  \"vocab_size\": 384\n}\n# config = T5Config(**config)","metadata":{},"outputs":[],"execution_count":null},{"id":"b83038be-dba4-493d-99c2-fbef1a92125c","cell_type":"code","source":"# model = T5ForConditionalGeneration(config)","metadata":{},"outputs":[],"execution_count":null},{"id":"01caa91e-83fd-4e2b-b459-ae05efe9c772","cell_type":"code","source":"total_params = sum(p.numel() for p in model.parameters())\ntrainable_params = sum(p.numel() for p in model.parameters() if p.requires_grad)\n\nprint(f\"Total params: {total_params:,}\")\nprint(f\"Trainable params: {trainable_params:,}\")\nprint(f\"Trainable %: {100 * trainable_params / total_params:.4f}%\")","metadata":{},"outputs":[],"execution_count":null},{"id":"a46769a3-2791-4339-af9b-c81c5c5e5c8c","cell_type":"code","source":"texts = train_df['transliteration'].to_list()","metadata":{},"outputs":[],"execution_count":null},{"id":"13bd309f-771c-4015-a559-9e0bc9427371","cell_type":"code","source":"token_lengths = []\ntokenized_texts = []\n\nprint(\"Tokenizing dataset...\")\n\nfor text in tqdm(texts):\n\n    tokens = tokenizer.encode(text, add_special_tokens=False)\n\n    token_lengths.append(len(tokens))\n    tokenized_texts.append(tokens)\n\ntrain_df[\"token_length\"] = token_lengths\n\n# ---------------------------------------------------\n# TOKEN STATISTICS\n# ---------------------------------------------------\n\nprint(\"\\nToken Statistics\")\nprint(\"----------------------\")\n\nprint(\"Total rows:\", len(train_df))\nprint(\"Mean length:\", np.mean(token_lengths))\nprint(\"Median length:\", np.median(token_lengths))\nprint(\"Max length:\", np.max(token_lengths))\nprint(\"95th percentile:\", np.percentile(token_lengths, 95))\n\n# histogram bins\nbins = [0,128,256,384,512,1024,2048]\n\nhist = pd.cut(token_lengths, bins).value_counts().sort_index()\n\nprint(\"\\nToken Length Distribution\")\nprint(hist)","metadata":{},"outputs":[],"execution_count":null},{"id":"6c3dfd86-2d46-4cdb-94ee-d9b630bad69a","cell_type":"code","source":"# ---------------------------------------------------\n# CHUNKING FUNCTION\n# ---------------------------------------------------\n\nMAX_CHUNK = 256        # ideal chunk size\nSPLIT_THRESHOLD = 256  # split if above this\n\ndef chunk_tokens(tokens, chunk_size=MAX_CHUNK):\n\n    chunks = []\n\n    if len(tokens) <= chunk_size:\n        chunks.append(tokens)\n\n    else:\n\n        n_chunks = int(np.ceil(len(tokens) / chunk_size))\n\n        split_size = int(np.ceil(len(tokens) / n_chunks))\n\n        for i in range(0, len(tokens), split_size):\n\n            chunk = tokens[i:i+split_size]\n\n            if len(chunk) > 0:\n                chunks.append(chunk)\n\n    return chunks","metadata":{},"outputs":[],"execution_count":null},{"id":"cc652855-6382-4fdb-bc37-510563ea455e","cell_type":"code","source":"# ---------------------------------------------------\n# CREATE CHUNKED DATASET\n# ---------------------------------------------------\n\nchunk_rows = []\n\nprint(\"\\nChunking sequences...\")\n\nfor idx, tokens in tqdm(enumerate(tokenized_texts), total=len(tokenized_texts)):\n\n    chunks = chunk_tokens(tokens)\n\n    for c_id, chunk in enumerate(chunks):\n\n        text_chunk = tokenizer.decode(chunk)\n\n        chunk_rows.append({\n            \"original_id\": idx,\n            \"chunk_id\": c_id,\n            \"chunk_token_length\": len(chunk),\n            \"chunk_text\": text_chunk\n        })\n\nchunk_df = pd.DataFrame(chunk_rows)\n\nprint(\"\\nOriginal dataset size:\", len(train_df))\nprint(\"Chunked dataset size:\", len(chunk_df))","metadata":{},"outputs":[],"execution_count":null},{"id":"c0d48c5c-6596-4a36-89bd-ce6a805a9c95","cell_type":"code","source":"texts = chunk_df['chunk_text'].to_list()","metadata":{},"outputs":[],"execution_count":null},{"id":"b8f50807-8531-4b85-9903-f1beb8680db0","cell_type":"code","source":"# chunk_df.to_csv(r'./train_data_chunked.csv', index=False)","metadata":{},"outputs":[],"execution_count":null},{"id":"2b5cb6e9-4f08-4ff5-84be-d149696fa420","cell_type":"code","source":"sentinel_tokens = [f\"<extra_id_{i}>\" for i in range(100)]\nsentinel_ids = tokenizer.convert_tokens_to_ids(sentinel_tokens)","metadata":{},"outputs":[],"execution_count":null},{"id":"6cca8ca6-2c08-425e-afd7-2f619d0f5886","cell_type":"code","source":"CORRUPTION_RATE = 0.12\nMEAN_SPAN_LENGTH = 10\nNUM_VARIANTS = 1   # how many corrupted samples per sentence\n\n# -----------------------------------------\n# SPAN LENGTH SAMPLING\n# -----------------------------------------\n\ndef sample_span_lengths(num_tokens, corruption_rate=0.15, mean_span_length=3):\n\n    num_to_corrupt = int(num_tokens * corruption_rate)\n\n    p = 1.0 / mean_span_length\n\n    spans = []\n    total_corrupted = 0\n\n    while total_corrupted < num_to_corrupt:\n\n        span_length = np.random.geometric(p)\n        span_length = min(span_length, num_to_corrupt - total_corrupted)\n\n        spans.append(span_length)\n        total_corrupted += span_length\n\n    return spans\n\n\n# -----------------------------------------\n# SPAN CORRUPTION FUNCTION\n# -----------------------------------------\n\ndef corrupt_spans(token_ids):\n\n    num_tokens = len(token_ids)\n\n    span_lengths = sample_span_lengths(\n        num_tokens,\n        corruption_rate=CORRUPTION_RATE,\n        mean_span_length=MEAN_SPAN_LENGTH,\n    )\n\n    available_positions = list(range(num_tokens))\n    span_positions = []\n\n    for length in span_lengths:\n\n        valid_starts = []\n\n        for pos in available_positions:\n\n            if pos + length <= num_tokens:\n\n                span_range = set(range(pos, pos + length))\n\n                if span_range.issubset(set(available_positions)):\n                    valid_starts.append(pos)\n\n        if not valid_starts:\n            continue\n\n        start = random.choice(valid_starts)\n\n        span_positions.append((start, length))\n\n        for i in range(start, start + length):\n            available_positions.remove(i)\n\n    span_positions.sort(key=lambda x: x[0])\n\n    corrupted_input = []\n    target = []\n\n    sentinel_index = 0\n    current_pos = 0\n\n    for start, length in span_positions:\n\n        corrupted_input.extend(token_ids[current_pos:start])\n\n        corrupted_input.append(sentinel_ids[sentinel_index])\n\n        target.append(sentinel_ids[sentinel_index])\n        target.extend(token_ids[start:start + length+10])\n\n        sentinel_index += 1\n        current_pos = start + length\n\n    corrupted_input.extend(token_ids[current_pos:])\n\n    return corrupted_input, target","metadata":{},"outputs":[],"execution_count":null},{"id":"4ac5b505-561a-4da8-bf11-88bdfdbf3aaf","cell_type":"code","source":"rows = []\n\nprint(\"Creating span corruption dataset...\")\n\nfor text in tqdm(texts):\n\n    token_ids = tokenizer.encode(text, add_special_tokens=False)\n\n    if len(token_ids) < 20:\n        continue\n\n    for _ in range(NUM_VARIANTS):\n\n        corrupted_input, target = corrupt_spans(token_ids)\n\n        input_text = tokenizer.decode(corrupted_input)\n        target_text = tokenizer.decode(target)\n\n        rows.append(\n            {\n                \"input_text\": input_text,\n                \"target_text\": target_text\n            }\n        )\n\n\nspan_df = pd.DataFrame(rows)","metadata":{"scrolled":true},"outputs":[],"execution_count":null},{"id":"9089e050-f541-4228-98a8-0d96ec0def0b","cell_type":"code","source":"span_df = pd.DataFrame(rows)\n\nprint(\"Generated samples:\", len(span_df))","metadata":{},"outputs":[],"execution_count":null},{"id":"05f14289-ac6a-4928-b042-b72bc3e9a31c","cell_type":"code","source":"span_df['input_text'][2]","metadata":{},"outputs":[],"execution_count":null},{"id":"31cb6e54-a19c-497a-bea9-a65f8c96fd79","cell_type":"code","source":"span_df['target_text'][28]","metadata":{},"outputs":[],"execution_count":null},{"id":"bb901854-11ec-44df-a281-fa75502287c8","cell_type":"code","source":"import torch\nfrom torch.utils.data import Dataset\nimport pandas as pd\n\n\nclass SpanMaskDataset(Dataset):\n\n    def __init__(self, df, tokenizer, max_length=256):\n\n        self.df = df\n        self.tokenizer = tokenizer\n        self.max_length = max_length\n\n        self.inputs = self.df[\"input_text\"].tolist()\n        self.targets = self.df[\"target_text\"].tolist()\n\n    def __len__(self):\n        return len(self.inputs)\n\n    def __getitem__(self, idx):\n\n        input_text = self.inputs[idx]\n        target_text = self.targets[idx]\n\n        model_inputs = self.tokenizer(\n            input_text,\n            truncation=True,\n            max_length=self.max_length\n        )\n\n        labels = self.tokenizer(\n            target_text,\n            truncation=True,\n            max_length=self.max_length\n        )\n\n        model_inputs[\"labels\"] = labels[\"input_ids\"]\n\n        return model_inputs","metadata":{},"outputs":[],"execution_count":null},{"id":"99503050-4cab-4949-9408-a8d461997ab1","cell_type":"code","source":"from dataclasses import dataclass\nfrom typing import Optional, Union\nimport torch\n\n\n@dataclass\nclass DataCollatorForSpanCorruption:\n\n    tokenizer: any\n    padding: Union[bool, str] = True\n    max_length: Optional[int] = None\n\n    def __call__(self, features):\n\n        input_ids = [f[\"input_ids\"] for f in features]\n        labels = [f[\"labels\"] for f in features]\n\n        batch = self.tokenizer.pad(\n            {\"input_ids\": input_ids},\n            padding=True,\n            return_tensors=\"pt\"\n        )\n\n        labels_batch = self.tokenizer.pad(\n            {\"input_ids\": labels},\n            padding=True,\n            return_tensors=\"pt\"\n        )\n\n        labels = labels_batch[\"input_ids\"]\n\n        labels[labels == self.tokenizer.pad_token_id] = -100\n\n        batch[\"labels\"] = labels\n\n        return batch","metadata":{},"outputs":[],"execution_count":null},{"id":"49f3999a-db43-4af0-8cd7-c32f180460c1","cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null},{"id":"8a37de34-f028-436f-bb20-464682267c12","cell_type":"code","source":"train_dataset = SpanMaskDataset(\n    span_df,\n    tokenizer,\n    max_length=256\n)","metadata":{},"outputs":[],"execution_count":null},{"id":"01e33974-e666-4dcf-86ef-13fa6157c93d","cell_type":"code","source":"data_collator = DataCollatorForSpanCorruption(\n    tokenizer=tokenizer\n)","metadata":{},"outputs":[],"execution_count":null},{"id":"672a422f-5489-4b23-9809-83d86db8b5b2","cell_type":"code","source":"from transformers import TrainingArguments\n\ntraining_args = TrainingArguments(\n\n    output_dir=\"./pretrain_model_small\",\n\n    num_train_epochs=10,\n\n    per_device_train_batch_size=8,\n\n    learning_rate=5e-4,\n\n    warmup_steps=500,\n\n    logging_steps=250,\n\n    save_steps=1000,\n\n    save_total_limit=1,\n\n    bf16=True,\n\n    gradient_accumulation_steps=2,\n\n    report_to=\"none\"\n)\n\ntrainer = Trainer(\n    model=model,\n    args=training_args,\n    train_dataset=train_dataset,\n    tokenizer=tokenizer,\n    data_collator=data_collator\n)","metadata":{},"outputs":[],"execution_count":null},{"id":"f907a782-d34e-4845-908b-38ccb869ff00","cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null},{"id":"be197730-e826-4f8d-a739-d571b9145bbe","cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null},{"id":"c20decc8-b2ff-4b7a-9b71-ec7f5a1e1b83","cell_type":"code","source":"trainer.train()","metadata":{"scrolled":true},"outputs":[],"execution_count":null},{"id":"f0dce7dc-9e73-4af0-abfc-35928f3cb924","cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null},{"id":"620104b2-7b5c-4554-96c1-0403ee0bb27f","cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null},{"id":"14ec03d1-971c-4d61-b743-a111abb684dc","cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null},{"id":"2bcc7b0a-8393-4fc7-b8b2-4e18de8dcc71","cell_type":"code","source":"model.eval()","metadata":{},"outputs":[],"execution_count":null},{"id":"40ef783e-598d-4820-976c-faa348289cd8","cell_type":"code","source":"def predict_span(text):\n\n    inputs = tokenizer(\n        text,\n        return_tensors=\"pt\",\n        truncation=True,\n        max_length=256\n    )\n\n    with torch.no_grad():\n        outputs = model.generate(\n            inputs[\"input_ids\"].to('cuda'),\n            max_length=256,\n            num_beams=5,\n            early_stopping=True\n        )\n\n    prediction = tokenizer.decode(outputs[0], skip_special_tokens=False)\n\n    return prediction","metadata":{},"outputs":[],"execution_count":null},{"id":"c12aa78c-400d-4723-9521-84f15bd5d708","cell_type":"code","source":"texts[162]","metadata":{},"outputs":[],"execution_count":null},{"id":"da51a1a7-4ed7-4cfb-9e36-51ca7cd2a60f","cell_type":"code","source":"print('input text : ',texts[1612])\nprint()\nprint(\"output text from model : \",predict_span(texts[161]))","metadata":{},"outputs":[],"execution_count":null},{"id":"d8600d9b-8f0e-489d-a345-e0db7c3774cb","cell_type":"code","source":"test = \"15 GÍN KÙ.BABBAR <extra_id_0> a-na PN\"\n\nprint(predict_span(test))","metadata":{},"outputs":[],"execution_count":null},{"id":"0785ce05-6975-4442-a9e7-d3b853b949db","cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null},{"id":"f55056de-f29b-4c1b-abdb-d4a6c20b032c","cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null},{"id":"6d132205-32ba-44ec-b04f-92885fdc0ed2","cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null},{"id":"f90dc680-3a79-4c17-a0c0-4b24f7492375","cell_type":"code","source":"","metadata":{},"outputs":[],"execution_count":null}]}