Skip to content
Permalink
28881fc565
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
1 lines (1 sloc) 82.2 KB
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"gpuType":"T4","mount_file_id":"1gubeKa9CntV-Wu4YqrPg1H6TWnTEXrQi","authorship_tag":"ABX9TyO6lMkb7JfuP4mT3L57ilPF"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"},"accelerator":"GPU","widgets":{"application/vnd.jupyter.widget-state+json":{"22358d0a74014134a34623caf65f8b57":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_0bec64abf8c0442ba3f6e18ace52b8b2","IPY_MODEL_d0a7b573ba6c4ab4a8c832aeb5a4008b","IPY_MODEL_cb0ffc3840c74edf978e70125af375ff"],"layout":"IPY_MODEL_938827961705441e95371ba7c6f67008"}},"0bec64abf8c0442ba3f6e18ace52b8b2":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_4ba881e7e74a4cd6b592024762b70dc7","placeholder":"​","style":"IPY_MODEL_026a8546b8ad422ab596ae35108548ac","value":"Downloading (…)/adapter_config.json: 100%"}},"d0a7b573ba6c4ab4a8c832aeb5a4008b":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_0ac4424f1a7842c7b9996137895c27c8","max":465,"min":0,"orientation":"horizontal","style":"IPY_MODEL_0ed3ecb6dad9407bb10df224e7886758","value":465}},"cb0ffc3840c74edf978e70125af375ff":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_b85fb2d4065749e08c21694ffb83c4c9","placeholder":"​","style":"IPY_MODEL_9de900c6a59e4d1187c67196450c9327","value":" 465/465 [00:00&lt;00:00, 10.9kB/s]"}},"938827961705441e95371ba7c6f67008":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"4ba881e7e74a4cd6b592024762b70dc7":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"026a8546b8ad422ab596ae35108548ac":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"0ac4424f1a7842c7b9996137895c27c8":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"0ed3ecb6dad9407bb10df224e7886758":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"b85fb2d4065749e08c21694ffb83c4c9":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"9de900c6a59e4d1187c67196450c9327":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"adc1f43c0c7e4499bbb69c64b03d4cf6":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_df2359bad646446997a33f9735a0236e","IPY_MODEL_bac1c1efab8f45ad9bb1c60ae8ae9e25","IPY_MODEL_ed64314aae5c49c0a99ef761f77c6cdd"],"layout":"IPY_MODEL_b6685d2763ac40db9d11a14d40b3eea7"}},"df2359bad646446997a33f9735a0236e":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_09e119a18fef4830aacd84a3c30f4442","placeholder":"​","style":"IPY_MODEL_b4fa69d2ec79457caabbc36e2e49f4f6","value":"Downloading (…)lve/main/config.json: 100%"}},"bac1c1efab8f45ad9bb1c60ae8ae9e25":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_fe8be034fc5145478c92c70b13669a12","max":595,"min":0,"orientation":"horizontal","style":"IPY_MODEL_1144537940e24bdea4ae11744ba41f4f","value":595}},"ed64314aae5c49c0a99ef761f77c6cdd":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_236eef87024a4b57b647761075284479","placeholder":"​","style":"IPY_MODEL_3be5a33952eb4e0e859f19b3655a9f9c","value":" 595/595 [00:00&lt;00:00, 16.8kB/s]"}},"b6685d2763ac40db9d11a14d40b3eea7":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"09e119a18fef4830aacd84a3c30f4442":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"b4fa69d2ec79457caabbc36e2e49f4f6":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"fe8be034fc5145478c92c70b13669a12":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"1144537940e24bdea4ae11744ba41f4f":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"236eef87024a4b57b647761075284479":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"3be5a33952eb4e0e859f19b3655a9f9c":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"449d55e1617c41b78160bb8535373ba4":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_87d5645c766d408e83f50acf645c2781","IPY_MODEL_d29c2750c32944ffbf1250a747babed9","IPY_MODEL_fd3e45a30ee1453684129da5c9ebac6c"],"layout":"IPY_MODEL_631e84ee23d549a6ae92e2974c07c92b"}},"87d5645c766d408e83f50acf645c2781":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_b198ee8138064793a8532754007b4b65","placeholder":"​","style":"IPY_MODEL_f4f0497b961a4ddebc5ad7e8095a5fbf","value":"Downloading pytorch_model.bin: 100%"}},"d29c2750c32944ffbf1250a747babed9":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_dee9b50d7cc84c1ba112e2b2fc23dd18","max":1560781537,"min":0,"orientation":"horizontal","style":"IPY_MODEL_294c481a0bdb49d392eaae6545ef2341","value":1560781537}},"fd3e45a30ee1453684129da5c9ebac6c":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_8e954f7fd50647f5b4a1717dac755010","placeholder":"​","style":"IPY_MODEL_2ee03b35f40945c3a3bd2d9128d2ffe1","value":" 1.56G/1.56G [02:25&lt;00:00, 13.6MB/s]"}},"631e84ee23d549a6ae92e2974c07c92b":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"b198ee8138064793a8532754007b4b65":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"f4f0497b961a4ddebc5ad7e8095a5fbf":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"dee9b50d7cc84c1ba112e2b2fc23dd18":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"294c481a0bdb49d392eaae6545ef2341":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"8e954f7fd50647f5b4a1717dac755010":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"2ee03b35f40945c3a3bd2d9128d2ffe1":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"d58a152677014d3ba000a74bec8447c1":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_6e6f752e75ee463cae1381932241e6d7","IPY_MODEL_476844ffedca4f28bc6e1346796d94c0","IPY_MODEL_283dbec64091466cbda6defe9528efee"],"layout":"IPY_MODEL_29c00b804ccd4418a40a5b911fb8f834"}},"6e6f752e75ee463cae1381932241e6d7":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_5511d4387a1845b5b5345be06f44277f","placeholder":"​","style":"IPY_MODEL_e16c4589f5a340f1b68d36e4352fe3c1","value":"Downloading (…)olve/main/vocab.json: 100%"}},"476844ffedca4f28bc6e1346796d94c0":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_9cf667cd83234d58883449353378d236","max":927059,"min":0,"orientation":"horizontal","style":"IPY_MODEL_14a53514ffc14b6583bc59ceb52357bf","value":927059}},"283dbec64091466cbda6defe9528efee":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_aad56cf295c0434a9e4a8e22a830c631","placeholder":"​","style":"IPY_MODEL_2b6c662221f549218fe164678676731c","value":" 927k/927k [00:00&lt;00:00, 19.7MB/s]"}},"29c00b804ccd4418a40a5b911fb8f834":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"5511d4387a1845b5b5345be06f44277f":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"e16c4589f5a340f1b68d36e4352fe3c1":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"9cf667cd83234d58883449353378d236":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"14a53514ffc14b6583bc59ceb52357bf":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"aad56cf295c0434a9e4a8e22a830c631":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"2b6c662221f549218fe164678676731c":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"af82975373a440bc983ebe7014ccc1d7":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_bc5a470000c146539771bc97ed6a9353","IPY_MODEL_b466340a71dd454d8c71ec0a680f918a","IPY_MODEL_03f1c46c1c1e4dcabf043281d4fc7671"],"layout":"IPY_MODEL_b5d9ed4be1e340c3a07027a0b3027235"}},"bc5a470000c146539771bc97ed6a9353":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_758722bb79894bb089eb54f755709103","placeholder":"​","style":"IPY_MODEL_8be386ccf8b949e79d9989ba61d35a7a","value":"Downloading (…)olve/main/merges.txt: 100%"}},"b466340a71dd454d8c71ec0a680f918a":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_05c61e6c6d114ceb8a6b7871e3310ba6","max":696298,"min":0,"orientation":"horizontal","style":"IPY_MODEL_9e6e695bccee4a9ca5d130f16ddfac84","value":696298}},"03f1c46c1c1e4dcabf043281d4fc7671":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_13c1594f1bf4468ebbce03212df9a865","placeholder":"​","style":"IPY_MODEL_c0bee0a6c7cc4c9aabc3b2811e0e5745","value":" 696k/696k [00:00&lt;00:00, 1.65MB/s]"}},"b5d9ed4be1e340c3a07027a0b3027235":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"758722bb79894bb089eb54f755709103":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"8be386ccf8b949e79d9989ba61d35a7a":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"05c61e6c6d114ceb8a6b7871e3310ba6":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"9e6e695bccee4a9ca5d130f16ddfac84":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"13c1594f1bf4468ebbce03212df9a865":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"c0bee0a6c7cc4c9aabc3b2811e0e5745":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"68842c68b0144335bc555436f91c9dcc":{"model_module":"@jupyter-widgets/controls","model_name":"HBoxModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HBoxModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HBoxView","box_style":"","children":["IPY_MODEL_8659e81beccf4576a1e61ba0ae12dece","IPY_MODEL_89be3fdcb34b4b30a6f38aaf8cd42a46","IPY_MODEL_508f0ff4aba44190b04cba6363340dfe"],"layout":"IPY_MODEL_394bcc69fb0e4aa1a6397cafce90ea91"}},"8659e81beccf4576a1e61ba0ae12dece":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_ea78cf716d904370901344622aa15d87","placeholder":"​","style":"IPY_MODEL_3125d318ecf54c05b6ef145aafe59106","value":"Downloading adapter_model.bin: 100%"}},"89be3fdcb34b4b30a6f38aaf8cd42a46":{"model_module":"@jupyter-widgets/controls","model_name":"FloatProgressModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"FloatProgressModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"ProgressView","bar_style":"success","description":"","description_tooltip":null,"layout":"IPY_MODEL_af7174f7608345fc887c5eeca8a1c683","max":4778897,"min":0,"orientation":"horizontal","style":"IPY_MODEL_c20e38b365824e8bb23df60e34d2d8ff","value":4778897}},"508f0ff4aba44190b04cba6363340dfe":{"model_module":"@jupyter-widgets/controls","model_name":"HTMLModel","model_module_version":"1.5.0","state":{"_dom_classes":[],"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"HTMLModel","_view_count":null,"_view_module":"@jupyter-widgets/controls","_view_module_version":"1.5.0","_view_name":"HTMLView","description":"","description_tooltip":null,"layout":"IPY_MODEL_92393cf161844a15b824128a5682d365","placeholder":"​","style":"IPY_MODEL_52e48b51ebaf41fe97563fe869fad82b","value":" 4.78M/4.78M [00:01&lt;00:00, 3.26MB/s]"}},"394bcc69fb0e4aa1a6397cafce90ea91":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"ea78cf716d904370901344622aa15d87":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"3125d318ecf54c05b6ef145aafe59106":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}},"af7174f7608345fc887c5eeca8a1c683":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"c20e38b365824e8bb23df60e34d2d8ff":{"model_module":"@jupyter-widgets/controls","model_name":"ProgressStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"ProgressStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","bar_color":null,"description_width":""}},"92393cf161844a15b824128a5682d365":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":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,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":null}},"52e48b51ebaf41fe97563fe869fad82b":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}}}}},"cells":[{"cell_type":"markdown","source":["# Install Required libraries"],"metadata":{"id":"oNme5YN3mwRS"}},{"cell_type":"code","execution_count":5,"metadata":{"id":"OmxFfI92lslA","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1690650458356,"user_tz":-60,"elapsed":13218,"user":{"displayName":"Unknown","userId":"16317712665857714848"}},"outputId":"6fd8c719-e5b0-4a07-c93e-77fadfb0c48c"},"outputs":[{"output_type":"stream","name":"stdout","text":["Requirement already satisfied: sacremoses in /usr/local/lib/python3.10/dist-packages (0.0.53)\n","Requirement already satisfied: transformers in /usr/local/lib/python3.10/dist-packages (4.31.0)\n","Collecting peft\n"," Downloading peft-0.4.0-py3-none-any.whl (72 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m72.9/72.9 kB\u001b[0m \u001b[31m906.6 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: regex in /usr/local/lib/python3.10/dist-packages (from sacremoses) (2022.10.31)\n","Requirement already satisfied: six in /usr/local/lib/python3.10/dist-packages (from sacremoses) (1.16.0)\n","Requirement already satisfied: click in /usr/local/lib/python3.10/dist-packages (from sacremoses) (8.1.6)\n","Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from sacremoses) (1.3.1)\n","Requirement already satisfied: tqdm in /usr/local/lib/python3.10/dist-packages (from sacremoses) (4.65.0)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers) (3.12.2)\n","Requirement already satisfied: huggingface-hub<1.0,>=0.14.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.16.4)\n","Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers) (1.22.4)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers) (23.1)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (6.0.1)\n","Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers) (2.27.1)\n","Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.13.3)\n","Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers) (0.3.1)\n","Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from peft) (5.9.5)\n","Requirement already satisfied: torch>=1.13.0 in /usr/local/lib/python3.10/dist-packages (from peft) (2.0.1+cu118)\n","Collecting accelerate (from peft)\n"," Downloading accelerate-0.21.0-py3-none-any.whl (244 kB)\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m244.2/244.2 kB\u001b[0m \u001b[31m7.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hRequirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.14.1->transformers) (2023.6.0)\n","Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.14.1->transformers) (4.7.1)\n","Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.0->peft) (1.11.1)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.0->peft) (3.1)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.0->peft) (3.1.2)\n","Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.13.0->peft) (2.0.0)\n","Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.13.0->peft) (3.25.2)\n","Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.13.0->peft) (16.0.6)\n","Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (1.26.16)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2023.7.22)\n","Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (2.0.12)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers) (3.4)\n","Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.13.0->peft) (2.1.3)\n","Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.13.0->peft) (1.3.0)\n","Installing collected packages: accelerate, peft\n","Successfully installed accelerate-0.21.0 peft-0.4.0\n"]}],"source":["!pip install sacremoses transformers peft"]},{"cell_type":"markdown","source":["# Import required libraries"],"metadata":{"id":"nxKi5cK6nU5Z"}},{"cell_type":"code","source":["from transformers import BioGptTokenizer, BioGptForSequenceClassification, pipeline, AutoTokenizer, AutoModel, AutoModelForSequenceClassification\n","import torch\n","import pandas as pd\n","import numpy as np\n","from sklearn.model_selection import train_test_split"],"metadata":{"id":"9Q4U4TWWnUNa","executionInfo":{"status":"ok","timestamp":1690650391547,"user_tz":-60,"elapsed":14341,"user":{"displayName":"Unknown","userId":"16317712665857714848"}}},"execution_count":2,"outputs":[]},{"cell_type":"markdown","source":["# Import Data"],"metadata":{"id":"nK9JropUm3yK"}},{"cell_type":"code","source":["df = pd.read_csv('/content/drive/MyDrive/Colab Notebooks/dissertation/data/final_clinicalText.csv')"],"metadata":{"id":"pX9KCq5pSseO","executionInfo":{"status":"ok","timestamp":1690650392810,"user_tz":-60,"elapsed":1278,"user":{"displayName":"Unknown","userId":"16317712665857714848"}}},"execution_count":3,"outputs":[]},{"cell_type":"markdown","source":["# Load Model and tokenizer (BioGPT)"],"metadata":{"id":"7h7jfsy9njIx"}},{"cell_type":"code","source":["device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n","\n","#GPT-2 is a model with absolute position embeddings so it's usually advised to pad the inputs on the right rather than the left. Remember this\n","tokenizer = AutoTokenizer.from_pretrained(\"microsoft/biogpt\")\n","tokenizer.padding_side = \"left\"\n","\n","model = AutoModel.from_pretrained(\"microsoft/biogpt\", num_labels=2, return_dict=True)\n","#model.resize_token_embeddings(len(tokenizer))\n","\n","#model = model.to(device)"],"metadata":{"id":"6oKjPaR80mDT"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from peft import (\n"," get_peft_config,\n"," get_peft_model,\n"," get_peft_model_state_dict,\n"," set_peft_model_state_dict,\n"," LoraConfig,\n"," PeftType,\n"," prepare_model_for_int8_training,\n"," PrefixTuningConfig,\n"," PromptEncoderConfig,\n"," PeftConfig,\n"," PeftModel,\n","\n",")\n","\n","device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n","\n","\n","peft_model_id = \"Lukee4/biogpt-letters\"\n","config = PeftConfig.from_pretrained(peft_model_id)\n","\n","#config.task_type='FEATURE_EXTRACTION'\n","inference_model = AutoModel.from_pretrained(config.base_model_name_or_path)\n","\n","tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)\n","\n","# Load the Lora model\n","inference_model = PeftModel.from_pretrained(inference_model, peft_model_id)\n","\n","#model = model.to(device)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":209,"referenced_widgets":["22358d0a74014134a34623caf65f8b57","0bec64abf8c0442ba3f6e18ace52b8b2","d0a7b573ba6c4ab4a8c832aeb5a4008b","cb0ffc3840c74edf978e70125af375ff","938827961705441e95371ba7c6f67008","4ba881e7e74a4cd6b592024762b70dc7","026a8546b8ad422ab596ae35108548ac","0ac4424f1a7842c7b9996137895c27c8","0ed3ecb6dad9407bb10df224e7886758","b85fb2d4065749e08c21694ffb83c4c9","9de900c6a59e4d1187c67196450c9327","adc1f43c0c7e4499bbb69c64b03d4cf6","df2359bad646446997a33f9735a0236e","bac1c1efab8f45ad9bb1c60ae8ae9e25","ed64314aae5c49c0a99ef761f77c6cdd","b6685d2763ac40db9d11a14d40b3eea7","09e119a18fef4830aacd84a3c30f4442","b4fa69d2ec79457caabbc36e2e49f4f6","fe8be034fc5145478c92c70b13669a12","1144537940e24bdea4ae11744ba41f4f","236eef87024a4b57b647761075284479","3be5a33952eb4e0e859f19b3655a9f9c","449d55e1617c41b78160bb8535373ba4","87d5645c766d408e83f50acf645c2781","d29c2750c32944ffbf1250a747babed9","fd3e45a30ee1453684129da5c9ebac6c","631e84ee23d549a6ae92e2974c07c92b","b198ee8138064793a8532754007b4b65","f4f0497b961a4ddebc5ad7e8095a5fbf","dee9b50d7cc84c1ba112e2b2fc23dd18","294c481a0bdb49d392eaae6545ef2341","8e954f7fd50647f5b4a1717dac755010","2ee03b35f40945c3a3bd2d9128d2ffe1","d58a152677014d3ba000a74bec8447c1","6e6f752e75ee463cae1381932241e6d7","476844ffedca4f28bc6e1346796d94c0","283dbec64091466cbda6defe9528efee","29c00b804ccd4418a40a5b911fb8f834","5511d4387a1845b5b5345be06f44277f","e16c4589f5a340f1b68d36e4352fe3c1","9cf667cd83234d58883449353378d236","14a53514ffc14b6583bc59ceb52357bf","aad56cf295c0434a9e4a8e22a830c631","2b6c662221f549218fe164678676731c","af82975373a440bc983ebe7014ccc1d7","bc5a470000c146539771bc97ed6a9353","b466340a71dd454d8c71ec0a680f918a","03f1c46c1c1e4dcabf043281d4fc7671","b5d9ed4be1e340c3a07027a0b3027235","758722bb79894bb089eb54f755709103","8be386ccf8b949e79d9989ba61d35a7a","05c61e6c6d114ceb8a6b7871e3310ba6","9e6e695bccee4a9ca5d130f16ddfac84","13c1594f1bf4468ebbce03212df9a865","c0bee0a6c7cc4c9aabc3b2811e0e5745","68842c68b0144335bc555436f91c9dcc","8659e81beccf4576a1e61ba0ae12dece","89be3fdcb34b4b30a6f38aaf8cd42a46","508f0ff4aba44190b04cba6363340dfe","394bcc69fb0e4aa1a6397cafce90ea91","ea78cf716d904370901344622aa15d87","3125d318ecf54c05b6ef145aafe59106","af7174f7608345fc887c5eeca8a1c683","c20e38b365824e8bb23df60e34d2d8ff","92393cf161844a15b824128a5682d365","52e48b51ebaf41fe97563fe869fad82b"]},"id":"S37ZLL02nMOi","executionInfo":{"status":"ok","timestamp":1690650623768,"user_tz":-60,"elapsed":165415,"user":{"displayName":"Unknown","userId":"16317712665857714848"}},"outputId":"68bca76e-cfa5-4a20-8c57-6bacf2d84719"},"execution_count":6,"outputs":[{"output_type":"display_data","data":{"text/plain":["Downloading (…)/adapter_config.json: 0%| | 0.00/465 [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"22358d0a74014134a34623caf65f8b57"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["Downloading (…)lve/main/config.json: 0%| | 0.00/595 [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"adc1f43c0c7e4499bbb69c64b03d4cf6"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["Downloading pytorch_model.bin: 0%| | 0.00/1.56G [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"449d55e1617c41b78160bb8535373ba4"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["Downloading (…)olve/main/vocab.json: 0%| | 0.00/927k [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"d58a152677014d3ba000a74bec8447c1"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["Downloading (…)olve/main/merges.txt: 0%| | 0.00/696k [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"af82975373a440bc983ebe7014ccc1d7"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["Downloading adapter_model.bin: 0%| | 0.00/4.78M [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"68842c68b0144335bc555436f91c9dcc"}},"metadata":{}}]},{"cell_type":"code","source":["#oversample 2019 and get result\n","#class weight\n","#fine tune"],"metadata":{"id":"lmd-cKW-pGj8"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["## Define the pipeline"],"metadata":{"id":"ppuc0YsrMwiA"}},{"cell_type":"code","source":["# Create the pipeline\n","p = pipeline(\n"," task=\"feature-extraction\",\n"," tokenizer=tokenizer,\n"," model=model,\n"," framework=\"pt\",\n"," device=0, # use CUDA with 0\n",")"],"metadata":{"id":"f9JuA7OTMuw-"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["### Get the embeddings of the last token of the last hidden state"],"metadata":{"id":"dNTtyRnArThB"}},{"cell_type":"code","source":["# Custom function to extract the embedding of the last token\n","def extract_last_token(last_hidden_states):\n"," last_hidden_states = np.array(last_hidden_states)\n"," return last_hidden_states[:,-1,:]\n","\n","# Process the data using the pipeline\n","results = p([row[\"extracted_text\"] for _, row in df.iterrows()])\n","\n","# Extract the last token of the last hidden state\n","embeddings = [extract_last_token(hidden_state) for hidden_state in results]"],"metadata":{"id":"8TnbZZQ3qqjo"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# Assign the reshaped embeddings to the \"embeddings\" column in the DataFrame\n","df[\"emb_biogpt_no_FineT\"] = embeddings\n","\n","# Print the resulting DataFrame\n","print(df)"],"metadata":{"id":"ZzokAh_VU5c4","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1690469546293,"user_tz":-60,"elapsed":190,"user":{"displayName":"Unknown","userId":"16317712665857714848"}},"outputId":"717473d4-8383-495a-bcf5-e4a62efd38ae"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":[" clinical_action extracted_text \\\n","0 1 ATTENDANCE STATUS Did Not Attend - no advance ... \n","1 0 Your patient has been informed, along with an... \n","2 0 Your patient has been informed, along with an... \n","3 1 ATTENDANCE STATUS Did Not Attend - no advance ... \n","4 1 ATTENDANCE STATUS Did Not Attend - no advance ... \n",".. ... ... \n","94 0 ATTENDANCE STATUS Attended on time or, if late... \n","95 0 ATTENDANCE STATUS Attended on time or, if late... \n","96 1 ATTENDANCE STATUS Attended on time or, if late... \n","97 0 ATTENDANCE STATUS Attended on time or, if late... \n","98 1 ATTENDANCE STATUS Did Not Attend - no advance ... \n","\n"," emb_biogpt_no_FineT \n","0 [[-0.6997142434120178, 0.3576340675354004, -1.... \n","1 [[-0.5884130001068115, 0.6733577847480774, -1.... \n","2 [[-0.6094481348991394, 0.3963492214679718, -1.... \n","3 [[-0.7163529992103577, 0.3390462100505829, -1.... \n","4 [[-0.6963425278663635, 0.35845375061035156, -1... \n",".. ... \n","94 [[-0.36470234394073486, 0.17761437594890594, -... \n","95 [[-0.5374011397361755, 0.3239386975765228, -1.... \n","96 [[-0.41086751222610474, 0.5456363558769226, -1... \n","97 [[-0.4364805221557617, 0.4016321897506714, -1.... \n","98 [[-0.7163529992103577, 0.3390462100505829, -1.... \n","\n","[99 rows x 3 columns]\n"]}]},{"cell_type":"markdown","source":["## Save to csv ot txt"],"metadata":{"id":"OeTeIttSNTS9"}},{"cell_type":"code","source":["df.to_json('/content/drive/MyDrive/Colab Notebooks/dissertation/data/letters_noFT.json', orient='records')\n","\n","#df.to_csv(\"/content/drive/MyDrive/Colab Notebooks/dissertation/data/datafinal.csv\", index=False)\n","#np.savetxt(r\"/content/drive/MyDrive/Colab Notebooks/dissertation/data/datafinal.txt\", df, fmt='%s')"],"metadata":{"id":"8OxiKJdDNXI1"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["#For testing pusposes (SVC code)"],"metadata":{"id":"F23BVwcxT0YO"}},{"cell_type":"code","source":["X_train, X_test, y_train, y_test = train_test_split(df.emb_biogpt_no_FineT, df.Predict, test_size=0.2, random_state=42)"],"metadata":{"id":"OmIh09w0IURd"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["X_train = np.array(X_train.tolist())\n","X_train = np.squeeze(X_train)\n","X_test = np.array(X_test.tolist())\n","X_test = np.squeeze(X_test)\n","print(np.array(X_train).shape)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"UNdFPglYVK6p","executionInfo":{"status":"ok","timestamp":1689337344382,"user_tz":-60,"elapsed":5,"user":{"displayName":"Unknown","userId":"16317712665857714848"}},"outputId":"f3be0b12-e460-46b7-e407-a0300e81ebb1"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["(150, 1024)\n"]}]},{"cell_type":"code","source":["X_train"],"metadata":{"id":"zlYSZTXmf5eY"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from sklearn.svm import SVC\n","svm_model = SVC(decision_function_shape='ovo')\n","svm_model.fit(X_train, y_train)"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":75},"id":"dMtghnDbI6tO","executionInfo":{"status":"ok","timestamp":1689337344976,"user_tz":-60,"elapsed":237,"user":{"displayName":"Unknown","userId":"16317712665857714848"}},"outputId":"07937119-df27-41fe-975d-fbff2d41f6e5"},"execution_count":null,"outputs":[{"output_type":"execute_result","data":{"text/plain":["SVC(decision_function_shape='ovo')"],"text/html":["<style>#sk-container-id-4 {color: black;background-color: white;}#sk-container-id-4 pre{padding: 0;}#sk-container-id-4 div.sk-toggleable {background-color: white;}#sk-container-id-4 label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.3em;box-sizing: border-box;text-align: center;}#sk-container-id-4 label.sk-toggleable__label-arrow:before {content: \"▸\";float: left;margin-right: 0.25em;color: #696969;}#sk-container-id-4 label.sk-toggleable__label-arrow:hover:before {color: black;}#sk-container-id-4 div.sk-estimator:hover label.sk-toggleable__label-arrow:before {color: black;}#sk-container-id-4 div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;background-color: #f0f8ff;}#sk-container-id-4 div.sk-toggleable__content pre {margin: 0.2em;color: black;border-radius: 0.25em;background-color: #f0f8ff;}#sk-container-id-4 input.sk-toggleable__control:checked~div.sk-toggleable__content {max-height: 200px;max-width: 100%;overflow: auto;}#sk-container-id-4 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {content: \"▾\";}#sk-container-id-4 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-4 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-4 input.sk-hidden--visually {border: 0;clip: rect(1px 1px 1px 1px);clip: rect(1px, 1px, 1px, 1px);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;}#sk-container-id-4 div.sk-estimator {font-family: monospace;background-color: #f0f8ff;border: 1px dotted black;border-radius: 0.25em;box-sizing: border-box;margin-bottom: 0.5em;}#sk-container-id-4 div.sk-estimator:hover {background-color: #d4ebff;}#sk-container-id-4 div.sk-parallel-item::after {content: \"\";width: 100%;border-bottom: 1px solid gray;flex-grow: 1;}#sk-container-id-4 div.sk-label:hover label.sk-toggleable__label {background-color: #d4ebff;}#sk-container-id-4 div.sk-serial::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: 0;}#sk-container-id-4 div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: white;padding-right: 0.2em;padding-left: 0.2em;position: relative;}#sk-container-id-4 div.sk-item {position: relative;z-index: 1;}#sk-container-id-4 div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: white;position: relative;}#sk-container-id-4 div.sk-item::before, #sk-container-id-4 div.sk-parallel-item::before {content: \"\";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 0;bottom: 0;left: 50%;z-index: -1;}#sk-container-id-4 div.sk-parallel-item {display: flex;flex-direction: column;z-index: 1;position: relative;background-color: white;}#sk-container-id-4 div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;}#sk-container-id-4 div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;}#sk-container-id-4 div.sk-parallel-item:only-child::after {width: 0;}#sk-container-id-4 div.sk-dashed-wrapped {border: 1px dashed gray;margin: 0 0.4em 0.5em 0.4em;box-sizing: border-box;padding-bottom: 0.4em;background-color: white;}#sk-container-id-4 div.sk-label label {font-family: monospace;font-weight: bold;display: inline-block;line-height: 1.2em;}#sk-container-id-4 div.sk-label-container {text-align: center;}#sk-container-id-4 div.sk-container {/* jupyter's `normalize.less` sets `[hidden] { display: none; }` but bootstrap.min.css set `[hidden] { display: none !important; }` so we also need the `!important` here to be able to override the default hidden behavior on the sphinx rendered scikit-learn.org. See: https://github.com/scikit-learn/scikit-learn/issues/21755 */display: inline-block !important;position: relative;}#sk-container-id-4 div.sk-text-repr-fallback {display: none;}</style><div id=\"sk-container-id-4\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>SVC(decision_function_shape=&#x27;ovo&#x27;)</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item\"><div class=\"sk-estimator sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-4\" type=\"checkbox\" checked><label for=\"sk-estimator-id-4\" class=\"sk-toggleable__label sk-toggleable__label-arrow\">SVC</label><div class=\"sk-toggleable__content\"><pre>SVC(decision_function_shape=&#x27;ovo&#x27;)</pre></div></div></div></div></div>"]},"metadata":{},"execution_count":35}]},{"cell_type":"code","source":["y_pred = svm_model.predict(X_test)"],"metadata":{"id":"EENlWgpVJHdE"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["from sklearn.metrics import classification_report\n","print(classification_report(y_test, y_pred))"],"metadata":{"id":"3fw2I_5FJJEb","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1689337345416,"user_tz":-60,"elapsed":4,"user":{"displayName":"Unknown","userId":"16317712665857714848"}},"outputId":"8e3b4c9a-814e-425d-b98f-25b97ea8ed6f"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":[" precision recall f1-score support\n","\n"," N 0.61 0.78 0.68 18\n"," U 0.00 0.00 0.00 3\n"," Y 0.60 0.53 0.56 17\n","\n"," accuracy 0.61 38\n"," macro avg 0.40 0.44 0.42 38\n","weighted avg 0.56 0.61 0.58 38\n","\n"]},{"output_type":"stream","name":"stderr","text":["/usr/local/lib/python3.10/dist-packages/sklearn/metrics/_classification.py:1344: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n"," _warn_prf(average, modifier, msg_start, len(result))\n","/usr/local/lib/python3.10/dist-packages/sklearn/metrics/_classification.py:1344: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n"," _warn_prf(average, modifier, msg_start, len(result))\n","/usr/local/lib/python3.10/dist-packages/sklearn/metrics/_classification.py:1344: UndefinedMetricWarning: Precision and F-score are ill-defined and being set to 0.0 in labels with no predicted samples. Use `zero_division` parameter to control this behavior.\n"," _warn_prf(average, modifier, msg_start, len(result))\n"]}]},{"cell_type":"code","source":["c = pipeline(\n"," task=\"text-classification\",\n"," tokenizer=\"microsoft/biogpt\",\n"," model=model,\n"," framework=\"pt\",\n"," device=0, # use CUDA with 0\n",")\n"],"metadata":{"id":"Bs-zADh7Zq3x","colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"status":"ok","timestamp":1689338002767,"user_tz":-60,"elapsed":1455,"user":{"displayName":"Unknown","userId":"16317712665857714848"}},"outputId":"31a5f9db-d646-4ad1-fe9d-1fe571df7a05"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stderr","text":["Xformers is not installed correctly. If you want to use memory_efficient_attention to accelerate training use the following command to install Xformers\n","pip install xformers.\n"]}]},{"cell_type":"code","source":["results2 = c([row[\"Chief Complaint\"] for _, row in df.iterrows()])\n"],"metadata":{"id":"-OeiyKA7ZbPH"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["print(classification_report(, results2))"],"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"RK6vRCxkZoD9","executionInfo":{"status":"ok","timestamp":1689338215435,"user_tz":-60,"elapsed":184,"user":{"displayName":"Unknown","userId":"16317712665857714848"}},"outputId":"2a4f2377-8bb5-405b-a052-66a38ada86f4"},"execution_count":null,"outputs":[{"output_type":"stream","name":"stdout","text":["[{'label': 'LABEL_0', 'score': 0.6615974307060242}, {'label': 'LABEL_0', 'score': 0.8978613615036011}, {'label': 'LABEL_0', 'score': 0.737217903137207}, {'label': 'LABEL_1', 'score': 0.5124248266220093}, {'label': 'LABEL_0', 'score': 0.7070297598838806}, {'label': 'LABEL_0', 'score': 0.6875593066215515}, {'label': 'LABEL_0', 'score': 0.6362900137901306}, {'label': 'LABEL_1', 'score': 0.5346298813819885}, {'label': 'LABEL_0', 'score': 0.7779340147972107}, {'label': 'LABEL_0', 'score': 0.6526575088500977}, {'label': 'LABEL_0', 'score': 0.7227324843406677}, {'label': 'LABEL_0', 'score': 0.8791565895080566}, {'label': 'LABEL_1', 'score': 0.932992696762085}, {'label': 'LABEL_0', 'score': 0.6692107915878296}, {'label': 'LABEL_0', 'score': 0.5934761166572571}, {'label': 'LABEL_0', 'score': 0.5123370885848999}, {'label': 'LABEL_0', 'score': 0.7277477383613586}, {'label': 'LABEL_0', 'score': 0.9222954511642456}, {'label': 'LABEL_0', 'score': 0.6491223573684692}, {'label': 'LABEL_0', 'score': 0.5726889371871948}, {'label': 'LABEL_0', 'score': 0.5519722104072571}, {'label': 'LABEL_0', 'score': 0.7658959031105042}, {'label': 'LABEL_0', 'score': 0.7677779793739319}, {'label': 'LABEL_0', 'score': 0.890244722366333}, {'label': 'LABEL_0', 'score': 0.5844970941543579}, {'label': 'LABEL_0', 'score': 0.6509642004966736}, {'label': 'LABEL_0', 'score': 0.7383297085762024}, {'label': 'LABEL_0', 'score': 0.7057068347930908}, {'label': 'LABEL_0', 'score': 0.7482975721359253}, {'label': 'LABEL_0', 'score': 0.6678454279899597}, {'label': 'LABEL_0', 'score': 0.7175522446632385}, {'label': 'LABEL_0', 'score': 0.7939876317977905}, {'label': 'LABEL_0', 'score': 0.6886239051818848}, {'label': 'LABEL_0', 'score': 0.6293384432792664}, {'label': 'LABEL_0', 'score': 0.7787708640098572}, {'label': 'LABEL_1', 'score': 0.5346750020980835}, {'label': 'LABEL_0', 'score': 0.6168493032455444}, {'label': 'LABEL_0', 'score': 0.7140619158744812}, {'label': 'LABEL_0', 'score': 0.9330634474754333}, {'label': 'LABEL_0', 'score': 0.7088048458099365}, {'label': 'LABEL_0', 'score': 0.7105473279953003}, {'label': 'LABEL_0', 'score': 0.7688608169555664}, {'label': 'LABEL_0', 'score': 0.7996343970298767}, {'label': 'LABEL_1', 'score': 0.5041794180870056}, {'label': 'LABEL_0', 'score': 0.7625333070755005}, {'label': 'LABEL_0', 'score': 0.6963614821434021}, {'label': 'LABEL_0', 'score': 0.7411929965019226}, {'label': 'LABEL_0', 'score': 0.7478159070014954}, {'label': 'LABEL_0', 'score': 0.8066991567611694}, {'label': 'LABEL_0', 'score': 0.6129153966903687}, {'label': 'LABEL_0', 'score': 0.5038318634033203}, {'label': 'LABEL_0', 'score': 0.685335099697113}, {'label': 'LABEL_0', 'score': 0.6668456196784973}, {'label': 'LABEL_0', 'score': 0.8713549375534058}, {'label': 'LABEL_0', 'score': 0.5283274054527283}, {'label': 'LABEL_0', 'score': 0.772803544998169}, {'label': 'LABEL_0', 'score': 0.9716405272483826}, {'label': 'LABEL_1', 'score': 0.5398741960525513}, {'label': 'LABEL_0', 'score': 0.7302786111831665}, {'label': 'LABEL_0', 'score': 0.7667151093482971}, {'label': 'LABEL_0', 'score': 0.7670304179191589}, {'label': 'LABEL_0', 'score': 0.7130184173583984}, {'label': 'LABEL_0', 'score': 0.5962071418762207}, {'label': 'LABEL_1', 'score': 0.7809521555900574}, {'label': 'LABEL_0', 'score': 0.91331946849823}, {'label': 'LABEL_0', 'score': 0.8840063214302063}, {'label': 'LABEL_1', 'score': 0.5562060475349426}, {'label': 'LABEL_0', 'score': 0.780636191368103}, {'label': 'LABEL_0', 'score': 0.6657049059867859}, {'label': 'LABEL_0', 'score': 0.6016926765441895}, {'label': 'LABEL_0', 'score': 0.7100022435188293}, {'label': 'LABEL_0', 'score': 0.7566763162612915}, {'label': 'LABEL_0', 'score': 0.6488569378852844}, {'label': 'LABEL_0', 'score': 0.6955004930496216}, {'label': 'LABEL_1', 'score': 0.5463865399360657}, {'label': 'LABEL_0', 'score': 0.6558042168617249}, {'label': 'LABEL_0', 'score': 0.7891439199447632}, {'label': 'LABEL_0', 'score': 0.7871383428573608}, {'label': 'LABEL_0', 'score': 0.8023427128791809}, {'label': 'LABEL_0', 'score': 0.589187502861023}, {'label': 'LABEL_0', 'score': 0.7212092280387878}, {'label': 'LABEL_1', 'score': 0.5844154953956604}, {'label': 'LABEL_0', 'score': 0.7456770539283752}, {'label': 'LABEL_0', 'score': 0.8659123182296753}, {'label': 'LABEL_0', 'score': 0.8992603421211243}, {'label': 'LABEL_0', 'score': 0.514760434627533}, {'label': 'LABEL_0', 'score': 0.7620018720626831}, {'label': 'LABEL_1', 'score': 0.5866338014602661}, {'label': 'LABEL_0', 'score': 0.8297902941703796}, {'label': 'LABEL_0', 'score': 0.8059366941452026}, {'label': 'LABEL_0', 'score': 0.6793333292007446}, {'label': 'LABEL_0', 'score': 0.5907491445541382}, {'label': 'LABEL_0', 'score': 0.9433456659317017}, {'label': 'LABEL_1', 'score': 0.5196303129196167}, {'label': 'LABEL_0', 'score': 0.7706891298294067}, {'label': 'LABEL_0', 'score': 0.8047298192977905}, {'label': 'LABEL_1', 'score': 0.6020045876502991}, {'label': 'LABEL_0', 'score': 0.96779465675354}, {'label': 'LABEL_0', 'score': 0.6920665502548218}, {'label': 'LABEL_0', 'score': 0.7542068362236023}, {'label': 'LABEL_0', 'score': 0.6763297915458679}, {'label': 'LABEL_0', 'score': 0.8180073499679565}, {'label': 'LABEL_1', 'score': 0.5910825729370117}, {'label': 'LABEL_0', 'score': 0.7814627289772034}, {'label': 'LABEL_0', 'score': 0.8504816889762878}, {'label': 'LABEL_0', 'score': 0.6659404635429382}, {'label': 'LABEL_0', 'score': 0.7470546364784241}, {'label': 'LABEL_1', 'score': 0.6019303798675537}, {'label': 'LABEL_0', 'score': 0.6815959215164185}, {'label': 'LABEL_0', 'score': 0.6103224754333496}, {'label': 'LABEL_0', 'score': 0.5264981985092163}, {'label': 'LABEL_0', 'score': 0.6877379417419434}, {'label': 'LABEL_0', 'score': 0.5092182159423828}, {'label': 'LABEL_0', 'score': 0.6549142599105835}, {'label': 'LABEL_0', 'score': 0.6244764924049377}, {'label': 'LABEL_0', 'score': 0.6329596638679504}, {'label': 'LABEL_0', 'score': 0.6964150667190552}, {'label': 'LABEL_0', 'score': 0.728044331073761}, {'label': 'LABEL_1', 'score': 0.6850619912147522}, {'label': 'LABEL_0', 'score': 0.5791393518447876}, {'label': 'LABEL_1', 'score': 0.631783127784729}, {'label': 'LABEL_0', 'score': 0.797654926776886}, {'label': 'LABEL_0', 'score': 0.8342559337615967}, {'label': 'LABEL_0', 'score': 0.7872901558876038}, {'label': 'LABEL_0', 'score': 0.5403001308441162}, {'label': 'LABEL_0', 'score': 0.9737462997436523}, {'label': 'LABEL_0', 'score': 0.663942277431488}, {'label': 'LABEL_0', 'score': 0.6177354454994202}, {'label': 'LABEL_0', 'score': 0.6165367960929871}, {'label': 'LABEL_0', 'score': 0.7678841352462769}, {'label': 'LABEL_0', 'score': 0.614977240562439}, {'label': 'LABEL_0', 'score': 0.8012751340866089}, {'label': 'LABEL_0', 'score': 0.65992271900177}, {'label': 'LABEL_0', 'score': 0.7245795726776123}, {'label': 'LABEL_0', 'score': 0.7442924976348877}, {'label': 'LABEL_0', 'score': 0.9026773571968079}, {'label': 'LABEL_0', 'score': 0.8084629774093628}, {'label': 'LABEL_0', 'score': 0.6144567131996155}, {'label': 'LABEL_0', 'score': 0.9622575044631958}, {'label': 'LABEL_0', 'score': 0.7682992815971375}, {'label': 'LABEL_0', 'score': 0.845178484916687}, {'label': 'LABEL_0', 'score': 0.9782117605209351}, {'label': 'LABEL_0', 'score': 0.6261171102523804}, {'label': 'LABEL_0', 'score': 0.8912791609764099}, {'label': 'LABEL_1', 'score': 0.5365575551986694}, {'label': 'LABEL_0', 'score': 0.5592782497406006}, {'label': 'LABEL_0', 'score': 0.7869940400123596}, {'label': 'LABEL_0', 'score': 0.5641335844993591}, {'label': 'LABEL_0', 'score': 0.7312366366386414}, {'label': 'LABEL_0', 'score': 0.759033739566803}, {'label': 'LABEL_0', 'score': 0.5738414525985718}, {'label': 'LABEL_1', 'score': 0.5965594053268433}, {'label': 'LABEL_0', 'score': 0.8608651161193848}, {'label': 'LABEL_0', 'score': 0.738036572933197}, {'label': 'LABEL_0', 'score': 0.604376494884491}, {'label': 'LABEL_0', 'score': 0.7667599320411682}, {'label': 'LABEL_1', 'score': 0.5392709970474243}, {'label': 'LABEL_0', 'score': 0.7998315095901489}, {'label': 'LABEL_0', 'score': 0.6989988088607788}, {'label': 'LABEL_0', 'score': 0.6253988742828369}, {'label': 'LABEL_0', 'score': 0.9001648426055908}, {'label': 'LABEL_0', 'score': 0.7018232345581055}, {'label': 'LABEL_1', 'score': 0.5016051530838013}, {'label': 'LABEL_0', 'score': 0.8002259731292725}, {'label': 'LABEL_0', 'score': 0.9049254059791565}, {'label': 'LABEL_0', 'score': 0.8459368348121643}, {'label': 'LABEL_0', 'score': 0.5065075159072876}, {'label': 'LABEL_0', 'score': 0.8334006667137146}, {'label': 'LABEL_0', 'score': 0.5210334658622742}, {'label': 'LABEL_0', 'score': 0.820144772529602}, {'label': 'LABEL_1', 'score': 0.6963856220245361}, {'label': 'LABEL_1', 'score': 0.6420274972915649}, {'label': 'LABEL_0', 'score': 0.8348711729049683}, {'label': 'LABEL_0', 'score': 0.6488588452339172}, {'label': 'LABEL_0', 'score': 0.8147182464599609}, {'label': 'LABEL_0', 'score': 0.7595041990280151}, {'label': 'LABEL_0', 'score': 0.8739688992500305}, {'label': 'LABEL_0', 'score': 0.8341084122657776}, {'label': 'LABEL_0', 'score': 0.730343222618103}, {'label': 'LABEL_0', 'score': 0.9408749938011169}, {'label': 'LABEL_1', 'score': 0.5836443901062012}, {'label': 'LABEL_0', 'score': 0.6184004545211792}, {'label': 'LABEL_0', 'score': 0.756477952003479}, {'label': 'LABEL_0', 'score': 0.8730202317237854}, {'label': 'LABEL_0', 'score': 0.8932791948318481}, {'label': 'LABEL_0', 'score': 0.8135764598846436}, {'label': 'LABEL_0', 'score': 0.7274437546730042}, {'label': 'LABEL_1', 'score': 0.5531033277511597}]\n"]}]},{"cell_type":"markdown","source":["# Normalize features https://discuss.huggingface.co/t/finetuning-for-feature-extraction-i-e-unsupervised-fine-tuning/12595/*4*"],"metadata":{"id":"UzZXT1yar4w3"}},{"cell_type":"markdown","source":["## Extract the embeddings using mean pooling"],"metadata":{"id":"2dVUNWxQftyw"}},{"cell_type":"code","source":["def mean_pooling(last_hidden_states, ):\n"," last_4_layers = last_hidden_states[-12:] # Consider the last 4 layers\n"," return np.mean(last_4_layers, axis=1)\n","\n","# Process the data using the pipeline\n","results = p([row[\"text\"] for _, row in df2.iterrows()])\n","\n","features = np.squeeze(results)\n","\n","print(features.shape)\n","# Perform mean pooling on the last hidden states\n","embeddings = [mean_pooling(hidden_state) for hidden_state in results]\n","\n","# Create a DataFrame to store the results\n","df2[\"embeddings12\"] = embeddings\n","\n","# Print the resulting DataFrame\n","print(df2)"],"metadata":{"id":"rp9v3E0yM9hY"},"execution_count":null,"outputs":[]}]}