mirror of
https://github.com/Vision-CAIR/MiniGPT-4.git
synced 2025-04-05 02:20:47 +00:00
1737 lines
90 KiB
Plaintext
1737 lines
90 KiB
Plaintext
{
|
||
"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": {
|
||
"6011c6dec5034f6fbf35ff71022ba430": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_name": "VBoxModel",
|
||
"model_module_version": "1.5.0",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "VBoxModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "VBoxView",
|
||
"box_style": "",
|
||
"children": [
|
||
"IPY_MODEL_93642d4b49304bcfbbf37975cf6caa60",
|
||
"IPY_MODEL_7e12f8aebc54422ca0014d9d6346fb9d",
|
||
"IPY_MODEL_c49fda25649c43988b378bed31858059",
|
||
"IPY_MODEL_b4e3a1def1c64498b1d5bbd5c3cfce6e"
|
||
],
|
||
"layout": "IPY_MODEL_7db81258dbe94331a725cce0ff6c3d14"
|
||
}
|
||
},
|
||
"b664cc536a7d4a7dac53c7b2017ec450": {
|
||
"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_9644ceb05399416fb0933734737e2dff",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_29833e735dc54b14bbff7becfeb057a9",
|
||
"value": "<center> <img\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.svg\nalt='Hugging Face'> <br> Copy a token from <a\nhref=\"https://huggingface.co/settings/tokens\" target=\"_blank\">your Hugging Face\ntokens page</a> and paste it below. <br> Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file. </center>"
|
||
}
|
||
},
|
||
"97998e8e0d8240708050e7cff3fe5fbc": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_name": "PasswordModel",
|
||
"model_module_version": "1.5.0",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "PasswordModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "PasswordView",
|
||
"continuous_update": true,
|
||
"description": "Token:",
|
||
"description_tooltip": null,
|
||
"disabled": false,
|
||
"layout": "IPY_MODEL_9b25af97dc3a4860ae8a3ce036739189",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_6db494f2bd7343109daaaea1317d438f",
|
||
"value": ""
|
||
}
|
||
},
|
||
"44370875a46449648d726e642128c9ea": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_name": "CheckboxModel",
|
||
"model_module_version": "1.5.0",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "CheckboxModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "CheckboxView",
|
||
"description": "Add token as git credential?",
|
||
"description_tooltip": null,
|
||
"disabled": false,
|
||
"indent": true,
|
||
"layout": "IPY_MODEL_9ab39d67e4864a7eab6e42f50ecf6afb",
|
||
"style": "IPY_MODEL_bb167ac28dc449dba90c80faa7ef4a00",
|
||
"value": true
|
||
}
|
||
},
|
||
"caebe3bb7773409385230fa31ad026a1": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_name": "ButtonModel",
|
||
"model_module_version": "1.5.0",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "ButtonModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "ButtonView",
|
||
"button_style": "",
|
||
"description": "Login",
|
||
"disabled": false,
|
||
"icon": "",
|
||
"layout": "IPY_MODEL_3b634ae3526241d186ae12bfc91e2ec9",
|
||
"style": "IPY_MODEL_89aa291fbe154a57b944702a432ebce4",
|
||
"tooltip": ""
|
||
}
|
||
},
|
||
"be6da232a80a41fdb05ee95580ca3b43": {
|
||
"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_7d56b3c5767f45e3893c5ef627204a2a",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_8cfaf082645844bcb0f331d46283dd9e",
|
||
"value": "\n<b>Pro Tip:</b> If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. </center>"
|
||
}
|
||
},
|
||
"7db81258dbe94331a725cce0ff6c3d14": {
|
||
"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": "center",
|
||
"align_self": null,
|
||
"border": null,
|
||
"bottom": null,
|
||
"display": "flex",
|
||
"flex": null,
|
||
"flex_flow": "column",
|
||
"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": "50%"
|
||
}
|
||
},
|
||
"9644ceb05399416fb0933734737e2dff": {
|
||
"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
|
||
}
|
||
},
|
||
"29833e735dc54b14bbff7becfeb057a9": {
|
||
"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": ""
|
||
}
|
||
},
|
||
"9b25af97dc3a4860ae8a3ce036739189": {
|
||
"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
|
||
}
|
||
},
|
||
"6db494f2bd7343109daaaea1317d438f": {
|
||
"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": ""
|
||
}
|
||
},
|
||
"9ab39d67e4864a7eab6e42f50ecf6afb": {
|
||
"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
|
||
}
|
||
},
|
||
"bb167ac28dc449dba90c80faa7ef4a00": {
|
||
"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": ""
|
||
}
|
||
},
|
||
"3b634ae3526241d186ae12bfc91e2ec9": {
|
||
"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
|
||
}
|
||
},
|
||
"89aa291fbe154a57b944702a432ebce4": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_name": "ButtonStyleModel",
|
||
"model_module_version": "1.5.0",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "ButtonStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"button_color": null,
|
||
"font_weight": ""
|
||
}
|
||
},
|
||
"7d56b3c5767f45e3893c5ef627204a2a": {
|
||
"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
|
||
}
|
||
},
|
||
"8cfaf082645844bcb0f331d46283dd9e": {
|
||
"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": ""
|
||
}
|
||
},
|
||
"dc0eeea532fc409f8bac645c94d02229": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_name": "LabelModel",
|
||
"model_module_version": "1.5.0",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "LabelModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "LabelView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_b996db9fa52f461381b6df0269fc34e6",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_e90475a5fb324adaa1a03a2f32ef859d",
|
||
"value": "Connecting..."
|
||
}
|
||
},
|
||
"b996db9fa52f461381b6df0269fc34e6": {
|
||
"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
|
||
}
|
||
},
|
||
"e90475a5fb324adaa1a03a2f32ef859d": {
|
||
"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": ""
|
||
}
|
||
},
|
||
"93642d4b49304bcfbbf37975cf6caa60": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_name": "LabelModel",
|
||
"model_module_version": "1.5.0",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "LabelModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "LabelView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_3e963f9e1b12495e82632d76b0d71b59",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_d29b772d9aa543c4a564c664f2b057f7",
|
||
"value": "Token is valid (permission: fineGrained)."
|
||
}
|
||
},
|
||
"7e12f8aebc54422ca0014d9d6346fb9d": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_name": "LabelModel",
|
||
"model_module_version": "1.5.0",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "LabelModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "LabelView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_ea4984b1bd3d44bf84f3357bf5db92df",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_2d8b09fac6ab416bab488d28144d94bd",
|
||
"value": "Your token has been saved in your configured git credential helpers (store)."
|
||
}
|
||
},
|
||
"c49fda25649c43988b378bed31858059": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_name": "LabelModel",
|
||
"model_module_version": "1.5.0",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "LabelModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "LabelView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_d1e365abefb3442d819a4bd6aa4f170b",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_65ef21f70da648d78bf9d38dd0a2e69f",
|
||
"value": "Your token has been saved to /root/.cache/huggingface/token"
|
||
}
|
||
},
|
||
"b4e3a1def1c64498b1d5bbd5c3cfce6e": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_name": "LabelModel",
|
||
"model_module_version": "1.5.0",
|
||
"state": {
|
||
"_dom_classes": [],
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "LabelModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/controls",
|
||
"_view_module_version": "1.5.0",
|
||
"_view_name": "LabelView",
|
||
"description": "",
|
||
"description_tooltip": null,
|
||
"layout": "IPY_MODEL_c085ae2ef5524695868ba1fc4677d9aa",
|
||
"placeholder": "",
|
||
"style": "IPY_MODEL_28348808b8734a4cbdb6439c9ab3f7d3",
|
||
"value": "Login successful"
|
||
}
|
||
},
|
||
"3e963f9e1b12495e82632d76b0d71b59": {
|
||
"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
|
||
}
|
||
},
|
||
"d29b772d9aa543c4a564c664f2b057f7": {
|
||
"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": ""
|
||
}
|
||
},
|
||
"ea4984b1bd3d44bf84f3357bf5db92df": {
|
||
"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
|
||
}
|
||
},
|
||
"2d8b09fac6ab416bab488d28144d94bd": {
|
||
"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": ""
|
||
}
|
||
},
|
||
"d1e365abefb3442d819a4bd6aa4f170b": {
|
||
"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
|
||
}
|
||
},
|
||
"65ef21f70da648d78bf9d38dd0a2e69f": {
|
||
"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": ""
|
||
}
|
||
},
|
||
"c085ae2ef5524695868ba1fc4677d9aa": {
|
||
"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
|
||
}
|
||
},
|
||
"28348808b8734a4cbdb6439c9ab3f7d3": {
|
||
"model_module": "@jupyter-widgets/controls",
|
||
"model_name": "DescriptionStyleModel",
|
||
"model_module_version": "1.5.0",
|
||
"state": {
|
||
"_model_module": "@jupyter-widgets/controls",
|
||
"_model_module_version": "1.5.0",
|
||
"_model_name": "DescriptionStyleModel",
|
||
"_view_count": null,
|
||
"_view_module": "@jupyter-widgets/base",
|
||
"_view_module_version": "1.2.0",
|
||
"_view_name": "StyleView",
|
||
"description_width": ""
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"cells": [
|
||
{
|
||
"cell_type": "markdown",
|
||
"source": [
|
||
"# 1. Clone the forked repository"
|
||
],
|
||
"metadata": {
|
||
"id": "2gppjikneL8E"
|
||
}
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"source": [
|
||
"!git clone https://github.com/ThuanNaN/MiniGPT-4.git\n",
|
||
"%cd MiniGPT-4"
|
||
],
|
||
"metadata": {
|
||
"id": "FfT6cpS80Vcp",
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"outputId": "03f7f3dc-134d-4770-e277-5ba6ddb8f4e0"
|
||
},
|
||
"execution_count": 1,
|
||
"outputs": [
|
||
{
|
||
"output_type": "stream",
|
||
"name": "stdout",
|
||
"text": [
|
||
"Cloning into 'MiniGPT-4'...\n",
|
||
"remote: Enumerating objects: 1900, done.\u001b[K\n",
|
||
"remote: Counting objects: 100% (984/984), done.\u001b[K\n",
|
||
"remote: Compressing objects: 100% (288/288), done.\u001b[K\n",
|
||
"remote: Total 1900 (delta 777), reused 729 (delta 693), pack-reused 916 (from 2)\u001b[K\n",
|
||
"Receiving objects: 100% (1900/1900), 65.31 MiB | 17.31 MiB/s, done.\n",
|
||
"Resolving deltas: 100% (1105/1105), done.\n",
|
||
"/content/MiniGPT-4\n"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "markdown",
|
||
"source": [
|
||
"# 2. Install packages"
|
||
],
|
||
"metadata": {
|
||
"id": "tJJ3tETveWJO"
|
||
}
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"source": [
|
||
"!pip3 install -r requirements.txt"
|
||
],
|
||
"metadata": {
|
||
"id": "1RLBodLsDWIB",
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"outputId": "9e7f6388-70eb-4f9e-e346-e4b7d286b30d"
|
||
},
|
||
"execution_count": 10,
|
||
"outputs": [
|
||
{
|
||
"output_type": "stream",
|
||
"name": "stdout",
|
||
"text": [
|
||
"Requirement already satisfied: torch==2.0.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 1)) (2.0.0)\n",
|
||
"Requirement already satisfied: torchaudio in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 2)) (2.0.1)\n",
|
||
"Requirement already satisfied: torchvision in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 3)) (0.15.1)\n",
|
||
"Requirement already satisfied: huggingface-hub==0.18.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 4)) (0.18.0)\n",
|
||
"Requirement already satisfied: matplotlib==3.7.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 5)) (3.7.0)\n",
|
||
"Requirement already satisfied: psutil==5.9.4 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 6)) (5.9.4)\n",
|
||
"Requirement already satisfied: iopath in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (0.1.10)\n",
|
||
"Requirement already satisfied: pyyaml==6.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 8)) (6.0)\n",
|
||
"Requirement already satisfied: regex==2022.10.31 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 9)) (2022.10.31)\n",
|
||
"Requirement already satisfied: tokenizers==0.13.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 10)) (0.13.2)\n",
|
||
"Requirement already satisfied: tqdm==4.64.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 11)) (4.64.1)\n",
|
||
"Requirement already satisfied: transformers==4.30.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 12)) (4.30.0)\n",
|
||
"Requirement already satisfied: timm==0.6.13 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 13)) (0.6.13)\n",
|
||
"Requirement already satisfied: webdataset==0.2.48 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 14)) (0.2.48)\n",
|
||
"Requirement already satisfied: omegaconf==2.3.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 15)) (2.3.0)\n",
|
||
"Requirement already satisfied: opencv-python==4.7.0.72 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 16)) (4.7.0.72)\n",
|
||
"Requirement already satisfied: decord==0.6.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 17)) (0.6.0)\n",
|
||
"Collecting peft==0.4.0 (from -r requirements.txt (line 18))\n",
|
||
" Downloading peft-0.4.0-py3-none-any.whl.metadata (21 kB)\n",
|
||
"Requirement already satisfied: sentence-transformers in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 19)) (2.2.2)\n",
|
||
"Requirement already satisfied: gradio==3.47.1 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 20)) (3.47.1)\n",
|
||
"Collecting accelerate==0.21.0 (from -r requirements.txt (line 21))\n",
|
||
" Downloading accelerate-0.21.0-py3-none-any.whl.metadata (17 kB)\n",
|
||
"Collecting bitsandbytes==0.40.2 (from -r requirements.txt (line 22))\n",
|
||
" Downloading bitsandbytes-0.40.2-py3-none-any.whl.metadata (9.8 kB)\n",
|
||
"Requirement already satisfied: scikit-image in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 23)) (0.25.0)\n",
|
||
"Requirement already satisfied: visual-genome in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 24)) (1.1.1)\n",
|
||
"Requirement already satisfied: wandb in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 25)) (0.19.1)\n",
|
||
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (3.16.1)\n",
|
||
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (4.12.2)\n",
|
||
"Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (1.13.1)\n",
|
||
"Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (3.4.2)\n",
|
||
"Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (3.1.5)\n",
|
||
"Requirement already satisfied: nvidia-cuda-nvrtc-cu11==11.7.99 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (11.7.99)\n",
|
||
"Requirement already satisfied: nvidia-cuda-runtime-cu11==11.7.99 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (11.7.99)\n",
|
||
"Requirement already satisfied: nvidia-cuda-cupti-cu11==11.7.101 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (11.7.101)\n",
|
||
"Requirement already satisfied: nvidia-cudnn-cu11==8.5.0.96 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (8.5.0.96)\n",
|
||
"Requirement already satisfied: nvidia-cublas-cu11==11.10.3.66 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (11.10.3.66)\n",
|
||
"Requirement already satisfied: nvidia-cufft-cu11==10.9.0.58 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (10.9.0.58)\n",
|
||
"Requirement already satisfied: nvidia-curand-cu11==10.2.10.91 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (10.2.10.91)\n",
|
||
"Requirement already satisfied: nvidia-cusolver-cu11==11.4.0.1 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (11.4.0.1)\n",
|
||
"Requirement already satisfied: nvidia-cusparse-cu11==11.7.4.91 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (11.7.4.91)\n",
|
||
"Requirement already satisfied: nvidia-nccl-cu11==2.14.3 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (2.14.3)\n",
|
||
"Requirement already satisfied: nvidia-nvtx-cu11==11.7.91 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (11.7.91)\n",
|
||
"Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.0->-r requirements.txt (line 1)) (2.0.0)\n",
|
||
"Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub==0.18.0->-r requirements.txt (line 4)) (2024.10.0)\n",
|
||
"Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub==0.18.0->-r requirements.txt (line 4)) (2.32.3)\n",
|
||
"Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub==0.18.0->-r requirements.txt (line 4)) (24.2)\n",
|
||
"Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.0->-r requirements.txt (line 5)) (1.3.1)\n",
|
||
"Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.0->-r requirements.txt (line 5)) (0.12.1)\n",
|
||
"Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.0->-r requirements.txt (line 5)) (4.55.3)\n",
|
||
"Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.0->-r requirements.txt (line 5)) (1.4.8)\n",
|
||
"Requirement already satisfied: numpy>=1.20 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.0->-r requirements.txt (line 5)) (1.26.4)\n",
|
||
"Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.0->-r requirements.txt (line 5)) (10.4.0)\n",
|
||
"Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.0->-r requirements.txt (line 5)) (3.2.1)\n",
|
||
"Requirement already satisfied: python-dateutil>=2.7 in /usr/local/lib/python3.10/dist-packages (from matplotlib==3.7.0->-r requirements.txt (line 5)) (2.8.2)\n",
|
||
"Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.30.0->-r requirements.txt (line 12)) (0.5.1)\n",
|
||
"Requirement already satisfied: braceexpand in /usr/local/lib/python3.10/dist-packages (from webdataset==0.2.48->-r requirements.txt (line 14)) (0.1.7)\n",
|
||
"Requirement already satisfied: antlr4-python3-runtime==4.9.* in /usr/local/lib/python3.10/dist-packages (from omegaconf==2.3.0->-r requirements.txt (line 15)) (4.9.3)\n",
|
||
"Requirement already satisfied: aiofiles<24.0,>=22.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (23.2.1)\n",
|
||
"Requirement already satisfied: altair<6.0,>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (5.5.0)\n",
|
||
"Requirement already satisfied: fastapi in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (0.115.6)\n",
|
||
"Requirement already satisfied: ffmpy in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (0.5.0)\n",
|
||
"Requirement already satisfied: gradio-client==0.6.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (0.6.0)\n",
|
||
"Requirement already satisfied: httpx in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (0.28.1)\n",
|
||
"Requirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (6.5.2)\n",
|
||
"Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (2.1.5)\n",
|
||
"Requirement already satisfied: orjson~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (3.10.13)\n",
|
||
"Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (2.2.2)\n",
|
||
"Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (2.10.4)\n",
|
||
"Requirement already satisfied: pydub in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (0.25.1)\n",
|
||
"Requirement already satisfied: python-multipart in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (0.0.20)\n",
|
||
"Requirement already satisfied: semantic-version~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (2.10.0)\n",
|
||
"Requirement already satisfied: uvicorn>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (0.34.0)\n",
|
||
"Requirement already satisfied: websockets<12.0,>=10.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.47.1->-r requirements.txt (line 20)) (11.0.3)\n",
|
||
"Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from nvidia-cublas-cu11==11.10.3.66->torch==2.0.0->-r requirements.txt (line 1)) (75.1.0)\n",
|
||
"Requirement already satisfied: wheel in /usr/local/lib/python3.10/dist-packages (from nvidia-cublas-cu11==11.10.3.66->torch==2.0.0->-r requirements.txt (line 1)) (0.45.1)\n",
|
||
"Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch==2.0.0->-r requirements.txt (line 1)) (3.31.2)\n",
|
||
"Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch==2.0.0->-r requirements.txt (line 1)) (18.1.8)\n",
|
||
"Requirement already satisfied: portalocker in /usr/local/lib/python3.10/dist-packages (from iopath->-r requirements.txt (line 7)) (3.1.1)\n",
|
||
"Requirement already satisfied: scikit-learn in /usr/local/lib/python3.10/dist-packages (from sentence-transformers->-r requirements.txt (line 19)) (1.6.0)\n",
|
||
"Requirement already satisfied: scipy in /usr/local/lib/python3.10/dist-packages (from sentence-transformers->-r requirements.txt (line 19)) (1.13.1)\n",
|
||
"Requirement already satisfied: nltk in /usr/local/lib/python3.10/dist-packages (from sentence-transformers->-r requirements.txt (line 19)) (3.9.1)\n",
|
||
"Requirement already satisfied: sentencepiece in /usr/local/lib/python3.10/dist-packages (from sentence-transformers->-r requirements.txt (line 19)) (0.2.0)\n",
|
||
"Requirement already satisfied: imageio!=2.35.0,>=2.33 in /usr/local/lib/python3.10/dist-packages (from scikit-image->-r requirements.txt (line 23)) (2.36.1)\n",
|
||
"Requirement already satisfied: tifffile>=2022.8.12 in /usr/local/lib/python3.10/dist-packages (from scikit-image->-r requirements.txt (line 23)) (2024.12.12)\n",
|
||
"Requirement already satisfied: lazy-loader>=0.4 in /usr/local/lib/python3.10/dist-packages (from scikit-image->-r requirements.txt (line 23)) (0.4)\n",
|
||
"Requirement already satisfied: progressbar2 in /usr/local/lib/python3.10/dist-packages (from visual-genome->-r requirements.txt (line 24)) (4.5.0)\n",
|
||
"Requirement already satisfied: click!=8.0.0,>=7.1 in /usr/local/lib/python3.10/dist-packages (from wandb->-r requirements.txt (line 25)) (8.1.8)\n",
|
||
"Requirement already satisfied: docker-pycreds>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from wandb->-r requirements.txt (line 25)) (0.4.0)\n",
|
||
"Requirement already satisfied: gitpython!=3.1.29,>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from wandb->-r requirements.txt (line 25)) (3.1.44)\n",
|
||
"Requirement already satisfied: platformdirs in /usr/local/lib/python3.10/dist-packages (from wandb->-r requirements.txt (line 25)) (4.3.6)\n",
|
||
"Requirement already satisfied: protobuf!=4.21.0,!=5.28.0,<6,>=3.19.0 in /usr/local/lib/python3.10/dist-packages (from wandb->-r requirements.txt (line 25)) (4.25.5)\n",
|
||
"Requirement already satisfied: sentry-sdk>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from wandb->-r requirements.txt (line 25)) (2.19.2)\n",
|
||
"Requirement already satisfied: setproctitle in /usr/local/lib/python3.10/dist-packages (from wandb->-r requirements.txt (line 25)) (1.3.4)\n",
|
||
"Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio==3.47.1->-r requirements.txt (line 20)) (4.23.0)\n",
|
||
"Requirement already satisfied: narwhals>=1.14.2 in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio==3.47.1->-r requirements.txt (line 20)) (1.21.1)\n",
|
||
"Requirement already satisfied: six>=1.4.0 in /usr/local/lib/python3.10/dist-packages (from docker-pycreds>=0.4.0->wandb->-r requirements.txt (line 25)) (1.17.0)\n",
|
||
"Requirement already satisfied: gitdb<5,>=4.0.1 in /usr/local/lib/python3.10/dist-packages (from gitpython!=3.1.29,>=1.0.0->wandb->-r requirements.txt (line 25)) (4.0.12)\n",
|
||
"Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio==3.47.1->-r requirements.txt (line 20)) (2024.2)\n",
|
||
"Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio==3.47.1->-r requirements.txt (line 20)) (2024.2)\n",
|
||
"Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio==3.47.1->-r requirements.txt (line 20)) (0.7.0)\n",
|
||
"Requirement already satisfied: pydantic-core==2.27.2 in /usr/local/lib/python3.10/dist-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio==3.47.1->-r requirements.txt (line 20)) (2.27.2)\n",
|
||
"Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub==0.18.0->-r requirements.txt (line 4)) (3.4.1)\n",
|
||
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub==0.18.0->-r requirements.txt (line 4)) (3.10)\n",
|
||
"Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub==0.18.0->-r requirements.txt (line 4)) (2.3.0)\n",
|
||
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub==0.18.0->-r requirements.txt (line 4)) (2024.12.14)\n",
|
||
"Requirement already satisfied: h11>=0.8 in /usr/local/lib/python3.10/dist-packages (from uvicorn>=0.14.0->gradio==3.47.1->-r requirements.txt (line 20)) (0.14.0)\n",
|
||
"Requirement already satisfied: starlette<0.42.0,>=0.40.0 in /usr/local/lib/python3.10/dist-packages (from fastapi->gradio==3.47.1->-r requirements.txt (line 20)) (0.41.3)\n",
|
||
"Requirement already satisfied: anyio in /usr/local/lib/python3.10/dist-packages (from httpx->gradio==3.47.1->-r requirements.txt (line 20)) (3.7.1)\n",
|
||
"Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.10/dist-packages (from httpx->gradio==3.47.1->-r requirements.txt (line 20)) (1.0.7)\n",
|
||
"Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from nltk->sentence-transformers->-r requirements.txt (line 19)) (1.4.2)\n",
|
||
"Requirement already satisfied: python-utils>=3.8.1 in /usr/local/lib/python3.10/dist-packages (from progressbar2->visual-genome->-r requirements.txt (line 24)) (3.9.1)\n",
|
||
"Requirement already satisfied: threadpoolctl>=3.1.0 in /usr/local/lib/python3.10/dist-packages (from scikit-learn->sentence-transformers->-r requirements.txt (line 19)) (3.5.0)\n",
|
||
"Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.10/dist-packages (from sympy->torch==2.0.0->-r requirements.txt (line 1)) (1.3.0)\n",
|
||
"Requirement already satisfied: smmap<6,>=3.0.1 in /usr/local/lib/python3.10/dist-packages (from gitdb<5,>=4.0.1->gitpython!=3.1.29,>=1.0.0->wandb->-r requirements.txt (line 25)) (5.0.2)\n",
|
||
"Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==3.47.1->-r requirements.txt (line 20)) (24.3.0)\n",
|
||
"Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==3.47.1->-r requirements.txt (line 20)) (2024.10.1)\n",
|
||
"Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==3.47.1->-r requirements.txt (line 20)) (0.35.1)\n",
|
||
"Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==3.47.1->-r requirements.txt (line 20)) (0.22.3)\n",
|
||
"Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.10/dist-packages (from anyio->httpx->gradio==3.47.1->-r requirements.txt (line 20)) (1.3.1)\n",
|
||
"Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio->httpx->gradio==3.47.1->-r requirements.txt (line 20)) (1.2.2)\n",
|
||
"Downloading peft-0.4.0-py3-none-any.whl (72 kB)\n",
|
||
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m72.9/72.9 kB\u001b[0m \u001b[31m7.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
||
"\u001b[?25hDownloading accelerate-0.21.0-py3-none-any.whl (244 kB)\n",
|
||
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m244.2/244.2 kB\u001b[0m \u001b[31m23.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
||
"\u001b[?25hDownloading bitsandbytes-0.40.2-py3-none-any.whl (92.5 MB)\n",
|
||
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.5/92.5 MB\u001b[0m \u001b[31m8.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
|
||
"\u001b[?25hInstalling collected packages: bitsandbytes, accelerate, peft\n",
|
||
" Attempting uninstall: bitsandbytes\n",
|
||
" Found existing installation: bitsandbytes 0.45.0\n",
|
||
" Uninstalling bitsandbytes-0.45.0:\n",
|
||
" Successfully uninstalled bitsandbytes-0.45.0\n",
|
||
" Attempting uninstall: accelerate\n",
|
||
" Found existing installation: accelerate 0.20.3\n",
|
||
" Uninstalling accelerate-0.20.3:\n",
|
||
" Successfully uninstalled accelerate-0.20.3\n",
|
||
" Attempting uninstall: peft\n",
|
||
" Found existing installation: peft 0.3.0\n",
|
||
" Uninstalling peft-0.3.0:\n",
|
||
" Successfully uninstalled peft-0.3.0\n",
|
||
"Successfully installed accelerate-0.21.0 bitsandbytes-0.40.2 peft-0.4.0\n"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"source": [
|
||
"!nvidia-smi"
|
||
],
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"id": "ulAu6G-t12Qz",
|
||
"outputId": "1afcc83e-1a2a-4902-ba90-96743076c1a6"
|
||
},
|
||
"execution_count": 1,
|
||
"outputs": [
|
||
{
|
||
"output_type": "stream",
|
||
"name": "stdout",
|
||
"text": [
|
||
"Mon Jan 13 20:35:43 2025 \n",
|
||
"+---------------------------------------------------------------------------------------+\n",
|
||
"| NVIDIA-SMI 535.104.05 Driver Version: 535.104.05 CUDA Version: 12.2 |\n",
|
||
"|-----------------------------------------+----------------------+----------------------+\n",
|
||
"| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |\n",
|
||
"| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |\n",
|
||
"| | | MIG M. |\n",
|
||
"|=========================================+======================+======================|\n",
|
||
"| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |\n",
|
||
"| N/A 41C P8 11W / 70W | 0MiB / 15360MiB | 0% Default |\n",
|
||
"| | | N/A |\n",
|
||
"+-----------------------------------------+----------------------+----------------------+\n",
|
||
" \n",
|
||
"+---------------------------------------------------------------------------------------+\n",
|
||
"| Processes: |\n",
|
||
"| GPU GI CI PID Type Process name GPU Memory |\n",
|
||
"| ID ID Usage |\n",
|
||
"|=======================================================================================|\n",
|
||
"| No running processes found |\n",
|
||
"+---------------------------------------------------------------------------------------+\n"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "markdown",
|
||
"source": [
|
||
"# 3. Login to huggingface hub by access token"
|
||
],
|
||
"metadata": {
|
||
"id": "4bmYuHaQeaj_"
|
||
}
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"source": [
|
||
"from huggingface_hub import notebook_login\n",
|
||
"\n",
|
||
"notebook_login()"
|
||
],
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/",
|
||
"height": 145,
|
||
"referenced_widgets": [
|
||
"6011c6dec5034f6fbf35ff71022ba430",
|
||
"b664cc536a7d4a7dac53c7b2017ec450",
|
||
"97998e8e0d8240708050e7cff3fe5fbc",
|
||
"44370875a46449648d726e642128c9ea",
|
||
"caebe3bb7773409385230fa31ad026a1",
|
||
"be6da232a80a41fdb05ee95580ca3b43",
|
||
"7db81258dbe94331a725cce0ff6c3d14",
|
||
"9644ceb05399416fb0933734737e2dff",
|
||
"29833e735dc54b14bbff7becfeb057a9",
|
||
"9b25af97dc3a4860ae8a3ce036739189",
|
||
"6db494f2bd7343109daaaea1317d438f",
|
||
"9ab39d67e4864a7eab6e42f50ecf6afb",
|
||
"bb167ac28dc449dba90c80faa7ef4a00",
|
||
"3b634ae3526241d186ae12bfc91e2ec9",
|
||
"89aa291fbe154a57b944702a432ebce4",
|
||
"7d56b3c5767f45e3893c5ef627204a2a",
|
||
"8cfaf082645844bcb0f331d46283dd9e",
|
||
"dc0eeea532fc409f8bac645c94d02229",
|
||
"b996db9fa52f461381b6df0269fc34e6",
|
||
"e90475a5fb324adaa1a03a2f32ef859d",
|
||
"93642d4b49304bcfbbf37975cf6caa60",
|
||
"7e12f8aebc54422ca0014d9d6346fb9d",
|
||
"c49fda25649c43988b378bed31858059",
|
||
"b4e3a1def1c64498b1d5bbd5c3cfce6e",
|
||
"3e963f9e1b12495e82632d76b0d71b59",
|
||
"d29b772d9aa543c4a564c664f2b057f7",
|
||
"ea4984b1bd3d44bf84f3357bf5db92df",
|
||
"2d8b09fac6ab416bab488d28144d94bd",
|
||
"d1e365abefb3442d819a4bd6aa4f170b",
|
||
"65ef21f70da648d78bf9d38dd0a2e69f",
|
||
"c085ae2ef5524695868ba1fc4677d9aa",
|
||
"28348808b8734a4cbdb6439c9ab3f7d3"
|
||
]
|
||
},
|
||
"id": "KlIlVLaAbYmc",
|
||
"outputId": "eea9b798-d203-44c3-a59e-b444e9b5a5bf"
|
||
},
|
||
"execution_count": 3,
|
||
"outputs": [
|
||
{
|
||
"output_type": "display_data",
|
||
"data": {
|
||
"text/plain": [
|
||
"VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
|
||
],
|
||
"application/vnd.jupyter.widget-view+json": {
|
||
"version_major": 2,
|
||
"version_minor": 0,
|
||
"model_id": "6011c6dec5034f6fbf35ff71022ba430"
|
||
}
|
||
},
|
||
"metadata": {}
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "markdown",
|
||
"source": [
|
||
"# 4. Download MVTec Dataset and pre-trained checkpoint\n",
|
||
"\n",
|
||
"The official homepage: https://www.mvtec.com/company/research/datasets/mvtec-ad"
|
||
],
|
||
"metadata": {
|
||
"id": "sofEa1dBei9U"
|
||
}
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"source": [
|
||
"%cd /content/MiniGPT-4"
|
||
],
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"id": "eiiFTdqqGgXl",
|
||
"outputId": "189e72ff-1fab-4dab-9982-9f6dd832ce60"
|
||
},
|
||
"execution_count": 5,
|
||
"outputs": [
|
||
{
|
||
"output_type": "stream",
|
||
"name": "stdout",
|
||
"text": [
|
||
"/content/MiniGPT-4\n"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"source": [
|
||
"!gdown 11a3HD9dEF1qaBj63ZndIS4l39itzhQcw\n",
|
||
"!unzip -q ./MVTEC_det_v2.zip"
|
||
],
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"id": "s_63t2wIyPWw",
|
||
"outputId": "3ea0cb89-cedf-42d3-d672-352958755580"
|
||
},
|
||
"execution_count": 5,
|
||
"outputs": [
|
||
{
|
||
"output_type": "stream",
|
||
"name": "stdout",
|
||
"text": [
|
||
"Downloading...\n",
|
||
"From (original): https://drive.google.com/uc?id=11a3HD9dEF1qaBj63ZndIS4l39itzhQcw\n",
|
||
"From (redirected): https://drive.google.com/uc?id=11a3HD9dEF1qaBj63ZndIS4l39itzhQcw&confirm=t&uuid=b59a460f-a379-4644-9a67-8344e46dbd29\n",
|
||
"To: /content/MiniGPT-4/MVTEC_det_v2.zip\n",
|
||
"100% 5.27G/5.27G [01:06<00:00, 79.0MB/s]\n"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "markdown",
|
||
"source": [
|
||
"## Pre-trained checkpoint for MiniGPT4-v2"
|
||
],
|
||
"metadata": {
|
||
"id": "LDDcZ7lYe3GT"
|
||
}
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"source": [
|
||
"!mkdir ./ckpt\n",
|
||
"%cd ckpt\n",
|
||
"!gdown 1HkoUUrjzFGn33cSiUkI-KcT-zysCynAz\n",
|
||
"%cd .."
|
||
],
|
||
"metadata": {
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"id": "9LA8wU7u0fgt",
|
||
"outputId": "c0e733dd-21a2-4340-d5c1-c6126418c12a"
|
||
},
|
||
"execution_count": 6,
|
||
"outputs": [
|
||
{
|
||
"output_type": "stream",
|
||
"name": "stdout",
|
||
"text": [
|
||
"/content/MiniGPT-4/ckpt\n",
|
||
"Downloading...\n",
|
||
"From (original): https://drive.google.com/uc?id=1HkoUUrjzFGn33cSiUkI-KcT-zysCynAz\n",
|
||
"From (redirected): https://drive.google.com/uc?id=1HkoUUrjzFGn33cSiUkI-KcT-zysCynAz&confirm=t&uuid=ba5a2255-48ff-4103-8d2b-4d07c7577001\n",
|
||
"To: /content/MiniGPT-4/ckpt/checkpoint_stage3.pth\n",
|
||
"100% 680M/680M [00:10<00:00, 63.5MB/s]\n",
|
||
"/content/MiniGPT-4\n"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "markdown",
|
||
"source": [
|
||
"# 5. Finetuning model with MVTec dataset\n",
|
||
"\n",
|
||
"- Edit the training config at: /content/MiniGPT-4/train_configs/minigptv2_finetune_mvtec.yaml"
|
||
],
|
||
"metadata": {
|
||
"id": "UghtQS9SfAYb"
|
||
}
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"source": [
|
||
"!python train.py --cfg-path train_configs/minigptv2_finetune_mvtec.yaml"
|
||
],
|
||
"metadata": {
|
||
"id": "kd-1XN-Xy-HE",
|
||
"colab": {
|
||
"base_uri": "https://localhost:8080/"
|
||
},
|
||
"outputId": "bf036de3-2280-448a-eb4b-b5d10390f379"
|
||
},
|
||
"execution_count": 12,
|
||
"outputs": [
|
||
{
|
||
"output_type": "stream",
|
||
"name": "stdout",
|
||
"text": [
|
||
"2025-01-13 20:54:35.810915: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
|
||
"2025-01-13 20:54:35.831310: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
|
||
"2025-01-13 20:54:35.837307: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
|
||
"2025-01-13 20:54:37.482011: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n",
|
||
"Not using distributed mode\n",
|
||
"2025-01-13 20:54:38,835 [INFO] \n",
|
||
"===== Running Parameters =====\n",
|
||
"2025-01-13 20:54:38,835 [INFO] {\n",
|
||
" \"amp\": true,\n",
|
||
" \"device\": \"cuda\",\n",
|
||
" \"dist_url\": \"env://\",\n",
|
||
" \"distributed\": false,\n",
|
||
" \"evaluate\": false,\n",
|
||
" \"init_lr\": 1e-05,\n",
|
||
" \"iters_per_epoch\": 2000,\n",
|
||
" \"job_name\": \"minigptv2_finetune\",\n",
|
||
" \"lr_sched\": \"linear_warmup_cosine_lr\",\n",
|
||
" \"max_epoch\": 5,\n",
|
||
" \"min_lr\": 1e-06,\n",
|
||
" \"num_workers\": 6,\n",
|
||
" \"output_dir\": \"mvtec_outputs\",\n",
|
||
" \"resume_ckpt_path\": null,\n",
|
||
" \"seed\": 42,\n",
|
||
" \"task\": \"image_text_pretrain\",\n",
|
||
" \"train_splits\": [\n",
|
||
" \"train\"\n",
|
||
" ],\n",
|
||
" \"wandb_log\": false,\n",
|
||
" \"warmup_lr\": 1e-06,\n",
|
||
" \"warmup_steps\": 1000,\n",
|
||
" \"weight_decay\": 0.05,\n",
|
||
" \"world_size\": 1\n",
|
||
"}\n",
|
||
"2025-01-13 20:54:38,835 [INFO] \n",
|
||
"====== Dataset Attributes ======\n",
|
||
"2025-01-13 20:54:38,836 [INFO] \n",
|
||
"======== mvtec_ad =======\n",
|
||
"2025-01-13 20:54:38,836 [INFO] {\n",
|
||
" \"batch_size\": 2,\n",
|
||
" \"build_info\": {\n",
|
||
" \"ann_path\": \"./MVTEC_det/train_data.json\",\n",
|
||
" \"image_path\": \"./MVTEC_det/images\"\n",
|
||
" },\n",
|
||
" \"data_type\": \"images\",\n",
|
||
" \"sample_ratio\": 100,\n",
|
||
" \"text_processor\": {\n",
|
||
" \"train\": {\n",
|
||
" \"name\": \"blip_caption\"\n",
|
||
" }\n",
|
||
" },\n",
|
||
" \"vis_processor\": {\n",
|
||
" \"train\": {\n",
|
||
" \"image_size\": 448,\n",
|
||
" \"name\": \"blip2_image_train\"\n",
|
||
" }\n",
|
||
" }\n",
|
||
"}\n",
|
||
"2025-01-13 20:54:38,836 [INFO] \n",
|
||
"====== Model Attributes ======\n",
|
||
"2025-01-13 20:54:38,836 [INFO] {\n",
|
||
" \"arch\": \"minigpt_v2\",\n",
|
||
" \"chat_template\": true,\n",
|
||
" \"ckpt\": \"./ckpt/checkpoint_stage3.pth\",\n",
|
||
" \"drop_path_rate\": 0,\n",
|
||
" \"end_sym\": \"</s>\",\n",
|
||
" \"freeze_vit\": true,\n",
|
||
" \"image_size\": 448,\n",
|
||
" \"llama_model\": \"meta-llama/Llama-2-7b-chat-hf\",\n",
|
||
" \"lora_alpha\": 16,\n",
|
||
" \"lora_r\": 64,\n",
|
||
" \"low_resource\": true,\n",
|
||
" \"max_txt_len\": 1024,\n",
|
||
" \"model_type\": \"pretrain\",\n",
|
||
" \"prompt\": \"\",\n",
|
||
" \"use_grad_checkpoint\": true,\n",
|
||
" \"vit_precision\": \"fp16\"\n",
|
||
"}\n",
|
||
"2025-01-13 20:54:38,837 [INFO] Building datasets...\n",
|
||
"2025-01-13 20:54:38,851 [INFO] Loading LLAMA\n",
|
||
"Loading checkpoint shards: 100% 2/2 [00:57<00:00, 28.76s/it]\n",
|
||
"/usr/local/lib/python3.10/dist-packages/peft/utils/other.py:102: FutureWarning: prepare_model_for_int8_training is deprecated and will be removed in a future version. Use prepare_model_for_kbit_training instead.\n",
|
||
" warnings.warn(\n",
|
||
"trainable params: 33,554,432 || all params: 6,771,970,048 || trainable%: 0.49548996469513035\n",
|
||
"2025-01-13 20:55:47,843 [INFO] Loading LLAMA Done\n",
|
||
"2025-01-13 20:55:47,843 [INFO] Loading VIT\n",
|
||
"Position interpolate from 16x16 to 32x32\n",
|
||
"2025-01-13 20:56:13,356 [INFO] freeze vision encoder\n",
|
||
"2025-01-13 20:56:13,356 [INFO] Loading VIT Done\n",
|
||
"Load Minigpt-4-LLM Checkpoint: ./ckpt/checkpoint_stage3.pth\n",
|
||
"2025-01-13 20:56:16,350 [INFO] Start training\n",
|
||
"2025-01-13 20:56:16,915 [INFO] dataset_ratios not specified, datasets will be concatenated (map-style datasets) or chained (webdataset.DataPipeline).\n",
|
||
"2025-01-13 20:56:16,915 [INFO] Loaded 3747 records for train split from the dataset.\n",
|
||
"batch sizes [[2]]\n",
|
||
"/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py:561: UserWarning: This DataLoader will create 6 worker processes in total. Our suggested max number of worker in current system is 2, which is smaller than what this DataLoader is going to create. Please be aware that excessive worker creation might get DataLoader running slow or even freeze, lower the worker number to avoid potential slowness/freeze if necessary.\n",
|
||
" warnings.warn(_create_warning_msg(\n",
|
||
"llama_model.base_model.model.model.layers.0.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.0.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.0.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.0.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.1.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.1.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.1.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.1.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.2.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.2.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.2.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.2.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.3.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.3.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.3.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.3.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.4.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.4.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.4.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.4.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.5.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.5.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.5.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.5.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.6.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.6.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.6.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.6.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.7.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.7.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.7.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.7.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.8.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.8.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.8.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.8.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.9.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.9.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.9.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.9.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.10.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.10.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.10.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.10.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.11.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.11.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.11.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.11.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.12.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.12.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.12.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.12.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.13.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.13.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.13.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.13.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.14.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.14.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.14.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.14.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.15.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.15.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.15.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.15.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.16.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.16.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.16.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.16.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.17.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.17.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.17.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.17.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.18.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.18.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.18.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.18.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.19.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.19.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.19.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.19.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.20.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.20.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.20.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.20.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.21.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.21.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.21.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.21.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.22.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.22.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.22.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.22.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.23.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.23.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.23.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.23.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.24.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.24.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.24.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.24.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.25.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.25.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.25.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.25.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.26.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.26.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.26.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.26.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.27.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.27.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.27.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.27.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.28.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.28.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.28.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.28.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.29.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.29.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.29.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.29.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.30.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.30.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.30.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.30.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.31.self_attn.q_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.31.self_attn.q_proj.lora_B.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.31.self_attn.v_proj.lora_A.default.weight\n",
|
||
"llama_model.base_model.model.model.layers.31.self_attn.v_proj.lora_B.default.weight\n",
|
||
"llama_proj.weight\n",
|
||
"llama_proj.bias\n",
|
||
"2025-01-13 20:56:16,951 [INFO] number of trainable parameters: 56627200\n",
|
||
"2025-01-13 20:56:16,952 [INFO] Start training epoch 0, 2000 iters per inner epoch.\n",
|
||
"/usr/local/lib/python3.10/dist-packages/torch/utils/checkpoint.py:31: UserWarning: None of the inputs have requires_grad=True. Gradients will be None\n",
|
||
" warnings.warn(\"None of the inputs have requires_grad=True. Gradients will be None\")\n",
|
||
"`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`...\n",
|
||
"/usr/local/lib/python3.10/dist-packages/bitsandbytes/autograd/_functions.py:322: UserWarning: MatMul8bitLt: inputs will be cast from torch.float32 to float16 during quantization\n",
|
||
" warnings.warn(f\"MatMul8bitLt: inputs will be cast from {A.dtype} to float16 during quantization\")\n",
|
||
"Train: data epoch: [0] [ 0/2000] eta: 6:29:28 lr: 0.000001 loss: 4.7070 time: 11.6845 data: 0.0000 max mem: 10541\n",
|
||
"Train: data epoch: [0] [ 50/2000] eta: 2:55:26 lr: 0.000001 loss: 4.7069 time: 5.3023 data: 0.0000 max mem: 11003\n",
|
||
"Train: data epoch: [0] [ 100/2000] eta: 2:49:09 lr: 0.000002 loss: 4.1843 time: 5.3225 data: 0.0000 max mem: 11004\n",
|
||
"Train: data epoch: [0] [ 150/2000] eta: 2:44:18 lr: 0.000002 loss: 3.6810 time: 5.2943 data: 0.0000 max mem: 11004\n",
|
||
"Traceback (most recent call last):\n",
|
||
" File \"/content/MiniGPT-4/train.py\", line 104, in <module>\n",
|
||
" main()\n",
|
||
" File \"/content/MiniGPT-4/train.py\", line 100, in main\n",
|
||
" runner.train()\n",
|
||
" File \"/content/MiniGPT-4/minigpt4/runners/runner_base.py\", line 377, in train\n",
|
||
" train_stats = self.train_epoch(cur_epoch)\n",
|
||
" File \"/content/MiniGPT-4/minigpt4/runners/runner_base.py\", line 437, in train_epoch\n",
|
||
" return self.task.train_epoch(\n",
|
||
" File \"/content/MiniGPT-4/minigpt4/tasks/base_task.py\", line 116, in train_epoch\n",
|
||
" return self._train_inner_loop(\n",
|
||
" File \"/content/MiniGPT-4/minigpt4/tasks/base_task.py\", line 225, in _train_inner_loop\n",
|
||
" scaler.scale(loss).backward()\n",
|
||
" File \"/usr/local/lib/python3.10/dist-packages/torch/_tensor.py\", line 487, in backward\n",
|
||
" torch.autograd.backward(\n",
|
||
" File \"/usr/local/lib/python3.10/dist-packages/torch/autograd/__init__.py\", line 200, in backward\n",
|
||
" Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass\n",
|
||
"KeyboardInterrupt\n",
|
||
"^C\n"
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"cell_type": "markdown",
|
||
"source": [
|
||
"## The outputs of training process (checkpoint) will be saved at /content/MiniGPT-4/minigpt4/mvtec_outputs"
|
||
],
|
||
"metadata": {
|
||
"id": "rRdpC_Kzf74t"
|
||
}
|
||
},
|
||
{
|
||
"cell_type": "markdown",
|
||
"source": [
|
||
"# 6. Run gradio demo\n",
|
||
"\n",
|
||
"- Replace the checkpoint path in line 8 in file /content/MiniGPT-4/train_configs/minigptv2_finetune_mvtec.yaml to run the finetuned model"
|
||
],
|
||
"metadata": {
|
||
"id": "cRq-ZeNbfG3b"
|
||
}
|
||
},
|
||
{
|
||
"cell_type": "code",
|
||
"source": [
|
||
"!python demo_v2.py --cfg-path eval_configs/minigptv2_eval_mvtec.yaml --gpu-id 0"
|
||
],
|
||
"metadata": {
|
||
"id": "2EVboxuFRiv2"
|
||
},
|
||
"execution_count": null,
|
||
"outputs": []
|
||
}
|
||
]
|
||
} |