diff --git "a/klein_lora_train.ipynb" "b/klein_lora_train.ipynb" new file mode 100644--- /dev/null +++ "b/klein_lora_train.ipynb" @@ -0,0 +1,2964 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "gpuType": "T4" + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + }, + "accelerator": "GPU", + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "3b63b361016e40ebb8083586258bb9d5": { + "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_2967eab118114ea989db021ef43c5475", + "IPY_MODEL_41563d0e9fc04a5c9aad849b5f0f9a99", + "IPY_MODEL_2ac1ccb63eed4c078a3b6453bfa9e636" + ], + "layout": "IPY_MODEL_f5fc253c0cc24c2d9eb7c7d37542fe0c" + } + }, + "2967eab118114ea989db021ef43c5475": { + "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_493ec59c3b314cd98a6e428398da3174", + "placeholder": "​", + "style": "IPY_MODEL_f44f36bd2ba142c4b1883f30b79a24cc", + "value": "model_index.json: 100%" + } + }, + "41563d0e9fc04a5c9aad849b5f0f9a99": { + "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_b7dac1c2df7f42199e15dfaedbe602a5", + "max": 509, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_fe3a71e09117468abd79dd205e40331f", + "value": 509 + } + }, + "2ac1ccb63eed4c078a3b6453bfa9e636": { + "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_673995177daa471089b7434789275335", + "placeholder": "​", + "style": "IPY_MODEL_c3df138215f44aa6baa3c081e04aea1e", + "value": " 509/509 [00:00<00:00, 46.3kB/s]" + } + }, + "f5fc253c0cc24c2d9eb7c7d37542fe0c": { + "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 + } + }, + "493ec59c3b314cd98a6e428398da3174": { + "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 + } + }, + "f44f36bd2ba142c4b1883f30b79a24cc": { + "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": "" + } + }, + "b7dac1c2df7f42199e15dfaedbe602a5": { + "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 + } + }, + "fe3a71e09117468abd79dd205e40331f": { + "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": "" + } + }, + "673995177daa471089b7434789275335": { + "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 + } + }, + "c3df138215f44aa6baa3c081e04aea1e": { + "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": "" + } + }, + "93290b25390b401db3e65967885f69ed": { + "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_807f357e46254f0cb761cf42bd548314", + "IPY_MODEL_6aecb2208248403bb09cad81f55106f4", + "IPY_MODEL_d35c8adab30e4143b8ac754848ae2c62" + ], + "layout": "IPY_MODEL_0791d038b5094d049ac517905759d69c" + } + }, + "807f357e46254f0cb761cf42bd548314": { + "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_6c3d0a7e94db4632b23f6e898d892d26", + "placeholder": "​", + "style": "IPY_MODEL_ca2d5f60577244a2921adea15f8822d4", + "value": "Download complete: " + } + }, + "6aecb2208248403bb09cad81f55106f4": { + "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_41f0adef56c042bc97846464c674a632", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_56ddb764376d4048a0fe1a66f1c8d18c", + "value": 1 + } + }, + "d35c8adab30e4143b8ac754848ae2c62": { + "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_02a1a0f3d9ac4ba5956c3b04806a5c0d", + "placeholder": "​", + "style": "IPY_MODEL_ee35da1e705341b99c1569aebffcaa37", + "value": " 5.92G/? [01:02<00:00, 81.2MB/s]" + } + }, + "0791d038b5094d049ac517905759d69c": { + "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 + } + }, + "6c3d0a7e94db4632b23f6e898d892d26": { + "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 + } + }, + "ca2d5f60577244a2921adea15f8822d4": { + "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": "" + } + }, + "41f0adef56c042bc97846464c674a632": { + "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": "20px" + } + }, + "56ddb764376d4048a0fe1a66f1c8d18c": { + "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": "" + } + }, + "02a1a0f3d9ac4ba5956c3b04806a5c0d": { + "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 + } + }, + "ee35da1e705341b99c1569aebffcaa37": { + "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": "" + } + }, + "459cc9fe6fc04a54a5fb75b990c67877": { + "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_02124f9fa2144d5ebddf9de87ebbd380", + "IPY_MODEL_835c52620cd04109bdd8ebc7d22bbd6b", + "IPY_MODEL_0776951f20554d53bc49cc7931b144e7" + ], + "layout": "IPY_MODEL_cbaebf04e84d4da4bc8304a1639168b6" + } + }, + "02124f9fa2144d5ebddf9de87ebbd380": { + "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_f18c9c1611734afabd9bdb0306dd43a6", + "placeholder": "​", + "style": "IPY_MODEL_d6021bad5e11497a87b11747e845c2d0", + "value": "Fetching 11 files: 100%" + } + }, + "835c52620cd04109bdd8ebc7d22bbd6b": { + "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_899e9a02beab438685a6f8d000135e3f", + "max": 11, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_ee56f7c753e94136a48f5c9de5e12be7", + "value": 11 + } + }, + "0776951f20554d53bc49cc7931b144e7": { + "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_d8d674ad73574009b26b21170b5e4e9d", + "placeholder": "​", + "style": "IPY_MODEL_c4bb563f385b4b1b88a81ea151287998", + "value": " 11/11 [01:00<00:00, 17.82s/it]" + } + }, + "cbaebf04e84d4da4bc8304a1639168b6": { + "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 + } + }, + "f18c9c1611734afabd9bdb0306dd43a6": { + "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 + } + }, + "d6021bad5e11497a87b11747e845c2d0": { + "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": "" + } + }, + "899e9a02beab438685a6f8d000135e3f": { + "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 + } + }, + "ee56f7c753e94136a48f5c9de5e12be7": { + "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": "" + } + }, + "d8d674ad73574009b26b21170b5e4e9d": { + "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 + } + }, + "c4bb563f385b4b1b88a81ea151287998": { + "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": "" + } + }, + "6d42762b803547a9a70e911ef6a36c13": { + "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_f99548bfbda6401fbaaf324def049129", + "IPY_MODEL_1ba8b78433214d37a0f817e6806ed328", + "IPY_MODEL_7c160502a13241508bf3597ff542511a" + ], + "layout": "IPY_MODEL_4c692efec01b4af4bd74fd60164b48d9" + } + }, + "f99548bfbda6401fbaaf324def049129": { + "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_bab8431f42df4e9198241a7cde34e5d8", + "placeholder": "​", + "style": "IPY_MODEL_95cee3c77dc049b79504cf9313ebaaba", + "value": "Loading pipeline components...: 100%" + } + }, + "1ba8b78433214d37a0f817e6806ed328": { + "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_a1909eecdc4746abae9795de0211f5b9", + "max": 5, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_a980c7e018dd4cbfb7da754bfc81f927", + "value": 5 + } + }, + "7c160502a13241508bf3597ff542511a": { + "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_fa7204d9e4134dd68d360db869deb135", + "placeholder": "​", + "style": "IPY_MODEL_ecf090d3e28f49f5978eac93318f78f4", + "value": " 5/5 [00:18<00:00,  4.49s/it]" + } + }, + "4c692efec01b4af4bd74fd60164b48d9": { + "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 + } + }, + "bab8431f42df4e9198241a7cde34e5d8": { + "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 + } + }, + "95cee3c77dc049b79504cf9313ebaaba": { + "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": "" + } + }, + "a1909eecdc4746abae9795de0211f5b9": { + "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 + } + }, + "a980c7e018dd4cbfb7da754bfc81f927": { + "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": "" + } + }, + "fa7204d9e4134dd68d360db869deb135": { + "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 + } + }, + "ecf090d3e28f49f5978eac93318f78f4": { + "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": "" + } + }, + "132921c4b68d42fdb2597d086ac6ee52": { + "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_2281136a5eea479f92bbab15686cef25", + "IPY_MODEL_831ef622dbf0454388399545da249921", + "IPY_MODEL_a5bc4c7fedec41e18610ebfd1613ab49" + ], + "layout": "IPY_MODEL_88f4270b59384276b73a28b4b2a43421" + } + }, + "2281136a5eea479f92bbab15686cef25": { + "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_d7430eb764e4486ea8c65b024c3de951", + "placeholder": "​", + "style": "IPY_MODEL_75868754e7234538b9282d709877b7aa", + "value": "Loading weights: 100%" + } + }, + "831ef622dbf0454388399545da249921": { + "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_ec324a9d8053462995f2614d85109112", + "max": 901, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_7dcf5741d7e4482fb7bf2638fabfc752", + "value": 901 + } + }, + "a5bc4c7fedec41e18610ebfd1613ab49": { + "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_180c94e6ea9d4365909dd3030355f095", + "placeholder": "​", + "style": "IPY_MODEL_6dbb4334c26b417aa42a787dec333514", + "value": " 901/901 [00:03<00:00, 591.05it/s, Materializing param=model.norm.weight]" + } + }, + "88f4270b59384276b73a28b4b2a43421": { + "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 + } + }, + "d7430eb764e4486ea8c65b024c3de951": { + "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 + } + }, + "75868754e7234538b9282d709877b7aa": { + "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": "" + } + }, + "ec324a9d8053462995f2614d85109112": { + "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 + } + }, + "7dcf5741d7e4482fb7bf2638fabfc752": { + "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": "" + } + }, + "180c94e6ea9d4365909dd3030355f095": { + "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 + } + }, + "6dbb4334c26b417aa42a787dec333514": { + "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": "code", + "execution_count": 1, + "metadata": { + "id": "PwuBLMVifFoV", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "8fc46599-5daf-4d0b-8b10-bd931174a613" + }, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Mounted at /content/drive\n", + "✅ HF login successful\n", + "🧹 Removing old diffusers...\n", + "🔄 Installing latest diffusers...\n", + " Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", + " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", + " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + " Building wheel for diffusers (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + "🔐 Installing dependencies...\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.4/1.4 MB\u001b[0m \u001b[31m31.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m105.4/105.4 kB\u001b[0m \u001b[31m11.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m509.1/509.1 kB\u001b[0m \u001b[31m45.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h🧹 Purging pip cache...\n", + "Files removed: 24\n", + "✅ Cell 1 complete!\n", + "🔑 Reading config files from Google Drive...\n", + "✅ Config loaded successfully\n", + " Model : codeShare/FLUX.2-klein-AIO-SDNQ-4bit-dynamic\n", + " Resolution : 1024 x 1024 (Square)\n", + " Foregrounds : /content/drive/MyDrive/my_flux_dataset/foregrounds.zip\n", + " Backgrounds : /content/drive/MyDrive/my_flux_dataset/backgrounds.zip\n", + "\n", + "🚀 Detected 1 GPU(s)\n", + " GPU 0: Tesla T4\n", + "\n", + "🧠 Total Pipes Configured: 2\n" + ] + } + ], + "source": [ + "#@markdown =============================================================================\n", + "#@markdown CELL 1: Google Colab Setup + Dependencies\n", + "#@markdown =============================================================================\n", + "\n", + "# --- Mount Google Drive ---\n", + "from google.colab import drive\n", + "drive.mount('/content/drive')\n", + "\n", + "# --- HF Login ---\n", + "from google.colab import userdata\n", + "from huggingface_hub import login\n", + "\n", + "try:\n", + " hf_token = userdata.get('HF_TOKEN')\n", + " login(token=hf_token)\n", + " print(\"✅ HF login successful\")\n", + "except Exception as e:\n", + " print(f\"⚠️ HF login failed: {e}\")\n", + "\n", + "# --- Cleanup old diffusers ---\n", + "import os\n", + "import gc\n", + "import shutil\n", + "import torch\n", + "\n", + "print(\"🧹 Removing old diffusers...\")\n", + "!pip uninstall -y diffusers > /dev/null 2>&1\n", + "!rm -rf /usr/local/lib/python3.11/dist-packages/diffusers*\n", + "!rm -rf ~/.cache/pip/*diffusers*\n", + "\n", + "print(\"🔄 Installing latest diffusers...\")\n", + "!pip install -q git+https://github.com/huggingface/diffusers.git --force-reinstall --no-deps\n", + "\n", + "print(\"🔐 Installing dependencies...\")\n", + "!pip install -q pynacl datasets accelerate transformers sentencepiece safetensors sdnq\n", + "\n", + "print(\"🧹 Purging pip cache...\")\n", + "!python -m pip cache purge\n", + "\n", + "gc.collect()\n", + "torch.cuda.empty_cache()\n", + "\n", + "print(\"✅ Cell 1 complete!\")\n", + "\n", + "#@markdown =============================================================================\n", + "#@markdown CELL 2: User Settings + Google Drive Dataset Paths\n", + "#@markdown =============================================================================\n", + "\n", + "import os\n", + "from pathlib import Path\n", + "\n", + "# =============================================================================\n", + "# GOOGLE DRIVE DATASET ROOT\n", + "# =============================================================================\n", + "\n", + "# Example:\n", + "# /content/drive/MyDrive/my_flux_dataset/\n", + "#\n", + "# ├── password.txt\n", + "# ├── model_id.txt\n", + "# ├── edit_prompt.txt\n", + "# ├── resolution.txt\n", + "# ├── foregrounds/\n", + "# └── backgrounds/\n", + "\n", + "google_drive_dataset_path = \"/content/drive/MyDrive/my_flux_dataset\"\n", + "\n", + "# =============================================================================\n", + "# CONFIG FILES\n", + "# =============================================================================\n", + "\n", + "password_txt_file = \"password.txt\"\n", + "\n", + "# Defaults\n", + "edit_prompt = \"improve this illustration\"\n", + "resolution = \"1024 x 1024 (Square)\"\n", + "\n", + "# Hardcoded dimensions\n", + "target_height = 1024\n", + "target_width = 1024\n", + "\n", + "print(\"🔑 Reading config files from Google Drive...\")\n", + "\n", + "dataset_path = Path(google_drive_dataset_path)\n", + "\n", + "encryption_password = (dataset_path / \"password.txt\").read_text(encoding=\"utf-8\").strip()\n", + "MODEL_ID = (dataset_path / \"model_id.txt\").read_text(encoding=\"utf-8\").strip()\n", + "edit_prompt = (dataset_path / \"edit_prompt.txt\").read_text(encoding=\"utf-8\").strip()\n", + "resolution = (dataset_path / \"resolution.txt\").read_text(encoding=\"utf-8\").strip()\n", + "\n", + "print(\"✅ Config loaded successfully\")\n", + "print(f\" Model : {MODEL_ID}\")\n", + "print(f\" Resolution : {resolution}\")\n", + "\n", + "# =============================================================================\n", + "# DATASET PATHS\n", + "# =============================================================================\n", + "\n", + "encrypted_input_dataset_path = os.path.join(\n", + " google_drive_dataset_path,\n", + " \"foregrounds.zip\"\n", + ")\n", + "\n", + "backgrounds_input_dataset_path = os.path.join(\n", + " google_drive_dataset_path,\n", + " \"backgrounds.zip\"\n", + ")\n", + "\n", + "print(f\" Foregrounds : {encrypted_input_dataset_path}\")\n", + "print(f\" Backgrounds : {backgrounds_input_dataset_path}\")\n", + "\n", + "# =============================================================================\n", + "# SETTINGS\n", + "# =============================================================================\n", + "\n", + "debug = True\n", + "save_checkpoint_every_n = False\n", + "\n", + "# =============================================================================\n", + "# MULTI GPU SUPPORT\n", + "# =============================================================================\n", + "\n", + "NUM_GPUS = torch.cuda.device_count()\n", + "\n", + "if NUM_GPUS == 0:\n", + " raise RuntimeError(\"❌ No CUDA GPU detected\")\n", + "\n", + "print(f\"\\n🚀 Detected {NUM_GPUS} GPU(s)\")\n", + "\n", + "for i in range(NUM_GPUS):\n", + " print(f\" GPU {i}: {torch.cuda.get_device_name(i)}\")\n", + "\n", + "# Pipes per GPU\n", + "PIPES_PER_GPU = 2\n", + "\n", + "TOTAL_PIPES = NUM_GPUS * PIPES_PER_GPU\n", + "\n", + "print(f\"\\n🧠 Total Pipes Configured: {TOTAL_PIPES}\")\n" + ] + }, + { + "cell_type": "code", + "source": [ + "#@markdown =============================================================================\n", + "#@markdown CELL 3: Load Flux2Klein + SDNQ + LoRA (Safe Text Precompute + Save)\n", + "#@markdown =============================================================================\n", + "\n", + "import gc\n", + "import torch\n", + "import os\n", + "from pathlib import Path\n", + "from safetensors.torch import save_file, load_file\n", + "from sdnq.loader import apply_sdnq_options_to_model\n", + "from sdnq.training import convert_sdnq_model_to_training\n", + "\n", + "gc.collect()\n", + "torch.cuda.empty_cache()\n", + "\n", + "torch.cuda.set_device(0)\n", + "print(f\"🚀 Using GPU 0: {torch.cuda.get_device_name(0)}\")\n", + "\n", + "# =============================================================================\n", + "# FIX COMPATIBILITY\n", + "# =============================================================================\n", + "print(\"🔧 Upgrading torchao and peft...\")\n", + "!pip install -q --upgrade torchao peft\n", + "\n", + "# =============================================================================\n", + "# LOAD PIPELINE\n", + "# =============================================================================\n", + "from diffusers import Flux2KleinPipeline\n", + "\n", + "print(f\"📦 Loading {MODEL_ID} ...\")\n", + "\n", + "pipe = Flux2KleinPipeline.from_pretrained(\n", + " MODEL_ID,\n", + " torch_dtype=torch.float16,\n", + " low_cpu_mem_usage=True,\n", + " device_map=\"cpu\",\n", + ")\n", + "\n", + "# Apply SDNQ + training mode\n", + "print(\"🔧 Applying SDNQ quantization...\")\n", + "pipe.transformer = apply_sdnq_options_to_model(\n", + " pipe.transformer,\n", + " use_quantized_matmul=False\n", + ").to(\"cuda\")\n", + "\n", + "print(\"🔄 Converting to SDNQ training mode...\")\n", + "pipe.transformer = convert_sdnq_model_to_training(\n", + " pipe.transformer,\n", + " quantized_matmul_dtype=\"int8\",\n", + " use_grad_ckpt=True,\n", + " use_quantized_matmul=False,\n", + " use_stochastic_rounding=True,\n", + " dequantize_fp32=True,\n", + ")\n", + "\n", + "# =============================================================================\n", + "# APPLY LORA\n", + "# =============================================================================\n", + "from peft import LoraConfig, get_peft_model\n", + "\n", + "lora_config = LoraConfig(\n", + " r=16,\n", + " lora_alpha=16,\n", + " target_modules=[\"to_q\", \"to_k\", \"to_v\", \"to_out.0\"],\n", + " lora_dropout=0.05,\n", + " bias=\"none\",\n", + ")\n", + "\n", + "pipe.transformer = get_peft_model(pipe.transformer, lora_config)\n", + "\n", + "trainable_params = sum(p.numel() for p in pipe.transformer.parameters() if p.requires_grad)\n", + "print(f\"✅ LoRA applied | Trainable params: {trainable_params:,}\")\n", + "\n", + "# =============================================================================\n", + "# PRE-COMPUTE + SAVE TEXT EMBEDDINGS AS SAFETENSOR\n", + "# =============================================================================\n", + "print(\"📝 Pre-computing text embeddings on CUDA...\")\n", + "\n", + "embeddings_dir = \"/content/flux_embeddings\"\n", + "os.makedirs(embeddings_dir, exist_ok=True)\n", + "\n", + "pipe.text_encoder.to(\"cuda\")\n", + "\n", + "with torch.no_grad():\n", + " prompt_embeds, text_ids = pipe.encode_prompt(\n", + " [edit_prompt],\n", + " device=\"cuda\",\n", + " num_images_per_prompt=1\n", + " )\n", + "\n", + "# Save as safetensor\n", + "embeddings_path = os.path.join(embeddings_dir, \"cached_text_embeds.safetensors\")\n", + "save_file({\n", + " \"prompt_embeds\": prompt_embeds,\n", + " \"text_ids\": text_ids\n", + "}, embeddings_path)\n", + "\n", + "print(f\"✅ Embeddings saved to: {embeddings_path}\")\n", + "print(f\" prompt_embeds shape: {prompt_embeds.shape}\")\n", + "print(f\" text_ids shape: {text_ids.shape}\")\n", + "\n", + "# =============================================================================\n", + "# AGGRESSIVE UNLOADING OF TEXT ENCODER\n", + "# =============================================================================\n", + "print(\"🧹 Aggressively unloading text encoder...\")\n", + "\n", + "if hasattr(pipe, \"text_encoder\"):\n", + " # Delete submodules first\n", + " if hasattr(pipe.text_encoder, \"transformer\"):\n", + " del pipe.text_encoder.transformer\n", + " if hasattr(pipe.text_encoder, \"text_model\"):\n", + " del pipe.text_encoder.text_model\n", + " if hasattr(pipe.text_encoder, \"encoder\"):\n", + " del pipe.text_encoder.encoder\n", + "\n", + " # Final deletion\n", + " del pipe.text_encoder\n", + "\n", + "gc.collect()\n", + "torch.cuda.empty_cache()\n", + "torch.cuda.synchronize()\n", + "\n", + "print(\"✅ Text encoder fully removed from VRAM\")\n", + "\n", + "# =============================================================================\n", + "# LOAD CACHED EMBEDDINGS\n", + "# =============================================================================\n", + "print(\"📂 Loading cached embeddings...\")\n", + "loaded = load_file(embeddings_path)\n", + "\n", + "pipe.cached_prompt_embeds = loaded[\"prompt_embeds\"]\n", + "pipe.cached_text_ids = loaded[\"text_ids\"]\n", + "\n", + "# =============================================================================\n", + "# Override encode_prompt\n", + "# =============================================================================\n", + "def cached_encode_prompt(self, prompt=None, device=None, num_images_per_prompt=1, **kwargs):\n", + " \"\"\"Always return pre-computed embeddings from safetensor\"\"\"\n", + " dev = device if device is not None else \"cuda\"\n", + " return (\n", + " self.cached_prompt_embeds.to(dev),\n", + " self.cached_text_ids.to(dev)\n", + " )\n", + "\n", + "pipe.encode_prompt = cached_encode_prompt.__get__(pipe, type(pipe))\n", + "\n", + "# =============================================================================\n", + "# Optimizer\n", + "# =============================================================================\n", + "from torch.optim import AdamW\n", + "\n", + "optimizer = AdamW(\n", + " pipe.transformer.parameters(),\n", + " lr=1e-4,\n", + " betas=(0.9, 0.999),\n", + " weight_decay=0.01,\n", + ")\n", + "\n", + "print(\"✅ Model + LoRA + Cached Text (safetensor) Ready\")\n", + "gc.collect()\n", + "torch.cuda.empty_cache()\n", + "print(f\"Final VRAM used: {torch.cuda.memory_allocated(0)/1e9:.2f} GB\")" + ], + "metadata": { + "id": "ZlFpC5tmfJX8", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 489, + "referenced_widgets": [ + "3b63b361016e40ebb8083586258bb9d5", + "2967eab118114ea989db021ef43c5475", + "41563d0e9fc04a5c9aad849b5f0f9a99", + "2ac1ccb63eed4c078a3b6453bfa9e636", + "f5fc253c0cc24c2d9eb7c7d37542fe0c", + "493ec59c3b314cd98a6e428398da3174", + "f44f36bd2ba142c4b1883f30b79a24cc", + "b7dac1c2df7f42199e15dfaedbe602a5", + "fe3a71e09117468abd79dd205e40331f", + "673995177daa471089b7434789275335", + "c3df138215f44aa6baa3c081e04aea1e", + "93290b25390b401db3e65967885f69ed", + "807f357e46254f0cb761cf42bd548314", + "6aecb2208248403bb09cad81f55106f4", + "d35c8adab30e4143b8ac754848ae2c62", + "0791d038b5094d049ac517905759d69c", + "6c3d0a7e94db4632b23f6e898d892d26", + "ca2d5f60577244a2921adea15f8822d4", + "41f0adef56c042bc97846464c674a632", + "56ddb764376d4048a0fe1a66f1c8d18c", + "02a1a0f3d9ac4ba5956c3b04806a5c0d", + "ee35da1e705341b99c1569aebffcaa37", + "459cc9fe6fc04a54a5fb75b990c67877", + "02124f9fa2144d5ebddf9de87ebbd380", + "835c52620cd04109bdd8ebc7d22bbd6b", + "0776951f20554d53bc49cc7931b144e7", + "cbaebf04e84d4da4bc8304a1639168b6", + "f18c9c1611734afabd9bdb0306dd43a6", + "d6021bad5e11497a87b11747e845c2d0", + "899e9a02beab438685a6f8d000135e3f", + "ee56f7c753e94136a48f5c9de5e12be7", + "d8d674ad73574009b26b21170b5e4e9d", + "c4bb563f385b4b1b88a81ea151287998", + "6d42762b803547a9a70e911ef6a36c13", + "f99548bfbda6401fbaaf324def049129", + "1ba8b78433214d37a0f817e6806ed328", + "7c160502a13241508bf3597ff542511a", + "4c692efec01b4af4bd74fd60164b48d9", + "bab8431f42df4e9198241a7cde34e5d8", + "95cee3c77dc049b79504cf9313ebaaba", + "a1909eecdc4746abae9795de0211f5b9", + "a980c7e018dd4cbfb7da754bfc81f927", + "fa7204d9e4134dd68d360db869deb135", + "ecf090d3e28f49f5978eac93318f78f4", + "132921c4b68d42fdb2597d086ac6ee52", + "2281136a5eea479f92bbab15686cef25", + "831ef622dbf0454388399545da249921", + "a5bc4c7fedec41e18610ebfd1613ab49", + "88f4270b59384276b73a28b4b2a43421", + "d7430eb764e4486ea8c65b024c3de951", + "75868754e7234538b9282d709877b7aa", + "ec324a9d8053462995f2614d85109112", + "7dcf5741d7e4482fb7bf2638fabfc752", + "180c94e6ea9d4365909dd3030355f095", + "6dbb4334c26b417aa42a787dec333514" + ] + }, + "outputId": "d3328ec1-8d0a-4688-93e6-36e1bbbdd333" + }, + "execution_count": 2, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "🚀 Using GPU 0: Tesla T4\n", + "🔧 Upgrading torchao and peft...\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.2/3.2 MB\u001b[0m \u001b[31m57.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "Flax classes are deprecated and will be removed in Diffusers v1.0.0. We recommend migrating to PyTorch classes or pinning your version of Diffusers.\n", + "Flax classes are deprecated and will be removed in Diffusers v1.0.0. We recommend migrating to PyTorch classes or pinning your version of Diffusers.\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "📦 Loading codeShare/FLUX.2-klein-AIO-SDNQ-4bit-dynamic ...\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "model_index.json: 0%| | 0.00/509 [00:00= max_train_steps:\n", + " break\n", + "\n", + " try:\n", + "\n", + " optimizer.zero_grad(set_to_none=True)\n", + "\n", + " # =========================================================\n", + " # IMAGE\n", + " # =========================================================\n", + "\n", + " target_images = batch[\n", + " \"target_pixel_values\"\n", + " ].to(\n", + " device=device,\n", + " dtype=torch.float16,\n", + " non_blocking=True\n", + " )\n", + "\n", + " # =========================================================\n", + " # VAE ENCODE\n", + " # =========================================================\n", + "\n", + " with torch.no_grad():\n", + "\n", + " latents = pipe.vae.encode(\n", + " target_images\n", + " ).latent_dist.sample()\n", + "\n", + "\n", + " noise = torch.randn_like(latents)\n", + "\n", + " noisy_latents = latents + (\n", + " noise * 0.1\n", + " )\n", + "\n", + " # Flux latent packing\n", + " b, c, h, w = noisy_latents.shape\n", + "\n", + " noisy_latents = noisy_latents.view(\n", + " b,\n", + " c,\n", + " h * w\n", + " ).transpose(1, 2)\n", + "\n", + " timesteps = torch.randint(\n", + " 0,\n", + " 1000,\n", + " (b,),\n", + " device=device\n", + " )\n", + "\n", + " # =========================================================\n", + " # CACHED TEXT\n", + " # =========================================================\n", + "\n", + " prompt_embeds = pipe.cached_prompt_embeds.to(\n", + " device=device,\n", + " dtype=torch.float16\n", + " )\n", + "\n", + " text_ids = pipe.cached_text_ids.to(device)\n", + "\n", + " # =========================================================\n", + " # IMAGE IDS\n", + " # =========================================================\n", + "\n", + " y = torch.arange(\n", + " h,\n", + " device=device,\n", + " dtype=torch.float32\n", + " )\n", + "\n", + " x = torch.arange(\n", + " w,\n", + " device=device,\n", + " dtype=torch.float32\n", + " )\n", + "\n", + " yy, xx = torch.meshgrid(\n", + " y,\n", + " x,\n", + " indexing=\"ij\"\n", + " )\n", + "\n", + " coords = torch.stack([\n", + " yy.flatten(),\n", + " xx.flatten(),\n", + " torch.zeros_like(xx.flatten()),\n", + " torch.zeros_like(xx.flatten())\n", + " ], dim=1)\n", + "\n", + " img_ids = coords.unsqueeze(0).expand(\n", + " b,\n", + " -1,\n", + " -1\n", + " ).contiguous()\n", + "\n", + " # =========================================================\n", + " # FORWARD\n", + " # =========================================================\n", + "\n", + " with torch.autocast(\"cuda\", dtype=torch.float16):\n", + "\n", + " model_pred = pipe.transformer(\n", + " hidden_states=noisy_latents,\n", + "\n", + " timestep=timesteps,\n", + "\n", + " encoder_hidden_states=prompt_embeds,\n", + "\n", + " txt_ids=text_ids,\n", + "\n", + " img_ids=img_ids,\n", + "\n", + " return_dict=False\n", + " )[0]\n", + "\n", + " model_pred = model_pred.transpose(\n", + " 1,\n", + " 2\n", + " ).view(\n", + " b,\n", + " c,\n", + " h,\n", + " w\n", + " )\n", + "\n", + " loss = torch.nn.functional.mse_loss(\n", + " model_pred,\n", + " noise\n", + " )\n", + "\n", + " # =========================================================\n", + " # BACKWARD\n", + " # =========================================================\n", + "\n", + " loss.backward()\n", + "\n", + " torch.nn.utils.clip_grad_norm_(\n", + " pipe.transformer.parameters(),\n", + " 1.0\n", + " )\n", + "\n", + " optimizer.step()\n", + "\n", + " # =========================================================\n", + " # LOGGING\n", + " # =========================================================\n", + "\n", + " vram = (\n", + " torch.cuda.memory_allocated() / 1e9\n", + " )\n", + "\n", + " print(\n", + " f\"Step {global_step:04d} | \"\n", + " f\"Loss: {loss.item():.6f} | \"\n", + " f\"VRAM: {vram:.2f} GB\"\n", + " )\n", + "\n", + " global_step += 1\n", + "\n", + " # =========================================================\n", + " # CLEANUP\n", + " # =========================================================\n", + "\n", + " del (\n", + " target_images,\n", + " latents,\n", + " noisy_latents,\n", + " noise,\n", + " model_pred,\n", + " loss,\n", + " img_ids,\n", + " coords,\n", + " yy,\n", + " xx,\n", + " prompt_embeds,\n", + " text_ids,\n", + " )\n", + "\n", + " gc.collect()\n", + "\n", + " torch.cuda.empty_cache()\n", + "\n", + " except Exception as e:\n", + "\n", + " print(f\"\\n❌ ERROR @ STEP {global_step}\")\n", + " print(str(e))\n", + "\n", + " traceback.print_exc()\n", + "\n", + " gc.collect()\n", + " torch.cuda.empty_cache()\n", + "\n", + " global_step += 1\n", + "\n", + "# =============================================================================\n", + "# SAVE LORA\n", + "# =============================================================================\n", + "\n", + "print(\"\\n💾 Saving LoRA adapter...\")\n", + "\n", + "# Convert training model -> standard SDNQ model\n", + "pipe.transformer = convert_training_model_to_sdnq(\n", + " pipe.transformer\n", + ")\n", + "\n", + "lora_output_path = os.path.join(\n", + " output_dir,\n", + " \"lora_adapter\"\n", + ")\n", + "\n", + "os.makedirs(\n", + " lora_output_path,\n", + " exist_ok=True\n", + ")\n", + "\n", + "# SAVE ONLY ADAPTER\n", + "pipe.transformer.save_pretrained(\n", + " lora_output_path,\n", + " safe_serialization=False\n", + ")\n", + "\n", + "print(f\"✅ Saved to: {lora_output_path}\")\n", + "\n", + "foreground_zip.close()\n", + "background_zip.close()\n", + "\n", + "gc.collect()\n", + "torch.cuda.empty_cache()\n", + "\n", + "print(\"\\n✅ CELL 4 COMPLETE\")" + ], + "execution_count": 7, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "🚀 SDNQ T4 TRAINING MODE\n", + "Resolution: 512\n", + "Steps: 10\n", + "\n", + "🚀 Starting training...\n", + "\n", + "\n", + "❌ ERROR @ STEP 0\n", + "Expected size for first two dimensions of batch2 tensor to be: [1, 32] but got: [1, 128].\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + "Traceback (most recent call last):\n", + " File \"/tmp/ipykernel_2497/3494919203.py\", line 345, in \n", + " model_pred = pipe.transformer(\n", + " ^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1776, in _wrapped_call_impl\n", + " return self._call_impl(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1787, in _call_impl\n", + " return forward_call(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 823, in forward\n", + " return model_forward(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 811, in __call__\n", + " return convert_to_fp32(self.model_forward(*args, **kwargs))\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/amp/autocast_mode.py\", line 44, in decorate_autocast\n", + " return func(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 823, in forward\n", + " return model_forward(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 811, in __call__\n", + " return convert_to_fp32(self.model_forward(*args, **kwargs))\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/amp/autocast_mode.py\", line 44, in decorate_autocast\n", + " return func(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 823, in forward\n", + " return model_forward(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 811, in __call__\n", + " return convert_to_fp32(self.model_forward(*args, **kwargs))\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/amp/autocast_mode.py\", line 44, in decorate_autocast\n", + " return func(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/peft/peft_model.py\", line 945, in forward\n", + " return self.get_base_model()(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1776, in _wrapped_call_impl\n", + " return self._call_impl(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1787, in _call_impl\n", + " return forward_call(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/diffusers/utils/peft_utils.py\", line 315, in wrapper\n", + " result = forward_fn(self, *args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/diffusers/models/transformers/transformer_flux2.py\", line 1265, in forward\n", + " hidden_states = self.x_embedder(hidden_states)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1776, in _wrapped_call_impl\n", + " return self._call_impl(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1787, in _call_impl\n", + " return forward_call(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/linear.py\", line 134, in forward\n", + " return F.linear(input, self.weight, self.bias)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Expected size for first two dimensions of batch2 tensor to be: [1, 32] but got: [1, 128].\n", + "Traceback (most recent call last):\n", + " File \"/tmp/ipykernel_2497/3494919203.py\", line 345, in \n", + " model_pred = pipe.transformer(\n", + " ^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1776, in _wrapped_call_impl\n", + " return self._call_impl(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1787, in _call_impl\n", + " return forward_call(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 823, in forward\n", + " return model_forward(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 811, in __call__\n", + " return convert_to_fp32(self.model_forward(*args, **kwargs))\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/amp/autocast_mode.py\", line 44, in decorate_autocast\n", + " return func(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 823, in forward\n", + " return model_forward(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 811, in __call__\n", + " return convert_to_fp32(self.model_forward(*args, **kwargs))\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/amp/autocast_mode.py\", line 44, in decorate_autocast\n", + " return func(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 823, in forward\n", + " return model_forward(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/accelerate/utils/operations.py\", line 811, in __call__\n", + " return convert_to_fp32(self.model_forward(*args, **kwargs))\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/amp/autocast_mode.py\", line 44, in decorate_autocast\n", + " return func(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/peft/peft_model.py\", line 945, in forward\n", + " return self.get_base_model()(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1776, in _wrapped_call_impl\n", + " return self._call_impl(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1787, in _call_impl\n", + " return forward_call(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/diffusers/utils/peft_utils.py\", line 315, in wrapper\n", + " result = forward_fn(self, *args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/diffusers/models/transformers/transformer_flux2.py\", line 1265, in forward\n", + " hidden_states = self.x_embedder(hidden_states)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1776, in _wrapped_call_impl\n", + " return self._call_impl(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\", line 1787, in _call_impl\n", + " return forward_call(*args, **kwargs)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + " File \"/usr/local/lib/python3.12/dist-packages/torch/nn/modules/linear.py\", line 134, in forward\n", + " return F.linear(input, self.weight, self.bias)\n", + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "RuntimeError: Expected size for first two dimensions of batch2 tensor to be: [1, 32] but got: [1, 128].\n" + ] + }, + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "❌ ERROR @ STEP 1\n", + "Expected size for first two dimensions of batch2 tensor to be: [1, 32] but got: [1, 128].\n", + "\n", + "💾 Saving LoRA adapter...\n" + ] + }, + { + "output_type": "error", + "ename": "AttributeError", + "evalue": "'Linear' object has no attribute 'original_class'", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mAttributeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m/tmp/ipykernel_2497/3494919203.py\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 443\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 444\u001b[0m \u001b[0;31m# Convert training model -> standard SDNQ model\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 445\u001b[0;31m pipe.transformer = convert_training_model_to_sdnq(\n\u001b[0m\u001b[1;32m 446\u001b[0m \u001b[0mpipe\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtransformer\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 447\u001b[0m )\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py\u001b[0m in \u001b[0;36mdecorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 122\u001b[0m \u001b[0;31m# pyrefly: ignore [bad-context-manager]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 123\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mctx_factory\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 124\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 125\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mdecorate_context\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/sdnq/training/__init__.py\u001b[0m in \u001b[0;36mconvert_training_model_to_sdnq\u001b[0;34m(model, dtype, dequantize_fp32, use_quantized_matmul)\u001b[0m\n\u001b[1;32m 346\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0muse_quantized_matmul\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mcheck_torch_compile\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 347\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mRuntimeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"SDNQ Quantized MatMul requires a working Triton install.\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 348\u001b[0;31m \u001b[0mmodel\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mconvert_training_module_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 349\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mquantization_method\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mQuantizationMethod\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSDNQ\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 350\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mhasattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"quantization_config\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py\u001b[0m in \u001b[0;36mdecorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 122\u001b[0m \u001b[0;31m# pyrefly: ignore [bad-context-manager]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 123\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mctx_factory\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 124\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 125\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mdecorate_context\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/sdnq/training/__init__.py\u001b[0m in \u001b[0;36mconvert_training_module_to_sdnq\u001b[0;34m(model)\u001b[0m\n\u001b[1;32m 338\u001b[0m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_layer_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 339\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 340\u001b[0;31m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_module_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 341\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 342\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py\u001b[0m in \u001b[0;36mdecorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 122\u001b[0m \u001b[0;31m# pyrefly: ignore [bad-context-manager]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 123\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mctx_factory\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 124\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 125\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mdecorate_context\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/sdnq/training/__init__.py\u001b[0m in \u001b[0;36mconvert_training_module_to_sdnq\u001b[0;34m(model)\u001b[0m\n\u001b[1;32m 338\u001b[0m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_layer_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 339\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 340\u001b[0;31m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_module_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 341\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 342\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py\u001b[0m in \u001b[0;36mdecorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 122\u001b[0m \u001b[0;31m# pyrefly: ignore [bad-context-manager]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 123\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mctx_factory\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 124\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 125\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mdecorate_context\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/sdnq/training/__init__.py\u001b[0m in \u001b[0;36mconvert_training_module_to_sdnq\u001b[0;34m(model)\u001b[0m\n\u001b[1;32m 338\u001b[0m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_layer_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 339\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 340\u001b[0;31m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_module_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 341\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 342\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py\u001b[0m in \u001b[0;36mdecorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 122\u001b[0m \u001b[0;31m# pyrefly: ignore [bad-context-manager]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 123\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mctx_factory\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 124\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 125\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mdecorate_context\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/sdnq/training/__init__.py\u001b[0m in \u001b[0;36mconvert_training_module_to_sdnq\u001b[0;34m(model)\u001b[0m\n\u001b[1;32m 338\u001b[0m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_layer_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 339\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 340\u001b[0;31m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_module_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 341\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 342\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py\u001b[0m in \u001b[0;36mdecorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 122\u001b[0m \u001b[0;31m# pyrefly: ignore [bad-context-manager]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 123\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mctx_factory\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 124\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 125\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mdecorate_context\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/sdnq/training/__init__.py\u001b[0m in \u001b[0;36mconvert_training_module_to_sdnq\u001b[0;34m(model)\u001b[0m\n\u001b[1;32m 338\u001b[0m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_layer_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 339\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 340\u001b[0;31m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_module_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 341\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 342\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py\u001b[0m in \u001b[0;36mdecorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 122\u001b[0m \u001b[0;31m# pyrefly: ignore [bad-context-manager]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 123\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mctx_factory\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 124\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 125\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mdecorate_context\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/sdnq/training/__init__.py\u001b[0m in \u001b[0;36mconvert_training_module_to_sdnq\u001b[0;34m(model)\u001b[0m\n\u001b[1;32m 336\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mmodel\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnamed_children\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 337\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mhasattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"weight\"\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0misinstance\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mweight\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mSDNQTensor\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 338\u001b[0;31m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_layer_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 339\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 340\u001b[0m \u001b[0msetattr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodel\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmodule_name\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconvert_training_module_to_sdnq\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mmodule\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/utils/_contextlib.py\u001b[0m in \u001b[0;36mdecorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 122\u001b[0m \u001b[0;31m# pyrefly: ignore [bad-context-manager]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 123\u001b[0m \u001b[0;32mwith\u001b[0m \u001b[0mctx_factory\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 124\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 125\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 126\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mdecorate_context\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/sdnq/training/__init__.py\u001b[0m in \u001b[0;36mconvert_training_layer_to_sdnq\u001b[0;34m(self, inplace)\u001b[0m\n\u001b[1;32m 313\u001b[0m \u001b[0msvd_up\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnn\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mParameter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mweight\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msvd_up\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrequires_grad\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 314\u001b[0m \u001b[0msvd_down\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtorch\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mnn\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mParameter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mweight\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msvd_down\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mrequires_grad\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mFalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 315\u001b[0;31m \u001b[0mquantized_forward\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mget_sdnq_forward_func\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moriginal_class\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__name__\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0msdnq_dequantizer\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mquantized_matmul_dtype\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 316\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0minplace\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 317\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mweight\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mweight\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.12/dist-packages/torch/nn/modules/module.py\u001b[0m in \u001b[0;36m__getattr__\u001b[0;34m(self, name)\u001b[0m\n\u001b[1;32m 1963\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mname\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mmodules\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1964\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmodules\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mname\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1965\u001b[0;31m raise AttributeError(\n\u001b[0m\u001b[1;32m 1966\u001b[0m \u001b[0;34mf\"'{type(self).__name__}' object has no attribute '{name}'\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1967\u001b[0m )\n", + "\u001b[0;31mAttributeError\u001b[0m: 'Linear' object has no attribute 'original_class'" + ] + } + ] + } + ] +} \ No newline at end of file