diff --git "a/SimpleRAG_test_v2.ipynb" "b/SimpleRAG_test_v2.ipynb" new file mode 100644--- /dev/null +++ "b/SimpleRAG_test_v2.ipynb" @@ -0,0 +1,6221 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "toc_visible": true + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "25276249349a4775a0c3abe385a57425": { + "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_3d8799ccc8bd4402bbacf03217c332a1", + "IPY_MODEL_67230cef27d34e179ff1b3103f0e5f77", + "IPY_MODEL_0e372e1ba7d943c09d9ba7073110c0d8" + ], + "layout": "IPY_MODEL_a31f4252ac5a4072b0441b4e9ea289ce" + } + }, + "3d8799ccc8bd4402bbacf03217c332a1": { + "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_7cd93466149242d49fe3e520faf16169", + "placeholder": "​", + "style": "IPY_MODEL_f1bd781fb20e4814b58a287458c87520", + "value": "modules.json: 100%" + } + }, + "67230cef27d34e179ff1b3103f0e5f77": { + "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_6c9f27ee06e943b2a4d83fded2c09ca8", + "max": 349, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_b353aa48f12e48c6b8e0d03897f8910e", + "value": 349 + } + }, + "0e372e1ba7d943c09d9ba7073110c0d8": { + "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_67f29f27191c4d368b6963c835e7e6bb", + "placeholder": "​", + "style": "IPY_MODEL_4d5a16b3c82c452a8876bbeb31c5d6b0", + "value": " 349/349 [00:00<00:00, 14.8kB/s]" + } + }, + "a31f4252ac5a4072b0441b4e9ea289ce": { + "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 + } + }, + "7cd93466149242d49fe3e520faf16169": { + "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 + } + }, + "f1bd781fb20e4814b58a287458c87520": { + "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": "" + } + }, + "6c9f27ee06e943b2a4d83fded2c09ca8": { + "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 + } + }, + "b353aa48f12e48c6b8e0d03897f8910e": { + "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": "" + } + }, + "67f29f27191c4d368b6963c835e7e6bb": { + "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 + } + }, + "4d5a16b3c82c452a8876bbeb31c5d6b0": { + "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": "" + } + }, + "0f6e5e613a904e62b33ab860ab1acfb0": { + "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_5f7769698fa04bc4abfca4e246480fd3", + "IPY_MODEL_a0f1bf790bf44f42939ccbc9d35922df", + "IPY_MODEL_c7aa31788c154080aededf88d32cebe1" + ], + "layout": "IPY_MODEL_00fe5b81d2c743b0afb278d4fb1c9ccd" + } + }, + "5f7769698fa04bc4abfca4e246480fd3": { + "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_8217fb586b51466f9d469078fef6b53a", + "placeholder": "​", + "style": "IPY_MODEL_6578ce7377934841971ac8bbec916401", + "value": "config_sentence_transformers.json: 100%" + } + }, + "a0f1bf790bf44f42939ccbc9d35922df": { + "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_c70314795ede49f69614d2bd62304a9d", + "max": 116, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_002e9f8d0773410bb29ecccff7845d8a", + "value": 116 + } + }, + "c7aa31788c154080aededf88d32cebe1": { + "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_570197bd1c704d9fbeeaae5a8afcbb6d", + "placeholder": "​", + "style": "IPY_MODEL_54fca1d20e48487399f1cfdd1d729c2c", + "value": " 116/116 [00:00<00:00, 5.43kB/s]" + } + }, + "00fe5b81d2c743b0afb278d4fb1c9ccd": { + "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 + } + }, + "8217fb586b51466f9d469078fef6b53a": { + "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 + } + }, + "6578ce7377934841971ac8bbec916401": { + "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": "" + } + }, + "c70314795ede49f69614d2bd62304a9d": { + "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 + } + }, + "002e9f8d0773410bb29ecccff7845d8a": { + "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": "" + } + }, + "570197bd1c704d9fbeeaae5a8afcbb6d": { + "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 + } + }, + "54fca1d20e48487399f1cfdd1d729c2c": { + "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": "" + } + }, + "49ac2653302b41a883a5d48f2f69ab9a": { + "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_650663daa6e24f3bbb580a50633d1c4f", + "IPY_MODEL_2ef61fc17de54f708b702b8d9633ba98", + "IPY_MODEL_f6a07670dde94fd89b782d624f3147e2" + ], + "layout": "IPY_MODEL_4b09e5a948bf4038b108cca562b3e06c" + } + }, + "650663daa6e24f3bbb580a50633d1c4f": { + "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_da917740702b4674937362eec6c363a2", + "placeholder": "​", + "style": "IPY_MODEL_0271616c24544084b9cd15005937bd1f", + "value": "README.md: 100%" + } + }, + "2ef61fc17de54f708b702b8d9633ba98": { + "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_76deb937a7874fe7b7f4e30cdcf17058", + "max": 10659, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_2a373c0130dc4b71a56346a5a0c51dcb", + "value": 10659 + } + }, + "f6a07670dde94fd89b782d624f3147e2": { + "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_572ec409149b40629f2ecf05377a7164", + "placeholder": "​", + "style": "IPY_MODEL_e14b87bfc58a4e1dac7901373b33ee97", + "value": " 10.7k/10.7k [00:00<00:00, 589kB/s]" + } + }, + "4b09e5a948bf4038b108cca562b3e06c": { + "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 + } + }, + "da917740702b4674937362eec6c363a2": { + "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 + } + }, + "0271616c24544084b9cd15005937bd1f": { + "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": "" + } + }, + "76deb937a7874fe7b7f4e30cdcf17058": { + "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 + } + }, + "2a373c0130dc4b71a56346a5a0c51dcb": { + "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": "" + } + }, + "572ec409149b40629f2ecf05377a7164": { + "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 + } + }, + "e14b87bfc58a4e1dac7901373b33ee97": { + "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": "" + } + }, + "7328592ec9b04f4d9f517cc0c1768edb": { + "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_9b4b771c7b3a44dcac3db49eb58161df", + "IPY_MODEL_902c0ccba0b54353a0c4a76af7eaae11", + "IPY_MODEL_79e761cddfa349958d18b9f2bfd2f2c4" + ], + "layout": "IPY_MODEL_fe116aef79374f70826464915dd4ac3f" + } + }, + "9b4b771c7b3a44dcac3db49eb58161df": { + "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_f7fd307d227c4599aab5664c3d124106", + "placeholder": "​", + "style": "IPY_MODEL_6b0a71886210454d99a202a441e3d96e", + "value": "sentence_bert_config.json: 100%" + } + }, + "902c0ccba0b54353a0c4a76af7eaae11": { + "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_447212d1fb464e96ba4f5a507f789915", + "max": 53, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_b28e821aa24446c58dad8fa982546a39", + "value": 53 + } + }, + "79e761cddfa349958d18b9f2bfd2f2c4": { + "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_c67531add7fc4b76a09632e00dc1282a", + "placeholder": "​", + "style": "IPY_MODEL_a73a685feab547c185049e78c38d6ef1", + "value": " 53.0/53.0 [00:00<00:00, 3.06kB/s]" + } + }, + "fe116aef79374f70826464915dd4ac3f": { + "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 + } + }, + "f7fd307d227c4599aab5664c3d124106": { + "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 + } + }, + "6b0a71886210454d99a202a441e3d96e": { + "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": "" + } + }, + "447212d1fb464e96ba4f5a507f789915": { + "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 + } + }, + "b28e821aa24446c58dad8fa982546a39": { + "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": "" + } + }, + "c67531add7fc4b76a09632e00dc1282a": { + "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 + } + }, + "a73a685feab547c185049e78c38d6ef1": { + "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": "" + } + }, + "8e86a0873c45441b93ccba90ab88128a": { + "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_da3c53f1e7394464a34aa88c0e18c76a", + "IPY_MODEL_1f1ec6c2fc634ea2b8898adde774b34d", + "IPY_MODEL_cfbf01c40aa4488fba44ef2f5d0f0cfa" + ], + "layout": "IPY_MODEL_2dbf7697ed434660b2a2ae9928c0083d" + } + }, + "da3c53f1e7394464a34aa88c0e18c76a": { + "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_4bd9b9eae6404bb1b83ee6ce8d8962c5", + "placeholder": "​", + "style": "IPY_MODEL_2160322acf134e80a14e08cb626fcdef", + "value": "config.json: 100%" + } + }, + "1f1ec6c2fc634ea2b8898adde774b34d": { + "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_68dd1ee738054f41a65c9c48bccc5bc9", + "max": 612, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_63f8d4f5c16a409fab37c5e200bc3aee", + "value": 612 + } + }, + "cfbf01c40aa4488fba44ef2f5d0f0cfa": { + "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_ebdaff7083d64f3da6b5dd5e0b34f940", + "placeholder": "​", + "style": "IPY_MODEL_061c957097c94d4eb9dd7b0455754045", + "value": " 612/612 [00:00<00:00, 35.2kB/s]" + } + }, + "2dbf7697ed434660b2a2ae9928c0083d": { + "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 + } + }, + "4bd9b9eae6404bb1b83ee6ce8d8962c5": { + "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 + } + }, + "2160322acf134e80a14e08cb626fcdef": { + "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": "" + } + }, + "68dd1ee738054f41a65c9c48bccc5bc9": { + "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 + } + }, + "63f8d4f5c16a409fab37c5e200bc3aee": { + "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": "" + } + }, + "ebdaff7083d64f3da6b5dd5e0b34f940": { + "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 + } + }, + "061c957097c94d4eb9dd7b0455754045": { + "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": "" + } + }, + "adb5f7de004c4f9c9352c9b802ec089b": { + "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_4bd869ad901943eab8efcb05f1084fc6", + "IPY_MODEL_f520c1ddbfd14df7830b66722a700f89", + "IPY_MODEL_896db0c2a5a044d6b4e0ee89e42c9ce0" + ], + "layout": "IPY_MODEL_017442fb05734e1a9bc079118951b4a9" + } + }, + "4bd869ad901943eab8efcb05f1084fc6": { + "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_b9def657d4544c92a919f458cf325e53", + "placeholder": "​", + "style": "IPY_MODEL_c49c8e522698470b9badeb12e80f0b32", + "value": "model.safetensors: 100%" + } + }, + "f520c1ddbfd14df7830b66722a700f89": { + "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_8cfc1824efe848a4b104aab400200c02", + "max": 90868376, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_46d6cc1965de4b4482c124a7e2c46bec", + "value": 90868376 + } + }, + "896db0c2a5a044d6b4e0ee89e42c9ce0": { + "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_6b46eddf09c4495b86ab3224eb41042c", + "placeholder": "​", + "style": "IPY_MODEL_d74baf94b40e49e9ba1e4c6ed184a784", + "value": " 90.9M/90.9M [00:00<00:00, 182MB/s]" + } + }, + "017442fb05734e1a9bc079118951b4a9": { + "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 + } + }, + "b9def657d4544c92a919f458cf325e53": { + "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 + } + }, + "c49c8e522698470b9badeb12e80f0b32": { + "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": "" + } + }, + "8cfc1824efe848a4b104aab400200c02": { + "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 + } + }, + "46d6cc1965de4b4482c124a7e2c46bec": { + "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": "" + } + }, + "6b46eddf09c4495b86ab3224eb41042c": { + "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 + } + }, + "d74baf94b40e49e9ba1e4c6ed184a784": { + "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": "" + } + }, + "a20f1cff605648749fa5a187a552d3e1": { + "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_391a33da4d034022b16dba7587eaa595", + "IPY_MODEL_a58ae7e3358746bc88fdc900137c7a4e", + "IPY_MODEL_6beebf1cf8c74c478a145de10f0385e1" + ], + "layout": "IPY_MODEL_bfc9e4172d4e47f68632e84b1b116bb6" + } + }, + "391a33da4d034022b16dba7587eaa595": { + "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_1840e33690b64a55bc8d26c7592b7b16", + "placeholder": "​", + "style": "IPY_MODEL_cac05e729d974c078d4dfe19608e0c19", + "value": "tokenizer_config.json: 100%" + } + }, + "a58ae7e3358746bc88fdc900137c7a4e": { + "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_d064cccf73254e30bca51905b12cead6", + "max": 350, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_d7b884b0c6cb4de39d8d2f26f07ea8da", + "value": 350 + } + }, + "6beebf1cf8c74c478a145de10f0385e1": { + "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_590624fab2a240299718c8d8c8994e8f", + "placeholder": "​", + "style": "IPY_MODEL_786387a302284a4ea8f9fe71d038b8a4", + "value": " 350/350 [00:00<00:00, 29.1kB/s]" + } + }, + "bfc9e4172d4e47f68632e84b1b116bb6": { + "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 + } + }, + "1840e33690b64a55bc8d26c7592b7b16": { + "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 + } + }, + "cac05e729d974c078d4dfe19608e0c19": { + "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": "" + } + }, + "d064cccf73254e30bca51905b12cead6": { + "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 + } + }, + "d7b884b0c6cb4de39d8d2f26f07ea8da": { + "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": "" + } + }, + "590624fab2a240299718c8d8c8994e8f": { + "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 + } + }, + "786387a302284a4ea8f9fe71d038b8a4": { + "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": "" + } + }, + "dfb1f8c983da424384400c6fe589ed8e": { + "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_b386af83ec6b419aaab27eba5d6e1263", + "IPY_MODEL_1c4e0226d0f64872962ec5f25877d7f9", + "IPY_MODEL_bba9c279a9b14bf19136f2bce8ca0bb3" + ], + "layout": "IPY_MODEL_a4dd0e2c45644110b5f1b15d16ff4775" + } + }, + "b386af83ec6b419aaab27eba5d6e1263": { + "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_1076f7220f6c4d519ad8ba0d27d7fa6c", + "placeholder": "​", + "style": "IPY_MODEL_da1bc2f490614952afa613e85a029812", + "value": "vocab.txt: 100%" + } + }, + "1c4e0226d0f64872962ec5f25877d7f9": { + "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_d93cc719b7684e7787299c4b37d223ca", + "max": 231508, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_af71a3b969664664aedcead7504899be", + "value": 231508 + } + }, + "bba9c279a9b14bf19136f2bce8ca0bb3": { + "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_c51d79c905b2423695781ac55e6e85c6", + "placeholder": "​", + "style": "IPY_MODEL_388d7db7adb342c1b6bce69accf2451e", + "value": " 232k/232k [00:00<00:00, 12.8MB/s]" + } + }, + "a4dd0e2c45644110b5f1b15d16ff4775": { + "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 + } + }, + "1076f7220f6c4d519ad8ba0d27d7fa6c": { + "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 + } + }, + "da1bc2f490614952afa613e85a029812": { + "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": "" + } + }, + "d93cc719b7684e7787299c4b37d223ca": { + "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 + } + }, + "af71a3b969664664aedcead7504899be": { + "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": "" + } + }, + "c51d79c905b2423695781ac55e6e85c6": { + "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 + } + }, + "388d7db7adb342c1b6bce69accf2451e": { + "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": "" + } + }, + "9037e953acf24bd3ab16e81c7468cb81": { + "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_5df6cb0605744c2595fa136d9fe2564e", + "IPY_MODEL_23cc45f87b9144f297bf8d501d748a23", + "IPY_MODEL_bf5a188c2be34b93846d4c576f07d128" + ], + "layout": "IPY_MODEL_59f17f0c5b2a4709bd4285d6fd9ee3f5" + } + }, + "5df6cb0605744c2595fa136d9fe2564e": { + "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_337210d366d2482985fb7774308c6f69", + "placeholder": "​", + "style": "IPY_MODEL_44cd3cf457b2471daced70654983333d", + "value": "tokenizer.json: 100%" + } + }, + "23cc45f87b9144f297bf8d501d748a23": { + "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_ff4a0009bb074b09a22320f259479c06", + "max": 466247, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_df671ec668134f39b11906b84ebcc835", + "value": 466247 + } + }, + "bf5a188c2be34b93846d4c576f07d128": { + "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_ca621434060c468a98020262ccb0ada7", + "placeholder": "​", + "style": "IPY_MODEL_e8db316073a242c58baf586fff2eea1e", + "value": " 466k/466k [00:00<00:00, 6.91MB/s]" + } + }, + "59f17f0c5b2a4709bd4285d6fd9ee3f5": { + "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 + } + }, + "337210d366d2482985fb7774308c6f69": { + "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 + } + }, + "44cd3cf457b2471daced70654983333d": { + "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": "" + } + }, + "ff4a0009bb074b09a22320f259479c06": { + "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 + } + }, + "df671ec668134f39b11906b84ebcc835": { + "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": "" + } + }, + "ca621434060c468a98020262ccb0ada7": { + "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 + } + }, + "e8db316073a242c58baf586fff2eea1e": { + "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": "" + } + }, + "38211e509711456994bd538df087dc59": { + "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_cc470721069f4f52a62c3d86f41a9420", + "IPY_MODEL_7a171baebb0b4fadbe1222523e079508", + "IPY_MODEL_f63d03efea40438c8c5669153523eb3b" + ], + "layout": "IPY_MODEL_94c7eac27f2c42e08106011e8275956e" + } + }, + "cc470721069f4f52a62c3d86f41a9420": { + "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_7137d61ae4aa41a19535fb088e1d4223", + "placeholder": "​", + "style": "IPY_MODEL_171ccb07570b4c6186b357cf4cf463c0", + "value": "special_tokens_map.json: 100%" + } + }, + "7a171baebb0b4fadbe1222523e079508": { + "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_4504401dbf9e4a868712ff7e1e3555a7", + "max": 112, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c81bf0877fcf43648ae15dbfc8f44048", + "value": 112 + } + }, + "f63d03efea40438c8c5669153523eb3b": { + "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_16fb7bdb14b74f4ebc7cff04c8ae5a2e", + "placeholder": "​", + "style": "IPY_MODEL_202181e6b84e437fbf813d8673b799c9", + "value": " 112/112 [00:00<00:00, 6.94kB/s]" + } + }, + "94c7eac27f2c42e08106011e8275956e": { + "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 + } + }, + "7137d61ae4aa41a19535fb088e1d4223": { + "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 + } + }, + "171ccb07570b4c6186b357cf4cf463c0": { + "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": "" + } + }, + "4504401dbf9e4a868712ff7e1e3555a7": { + "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 + } + }, + "c81bf0877fcf43648ae15dbfc8f44048": { + "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": "" + } + }, + "16fb7bdb14b74f4ebc7cff04c8ae5a2e": { + "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 + } + }, + "202181e6b84e437fbf813d8673b799c9": { + "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": "" + } + }, + "88789f04fa274a8e95b4af6864a465c0": { + "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_0952e37319004bec830a86190b9b9020", + "IPY_MODEL_6d2ac22a299c46c3a941b9e91abeb88e", + "IPY_MODEL_4ddf4b8b41004f19ba06e99e64efff26" + ], + "layout": "IPY_MODEL_c3fac914fa224e46af7e27e471dbe32b" + } + }, + "0952e37319004bec830a86190b9b9020": { + "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_889f3a5a3283449ebeaa9c28ad95ae30", + "placeholder": "​", + "style": "IPY_MODEL_d83fe6ca55464b3abd34691f601ee836", + "value": "1_Pooling%2Fconfig.json: 100%" + } + }, + "6d2ac22a299c46c3a941b9e91abeb88e": { + "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_22e83c6ad646445783d8dea3136add1c", + "max": 190, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_249a036c5ee147948b5c2f4b5b9bc726", + "value": 190 + } + }, + "4ddf4b8b41004f19ba06e99e64efff26": { + "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_81dd63a35f414f229fb36856d4ec0376", + "placeholder": "​", + "style": "IPY_MODEL_17c8334053a243deaf73246837594932", + "value": " 190/190 [00:00<00:00, 12.8kB/s]" + } + }, + "c3fac914fa224e46af7e27e471dbe32b": { + "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 + } + }, + "889f3a5a3283449ebeaa9c28ad95ae30": { + "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 + } + }, + "d83fe6ca55464b3abd34691f601ee836": { + "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": "" + } + }, + "22e83c6ad646445783d8dea3136add1c": { + "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 + } + }, + "249a036c5ee147948b5c2f4b5b9bc726": { + "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": "" + } + }, + "81dd63a35f414f229fb36856d4ec0376": { + "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 + } + }, + "17c8334053a243deaf73246837594932": { + "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": [ + "#**GCP Setup**" + ], + "metadata": { + "id": "TgZHoP4OKrM1" + } + }, + { + "cell_type": "code", + "source": [], + "metadata": { + "id": "QOzI7TTrKqgX" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "#**Setup**" + ], + "metadata": { + "id": "KgKm8kckFuSh" + } + }, + { + "cell_type": "markdown", + "source": [ + "##**Requirements**" + ], + "metadata": { + "id": "pr0iR7O4LHmR" + } + }, + { + "cell_type": "markdown", + "source": [ + "##**Packages**" + ], + "metadata": { + "id": "KWoLMVqb2KIH" + } + }, + { + "cell_type": "code", + "source": [ + "!pip install langchain langchain-community langchain_huggingface langchain-pinecone langchain_openai pypdf pinecone" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "collapsed": true, + "id": "Xo0DMW4pK5IW", + "outputId": "26ebcaf8-a04a-4614-9ea5-9bb75601aba3" + }, + "execution_count": 1, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Requirement already satisfied: langchain in /usr/local/lib/python3.11/dist-packages (0.3.19)\n", + "Collecting langchain-community\n", + " Downloading langchain_community-0.3.18-py3-none-any.whl.metadata (2.4 kB)\n", + "Collecting langchain_huggingface\n", + " Downloading langchain_huggingface-0.1.2-py3-none-any.whl.metadata (1.3 kB)\n", + "Collecting langchain-pinecone\n", + " Downloading langchain_pinecone-0.2.3-py3-none-any.whl.metadata (1.3 kB)\n", + "Collecting langchain_openai\n", + " Downloading langchain_openai-0.3.7-py3-none-any.whl.metadata (2.3 kB)\n", + "Collecting pypdf\n", + " Downloading pypdf-5.3.1-py3-none-any.whl.metadata (7.3 kB)\n", + "Collecting pinecone\n", + " Downloading pinecone-6.0.1-py3-none-any.whl.metadata (8.8 kB)\n", + "Requirement already satisfied: langchain-core<1.0.0,>=0.3.35 in /usr/local/lib/python3.11/dist-packages (from langchain) (0.3.40)\n", + "Requirement already satisfied: langchain-text-splitters<1.0.0,>=0.3.6 in /usr/local/lib/python3.11/dist-packages (from langchain) (0.3.6)\n", + "Requirement already satisfied: langsmith<0.4,>=0.1.17 in /usr/local/lib/python3.11/dist-packages (from langchain) (0.3.11)\n", + "Requirement already satisfied: pydantic<3.0.0,>=2.7.4 in /usr/local/lib/python3.11/dist-packages (from langchain) (2.10.6)\n", + "Requirement already satisfied: SQLAlchemy<3,>=1.4 in /usr/local/lib/python3.11/dist-packages (from langchain) (2.0.38)\n", + "Requirement already satisfied: requests<3,>=2 in /usr/local/lib/python3.11/dist-packages (from langchain) (2.32.3)\n", + "Requirement already satisfied: PyYAML>=5.3 in /usr/local/lib/python3.11/dist-packages (from langchain) (6.0.2)\n", + "Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in /usr/local/lib/python3.11/dist-packages (from langchain) (3.11.13)\n", + "Requirement already satisfied: tenacity!=8.4.0,<10,>=8.1.0 in /usr/local/lib/python3.11/dist-packages (from langchain) (9.0.0)\n", + "Requirement already satisfied: numpy<2,>=1.26.4 in /usr/local/lib/python3.11/dist-packages (from langchain) (1.26.4)\n", + "Collecting dataclasses-json<0.7,>=0.5.7 (from langchain-community)\n", + " Downloading dataclasses_json-0.6.7-py3-none-any.whl.metadata (25 kB)\n", + "Collecting pydantic-settings<3.0.0,>=2.4.0 (from langchain-community)\n", + " Downloading pydantic_settings-2.8.1-py3-none-any.whl.metadata (3.5 kB)\n", + "Collecting httpx-sse<1.0.0,>=0.4.0 (from langchain-community)\n", + " Downloading httpx_sse-0.4.0-py3-none-any.whl.metadata (9.0 kB)\n", + "Requirement already satisfied: huggingface-hub>=0.23.0 in /usr/local/lib/python3.11/dist-packages (from langchain_huggingface) (0.28.1)\n", + "Requirement already satisfied: sentence-transformers>=2.6.0 in /usr/local/lib/python3.11/dist-packages (from langchain_huggingface) (3.4.1)\n", + "Requirement already satisfied: tokenizers>=0.19.1 in /usr/local/lib/python3.11/dist-packages (from langchain_huggingface) (0.21.0)\n", + "Requirement already satisfied: transformers>=4.39.0 in /usr/local/lib/python3.11/dist-packages (from langchain_huggingface) (4.48.3)\n", + "Collecting pinecone\n", + " Downloading pinecone-5.4.2-py3-none-any.whl.metadata (19 kB)\n", + "Collecting aiohttp<4.0.0,>=3.8.3 (from langchain)\n", + " Downloading aiohttp-3.10.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.7 kB)\n", + "Collecting langchain-tests<1.0.0,>=0.3.7 (from langchain-pinecone)\n", + " Downloading langchain_tests-0.3.12-py3-none-any.whl.metadata (3.2 kB)\n", + "Requirement already satisfied: openai<2.0.0,>=1.58.1 in /usr/local/lib/python3.11/dist-packages (from langchain_openai) (1.61.1)\n", + "Collecting tiktoken<1,>=0.7 (from langchain_openai)\n", + " Downloading tiktoken-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.7 kB)\n", + "Requirement already satisfied: certifi>=2019.11.17 in /usr/local/lib/python3.11/dist-packages (from pinecone) (2025.1.31)\n", + "Collecting pinecone-plugin-inference<4.0.0,>=2.0.0 (from pinecone)\n", + " Downloading pinecone_plugin_inference-3.1.0-py3-none-any.whl.metadata (2.2 kB)\n", + "Collecting pinecone-plugin-interface<0.0.8,>=0.0.7 (from pinecone)\n", + " Downloading pinecone_plugin_interface-0.0.7-py3-none-any.whl.metadata (1.2 kB)\n", + "Requirement already satisfied: python-dateutil>=2.5.3 in /usr/local/lib/python3.11/dist-packages (from pinecone) (2.8.2)\n", + "Requirement already satisfied: tqdm>=4.64.1 in /usr/local/lib/python3.11/dist-packages (from pinecone) (4.67.1)\n", + "Requirement already satisfied: typing-extensions>=3.7.4 in /usr/local/lib/python3.11/dist-packages (from pinecone) (4.12.2)\n", + "Requirement already satisfied: urllib3>=1.26.0 in /usr/local/lib/python3.11/dist-packages (from pinecone) (2.3.0)\n", + "Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (2.4.6)\n", + "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.3.2)\n", + "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (25.1.0)\n", + "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.5.0)\n", + "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (6.1.0)\n", + "Requirement already satisfied: yarl<2.0,>=1.12.0 in /usr/local/lib/python3.11/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.18.3)\n", + "Collecting marshmallow<4.0.0,>=3.18.0 (from dataclasses-json<0.7,>=0.5.7->langchain-community)\n", + " Downloading marshmallow-3.26.1-py3-none-any.whl.metadata (7.3 kB)\n", + "Collecting typing-inspect<1,>=0.4.0 (from dataclasses-json<0.7,>=0.5.7->langchain-community)\n", + " Downloading typing_inspect-0.9.0-py3-none-any.whl.metadata (1.5 kB)\n", + "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.23.0->langchain_huggingface) (3.17.0)\n", + "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.23.0->langchain_huggingface) (2024.10.0)\n", + "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub>=0.23.0->langchain_huggingface) (24.2)\n", + "Requirement already satisfied: jsonpatch<2.0,>=1.33 in /usr/local/lib/python3.11/dist-packages (from langchain-core<1.0.0,>=0.3.35->langchain) (1.33)\n", + "Requirement already satisfied: pytest<9,>=7 in /usr/local/lib/python3.11/dist-packages (from langchain-tests<1.0.0,>=0.3.7->langchain-pinecone) (8.3.4)\n", + "Collecting pytest-asyncio<1,>=0.20 (from langchain-tests<1.0.0,>=0.3.7->langchain-pinecone)\n", + " Downloading pytest_asyncio-0.25.3-py3-none-any.whl.metadata (3.9 kB)\n", + "Requirement already satisfied: httpx<1,>=0.25.0 in /usr/local/lib/python3.11/dist-packages (from langchain-tests<1.0.0,>=0.3.7->langchain-pinecone) (0.28.1)\n", + "Collecting syrupy<5,>=4 (from langchain-tests<1.0.0,>=0.3.7->langchain-pinecone)\n", + " Downloading syrupy-4.8.2-py3-none-any.whl.metadata (36 kB)\n", + "Collecting pytest-socket<1,>=0.6.0 (from langchain-tests<1.0.0,>=0.3.7->langchain-pinecone)\n", + " Downloading pytest_socket-0.7.0-py3-none-any.whl.metadata (6.7 kB)\n", + "Requirement already satisfied: orjson<4.0.0,>=3.9.14 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.17->langchain) (3.10.15)\n", + "Requirement already satisfied: requests-toolbelt<2.0.0,>=1.0.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.17->langchain) (1.0.0)\n", + "Requirement already satisfied: zstandard<0.24.0,>=0.23.0 in /usr/local/lib/python3.11/dist-packages (from langsmith<0.4,>=0.1.17->langchain) (0.23.0)\n", + "Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.11/dist-packages (from openai<2.0.0,>=1.58.1->langchain_openai) (3.7.1)\n", + "Requirement already satisfied: distro<2,>=1.7.0 in /usr/local/lib/python3.11/dist-packages (from openai<2.0.0,>=1.58.1->langchain_openai) (1.9.0)\n", + "Requirement already satisfied: jiter<1,>=0.4.0 in /usr/local/lib/python3.11/dist-packages (from openai<2.0.0,>=1.58.1->langchain_openai) (0.8.2)\n", + "Requirement already satisfied: sniffio in /usr/local/lib/python3.11/dist-packages (from openai<2.0.0,>=1.58.1->langchain_openai) (1.3.1)\n", + "Requirement already satisfied: annotated-types>=0.6.0 in /usr/local/lib/python3.11/dist-packages (from pydantic<3.0.0,>=2.7.4->langchain) (0.7.0)\n", + "Requirement already satisfied: pydantic-core==2.27.2 in /usr/local/lib/python3.11/dist-packages (from pydantic<3.0.0,>=2.7.4->langchain) (2.27.2)\n", + "Collecting python-dotenv>=0.21.0 (from pydantic-settings<3.0.0,>=2.4.0->langchain-community)\n", + " Downloading python_dotenv-1.0.1-py3-none-any.whl.metadata (23 kB)\n", + "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.11/dist-packages (from python-dateutil>=2.5.3->pinecone) (1.17.0)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain) (3.4.1)\n", + "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests<3,>=2->langchain) (3.10)\n", + "Requirement already satisfied: torch>=1.11.0 in /usr/local/lib/python3.11/dist-packages (from sentence-transformers>=2.6.0->langchain_huggingface) (2.5.1+cu124)\n", + "Requirement already satisfied: scikit-learn in /usr/local/lib/python3.11/dist-packages (from sentence-transformers>=2.6.0->langchain_huggingface) (1.6.1)\n", + "Requirement already satisfied: scipy in /usr/local/lib/python3.11/dist-packages (from sentence-transformers>=2.6.0->langchain_huggingface) (1.13.1)\n", + "Requirement already satisfied: Pillow in /usr/local/lib/python3.11/dist-packages (from sentence-transformers>=2.6.0->langchain_huggingface) (11.1.0)\n", + "Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.11/dist-packages (from SQLAlchemy<3,>=1.4->langchain) (3.1.1)\n", + "Requirement already satisfied: regex>=2022.1.18 in /usr/local/lib/python3.11/dist-packages (from tiktoken<1,>=0.7->langchain_openai) (2024.11.6)\n", + "Requirement already satisfied: safetensors>=0.4.1 in /usr/local/lib/python3.11/dist-packages (from transformers>=4.39.0->langchain_huggingface) (0.5.3)\n", + "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.11/dist-packages (from httpx<1,>=0.25.0->langchain-tests<1.0.0,>=0.3.7->langchain-pinecone) (1.0.7)\n", + "Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.11/dist-packages (from httpcore==1.*->httpx<1,>=0.25.0->langchain-tests<1.0.0,>=0.3.7->langchain-pinecone) (0.14.0)\n", + "Requirement already satisfied: jsonpointer>=1.9 in /usr/local/lib/python3.11/dist-packages (from jsonpatch<2.0,>=1.33->langchain-core<1.0.0,>=0.3.35->langchain) (3.0.0)\n", + "Requirement already satisfied: iniconfig in /usr/local/lib/python3.11/dist-packages (from pytest<9,>=7->langchain-tests<1.0.0,>=0.3.7->langchain-pinecone) (2.0.0)\n", + "Requirement already satisfied: pluggy<2,>=1.5 in /usr/local/lib/python3.11/dist-packages (from pytest<9,>=7->langchain-tests<1.0.0,>=0.3.7->langchain-pinecone) (1.5.0)\n", + "Requirement already satisfied: networkx in /usr/local/lib/python3.11/dist-packages (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface) (3.4.2)\n", + "Requirement already satisfied: jinja2 in /usr/local/lib/python3.11/dist-packages (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface) (3.1.5)\n", + "Collecting nvidia-cuda-nvrtc-cu12==12.4.127 (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface)\n", + " Downloading nvidia_cuda_nvrtc_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-cuda-runtime-cu12==12.4.127 (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface)\n", + " Downloading nvidia_cuda_runtime_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-cuda-cupti-cu12==12.4.127 (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface)\n", + " Downloading nvidia_cuda_cupti_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cudnn-cu12==9.1.0.70 (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface)\n", + " Downloading nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cublas-cu12==12.4.5.8 (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface)\n", + " Downloading nvidia_cublas_cu12-12.4.5.8-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-cufft-cu12==11.2.1.3 (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface)\n", + " Downloading nvidia_cufft_cu12-11.2.1.3-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-curand-cu12==10.3.5.147 (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface)\n", + " Downloading nvidia_curand_cu12-10.3.5.147-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-cusolver-cu12==11.6.1.9 (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface)\n", + " Downloading nvidia_cusolver_cu12-11.6.1.9-py3-none-manylinux2014_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cusparse-cu12==12.3.1.170 (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface)\n", + " Downloading nvidia_cusparse_cu12-12.3.1.170-py3-none-manylinux2014_x86_64.whl.metadata (1.6 kB)\n", + "Requirement already satisfied: nvidia-nccl-cu12==2.21.5 in /usr/local/lib/python3.11/dist-packages (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface) (2.21.5)\n", + "Requirement already satisfied: nvidia-nvtx-cu12==12.4.127 in /usr/local/lib/python3.11/dist-packages (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface) (12.4.127)\n", + "Collecting nvidia-nvjitlink-cu12==12.4.127 (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface)\n", + " Downloading nvidia_nvjitlink_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Requirement already satisfied: triton==3.1.0 in /usr/local/lib/python3.11/dist-packages (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface) (3.1.0)\n", + "Requirement already satisfied: sympy==1.13.1 in /usr/local/lib/python3.11/dist-packages (from torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface) (1.13.1)\n", + "Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.11/dist-packages (from sympy==1.13.1->torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface) (1.3.0)\n", + "Collecting mypy-extensions>=0.3.0 (from typing-inspect<1,>=0.4.0->dataclasses-json<0.7,>=0.5.7->langchain-community)\n", + " Downloading mypy_extensions-1.0.0-py3-none-any.whl.metadata (1.1 kB)\n", + "Requirement already satisfied: propcache>=0.2.0 in /usr/local/lib/python3.11/dist-packages (from yarl<2.0,>=1.12.0->aiohttp<4.0.0,>=3.8.3->langchain) (0.3.0)\n", + "Requirement already satisfied: joblib>=1.2.0 in /usr/local/lib/python3.11/dist-packages (from scikit-learn->sentence-transformers>=2.6.0->langchain_huggingface) (1.4.2)\n", + "Requirement already satisfied: threadpoolctl>=3.1.0 in /usr/local/lib/python3.11/dist-packages (from scikit-learn->sentence-transformers>=2.6.0->langchain_huggingface) (3.5.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.11/dist-packages (from jinja2->torch>=1.11.0->sentence-transformers>=2.6.0->langchain_huggingface) (3.0.2)\n", + "Downloading langchain_community-0.3.18-py3-none-any.whl (2.5 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.5/2.5 MB\u001b[0m \u001b[31m21.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading langchain_huggingface-0.1.2-py3-none-any.whl (21 kB)\n", + "Downloading langchain_pinecone-0.2.3-py3-none-any.whl (11 kB)\n", + "Downloading langchain_openai-0.3.7-py3-none-any.whl (55 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m55.3/55.3 kB\u001b[0m \u001b[31m1.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading pypdf-5.3.1-py3-none-any.whl (302 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m302.0/302.0 kB\u001b[0m \u001b[31m13.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading pinecone-5.4.2-py3-none-any.whl (427 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m427.3/427.3 kB\u001b[0m \u001b[31m6.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading aiohttp-3.10.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m23.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading dataclasses_json-0.6.7-py3-none-any.whl (28 kB)\n", + "Downloading httpx_sse-0.4.0-py3-none-any.whl (7.8 kB)\n", + "Downloading langchain_tests-0.3.12-py3-none-any.whl (37 kB)\n", + "Downloading pinecone_plugin_inference-3.1.0-py3-none-any.whl (87 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m87.5/87.5 kB\u001b[0m \u001b[31m5.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading pinecone_plugin_interface-0.0.7-py3-none-any.whl (6.2 kB)\n", + "Downloading pydantic_settings-2.8.1-py3-none-any.whl (30 kB)\n", + "Downloading tiktoken-0.9.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m24.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading marshmallow-3.26.1-py3-none-any.whl (50 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.9/50.9 kB\u001b[0m \u001b[31m2.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading pytest_asyncio-0.25.3-py3-none-any.whl (19 kB)\n", + "Downloading pytest_socket-0.7.0-py3-none-any.whl (6.8 kB)\n", + "Downloading python_dotenv-1.0.1-py3-none-any.whl (19 kB)\n", + "Downloading syrupy-4.8.2-py3-none-any.whl (50 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m50.5/50.5 kB\u001b[0m \u001b[31m3.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cublas_cu12-12.4.5.8-py3-none-manylinux2014_x86_64.whl (363.4 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m363.4/363.4 MB\u001b[0m \u001b[31m3.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cuda_cupti_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl (13.8 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━��━━━━━━━━━━━━━\u001b[0m \u001b[32m13.8/13.8 MB\u001b[0m \u001b[31m76.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cuda_nvrtc_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl (24.6 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m24.6/24.6 MB\u001b[0m \u001b[31m65.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cuda_runtime_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl (883 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m883.7/883.7 kB\u001b[0m \u001b[31m35.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl (664.8 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m664.8/664.8 MB\u001b[0m \u001b[31m2.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cufft_cu12-11.2.1.3-py3-none-manylinux2014_x86_64.whl (211.5 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m211.5/211.5 MB\u001b[0m \u001b[31m6.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_curand_cu12-10.3.5.147-py3-none-manylinux2014_x86_64.whl (56.3 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.3/56.3 MB\u001b[0m \u001b[31m12.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cusolver_cu12-11.6.1.9-py3-none-manylinux2014_x86_64.whl (127.9 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m127.9/127.9 MB\u001b[0m \u001b[31m7.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cusparse_cu12-12.3.1.170-py3-none-manylinux2014_x86_64.whl (207.5 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m207.5/207.5 MB\u001b[0m \u001b[31m5.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_nvjitlink_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl (21.1 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.1/21.1 MB\u001b[0m \u001b[31m77.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)\n", + "Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)\n", + "Installing collected packages: python-dotenv, pypdf, pinecone-plugin-interface, nvidia-nvjitlink-cu12, nvidia-curand-cu12, nvidia-cufft-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, nvidia-cublas-cu12, mypy-extensions, marshmallow, httpx-sse, typing-inspect, tiktoken, syrupy, pytest-socket, pytest-asyncio, pinecone-plugin-inference, nvidia-cusparse-cu12, nvidia-cudnn-cu12, aiohttp, pydantic-settings, pinecone, nvidia-cusolver-cu12, dataclasses-json, langchain-tests, langchain_openai, langchain-pinecone, langchain_huggingface, langchain-community\n", + " Attempting uninstall: nvidia-nvjitlink-cu12\n", + " Found existing installation: nvidia-nvjitlink-cu12 12.5.82\n", + " Uninstalling nvidia-nvjitlink-cu12-12.5.82:\n", + " Successfully uninstalled nvidia-nvjitlink-cu12-12.5.82\n", + " Attempting uninstall: nvidia-curand-cu12\n", + " Found existing installation: nvidia-curand-cu12 10.3.6.82\n", + " Uninstalling nvidia-curand-cu12-10.3.6.82:\n", + " Successfully uninstalled nvidia-curand-cu12-10.3.6.82\n", + " Attempting uninstall: nvidia-cufft-cu12\n", + " Found existing installation: nvidia-cufft-cu12 11.2.3.61\n", + " Uninstalling nvidia-cufft-cu12-11.2.3.61:\n", + " Successfully uninstalled nvidia-cufft-cu12-11.2.3.61\n", + " Attempting uninstall: nvidia-cuda-runtime-cu12\n", + " Found existing installation: nvidia-cuda-runtime-cu12 12.5.82\n", + " Uninstalling nvidia-cuda-runtime-cu12-12.5.82:\n", + " Successfully uninstalled nvidia-cuda-runtime-cu12-12.5.82\n", + " Attempting uninstall: nvidia-cuda-nvrtc-cu12\n", + " Found existing installation: nvidia-cuda-nvrtc-cu12 12.5.82\n", + " Uninstalling nvidia-cuda-nvrtc-cu12-12.5.82:\n", + " Successfully uninstalled nvidia-cuda-nvrtc-cu12-12.5.82\n", + " Attempting uninstall: nvidia-cuda-cupti-cu12\n", + " Found existing installation: nvidia-cuda-cupti-cu12 12.5.82\n", + " Uninstalling nvidia-cuda-cupti-cu12-12.5.82:\n", + " Successfully uninstalled nvidia-cuda-cupti-cu12-12.5.82\n", + " Attempting uninstall: nvidia-cublas-cu12\n", + " Found existing installation: nvidia-cublas-cu12 12.5.3.2\n", + " Uninstalling nvidia-cublas-cu12-12.5.3.2:\n", + " Successfully uninstalled nvidia-cublas-cu12-12.5.3.2\n", + " Attempting uninstall: nvidia-cusparse-cu12\n", + " Found existing installation: nvidia-cusparse-cu12 12.5.1.3\n", + " Uninstalling nvidia-cusparse-cu12-12.5.1.3:\n", + " Successfully uninstalled nvidia-cusparse-cu12-12.5.1.3\n", + " Attempting uninstall: nvidia-cudnn-cu12\n", + " Found existing installation: nvidia-cudnn-cu12 9.3.0.75\n", + " Uninstalling nvidia-cudnn-cu12-9.3.0.75:\n", + " Successfully uninstalled nvidia-cudnn-cu12-9.3.0.75\n", + " Attempting uninstall: aiohttp\n", + " Found existing installation: aiohttp 3.11.13\n", + " Uninstalling aiohttp-3.11.13:\n", + " Successfully uninstalled aiohttp-3.11.13\n", + " Attempting uninstall: nvidia-cusolver-cu12\n", + " Found existing installation: nvidia-cusolver-cu12 11.6.3.83\n", + " Uninstalling nvidia-cusolver-cu12-11.6.3.83:\n", + " Successfully uninstalled nvidia-cusolver-cu12-11.6.3.83\n", + "Successfully installed aiohttp-3.10.11 dataclasses-json-0.6.7 httpx-sse-0.4.0 langchain-community-0.3.18 langchain-pinecone-0.2.3 langchain-tests-0.3.12 langchain_huggingface-0.1.2 langchain_openai-0.3.7 marshmallow-3.26.1 mypy-extensions-1.0.0 nvidia-cublas-cu12-12.4.5.8 nvidia-cuda-cupti-cu12-12.4.127 nvidia-cuda-nvrtc-cu12-12.4.127 nvidia-cuda-runtime-cu12-12.4.127 nvidia-cudnn-cu12-9.1.0.70 nvidia-cufft-cu12-11.2.1.3 nvidia-curand-cu12-10.3.5.147 nvidia-cusolver-cu12-11.6.1.9 nvidia-cusparse-cu12-12.3.1.170 nvidia-nvjitlink-cu12-12.4.127 pinecone-5.4.2 pinecone-plugin-inference-3.1.0 pinecone-plugin-interface-0.0.7 pydantic-settings-2.8.1 pypdf-5.3.1 pytest-asyncio-0.25.3 pytest-socket-0.7.0 python-dotenv-1.0.1 syrupy-4.8.2 tiktoken-0.9.0 typing-inspect-0.9.0\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##**Env Variables**" + ], + "metadata": { + "id": "uR_f4zR2LdMb" + } + }, + { + "cell_type": "code", + "source": [ + "from google.colab import userdata\n", + "# GOOGLE_APPLICATION_CREDENTIALS = userdata.get('GOOGLE_APPLICATION_CREDENTIALS') # need to talk with Rafay about this\n", + "OPENAI_API_KEY = userdata.get('OPENAI_API_KEY')\n", + "PINECONE_API_KEY = userdata.get('PINECONE_API_KEY')" + ], + "metadata": { + "id": "mkjOc3yRFt1c" + }, + "execution_count": 2, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "#**Ingestion**" + ], + "metadata": { + "id": "-NczDh0-Lima" + } + }, + { + "cell_type": "markdown", + "source": [ + "## **Document loading**" + ], + "metadata": { + "id": "xZywIvc8NTKv" + } + }, + { + "cell_type": "code", + "source": [ + "from langchain_community.document_loaders import TextLoader, PyPDFLoader, DirectoryLoader\n", + "from langchain.text_splitter import RecursiveCharacterTextSplitter" + ], + "metadata": { + "id": "RA6cVNj0i7sU" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "#Extract Data From the PDF File\n", + "def load_pdf_file(data):\n", + " loader= DirectoryLoader(data,\n", + " glob=\"*.pdf\",\n", + " loader_cls=PyPDFLoader)\n", + "\n", + " documents=loader.load()\n", + "\n", + " return documents\n" + ], + "metadata": { + "id": "-j5BuhPNFt43" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "extracted_data=load_pdf_file(data='/content/Data')" + ], + "metadata": { + "id": "4XmX9K-1KpIx" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "extracted_data[0].page_content" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 140 + }, + "id": "er8nkiQ9OsSU", + "outputId": "afc9e08a-b90f-4c99-96f2-6a7fcb4d91a0" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "'YOLOv9: Learning What You Want to Learn\\nUsing Programmable Gradient Information\\nChien-Yao Wang1,2, I-Hau Yeh2, and Hong-Yuan Mark Liao1,2,3\\n1Institute of Information Science, Academia Sinica, Taiwan\\n2National Taipei University of Technology, Taiwan\\n3Department of Information and Computer Engineering, Chung Yuan Christian University, Taiwan\\nkinyiu@iis.sinica.edu.tw, ihyeh@emc.com.tw, and liao@iis.sinica.edu.tw\\nAbstract\\nToday’s deep learning methods focus on how to design\\nthe most appropriate objective functions so that the pre-\\ndiction results of the model can be closest to the ground\\ntruth. Meanwhile, an appropriate architecture that can\\nfacilitate acquisition of enough information for prediction\\nhas to be designed. Existing methods ignore a fact that\\nwhen input data undergoes layer-by-layer feature extrac-\\ntion and spatial transformation, large amount of informa-\\ntion will be lost. This paper will delve into the important is-\\nsues of data loss when data is transmitted through deep net-\\nworks, namely information bottleneck and reversible func-\\ntions. We proposed the concept of programmable gradi-\\nent information (PGI) to cope with the various changes\\nrequired by deep networks to achieve multiple objectives.\\nPGI can provide complete input information for the tar-\\nget task to calculate objective function, so that reliable\\ngradient information can be obtained to update network\\nweights. In addition, a new lightweight network architec-\\nture – Generalized Efficient Layer Aggregation Network\\n(GELAN), based on gradient path planning is designed.\\nGELAN’s architecture confirms that PGI has gained su-\\nperior results on lightweight models. We verified the pro-\\nposed GELAN and PGI on MS COCO dataset based ob-\\nject detection. The results show that GELAN only uses\\nconventional convolution operators to achieve better pa-\\nrameter utilization than the state-of-the-art methods devel-\\noped based on depth-wise convolution. PGI can be used\\nfor variety of models from lightweight to large. It can be\\nused to obtain complete information, so that train-from-\\nscratch models can achieve better results than state-of-the-\\nart models pre-trained using large datasets, the compari-\\nson results are shown in Figure 1. The source codes are at:\\nhttps://github.com/WongKinYiu/yolov9.\\n1. Introduction\\nDeep learning-based models have demonstrated far bet-\\nter performance than past artificial intelligence systems in\\nvarious fields, such as computer vision, language process-\\ning, and speech recognition. In recent years, researchers\\nFigure 1. Comparisons of the real-time object detecors on MS\\nCOCO dataset. The GELAN and PGI-based object detection\\nmethod surpassed all previous train-from-scratch methods in terms\\nof object detection performance. In terms of accuracy, the new\\nmethod outperforms RT DETR [43] pre-trained with a large\\ndataset, and it also outperforms depth-wise convolution-based de-\\nsign YOLO MS [7] in terms of parameters utilization.\\nin the field of deep learning have mainly focused on how\\nto develop more powerful system architectures and learn-\\ning methods, such as CNNs [21–23, 42, 55, 71, 72], Trans-\\nformers [8, 9, 40, 41, 60, 69, 70], Perceivers [26, 26, 32, 52,\\n56, 81, 81], and Mambas [17, 38, 80]. In addition, some\\nresearchers have tried to develop more general objective\\nfunctions, such as loss function [5, 45, 46, 50, 77, 78], la-\\nbel assignment [10, 12, 33, 67, 79] and auxiliary supervi-\\nsion [18, 20, 24, 28, 29, 51, 54, 68, 76]. The above studies\\nall try to precisely find the mapping between input and tar-\\nget tasks. However, most past approaches have ignored that\\ninput data may have a non-negligible amount of informa-\\ntion loss during the feedforward process. This loss of in-\\nformation can lead to biased gradient flows, which are sub-\\nsequently used to update the model. The above problems\\ncan result in deep networks to establish incorrect associa-\\ntions between targets and inputs, causing the trained model\\nto produce incorrect predictions.\\n1\\narXiv:2402.13616v2 [cs.CV] 29 Feb 2024'" + ], + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "string" + } + }, + "metadata": {}, + "execution_count": 10 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##**Splitting into chunks**" + ], + "metadata": { + "id": "JQKSXDuHLpeA" + } + }, + { + "cell_type": "code", + "source": [ + "#Split the Data into Text Chunks\n", + "def text_split(extracted_data):\n", + " text_splitter=RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=100)\n", + " text_chunks=text_splitter.split_documents(extracted_data)\n", + " return text_chunks" + ], + "metadata": { + "id": "GztOY7zpFtyI" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "text_chunks=text_split(extracted_data)\n", + "print(\"Length of Text Chunks\", len(text_chunks))" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "lsNUiXHaFtt2", + "outputId": "0828967e-e0b3-4711-a5e3-8c9362ae6588" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Length of Text Chunks 91\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##**Embeddings**" + ], + "metadata": { + "id": "ScyyYHymMCv4" + } + }, + { + "cell_type": "code", + "source": [ + "from langchain_huggingface import HuggingFaceEmbeddings\n", + "\n", + "#Download the Embeddings from Hugging Face\n", + "def download_hugging_face_embeddings():\n", + " embeddings=HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2')\n", + " return embeddings" + ], + "metadata": { + "id": "Ja3Th0wPO3bQ" + }, + "execution_count": 3, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "embeddings = download_hugging_face_embeddings()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 493, + "referenced_widgets": [ + "25276249349a4775a0c3abe385a57425", + "3d8799ccc8bd4402bbacf03217c332a1", + "67230cef27d34e179ff1b3103f0e5f77", + "0e372e1ba7d943c09d9ba7073110c0d8", + "a31f4252ac5a4072b0441b4e9ea289ce", + "7cd93466149242d49fe3e520faf16169", + "f1bd781fb20e4814b58a287458c87520", + "6c9f27ee06e943b2a4d83fded2c09ca8", + "b353aa48f12e48c6b8e0d03897f8910e", + "67f29f27191c4d368b6963c835e7e6bb", + "4d5a16b3c82c452a8876bbeb31c5d6b0", + "0f6e5e613a904e62b33ab860ab1acfb0", + "5f7769698fa04bc4abfca4e246480fd3", + "a0f1bf790bf44f42939ccbc9d35922df", + "c7aa31788c154080aededf88d32cebe1", + "00fe5b81d2c743b0afb278d4fb1c9ccd", + "8217fb586b51466f9d469078fef6b53a", + "6578ce7377934841971ac8bbec916401", + "c70314795ede49f69614d2bd62304a9d", + "002e9f8d0773410bb29ecccff7845d8a", + "570197bd1c704d9fbeeaae5a8afcbb6d", + "54fca1d20e48487399f1cfdd1d729c2c", + "49ac2653302b41a883a5d48f2f69ab9a", + "650663daa6e24f3bbb580a50633d1c4f", + "2ef61fc17de54f708b702b8d9633ba98", + "f6a07670dde94fd89b782d624f3147e2", + "4b09e5a948bf4038b108cca562b3e06c", + "da917740702b4674937362eec6c363a2", + "0271616c24544084b9cd15005937bd1f", + "76deb937a7874fe7b7f4e30cdcf17058", + "2a373c0130dc4b71a56346a5a0c51dcb", + "572ec409149b40629f2ecf05377a7164", + "e14b87bfc58a4e1dac7901373b33ee97", + "7328592ec9b04f4d9f517cc0c1768edb", + "9b4b771c7b3a44dcac3db49eb58161df", + "902c0ccba0b54353a0c4a76af7eaae11", + "79e761cddfa349958d18b9f2bfd2f2c4", + "fe116aef79374f70826464915dd4ac3f", + "f7fd307d227c4599aab5664c3d124106", + "6b0a71886210454d99a202a441e3d96e", + "447212d1fb464e96ba4f5a507f789915", + "b28e821aa24446c58dad8fa982546a39", + "c67531add7fc4b76a09632e00dc1282a", + "a73a685feab547c185049e78c38d6ef1", + "8e86a0873c45441b93ccba90ab88128a", + "da3c53f1e7394464a34aa88c0e18c76a", + "1f1ec6c2fc634ea2b8898adde774b34d", + "cfbf01c40aa4488fba44ef2f5d0f0cfa", + "2dbf7697ed434660b2a2ae9928c0083d", + "4bd9b9eae6404bb1b83ee6ce8d8962c5", + "2160322acf134e80a14e08cb626fcdef", + "68dd1ee738054f41a65c9c48bccc5bc9", + "63f8d4f5c16a409fab37c5e200bc3aee", + "ebdaff7083d64f3da6b5dd5e0b34f940", + "061c957097c94d4eb9dd7b0455754045", + "adb5f7de004c4f9c9352c9b802ec089b", + "4bd869ad901943eab8efcb05f1084fc6", + "f520c1ddbfd14df7830b66722a700f89", + "896db0c2a5a044d6b4e0ee89e42c9ce0", + "017442fb05734e1a9bc079118951b4a9", + "b9def657d4544c92a919f458cf325e53", + "c49c8e522698470b9badeb12e80f0b32", + "8cfc1824efe848a4b104aab400200c02", + "46d6cc1965de4b4482c124a7e2c46bec", + "6b46eddf09c4495b86ab3224eb41042c", + "d74baf94b40e49e9ba1e4c6ed184a784", + "a20f1cff605648749fa5a187a552d3e1", + "391a33da4d034022b16dba7587eaa595", + "a58ae7e3358746bc88fdc900137c7a4e", + "6beebf1cf8c74c478a145de10f0385e1", + "bfc9e4172d4e47f68632e84b1b116bb6", + "1840e33690b64a55bc8d26c7592b7b16", + "cac05e729d974c078d4dfe19608e0c19", + "d064cccf73254e30bca51905b12cead6", + "d7b884b0c6cb4de39d8d2f26f07ea8da", + "590624fab2a240299718c8d8c8994e8f", + "786387a302284a4ea8f9fe71d038b8a4", + "dfb1f8c983da424384400c6fe589ed8e", + "b386af83ec6b419aaab27eba5d6e1263", + "1c4e0226d0f64872962ec5f25877d7f9", + "bba9c279a9b14bf19136f2bce8ca0bb3", + "a4dd0e2c45644110b5f1b15d16ff4775", + "1076f7220f6c4d519ad8ba0d27d7fa6c", + "da1bc2f490614952afa613e85a029812", + "d93cc719b7684e7787299c4b37d223ca", + "af71a3b969664664aedcead7504899be", + "c51d79c905b2423695781ac55e6e85c6", + "388d7db7adb342c1b6bce69accf2451e", + "9037e953acf24bd3ab16e81c7468cb81", + "5df6cb0605744c2595fa136d9fe2564e", + "23cc45f87b9144f297bf8d501d748a23", + "bf5a188c2be34b93846d4c576f07d128", + "59f17f0c5b2a4709bd4285d6fd9ee3f5", + "337210d366d2482985fb7774308c6f69", + "44cd3cf457b2471daced70654983333d", + "ff4a0009bb074b09a22320f259479c06", + "df671ec668134f39b11906b84ebcc835", + "ca621434060c468a98020262ccb0ada7", + "e8db316073a242c58baf586fff2eea1e", + "38211e509711456994bd538df087dc59", + "cc470721069f4f52a62c3d86f41a9420", + "7a171baebb0b4fadbe1222523e079508", + "f63d03efea40438c8c5669153523eb3b", + "94c7eac27f2c42e08106011e8275956e", + "7137d61ae4aa41a19535fb088e1d4223", + "171ccb07570b4c6186b357cf4cf463c0", + "4504401dbf9e4a868712ff7e1e3555a7", + "c81bf0877fcf43648ae15dbfc8f44048", + "16fb7bdb14b74f4ebc7cff04c8ae5a2e", + "202181e6b84e437fbf813d8673b799c9", + "88789f04fa274a8e95b4af6864a465c0", + "0952e37319004bec830a86190b9b9020", + "6d2ac22a299c46c3a941b9e91abeb88e", + "4ddf4b8b41004f19ba06e99e64efff26", + "c3fac914fa224e46af7e27e471dbe32b", + "889f3a5a3283449ebeaa9c28ad95ae30", + "d83fe6ca55464b3abd34691f601ee836", + "22e83c6ad646445783d8dea3136add1c", + "249a036c5ee147948b5c2f4b5b9bc726", + "81dd63a35f414f229fb36856d4ec0376", + "17c8334053a243deaf73246837594932" + ] + }, + "id": "JADR73qSO3YY", + "outputId": "30671cdb-b2b9-48a2-834a-71417625226f", + "collapsed": true + }, + "execution_count": 4, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.11/dist-packages/huggingface_hub/utils/_auth.py:94: UserWarning: \n", + "The secret `HF_TOKEN` does not exist in your Colab secrets.\n", + "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n", + "You will be able to reuse this secret in all of your notebooks.\n", + "Please note that authentication is recommended but still optional to access public models or datasets.\n", + " warnings.warn(\n" + ] + }, + { + "output_type": "display_data", + "data": { + "text/plain": [ + "modules.json: 0%| | 0.00/349 [00:00" + ] + }, + "metadata": {}, + "execution_count": 8 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##**Create Embedding for text Chunks**" + ], + "metadata": { + "id": "KTagl7ihPlEV" + } + }, + { + "cell_type": "code", + "source": [ + "from langchain_pinecone import PineconeVectorStore\n", + "\n", + "vector_store = PineconeVectorStore(pinecone_api_key= PINECONE_API_KEY,\n", + " index=index,\n", + " embedding=embeddings)" + ], + "metadata": { + "id": "n3pDG2ztNbCW" + }, + "execution_count": 10, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# vector_store.add_documents(documents=text_chunks)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "collapsed": true, + "id": "vlcFOl6kQdAF", + "outputId": "79450b21-5e3c-427d-9967-63844a4eaabd" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "['51001868-e8dd-46b9-907c-6bd112b2bbb4',\n", + " 'a90da03d-dbb5-4d38-b2f1-9050391fc117',\n", + " '3b354502-9727-4f42-9604-5ee2ab1753a1',\n", + " '443089a0-517e-4cc0-9853-9b83035819e2',\n", + " '1486472e-b70c-429f-b6ac-0230a13fe756',\n", + " '9bc1e844-db60-4db4-bc09-df14315a5ca7',\n", + " '3f17706b-104c-4a65-882d-a3fa44f04a0d',\n", + " 'aba96d67-0838-49eb-9029-937a34cd3af6',\n", + " 'a94c54e5-3e61-4b23-93b8-ae5ccb9cec8b',\n", + " '2b8ccced-0645-47d9-9179-7881954276f0',\n", + " '8d172631-df27-4e90-8a6d-53fa06c5a712',\n", + " '3fa66654-52e6-4b6d-aad8-ad34a59e94a2',\n", + " '544e8d71-a799-4d84-876e-9f8dedc91db9',\n", + " 'fc69b8a4-bb38-456a-88ec-482a0f2e3013',\n", + " 'f5ee1ebe-0645-47cf-b483-d60e5d3ddb0a',\n", + " '2b53f71a-b170-49c9-be12-c2576a4cdaec',\n", + " '016e4aef-a401-4a30-a364-6183bd99c0a6',\n", + " 'b7adbce2-b122-484a-8d5d-50cfb99b2776',\n", + " 'd98dc780-833f-47eb-a133-42b085761f0a',\n", + " 'd9a7779b-abb6-41fc-8568-d4c4a93d7d97',\n", + " '4c0e516d-7806-49c4-9c14-7eaff2e23689',\n", + " '8f7c11e5-e58b-4e0f-aea8-42b49fd2c186',\n", + " '447fdf30-3ee9-4f66-aecd-509f0e311e0c',\n", + " '71cf7c36-7c4a-4500-a4a3-6ad31c307309',\n", + " 'f7a6e0e1-fc05-4980-901c-9844c1967c9b',\n", + " 'cbd6ad8d-8496-444b-8c53-349b3cbe8cd3',\n", + " 'bcdad0b2-d32d-4a4e-86ce-0ac5a9539059',\n", + " '8fd30734-94f9-4b9d-8da9-9a2f565dddcd',\n", + " '70dc325f-a313-40c4-bb7d-a277e8db7c58',\n", + " '5748ed6a-ac2e-41bc-b69a-b4dcb8fcbc02',\n", + " 'd4e08b89-0a00-4b79-b65a-c7c35585c3fc',\n", + " '1678bf65-d800-4160-b2f2-dfb0fa8f0c60',\n", + " '078716bf-da5e-492c-8fb7-a9cff92a86b4',\n", + " 'a6fe332e-a340-49c0-98c2-2a133b55a915',\n", + " '8db3a003-99cb-431b-8881-64681aa00f3c',\n", + " '26f65897-0a09-4bd1-8925-c4b3447280c6',\n", + " '9019a760-52aa-4cf8-89ee-78384e034ddc',\n", + " 'dbe3e1b3-08e5-4907-b849-95e06e685dda',\n", + " 'f12ee927-7963-4895-b570-04fa2f6ac987',\n", + " '1d4c9b34-c7e5-40ac-8ec7-ded7f7031b2a',\n", + " '2d8a1daa-edf1-43e1-a133-4966cdbbfe11',\n", + " 'd433d8f9-597b-4504-8bad-488e3f235696',\n", + " '87ca4605-ff84-4384-870a-2fc198d7e45c',\n", + " '2b84c329-c654-4e6c-963f-9940e94f0719',\n", + " '2903140d-a7b3-4e9b-b9c1-5c041896ab70',\n", + " '676f7237-abf2-416c-8007-cbed7807c7e7',\n", + " 'ff618d18-317d-4cb2-a71a-3278632affb2',\n", + " '4f06a055-ade6-442b-932c-7dcbaccb46c3',\n", + " '838fe06e-1002-4034-9884-6e87c6079bcf',\n", + " '8cdd1494-65a5-4364-b4b7-d01ab6f4be50',\n", + " '25940e14-d3a0-4546-9959-38e7f58f68bf',\n", + " 'cea70f34-03f5-417d-acff-b150f87fab55',\n", + " '5e8af3a8-81ce-4362-a3b7-05de55b0dc1c',\n", + " '40114c94-cb57-428e-9981-a3d9024fd409',\n", + " '084485a6-2508-4db2-8fb7-0c8867cc82ef',\n", + " 'e561a959-6061-46ac-a381-cbe1e231edcd',\n", + " 'c753d4b2-850a-4987-b6b5-e4b630757f2d',\n", + " '848481d7-bb1a-4f8b-adab-0525c9fb00c4',\n", + " 'cfa0ce2d-4c9c-47c7-bbba-aef6f392432b',\n", + " '4fa548ff-b3e2-4dd6-ae6b-d68b25c4f6bb',\n", + " '7892db2e-39fa-4f32-8fb8-198bd90f4f19',\n", + " '1463f794-ac03-43d4-a35d-486cab755319',\n", + " 'b61e11d9-5138-4aed-aacc-2f46c9948de2',\n", + " '21fa31dc-01cf-4766-a5b6-76372b7bc96d',\n", + " '3de07487-e37a-432d-af3b-41ee27f69052',\n", + " '48cb102c-2f22-4fb0-8fd9-586c798646b2',\n", + " '398e4744-3cf5-45e0-9090-5f397be5e61d',\n", + " '8e5249f4-e81f-48eb-b39b-d087e3c34805',\n", + " 'c92a057b-ffef-4215-96a0-81a2b2c87ebf',\n", + " '9d464f7d-e7af-4f13-b13a-6a12b72a20bd',\n", + " '1f74283b-8834-4f13-9acb-5d66943c6e61',\n", + " '23d1cf77-5248-4ce2-8cab-513c58681f8a',\n", + " '054ae75d-ef21-4d0a-807b-86f55e23621a',\n", + " 'cef98bde-b176-49dd-9be0-12cd80b3426a',\n", + " '36038c71-4fe9-40e4-bc10-519a86249b77',\n", + " 'da67e5eb-7654-426e-a99e-c82087ed03d7',\n", + " '8c097d98-778c-4106-8a7c-87c6f302a341',\n", + " '89c850ba-0941-44bc-907d-4b8267154448',\n", + " 'bcf0d4f2-5c95-4e31-9818-a211836408a4',\n", + " '212bddc0-18a5-405a-bfaf-6bd54c13378d',\n", + " 'dd4d5c73-a6f3-4f9a-a1b4-ceecf720775e',\n", + " '709b1cda-5120-4891-b72c-7978adbcc5c1',\n", + " 'db13e613-66e3-4d2d-a869-2dd1ecd62674',\n", + " '4e58bb53-6aaf-4385-a8c4-15727e5cc000',\n", + " 'c08138f7-4cd6-451d-ba87-3f5a92df1bc5',\n", + " 'dd7b6c2b-2ca3-4d6c-a63e-457d47211411',\n", + " '733a845d-ed09-4240-bf9d-894196ea10de',\n", + " 'd1c54eda-7e26-4efa-93e0-b85a7f3005f6',\n", + " '378cb74b-398c-4d1e-8ad6-bcf3c53ba40b',\n", + " '25c6fc39-2891-4eb4-b77a-f7666edb7a64',\n", + " '624ca3be-980c-4d21-abb5-ee578b7835ea']" + ] + }, + "metadata": {}, + "execution_count": 20 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##**Create Retriever**" + ], + "metadata": { + "id": "kTSHW7QTkmWe" + } + }, + { + "cell_type": "code", + "source": [ + "retriever = vector_store.as_retriever(search_type=\"similarity\",\n", + " search_kwargs={\"k\":5})" + ], + "metadata": { + "id": "Ry3PvJlAQPux" + }, + "execution_count": 11, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "####**Check retrieval**" + ], + "metadata": { + "id": "dF4qCwXA8DBw" + } + }, + { + "cell_type": "code", + "source": [ + "retrieved_docs = retriever.invoke(\"what is Programmable Gradient Information?\")\n", + "res = [doc.page_content for doc in retrieved_docs]\n", + "res[0]" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 140 + }, + "id": "4b5AVD2CRfse", + "outputId": "d4cb0f37-57c5-4ae8-8c82-c78648389100" + }, + "execution_count": 12, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "'Figure 3. PGI and related network architectures and methods. (a) Path Aggregation Network (PAN)) [37], (b) Reversible Columns\\n(RevCol) [3], (c) conventional deep supervision, and (d) our proposed Programmable Gradient Information (PGI). PGI is mainly composed\\nof three components: (1) main branch: architecture used for inference, (2) auxiliary reversible branch: generate reliable gradients to supply\\nmain branch for backward transmission, and (3) multi-level auxiliary information: control main branch learning plannable multi-level of\\nsemantic information.\\n4. Methodology\\n4.1. Programmable Gradient Information\\nIn order to solve the aforementioned problems, we pro-\\npose a new auxiliary supervision framework called Pro-\\ngrammable Gradient Information (PGI), as shown in Fig-\\nure 3 (d). PGI mainly includes three components, namely\\n(1) main branch, (2) auxiliary reversible branch, and (3)\\nmulti-level auxiliary information. From Figure 3 (d) we'" + ], + "application/vnd.google.colaboratory.intrinsic+json": { + "type": "string" + } + }, + "metadata": {}, + "execution_count": 12 + } + ] + }, + { + "cell_type": "code", + "source": [ + "retrieved_docs = retriever.invoke(\"what is Auxiliary Reversible Branch\")\n", + "res = [doc.page_content for doc in retrieved_docs]\n", + "res" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "GGo770zVOmit", + "outputId": "6a45c2d1-d32c-4188-a088-945f933a78af" + }, + "execution_count": 15, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "['multi-level auxiliary information. From Figure 3 (d) we\\nsee that the inference process of PGI only uses main branch\\nand therefore does not require any additional inference cost.\\nAs for the other two components, they are used to solve or\\nslow down several important issues in deep learning meth-\\nods. Among them, auxiliary reversible branch is designed\\nto deal with the problems caused by the deepening of neural\\nnetworks. Network deepening will cause information bot-\\ntleneck, which will make the loss function unable to gener-\\nate reliable gradients. As for multi-level auxiliary informa-\\ntion, it is designed to handle the error accumulation problem\\ncaused by deep supervision, especially for the architecture\\nand lightweight model of multiple prediction branch. Next,\\nwe will introduce these two components step by step.\\n4.1.1 Auxiliary Reversible Branch\\nIn PGI, we propose auxiliary reversible branch to gener-\\nate reliable gradients and update network parameters. By',\n", + " 'to solve problems and conduct relative analysis.\\n3.2. Reversible Functions\\nWhen a function r has an inverse transformation func-\\ntion v, we call this function reversible function, as shown in\\nEq. 2.\\nX = vζ(rψ(X)), (2)\\nwhere ψ and ζ are parameters of r and v, respectively. Data\\nX is converted by reversible function without losing infor-\\nmation, as shown in Eq. 3.\\nI(X, X) =I(X, rψ(X)) =I(X, vζ(rψ(X))). (3)\\nWhen the network’s transformation function is composed\\nof reversible functions, more reliable gradients can be ob-\\ntained to update the model. Almost all of today’s popular\\ndeep learning methods are architectures that conform to the\\nreversible property, such as Eq. 4.\\nXl+1 = Xl + fl+1\\nθ (Xl), (4)\\nwhere l indicates the l-th layer of a PreAct ResNet and\\nf is the transformation function of the l-th layer. PreAct\\nResNet [22] repeatedly passes the original data X to sub-\\nsequent layers in an explicit way. Although such a design\\ncan make a deep neural network with more than a thousand',\n", + " 'tions with the next partition in a hierarchical manner, and\\nconcatenates all converted partitions before passing them\\nbackwards. CBNet [34, 39] re-introduces the original in-\\nput data through composite backbone to obtain complete\\noriginal information, and obtains different levels of multi-\\nlevel reversible information through various composition\\nmethods. These network architectures generally have ex-\\ncellent parameter utilization, but the extra composite layers\\ncause slow inference speeds. DynamicDet [36] combines\\nCBNet [34] and the high-efficiency real-time object detec-\\ntor YOLOv7 [63] to achieve a very good trade-off among\\nspeed, number of parameters, and accuracy. This paper in-\\ntroduces the DynamicDet architecture as the basis for de-\\nsigning reversible branches. In addition, reversible infor-\\nmation is further introduced into the proposed PGI. The\\nproposed new architecture does not require additional con-\\nnections during the inference process, so it can fully retain',\n", + " 'sary condition in the inference stage. In view of this, we\\nregard reversible branch as an expansion of deep supervi-\\nsion branch, and then design auxiliary reversible branch, as\\nshown in Figure 3 (d). As for the main branch deep fea-\\ntures that would have lost important information due to in-\\nformation bottleneck, they will be able to receive reliable\\ngradient information from the auxiliary reversible branch.\\nThese gradient information will drive parameter learning to\\nassist in extracting correct and important information, and\\nthe above actions can enable the main branch to obtain fea-\\ntures that are more effective for the target task. Moreover,\\nthe reversible architecture performs worse on shallow net-\\nworks than on general networks because complex tasks re-\\nquire conversion in deeper networks. Our proposed method\\ndoes not force the main branch to retain complete origi-\\nnal information but updates it by generating useful gradient',\n", + " 'Figure 4. The architecture of GELAN: (a) CSPNet [64], (b) ELAN [65], and (c) proposed GELAN. We imitate CSPNet and extend ELAN\\ninto GELAN that can support any computational blocks.\\nFinally, since auxiliary reversible branch can be removed\\nduring the inference phase, the inference capabilities of the\\noriginal network can be retained. We can also choose any\\nreversible architectures in PGI to play the role of auxiliary\\nreversible branch.\\n4.1.2 Multi-level Auxiliary Information\\nIn this section we will discuss how multi-level auxiliary in-\\nformation works. The deep supervision architecture includ-\\ning multiple prediction branch is shown in Figure 3 (c). For\\nobject detection, different feature pyramids can be used to\\nperform different tasks, for example together they can de-\\ntect objects of different sizes. Therefore, after connecting\\nto the deep supervision branch, the shallow features will be\\nguided to learn the features required for small object detec-']" + ] + }, + "metadata": {}, + "execution_count": 15 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#**SChema**" + ], + "metadata": { + "id": "3945UwuhBAsT" + } + }, + { + "cell_type": "code", + "source": [ + "from langchain.prompts import PromptTemplate\n", + "from langchain_core.prompts import ChatPromptTemplate\n", + "from langchain_core.runnables import RunnablePassthrough" + ], + "metadata": { + "id": "si6_-ShiQXDD" + }, + "execution_count": 13, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "from pydantic import BaseModel, Field\n", + "from typing import List, Union\n", + "from typing_extensions import Literal\n", + "\n", + "# Define the Question model\n", + "class Question(BaseModel):\n", + " question: str = Field(..., description=\"The question prompt that the user needs to answer.\")\n", + " type: Literal['fill_missing', 'MCQ', 'short_answer'] = Field(..., description=\"The type of question: fill_missing, MCQ, or short_answer.\")\n", + " options: Union[List[str], None] = Field(None, description=\"The options for the question, used only for MCQ type.\")\n", + "\n", + "# Example usage\n", + "question_data = {\n", + " \"question\": \"What is the capital of France?\",\n", + " \"type\": \"MCQ\",\n", + " \"options\": [\"Paris\", \"London\", \"Berlin\"]\n", + "}\n", + "\n", + "parsed_question = Question(**question_data)\n", + "print(parsed_question)\n" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "lyEuDH6BPtzM", + "outputId": "1bb1fbe1-dbc4-49c3-8b2a-365539aec04c" + }, + "execution_count": 14, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "question='What is the capital of France?' type='MCQ' options=['Paris', 'London', 'Berlin']\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##**Trial1**" + ], + "metadata": { + "id": "ueAy6f5q54MG" + } + }, + { + "cell_type": "markdown", + "source": [ + "####**LLM With Structured output**" + ], + "metadata": { + "id": "CnpbBAGO32e4" + } + }, + { + "cell_type": "code", + "source": [ + "from langchain_openai import OpenAI, ChatOpenAI\n", + "\n", + "llm = ChatOpenAI(api_key=OPENAI_API_KEY, temperature=0, model='gpt-3.5-turbo-0125')\n", + "llm_sturctured = llm.with_structured_output(Question)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "qzKP3Uii3dwP", + "outputId": "142dedf0-2bfd-405e-f110-822a4a90cba4" + }, + "execution_count": 15, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.11/dist-packages/langchain_openai/chat_models/base.py:1390: UserWarning: Cannot use method='json_schema' with model gpt-3.5-turbo-0125 since it doesn't support OpenAI's Structured Output API. You can see supported models here: https://platform.openai.com/docs/guides/structured-outputs#supported-models. To fix this warning, set `method='function_calling'. Overriding to method='function_calling'.\n", + " warnings.warn(\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "question = \"generate MCQ questions about Yolo\"\n", + "\n", + "res = llm_sturctured.invoke(question)\n", + "res" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "LByg7InT39yn", + "outputId": "8cdd98f6-3676-4e08-b392-b308bd0c9bae" + }, + "execution_count": 25, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Question(question='What does YOLO stand for?', type='MCQ', options=['You Only Look Once', 'You Only Live Once', 'You Only Love Once', 'You Only Learn Once'])" + ] + }, + "metadata": {}, + "execution_count": 25 + } + ] + }, + { + "cell_type": "code", + "source": [ + "question_2 = \"generate question about maths\"\n", + "\n", + "res = llm_sturctured.invoke(question_2)\n", + "res" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "n-yPAJbh3p9e", + "outputId": "6077c746-a89a-4fe8-fc12-15422ff00f5f" + }, + "execution_count": 24, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Question(question='What is the value of 2 + 2?', type='short_answer', options=None)" + ] + }, + "metadata": {}, + "execution_count": 24 + } + ] + }, + { + "cell_type": "code", + "source": [ + "q_3 = \" generate 4 MCQ questions about maths \"\n", + "res = llm_sturctured.invoke(q_3)\n", + "res" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "dcts6zE94OaO", + "outputId": "1663c25a-f6f6-423d-d026-676fe0ec840b" + }, + "execution_count": 27, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Question(question='What is the value of pi (π)?', type='MCQ', options=['3.14', '2.71', '1.618', '4.20'])" + ] + }, + "metadata": {}, + "execution_count": 27 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "####**Some improvements on the schema**\n", + "1. Improving the prompt to the LLM\n", + "2. improving the `structure of the output` to support `multiple questions`" + ], + "metadata": { + "id": "pEugulrCCxf4" + } + }, + { + "cell_type": "code", + "source": [ + "# Define the individual Question model\n", + "class Question(BaseModel):\n", + " question: str = Field(..., description=\"The question prompt that the user needs to answer.\")\n", + " type: Literal['fill_missing', 'MCQ', 'short_answer'] = Field(..., description=\"The type of question: fill_missing, MCQ, or short_answer.\")\n", + " options: Union[List[str], None] = Field(None, description=\"The options for the question, used only for MCQ type.\")\n", + "\n", + "# Define the Questions model that contains a list of Question objects and the total number of questions\n", + "class Questions(BaseModel):\n", + " no_of_questions: int = Field(..., description=\"The total number of questions generated.\")\n", + " questions: List[Question] = Field(..., description=\"A list of Question objects.\")\n", + "\n", + "llm_sturctured = llm.with_structured_output(Questions)" + ], + "metadata": { + "id": "wV52DbhSC31H" + }, + "execution_count": 16, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "question_2 = \"\"\"Your task is to generate various questions about the maths.\n", + "Each question must be one of three types: ['fill_missing', 'MCQ', 'short_answer']\n", + "\"\"\"\n", + "res = llm_sturctured.invoke(question_2)\n", + "res" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "18aW0xvkCLYk", + "outputId": "5678e024-d678-48e6-a221-0b933e0dd996" + }, + "execution_count": 17, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Questions(no_of_questions=5, questions=[Question(question='What is the value of 2 + 2?', type='fill_missing', options=None), Question(question='What is the square root of 25?', type='MCQ', options=['5', '6', '7', '8']), Question(question='Solve for x: 3x + 5 = 17', type='short_answer', options=None), Question(question='What is the next number in the sequence: 2, 4, 6, 8, __?', type='fill_missing', options=None), Question(question='Which of the following is a prime number?', type='MCQ', options=['15', '17', '20', '22'])])" + ] + }, + "metadata": {}, + "execution_count": 17 + } + ] + }, + { + "cell_type": "code", + "source": [ + "question_2 = \"\"\"Your task is to generate 4 questions about the Logical Reasoning.\n", + "Each question must be one of three types: ['fill_missing', 'MCQ', 'short_answer']\n", + "\"\"\"\n", + "res = llm_sturctured.invoke(question_2)\n", + "res" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "QBbTzU4WDBeH", + "outputId": "1bcf8b4f-9624-4e66-e12c-0d466bb5a911" + }, + "execution_count": 64, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Questions(no_of_questions=4, questions=[Question(question='Fill in the missing word: A bird in the hand is worth two in the ___', type='fill_missing', options=None), Question(question='What is the next number in the sequence: 1, 1, 2, 3, 5, 8, ___', type='short_answer', options=None), Question(question='Which of the following is not a prime number?', type='MCQ', options=['A. 7', 'B. 12', 'C. 17', 'D. 23']), Question(question='If all Bloops are Razzies and all Razzies are Lazzies, then all Bloops are definitely Lazzies. Is this statement True or False?', type='MCQ', options=['True', 'False'])])" + ] + }, + "metadata": {}, + "execution_count": 64 + } + ] + }, + { + "cell_type": "code", + "source": [ + "res.dict()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "33CiACKSDOZO", + "outputId": "a005c858-9856-4ded-c302-132aa836fbcc" + }, + "execution_count": 65, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":1: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/\n", + " res.dict()\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "{'no_of_questions': 4,\n", + " 'questions': [{'question': 'Fill in the missing word: A bird in the hand is worth two in the ___',\n", + " 'type': 'fill_missing',\n", + " 'options': None},\n", + " {'question': 'What is the next number in the sequence: 1, 1, 2, 3, 5, 8, ___',\n", + " 'type': 'short_answer',\n", + " 'options': None},\n", + " {'question': 'Which of the following is not a prime number?',\n", + " 'type': 'MCQ',\n", + " 'options': ['A. 7', 'B. 12', 'C. 17', 'D. 23']},\n", + " {'question': 'If all Bloops are Razzies and all Razzies are Lazzies, then all Bloops are definitely Lazzies. Is this statement True or False?',\n", + " 'type': 'MCQ',\n", + " 'options': ['True', 'False']}]}" + ] + }, + "metadata": {}, + "execution_count": 65 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##**Trial 2**" + ], + "metadata": { + "id": "ha89rpZ-4cwf" + } + }, + { + "cell_type": "markdown", + "source": [ + "####**Improvement on the prompts**\n", + "1. given some 'context' -> generate some question based on the context given" + ], + "metadata": { + "id": "23QrAslP3kZe" + } + }, + { + "cell_type": "code", + "source": [ + "question_2 = \"\"\"Your task is to generate 4 questions about this topic.\n", + "topic:\n", + "Programmable Gradient Information\n", + " In order to solve the aforementioned problems, we pro\n", + "pose a new auxiliary supervision framework called Pro\n", + "grammable Gradient Information (PGI), as shown in Fig\n", + "ure 3 (d). PGI mainly includes three components, namely\n", + " (1) main branch, (2) auxiliary reversible branch, and (3)\n", + " multi-level auxiliary information. From Figure 3 (d) we\n", + " see that the inference process of PGI only uses main branch\n", + " and therefore does not require any additional inference cost.\n", + " As for the other two components, they are used to solve or\n", + " slow down several important issues in deep learning meth\n", + "ods. Among them, auxiliary reversible branch is designed\n", + " to deal with the problems caused by the deepening of neural\n", + " networks. Network deepening will cause information bot\n", + "tleneck, which will make the loss function unable to gener\n", + "ate reliable gradients. As for multi-level auxiliary informa\n", + "tion, it is designed to handle the error accumulation problem\n", + " caused by deep supervision, especially for the architecture\n", + " and lightweight model of multiple prediction branch. Next,\n", + " we will introduce these two components step by step\n", + "Each question must be one of three types: ['fill_missing', 'MCQ', 'short_answer']\n", + "\"\"\"\n", + "res = llm_sturctured.invoke(question_2)\n", + "res" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "iK1qbwqypZfO", + "outputId": "3326522f-26e4-4064-8889-40ea09361402" + }, + "execution_count": 18, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Questions(no_of_questions=4, questions=[Question(question='What is the name of the new auxiliary supervision framework proposed in the text?', type='short_answer', options=None), Question(question='Which components are included in the Programmable Gradient Information (PGI) framework?', type='fill_missing', options=None), Question(question='What is the purpose of the auxiliary reversible branch in the PGI framework?', type='short_answer', options=None), Question(question='Why is multi-level auxiliary information designed in the PGI framework?', type='short_answer', options=None)])" + ] + }, + "metadata": {}, + "execution_count": 18 + } + ] + }, + { + "cell_type": "code", + "source": [ + "question_2 = \"\"\"Your task is to generate 4 questions about this topic.\n", + "include MCQ in the generated questions\n", + "topic:\n", + "Programmable Gradient Information\n", + " In order to solve the aforementioned problems, we pro\n", + "pose a new auxiliary supervision framework called Pro\n", + "grammable Gradient Information (PGI), as shown in Fig\n", + "ure 3 (d). PGI mainly includes three components, namely\n", + " (1) main branch, (2) auxiliary reversible branch, and (3)\n", + " multi-level auxiliary information. From Figure 3 (d) we\n", + " see that the inference process of PGI only uses main branch\n", + " and therefore does not require any additional inference cost.\n", + " As for the other two components, they are used to solve or\n", + " slow down several important issues in deep learning meth\n", + "ods. Among them, auxiliary reversible branch is designed\n", + " to deal with the problems caused by the deepening of neural\n", + " networks. Network deepening will cause information bot\n", + "tleneck, which will make the loss function unable to gener\n", + "ate reliable gradients. As for multi-level auxiliary informa\n", + "tion, it is designed to handle the error accumulation problem\n", + " caused by deep supervision, especially for the architecture\n", + " and lightweight model of multiple prediction branch. Next,\n", + " we will introduce these two components step by step\n", + "Each question must be one of three types: ['fill_missing', 'MCQ', 'short_answer']\n", + "\"\"\"\n", + "res = llm_sturctured.invoke(question_2)\n", + "res" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "bjifwDIXpZUK", + "outputId": "764d35d9-3c7d-44c5-dff1-bcd0f816f34d" + }, + "execution_count": 19, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Questions(no_of_questions=4, questions=[Question(question='What is the main purpose of Programmable Gradient Information (PGI) framework?', type='short_answer', options=None), Question(question='Which components are included in the PGI framework?', type='fill_missing', options=None), Question(question='What is the role of the auxiliary reversible branch in PGI?', type='short_answer', options=None), Question(question='Why is multi-level auxiliary information included in the PGI framework?', type='MCQ', options=['To handle error accumulation problem', 'To improve inference cost', 'To reduce network deepening issues', 'To enhance deep supervision'])])" + ] + }, + "metadata": {}, + "execution_count": 19 + } + ] + }, + { + "cell_type": "code", + "source": [ + "res.dict()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "LlUf4AMvqATY", + "outputId": "aab09585-e314-41a5-a4cd-a8ad0e71df56" + }, + "execution_count": 21, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":1: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/\n", + " res.dict()\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "{'no_of_questions': 4,\n", + " 'questions': [{'question': 'What is the main purpose of Programmable Gradient Information (PGI) framework?',\n", + " 'type': 'short_answer',\n", + " 'options': None},\n", + " {'question': 'Which components are included in the PGI framework?',\n", + " 'type': 'fill_missing',\n", + " 'options': None},\n", + " {'question': 'What is the role of the auxiliary reversible branch in PGI?',\n", + " 'type': 'short_answer',\n", + " 'options': None},\n", + " {'question': 'Why is multi-level auxiliary information included in the PGI framework?',\n", + " 'type': 'MCQ',\n", + " 'options': ['To handle error accumulation problem',\n", + " 'To improve inference cost',\n", + " 'To reduce network deepening issues',\n", + " 'To enhance deep supervision']}]}" + ] + }, + "metadata": {}, + "execution_count": 21 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "**conclusion**:\n", + "1. `structured output` : working good as the designed schema\n", + "2. `context given` : when passing a peace of context --> we got a good question generation\n", + "3. need to automate `retrieving` and `generation` in a specific format" + ], + "metadata": { + "id": "e-HS16-wqWea" + } + }, + { + "cell_type": "markdown", + "source": [ + "##**Trial 3**\n", + "1. `Parser` : Pydantic out parser\n", + "2. `format_instruction` in the prompt : parser.get_format_instructions()\n", + "3. `Context`: retrieved docs based on the topic\n", + "4. `llm_structured` : to output the generation in a needed format" + ], + "metadata": { + "id": "27t2lJagyPPZ" + } + }, + { + "cell_type": "code", + "source": [ + "from langchain.chains import LLMChain" + ], + "metadata": { + "id": "exmAtuF73XMj" + }, + "execution_count": 51, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "from langchain.output_parsers import PydanticOutputParser\n", + "\n", + "parser = PydanticOutputParser(pydantic_object = Questions)\n", + "print(parser.get_format_instructions())" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "UbBPpYyo7JoD", + "outputId": "47d9ed98-b5f3-432f-be70-5ec9bc77ecc5" + }, + "execution_count": 81, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "The output should be formatted as a JSON instance that conforms to the JSON schema below.\n", + "\n", + "As an example, for the schema {\"properties\": {\"foo\": {\"title\": \"Foo\", \"description\": \"a list of strings\", \"type\": \"array\", \"items\": {\"type\": \"string\"}}}, \"required\": [\"foo\"]}\n", + "the object {\"foo\": [\"bar\", \"baz\"]} is a well-formatted instance of the schema. The object {\"properties\": {\"foo\": [\"bar\", \"baz\"]}} is not well-formatted.\n", + "\n", + "Here is the output schema:\n", + "```\n", + "{\"$defs\": {\"Question\": {\"properties\": {\"question\": {\"description\": \"The question prompt that the user needs to answer.\", \"title\": \"Question\", \"type\": \"string\"}, \"type\": {\"description\": \"The type of question: fill_missing, MCQ, or short_answer.\", \"enum\": [\"fill_missing\", \"MCQ\", \"short_answer\"], \"title\": \"Type\", \"type\": \"string\"}, \"options\": {\"anyOf\": [{\"items\": {\"type\": \"string\"}, \"type\": \"array\"}, {\"type\": \"null\"}], \"default\": null, \"description\": \"The options for the question, used only for MCQ type.\", \"title\": \"Options\"}}, \"required\": [\"question\", \"type\"], \"title\": \"Question\", \"type\": \"object\"}}, \"properties\": {\"no_of_questions\": {\"description\": \"The total number of questions generated.\", \"title\": \"No Of Questions\", \"type\": \"integer\"}, \"questions\": {\"description\": \"A list of Question objects.\", \"items\": {\"$ref\": \"#/$defs/Question\"}, \"title\": \"Questions\", \"type\": \"array\"}}, \"required\": [\"no_of_questions\", \"questions\"]}\n", + "```\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "prompt_template = \"\"\"\n", + "You are given some context below. Based on the context, generate questions with one of the following types: ['fill_missing', 'MCQ', 'short_answer'].\n", + "\n", + "Context: {context}\n", + "\n", + "Make sure to generate a variety of questions. The types should be distributed among 'fill_missing', 'MCQ', and 'short_answer'.\n", + "\n", + "For MCQs, provide at least 3 options. For 'fill_missing', make sure to leave a gap that can be filled. For 'short_answer', make sure the answer is clear from the context.\n", + "\n", + "Return a list of questions, with each question having the following structure:\n", + "- 'question': The question prompt.\n", + "- 'type': The type of question: 'fill_missing', 'MCQ', or 'short_answer'.\n", + "- 'options': For 'MCQ', a list of options. For other types, this field should be omitted.\n", + "\n", + "The response should be with a format that matches the following structure:\n", + "{format_instructions}\n", + "\"\"\"\n" + ], + "metadata": { + "id": "s-pTxGAJyRf_" + }, + "execution_count": 82, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "def generate_questions_from_context(query: str, retriever) -> Questions:\n", + " # Retrieve relevant documents from the vector store using the retriever\n", + " retrieved_docs = retriever.invoke(query)\n", + " retrieved_docs = [rec.page_content for rec in retrieved_docs]\n", + " # print(retrieved_docs)\n", + "\n", + " # Combine the retrieved documents into a single context string\n", + " context= \" \".join([doc for doc in retrieved_docs])\n", + " # print (f\"context is :{context}\")\n", + "\n", + " # Create the LLMChain with the prompt template and the LLM model\n", + " prompt = PromptTemplate(template=prompt_template, input_variables=[\"context\"],\n", + " partial_variables={\"format_instructions\" : parser.get_format_instructions()}\n", + " )\n", + " # print(f\"{prompt}\")\n", + "\n", + " chain = prompt | llm_sturctured\n", + "\n", + " # Call the chain to generate the questions\n", + " response = chain.invoke({\n", + " \"context\": context,\"format_instructions\" : parser.get_format_instructions()\n", + " }\n", + " )\n", + " return response" + ], + "metadata": { + "id": "YmqyMQ-m8YXx" + }, + "execution_count": 91, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "res = generate_questions_from_context(\"yolo\",retriever=retriever)\n", + "res" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "BGdVVzrk9EUV", + "outputId": "ec7006e5-ef02-4a82-c09a-9a88cb3a548d" + }, + "execution_count": 94, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Questions(no_of_questions=5, questions=[Question(question='What is the parameter usage of YOLOv9-C?', type='short_answer', options=None), Question(question='Which model is considered the best performing among existing methods for lightweight models?', type='MCQ', options=['YOLO MS-S', 'YOLO MS', 'YOLOv7 AF', 'YOLOv8-X']), Question(question='The GELAN we designed achieves a higher parameter usage than which design based on the most advanced technology?', type='fill_missing', options=None), Question(question='What dataset was used to conduct experiments for YOLOv9?', type='short_answer', options=None), Question(question='What is the main computing unit used in most of the YOLO series models?', type='short_answer', options=None)])" + ] + }, + "metadata": {}, + "execution_count": 94 + } + ] + }, + { + "cell_type": "code", + "source": [ + "res.dict()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "ecEZmz1x9H1K", + "outputId": "524f158a-4472-41df-a73a-dfec385a40db" + }, + "execution_count": 95, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":1: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/\n", + " res.dict()\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "{'no_of_questions': 5,\n", + " 'questions': [{'question': 'What is the parameter usage of YOLOv9-C?',\n", + " 'type': 'short_answer',\n", + " 'options': None},\n", + " {'question': 'Which model is considered the best performing among existing methods for lightweight models?',\n", + " 'type': 'MCQ',\n", + " 'options': ['YOLO MS-S', 'YOLO MS', 'YOLOv7 AF', 'YOLOv8-X']},\n", + " {'question': 'The GELAN we designed achieves a higher parameter usage than which design based on the most advanced technology?',\n", + " 'type': 'fill_missing',\n", + " 'options': None},\n", + " {'question': 'What dataset was used to conduct experiments for YOLOv9?',\n", + " 'type': 'short_answer',\n", + " 'options': None},\n", + " {'question': 'What is the main computing unit used in most of the YOLO series models?',\n", + " 'type': 'short_answer',\n", + " 'options': None}]}" + ] + }, + "metadata": {}, + "execution_count": 95 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#**LLM OpenAI**" + ], + "metadata": { + "id": "Oxfqq0GTR1ms" + } + }, + { + "cell_type": "markdown", + "source": [ + "##**LLM model**" + ], + "metadata": { + "id": "6F4dt6JVrOoq" + } + }, + { + "cell_type": "code", + "source": [ + "from langchain_openai import OpenAI, ChatOpenAI\n", + "llm = ChatOpenAI(api_key=OPENAI_API_KEY, temperature=0, model='gpt-3.5-turbo-0125')" + ], + "metadata": { + "id": "ggjVLpYbR4i4" + }, + "execution_count": 22, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "llm_sturctured = llm.with_structured_output(Questions)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "Fw_vaPBwR8r7", + "outputId": "194aad3d-c5aa-4bdc-ce70-77639fd5f898" + }, + "execution_count": 23, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + "/usr/local/lib/python3.11/dist-packages/langchain_openai/chat_models/base.py:1390: UserWarning: Cannot use method='json_schema' with model gpt-3.5-turbo-0125 since it doesn't support OpenAI's Structured Output API. You can see supported models here: https://platform.openai.com/docs/guides/structured-outputs#supported-models. To fix this warning, set `method='function_calling'. Overriding to method='function_calling'.\n", + " warnings.warn(\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "res = llm_sturctured.invoke(\"generate one mcq about Generalized ELAN \")\n", + "res" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "NL4tTa9QTXTd", + "outputId": "5290f348-2e77-4dcb-f0ed-468b33e7b64f" + }, + "execution_count": 24, + "outputs": [ + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "Questions(no_of_questions=1, questions=[Question(question='What does ELAN stand for in Generalized ELAN?', type='MCQ', options=['Extended Local Area Network', 'Enhanced Local Area Network', 'Ethernet Local Area Network', 'Enterprise Local Area Network'])])" + ] + }, + "metadata": {}, + "execution_count": 24 + } + ] + }, + { + "cell_type": "code", + "source": [ + "res.dict()" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "Ob1ZkNUSrg2j", + "outputId": "d2831d2c-a452-42c8-b561-1b5cfafd16fe" + }, + "execution_count": 25, + "outputs": [ + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":1: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/\n", + " res.dict()\n" + ] + }, + { + "output_type": "execute_result", + "data": { + "text/plain": [ + "{'no_of_questions': 1,\n", + " 'questions': [{'question': 'What does ELAN stand for in Generalized ELAN?',\n", + " 'type': 'MCQ',\n", + " 'options': ['Extended Local Area Network',\n", + " 'Enhanced Local Area Network',\n", + " 'Ethernet Local Area Network',\n", + " 'Enterprise Local Area Network']}]}" + ] + }, + "metadata": {}, + "execution_count": 25 + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#**Retrieval Chain**" + ], + "metadata": { + "id": "C1ONIbOmVV4N" + } + }, + { + "cell_type": "code", + "source": [ + "from langchain.chains import create_retrieval_chain\n", + "from langchain.chains.combine_documents import create_stuff_documents_chain\n", + "from langchain_core.prompts import ChatPromptTemplate" + ], + "metadata": { + "id": "f1oOh4dCRfjN" + }, + "execution_count": 26, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "system_prompt = (\n", + " \"You are a AI expert who can generate questions from retrieved docs. \"\n", + " \"You will be given a topic to generate question about\"\n", + " \"Use the following pieces of retrieved context to generate \"\n", + " \"new questions based on the topic given.\"\n", + " \"say that you don't know if the input given is beyond the scope of the retrieved context \"\n", + " \" dont respond with anything accept for generated question\"\n", + " \"\\n\\n\"\n", + " \"Each question must be one of three types: ['fill_missing', 'MCQ', 'short_answer']\"\n", + " \"{context}\"\n", + ")\n", + "\n", + "prompt = ChatPromptTemplate.from_messages(\n", + " [\n", + " (\"system\", system_prompt),\n", + " (\"human\", \"{input}\"),\n", + " ]\n", + ")" + ], + "metadata": { + "id": "z_KLSDBNSL9d" + }, + "execution_count": 27, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "# parser = PydanticOutputParser(pydantic_object = Question)\n", + "\n", + "# question_answer_chain = create_stuff_documents_chain(llm, prompt, output_parser=parser )\n", + "# rag_chain = create_retrieval_chain(retriever, question_answer_chain)" + ], + "metadata": { + "id": "-Uxf9Q24RnaK" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "combine_docs_chain = create_stuff_documents_chain(llm, prompt)\n", + "rag_chain = create_retrieval_chain(retriever, combine_docs_chain)" + ], + "metadata": { + "id": "vZn52wk2TmFF" + }, + "execution_count": 30, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "##**Test create_stuff_documents_chain**\n", + "* Create a chain for passing a list of Documents to a model.\n", + "* chain.invoke({\"context\": docs})\n", + "* docs == Retrieved context\n" + ], + "metadata": { + "id": "2oEJf1McsBeH" + } + }, + { + "cell_type": "markdown", + "source": [ + "##**Test Retrieval chain**\n", + "* This chain takes in a user inquiry, which is then passed to the retriever to fetch relevant documents. Those documents (and original inputs) are then passed to an LLM to generate a response" + ], + "metadata": { + "id": "H9NEdN3YtQyA" + } + }, + { + "cell_type": "code", + "source": [ + "response = rag_chain.invoke({\"input\": \"4 mcq about yolo 9 with answers\"})\n", + "print(response[\"answer\"])" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "I6K4PsNhSkez", + "outputId": "f4999496-d684-47b9-c601-7df2384a0a09" + }, + "execution_count": 31, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "MCQ 1: Which YOLOv9 model has the highest number of parameters?\n", + "a) YOLOv9-S\n", + "b) YOLOv9-M\n", + "c) YOLOv9-C\n", + "d) YOLOv9-E\n", + "\n", + "Answer: c) YOLOv9-C\n", + "\n", + "MCQ 2: Compared to YOLOv8-X, which YOLOv9 model has 27% less calculations?\n", + "a) YOLOv9-S\n", + "b) YOLOv9-M\n", + "c) YOLOv9-C\n", + "d) YOLOv9-E\n", + "\n", + "Answer: d) YOLOv9-E\n", + "\n", + "MCQ 3: Which YOLOv9 model shows a significant improvement of 1.7% in AP compared to YOLOv8-X?\n", + "a) YOLOv9-S\n", + "b) YOLOv9-M\n", + "c) YOLOv9-C\n", + "d) YOLOv9-E\n", + "\n", + "Answer: d) YOLOv9-E\n", + "\n", + "MCQ 4: Among YOLO MS-S, YOLO MS, YOLOv7 AF, and YOLOv8-X, which is the best performing method for large models?\n", + "a) YOLO MS-S\n", + "b) YOLO MS\n", + "c) YOLOv7 AF\n", + "d) YOLOv8-X\n", + "\n", + "Answer: d) YOLOv8-X\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "response = rag_chain.invoke({\"input\": \" mcq about yolo_9 with answers\"})\n", + "print(response[\"answer\"])" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "KN8l__yqg0ec", + "outputId": "284b5992-e960-4ec9-9828-cbcfb8df2a61" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "1. Which YOLOv9 model has 42% less parameters and 22% less calculations compared to YOLOv7 AF but achieves the same Average Precision (AP)?\n", + " A) YOLOv9-C\n", + " B) YOLOv9-E\n", + " C) YOLOv9-S\n", + " D) YOLOv9-M\n", + "\n", + "2. How much improvement in Average Precision (AP) does YOLOv9-E show compared to YOLOv8-X?\n", + " A) 0.4%\n", + " B) 1.7%\n", + " C) 0.6%\n", + " D) 0.5%\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "response = rag_chain.invoke({\"input\": \"Programmable Gradient Information\"})\n", + "print(response[\"answer\"])" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "lNCSE9p5uhcj", + "outputId": "bbcab11a-7eca-42a8-a27a-02d883da54c7" + }, + "execution_count": 33, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "MCQ: What are the three components of Programmable Gradient Information (PGI) as proposed in the study?\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "##**Try**" + ], + "metadata": { + "id": "iKOoM0kRv-vE" + } + }, + { + "cell_type": "code", + "source": [ + "combine_docs_chain = create_stuff_documents_chain(llm_sturctured, prompt)\n", + "rag_chain = create_retrieval_chain(retriever, combine_docs_chain)" + ], + "metadata": { + "id": "Mu7nDewowB5h" + }, + "execution_count": 34, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "response = rag_chain.invoke({\"input\": \"Programmable Gradient Information\"})\n", + "print(response[\"answer\"])" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 356 + }, + "id": "mDyj78c6wEPv", + "outputId": "30be2448-1a8e-4bf2-a470-26947262da65" + }, + "execution_count": 35, + "outputs": [ + { + "output_type": "error", + "ename": "ValidationError", + "evalue": "1 validation error for Generation\ntext\n Input should be a valid string [type=string_type, input_value=Questions(no_of_questions...answer', options=None)]), input_type=Questions]\n For further information visit https://errors.pydantic.dev/2.10/v/string_type", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mValidationError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mresponse\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrag_chain\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minvoke\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m{\u001b[0m\u001b[0;34m\"input\"\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m\"Programmable Gradient Information\"\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 2\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresponse\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"answer\"\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.11/dist-packages/langchain_core/runnables/base.py\u001b[0m in \u001b[0;36minvoke\u001b[0;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[1;32m 5358\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mOptional\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mAny\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 5359\u001b[0m ) -> Output:\n\u001b[0;32m-> 5360\u001b[0;31m return self.bound.invoke(\n\u001b[0m\u001b[1;32m 5361\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5362\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_merge_configs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mconfig\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.11/dist-packages/langchain_core/runnables/base.py\u001b[0m in \u001b[0;36minvoke\u001b[0;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[1;32m 3022\u001b[0m \u001b[0minput\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcontext\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstep\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minvoke\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\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[1;32m 3023\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-> 3024\u001b[0;31m \u001b[0minput\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcontext\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstep\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minvoke\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\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 3025\u001b[0m \u001b[0;31m# finish the root run\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3026\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\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.11/dist-packages/langchain_core/runnables/passthrough.py\u001b[0m in \u001b[0;36minvoke\u001b[0;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[1;32m 492\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 493\u001b[0m ) -> dict[str, Any]:\n\u001b[0;32m--> 494\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_call_with_config\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_invoke\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\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 495\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 496\u001b[0m async def _ainvoke(\n", + "\u001b[0;32m/usr/local/lib/python3.11/dist-packages/langchain_core/runnables/base.py\u001b[0m in \u001b[0;36m_call_with_config\u001b[0;34m(self, func, input, config, run_type, serialized, **kwargs)\u001b[0m\n\u001b[1;32m 1920\u001b[0m output = cast(\n\u001b[1;32m 1921\u001b[0m \u001b[0mOutput\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1922\u001b[0;31m context.run(\n\u001b[0m\u001b[1;32m 1923\u001b[0m \u001b[0mcall_func_with_variable_args\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;31m# type: ignore[arg-type]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1924\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;31m# type: ignore[arg-type]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.11/dist-packages/langchain_core/runnables/config.py\u001b[0m in \u001b[0;36mcall_func_with_variable_args\u001b[0;34m(func, input, config, run_manager, **kwargs)\u001b[0m\n\u001b[1;32m 394\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mrun_manager\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0maccepts_run_manager\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\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 395\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"run_manager\"\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrun_manager\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 396\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# type: ignore[call-arg]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 397\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 398\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.11/dist-packages/langchain_core/runnables/passthrough.py\u001b[0m in \u001b[0;36m_invoke\u001b[0;34m(self, input, run_manager, config, **kwargs)\u001b[0m\n\u001b[1;32m 479\u001b[0m return {\n\u001b[1;32m 480\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 481\u001b[0;31m **self.mapper.invoke(\n\u001b[0m\u001b[1;32m 482\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 483\u001b[0m \u001b[0mpatch_config\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mconfig\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcallbacks\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mrun_manager\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mget_child\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[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.11/dist-packages/langchain_core/runnables/base.py\u001b[0m in \u001b[0;36minvoke\u001b[0;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[1;32m 3727\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstep\u001b[0m \u001b[0;32min\u001b[0m \u001b[0msteps\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\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 3728\u001b[0m ]\n\u001b[0;32m-> 3729\u001b[0;31m \u001b[0moutput\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfuture\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfuture\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mzip\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msteps\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfutures\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 3730\u001b[0m \u001b[0;31m# finish the root run\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3731\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\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.11/dist-packages/langchain_core/runnables/base.py\u001b[0m in \u001b[0;36m\u001b[0;34m(.0)\u001b[0m\n\u001b[1;32m 3727\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mstep\u001b[0m \u001b[0;32min\u001b[0m \u001b[0msteps\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mitems\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 3728\u001b[0m ]\n\u001b[0;32m-> 3729\u001b[0;31m \u001b[0moutput\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0mkey\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mfuture\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mresult\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mkey\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfuture\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mzip\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msteps\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfutures\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 3730\u001b[0m \u001b[0;31m# finish the root run\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3731\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/lib/python3.11/concurrent/futures/_base.py\u001b[0m in \u001b[0;36mresult\u001b[0;34m(self, timeout)\u001b[0m\n\u001b[1;32m 454\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mCancelledError\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 455\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_state\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0mFINISHED\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 456\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__get_result\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 457\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 458\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mTimeoutError\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/lib/python3.11/concurrent/futures/_base.py\u001b[0m in \u001b[0;36m__get_result\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 399\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_exception\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 400\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 401\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_exception\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 402\u001b[0m \u001b[0;32mfinally\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 403\u001b[0m \u001b[0;31m# Break a reference cycle with the exception in self._exception\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/lib/python3.11/concurrent/futures/thread.py\u001b[0m in \u001b[0;36mrun\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 56\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 57\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 58\u001b[0;31m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mself\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 59\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mexc\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 60\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfuture\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_exception\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mexc\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.11/dist-packages/langchain_core/runnables/base.py\u001b[0m in \u001b[0;36m_invoke_step\u001b[0;34m(step, input, config, key)\u001b[0m\n\u001b[1;32m 3711\u001b[0m \u001b[0mcontext\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcopy_context\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 3712\u001b[0m \u001b[0mcontext\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0m_set_config_context\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mchild_config\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3713\u001b[0;31m return context.run(\n\u001b[0m\u001b[1;32m 3714\u001b[0m \u001b[0mstep\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minvoke\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3715\u001b[0m \u001b[0minput\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.11/dist-packages/langchain_core/runnables/base.py\u001b[0m in \u001b[0;36minvoke\u001b[0;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[1;32m 5358\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mOptional\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mAny\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 5359\u001b[0m ) -> Output:\n\u001b[0;32m-> 5360\u001b[0;31m return self.bound.invoke(\n\u001b[0m\u001b[1;32m 5361\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5362\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_merge_configs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mconfig\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.11/dist-packages/langchain_core/runnables/base.py\u001b[0m in \u001b[0;36minvoke\u001b[0;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[1;32m 3022\u001b[0m \u001b[0minput\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcontext\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstep\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minvoke\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\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[1;32m 3023\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-> 3024\u001b[0;31m \u001b[0minput\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcontext\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstep\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minvoke\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mconfig\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 3025\u001b[0m \u001b[0;31m# finish the root run\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3026\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mBaseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\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.11/dist-packages/langchain_core/output_parsers/base.py\u001b[0m in \u001b[0;36minvoke\u001b[0;34m(self, input, config, **kwargs)\u001b[0m\n\u001b[1;32m 200\u001b[0m )\n\u001b[1;32m 201\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--> 202\u001b[0;31m return self._call_with_config(\n\u001b[0m\u001b[1;32m 203\u001b[0m \u001b[0;32mlambda\u001b[0m \u001b[0minner_input\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mparse_result\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mGeneration\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtext\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0minner_input\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[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 204\u001b[0m \u001b[0minput\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.11/dist-packages/langchain_core/runnables/base.py\u001b[0m in \u001b[0;36m_call_with_config\u001b[0;34m(self, func, input, config, run_type, serialized, **kwargs)\u001b[0m\n\u001b[1;32m 1920\u001b[0m output = cast(\n\u001b[1;32m 1921\u001b[0m \u001b[0mOutput\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1922\u001b[0;31m context.run(\n\u001b[0m\u001b[1;32m 1923\u001b[0m \u001b[0mcall_func_with_variable_args\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;31m# type: ignore[arg-type]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1924\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;31m# type: ignore[arg-type]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.11/dist-packages/langchain_core/runnables/config.py\u001b[0m in \u001b[0;36mcall_func_with_variable_args\u001b[0;34m(func, input, config, run_manager, **kwargs)\u001b[0m\n\u001b[1;32m 394\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mrun_manager\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0maccepts_run_manager\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\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 395\u001b[0m \u001b[0mkwargs\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m\"run_manager\"\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrun_manager\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 396\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# type: ignore[call-arg]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 397\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 398\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.11/dist-packages/langchain_core/output_parsers/base.py\u001b[0m in \u001b[0;36m\u001b[0;34m(inner_input)\u001b[0m\n\u001b[1;32m 201\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 202\u001b[0m return self._call_with_config(\n\u001b[0;32m--> 203\u001b[0;31m \u001b[0;32mlambda\u001b[0m \u001b[0minner_input\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mparse_result\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mGeneration\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtext\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0minner_input\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[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 204\u001b[0m \u001b[0minput\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 205\u001b[0m \u001b[0mconfig\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.11/dist-packages/langchain_core/load/serializable.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 123\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m__init__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0mAny\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m->\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 124\u001b[0m \u001b[0;34m\"\"\"\"\"\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 125\u001b[0;31m \u001b[0msuper\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__init__\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 126\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 127\u001b[0m \u001b[0;34m@\u001b[0m\u001b[0mclassmethod\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/usr/local/lib/python3.11/dist-packages/pydantic/main.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, **data)\u001b[0m\n\u001b[1;32m 212\u001b[0m \u001b[0;31m# `__tracebackhide__` tells pytest and some other tools to omit this function from tracebacks\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 213\u001b[0m \u001b[0m__tracebackhide__\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 214\u001b[0;31m \u001b[0mvalidated_self\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__pydantic_validator__\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mvalidate_python\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself_instance\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mself\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 215\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mvalidated_self\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 216\u001b[0m warnings.warn(\n", + "\u001b[0;31mValidationError\u001b[0m: 1 validation error for Generation\ntext\n Input should be a valid string [type=string_type, input_value=Questions(no_of_questions...answer', options=None)]), input_type=Questions]\n For further information visit https://errors.pydantic.dev/2.10/v/string_type" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "#**Try parsing**" + ], + "metadata": { + "id": "yKasdGr8gps9" + } + }, + { + "cell_type": "code", + "source": [ + "def parse_generated_question(question_str: str):\n", + " try:\n", + " question_data = Question.parse_raw(question_str)\n", + " return question_data\n", + " except Exception as e:\n", + " print(f\"Error parsing question: {e}\")\n", + " return None\n" + ], + "metadata": { + "id": "WLvMPUKigdl9" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "parse_generated_question(response)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "lFe-bV1igdi9", + "outputId": "62d015ea-b210-48b0-a768-981d42523f7a" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Error parsing question: 1 validation error for Question\n", + "__root__\n", + " the JSON object must be str, bytes or bytearray, not dict [type=type_error, input_value={'input': ' mcq about yol... C) 0.6%\\n D) 0.5%'}, input_type=dict]\n" + ] + }, + { + "output_type": "stream", + "name": "stderr", + "text": [ + ":3: PydanticDeprecatedSince20: The `parse_raw` method is deprecated; if your data is JSON use `model_validate_json`, otherwise load the data then use `model_validate` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.10/migration/\n", + " question_data = Question.parse_raw(question_str)\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "response = rag_chain.invoke({\"input\": \"heartattacks\"})\n", + "print(response[\"answer\"])" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "gh2IDzK5T3hv", + "outputId": "5aefc0f0-98cb-4ec5-ac48-c09e09620040" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "\n", + "What is the average precision for YOLOv8-N [15]?\n", + "\n", + "What is the highest average precision for YOLOv8-X [15]?\n", + "\n", + "What is the average precision for DAMO YOLO-T [75]?\n", + "\n", + "What is the highest average precision for Gold YOLO-N [61]?\n", + "\n", + "What is the average precision for YOLO MS-N [7]?\n", + "\n", + "What is the highest average precision for GELAN-S (Ours)?\n", + "\n", + "What is the average precision for YOLOv9-E (S)?\n", + "\n", + "What is the highest average precision for PPYOLOE+-L [74] (C)?\n", + "\n", + "What is the average precision for PPYOLOE-L [74] (I)?\n", + "\n", + "What is the highest average precision for RTMDet-L [44] (I)?\n", + "\n", + "What is the average precision for YOLOR-CSP [66] (C)?\n", + "\n", + "What is the highest average precision for YOLOv9-E (S)?\n", + "\n", + "What is the average precision for YOLOv6-L v3.0 [30] (D)?\n", + "\n", + "What is the highest average precision for RT DETR-X [43] (I)?\n", + "\n", + "What is the average precision for Gold YOLO-L [61] (C)?\n", + "\n", + "What is the highest average precision for Gold YOLO-L [61] (D)?\n", + "\n", + "What is the average precision for Gold YOLO-L [61] (I)?\n", + "\n", + "What is the highest average precision for RT DETR-R101 [43] (I)?\n", + "\n", + "What is the average precision for RTMDet-X [44] (I)?\n", + "\n", + "What is the highest average precision for YOLOR-CSP-X [66] (C)?\n", + "\n", + "What is the average precision for PPYOLOE+-X [74] (C)?\n", + "\n", + "What is the highest average precision for PPYOLOE-X [74] (I)?\n", + "\n", + "What is the average precision for YOLOR-CSP [66] (C)?\n", + "\n", + "What is the highest average precision for RT DETR-R50 [43] (I)?\n", + "\n", + "What is the average precision for YOLOv9-E (S)?\n", + "\n", + "What is the highest average precision for YOLOv6-L v3.0 [30] (D)?\n", + "\n", + "What is the average precision for Gold YOLO-L [61] (C)?\n", + "\n", + "What is the highest average precision for Gold YOLO-L [61] (D)?\n", + "\n", + "What is the average precision for Gold YOLO-L [61] (I)?\n", + "\n", + "What\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "response = rag_chain.invoke({\"input\": \"Gradient Information?\"})\n", + "print(response[\"answer\"])" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "AaUl0VtyT74_", + "outputId": "413e9dfc-987a-407f-f7c7-66569c895032" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "\n", + "What is the proposed Programmable Gradient Information (PGI) framework and what are its components?\n", + "\n", + "How does the information bottleneck principle relate to the problem of unreliable gradients in deep neural networks?\n", + "\n", + "Can you explain the concept of reversible functions and how they can be used to solve the problem of unreliable gradients in deep neural networks?\n" + ] + } + ] + }, + { + "cell_type": "code", + "source": [ + "response = rag_chain.invoke({\"input\": \"quadratic equation\"})\n", + "print(response[\"answer\"])" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "UPu_H2pdUlNF", + "outputId": "64bb7a14-e176-4629-9425-410822b510ce" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\n", + "\n", + "What is the goal for the lightweight model in terms of preserving information?\n", + "\n", + "Can the proposed deep neural network training method generate reliable gradients for shallow and lightweight neural networks?\n", + "\n", + "How does the proposed method address the issue of losing important information in the feedforward stage?\n", + "\n", + "What is the difficulty in fully preserving the information of X?\n", + "\n", + "What is the difference between I(Y, X) and I(X, X)?\n" + ] + } + ] + } + ] +} \ No newline at end of file