Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save inspirit941/e34b776f5c59cf1ba0b7a0d7fdfdf6bc to your computer and use it in GitHub Desktop.
Save inspirit941/e34b776f5c59cf1ba0b7a0d7fdfdf6bc to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"326b5526433d4902bd3d31ccd1b9c087": {
"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_057a4ed7f2da410988806acb4404fbc0",
"IPY_MODEL_a9a7df757ae54f5492c12aacdc49e715",
"IPY_MODEL_1d2e201ae4bf48609eb8f5e9af839468"
],
"layout": "IPY_MODEL_d7f2c0ef555f4a56bd50c812e6051e32"
}
},
"057a4ed7f2da410988806acb4404fbc0": {
"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_42c6d28bbe7b46998818804054f75b38",
"placeholder": "​",
"style": "IPY_MODEL_cdac95aab5a745cea004a4bc152a08b0",
"value": "Fetching 5 files: 100%"
}
},
"a9a7df757ae54f5492c12aacdc49e715": {
"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_762a1751bfa64291aa34636b3443d2e7",
"max": 5,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_66009c1ca2e5467582bf46da04b9c397",
"value": 5
}
},
"1d2e201ae4bf48609eb8f5e9af839468": {
"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_7d41af47fcf341a681c1e24fcf984111",
"placeholder": "​",
"style": "IPY_MODEL_300db5e38e0940af8cbdf9fcd868da74",
"value": " 5/5 [00:09<00:00,  5.40s/it]"
}
},
"d7f2c0ef555f4a56bd50c812e6051e32": {
"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
}
},
"42c6d28bbe7b46998818804054f75b38": {
"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
}
},
"cdac95aab5a745cea004a4bc152a08b0": {
"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": ""
}
},
"762a1751bfa64291aa34636b3443d2e7": {
"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
}
},
"66009c1ca2e5467582bf46da04b9c397": {
"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": ""
}
},
"7d41af47fcf341a681c1e24fcf984111": {
"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
}
},
"300db5e38e0940af8cbdf9fcd868da74": {
"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": ""
}
},
"5403d252723849aabcbf9d66e9d5f75d": {
"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_f78c8dfb0b644104ad836638552499a1",
"IPY_MODEL_4a85338d03d44a9f8b95102274eb9a11",
"IPY_MODEL_89310cc9df9e4e918455662ba3baf71e"
],
"layout": "IPY_MODEL_dec4da4eec5e46e7b0ef4351403e9700"
}
},
"f78c8dfb0b644104ad836638552499a1": {
"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_ba8775e7832d4cf89e1a3ba1e9e352a7",
"placeholder": "​",
"style": "IPY_MODEL_df5521089beb4e46a40a2ab19d4f7391",
"value": "tokenizer.json: 100%"
}
},
"4a85338d03d44a9f8b95102274eb9a11": {
"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_952bc4fd749f4768ab1b23e9c5a94c6e",
"max": 711396,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_00cffb0e4cf24ffb890a307e57afdd85",
"value": 711396
}
},
"89310cc9df9e4e918455662ba3baf71e": {
"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_bff286ecc8434596a52b74bd0d71cddc",
"placeholder": "​",
"style": "IPY_MODEL_733c45e6efa144d5b01558e24d3646b7",
"value": " 711k/711k [00:00<00:00, 897kB/s]"
}
},
"dec4da4eec5e46e7b0ef4351403e9700": {
"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
}
},
"ba8775e7832d4cf89e1a3ba1e9e352a7": {
"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
}
},
"df5521089beb4e46a40a2ab19d4f7391": {
"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": ""
}
},
"952bc4fd749f4768ab1b23e9c5a94c6e": {
"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
}
},
"00cffb0e4cf24ffb890a307e57afdd85": {
"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": ""
}
},
"bff286ecc8434596a52b74bd0d71cddc": {
"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
}
},
"733c45e6efa144d5b01558e24d3646b7": {
"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": ""
}
},
"3994cadcf2494d3d95fb6417e21d0380": {
"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_2d33d2a0f13d45f580c85b5e5fa664da",
"IPY_MODEL_43407fc260194c718d2cf686bdbf1494",
"IPY_MODEL_36cd36a4339940768716c3b3f352aeb8"
],
"layout": "IPY_MODEL_3f67ba8b6eff453e87b8536d696eb3ae"
}
},
"2d33d2a0f13d45f580c85b5e5fa664da": {
"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_b7d40162de7d4b0c869b0f65a1fd45ce",
"placeholder": "​",
"style": "IPY_MODEL_fb9403f913034c98ac468dbfb77d27a6",
"value": "special_tokens_map.json: 100%"
}
},
"43407fc260194c718d2cf686bdbf1494": {
"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_15ea0e8ed9764d968e54096f971a567a",
"max": 695,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_feba3c7e8f8547bc982372c2e4dc116a",
"value": 695
}
},
"36cd36a4339940768716c3b3f352aeb8": {
"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_42896a2b6e06450390b5e05e7789a6ca",
"placeholder": "​",
"style": "IPY_MODEL_19788c55a5e64795a6927cf9d4b6f4ac",
"value": " 695/695 [00:00<00:00, 38.2kB/s]"
}
},
"3f67ba8b6eff453e87b8536d696eb3ae": {
"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
}
},
"b7d40162de7d4b0c869b0f65a1fd45ce": {
"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
}
},
"fb9403f913034c98ac468dbfb77d27a6": {
"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": ""
}
},
"15ea0e8ed9764d968e54096f971a567a": {
"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
}
},
"feba3c7e8f8547bc982372c2e4dc116a": {
"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": ""
}
},
"42896a2b6e06450390b5e05e7789a6ca": {
"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
}
},
"19788c55a5e64795a6927cf9d4b6f4ac": {
"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": ""
}
},
"5208f439666a479aa5dda68c1c2374ca": {
"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_fbe34b7fe413413a83fed0c70d5ae261",
"IPY_MODEL_43cc70af330a43948e92d8973381d00e",
"IPY_MODEL_568fe50cb9974195b9a74e2a748f85e1"
],
"layout": "IPY_MODEL_b1ca5ca48caf48d7b74604c3397db1fc"
}
},
"fbe34b7fe413413a83fed0c70d5ae261": {
"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_741312b1ca424c0c8ac84747db6d7e2d",
"placeholder": "​",
"style": "IPY_MODEL_f915b015df634a1eb665266a1fdf99d7",
"value": "model_optimized.onnx: 100%"
}
},
"43cc70af330a43948e92d8973381d00e": {
"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_93a939cce2b646e68e8e9e23b7090052",
"max": 217824172,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_a0a9590fd48341fe9abe54acb6d0f0b3",
"value": 217824172
}
},
"568fe50cb9974195b9a74e2a748f85e1": {
"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_236b133c1e26455d9cabb0faf3d16a85",
"placeholder": "​",
"style": "IPY_MODEL_16ebf2335b194aa0adaab7432d2caa89",
"value": " 218M/218M [00:08<00:00, 25.0MB/s]"
}
},
"b1ca5ca48caf48d7b74604c3397db1fc": {
"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
}
},
"741312b1ca424c0c8ac84747db6d7e2d": {
"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
}
},
"f915b015df634a1eb665266a1fdf99d7": {
"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": ""
}
},
"93a939cce2b646e68e8e9e23b7090052": {
"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
}
},
"a0a9590fd48341fe9abe54acb6d0f0b3": {
"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": ""
}
},
"236b133c1e26455d9cabb0faf3d16a85": {
"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
}
},
"16ebf2335b194aa0adaab7432d2caa89": {
"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": ""
}
},
"6b140bab80eb43d39e6f44d886bffd83": {
"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_77d9f31089994b2e855a2b9e17fce3ae",
"IPY_MODEL_54c5e8fe845f48d592af8ccb933cf636",
"IPY_MODEL_56377b1831af409f806260753da88997"
],
"layout": "IPY_MODEL_197bb8499a894947ba515f2e33a082ec"
}
},
"77d9f31089994b2e855a2b9e17fce3ae": {
"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_b1a3806658d7415c9c854f10ca6c6106",
"placeholder": "​",
"style": "IPY_MODEL_e84c938c3c93479ea7dbb5c0e62e2ddc",
"value": "config.json: 100%"
}
},
"54c5e8fe845f48d592af8ccb933cf636": {
"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_1516e853177a447d8071bd6e6a4fb62f",
"max": 740,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_28827cbbd66f4817b56b74b2db313708",
"value": 740
}
},
"56377b1831af409f806260753da88997": {
"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_d8237c47189942439c15435478885701",
"placeholder": "​",
"style": "IPY_MODEL_142c7570473642e4a7eac37291f76003",
"value": " 740/740 [00:00<00:00, 33.5kB/s]"
}
},
"197bb8499a894947ba515f2e33a082ec": {
"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
}
},
"b1a3806658d7415c9c854f10ca6c6106": {
"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
}
},
"e84c938c3c93479ea7dbb5c0e62e2ddc": {
"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": ""
}
},
"1516e853177a447d8071bd6e6a4fb62f": {
"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
}
},
"28827cbbd66f4817b56b74b2db313708": {
"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": ""
}
},
"d8237c47189942439c15435478885701": {
"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
}
},
"142c7570473642e4a7eac37291f76003": {
"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": ""
}
},
"755acb2571f549ce8e23847ac7fd1e2e": {
"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_f129cffe41014170a28a918acb65f7bf",
"IPY_MODEL_9d5c45a0a7504aae9e701386364c3d2d",
"IPY_MODEL_5d0caac313b94e1489edd233fbb2754a"
],
"layout": "IPY_MODEL_bc42ae1b7c8542a0b546ddda51a5b6d5"
}
},
"f129cffe41014170a28a918acb65f7bf": {
"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_bc8aa6f790ef48fcbcad2ef9d1544db4",
"placeholder": "​",
"style": "IPY_MODEL_9b12eb438ecb44a796544870d647e22b",
"value": "tokenizer_config.json: 100%"
}
},
"9d5c45a0a7504aae9e701386364c3d2d": {
"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_60bfdc366ca64618b36a0f49ba6dc0d8",
"max": 1242,
"min": 0,
"orientation": "horizontal",
"style": "IPY_MODEL_48a120680f1d4eca99fa3ba847c8ae06",
"value": 1242
}
},
"5d0caac313b94e1489edd233fbb2754a": {
"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_4a7ca1cf8a554d9fa550b60eed1ffac2",
"placeholder": "​",
"style": "IPY_MODEL_24dff829c98a417a9a359de35faf06b7",
"value": " 1.24k/1.24k [00:00<00:00, 76.3kB/s]"
}
},
"bc42ae1b7c8542a0b546ddda51a5b6d5": {
"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
}
},
"bc8aa6f790ef48fcbcad2ef9d1544db4": {
"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
}
},
"9b12eb438ecb44a796544870d647e22b": {
"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": ""
}
},
"60bfdc366ca64618b36a0f49ba6dc0d8": {
"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
}
},
"48a120680f1d4eca99fa3ba847c8ae06": {
"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": ""
}
},
"4a7ca1cf8a554d9fa550b60eed1ffac2": {
"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
}
},
"24dff829c98a417a9a359de35faf06b7": {
"model_module": "@jupyter-widgets/controls",
"model_name": "DescriptionStyleModel",
"model_module_version": "1.5.0",
"state": {
"_model_module": "@jupyter-widgets/controls",
"_model_module_version": "1.5.0",
"_model_name": "DescriptionStyleModel",
"_view_count": null,
"_view_module": "@jupyter-widgets/base",
"_view_module_version": "1.2.0",
"_view_name": "StyleView",
"description_width": ""
}
}
}
}
},
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"id": "3-wvIiFhkBYR",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "9e8f23ed-64d7-465d-c61a-31d436c03503"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
"cudf-cu12 24.4.1 requires protobuf<5,>=3.20, but you have protobuf 5.26.1 which is incompatible.\n",
"google-ai-generativelanguage 0.6.2 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"google-api-core 2.11.1 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0.dev0,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"google-cloud-aiplatform 1.48.0 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"google-cloud-bigquery-connection 1.12.1 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"google-cloud-bigquery-storage 2.24.0 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"google-cloud-datastore 2.15.2 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"google-cloud-firestore 2.11.1 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"google-cloud-functions 1.13.3 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"google-cloud-iam 2.15.0 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"google-cloud-language 2.13.3 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"google-cloud-resource-manager 1.12.3 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"google-cloud-translate 3.11.3 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"googleapis-common-protos 1.63.0 requires protobuf!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0.dev0,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"grpc-google-iam-v1 0.13.0 requires protobuf!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.19.5, but you have protobuf 5.26.1 which is incompatible.\n",
"proto-plus 1.23.0 requires protobuf<5.0.0dev,>=3.19.0, but you have protobuf 5.26.1 which is incompatible.\n",
"tensorflow 2.15.0 requires protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3, but you have protobuf 5.26.1 which is incompatible.\n",
"tensorflow-metadata 1.15.0 requires protobuf<4.21,>=3.20.3; python_version < \"3.11\", but you have protobuf 5.26.1 which is incompatible.\u001b[0m\u001b[31m\n",
"\u001b[0m Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
" Building wheel for langdetect (setup.py) ... \u001b[?25l\u001b[?25hdone\n",
"\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
"transformers 4.40.1 requires tokenizers<0.20,>=0.19, but you have tokenizers 0.15.2 which is incompatible.\u001b[0m\u001b[31m\n",
"\u001b[0m Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
" Installing backend dependencies ... \u001b[?25l\u001b[?25hdone\n",
" Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
" Building wheel for llama-cpp-python (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n"
]
}
],
"source": [
"!pip -qqq install pip --progress-bar off\n",
"!pip -qqq install langchain-groq==0.1.3 --progress-bar off ## llama3 api using groq.\n",
"!pip -qqq install langchain==0.1.17 --progress-bar off\n",
"!pip -qqq install llama-parse==0.1.3 --progress-bar off ## for parsing documents \n",
"!pip -qqq install qdrant-client==1.9.1 --progress-bar off ## Vector DB\n",
"!pip -qqq install \"unstructured[md]\"==0.13.6 --progress-bar off ## for markdown parsing\n",
"!pip -qqq install fastembed==0.2.7 --progress-bar off # embedding component\n",
"!pip -qqq install flashrank==0.2.4 --progress-bar off # for reranking"
]
},
{
"cell_type": "code",
"source": [
"import os\n",
"import textwrap\n",
"from pathlib import Path\n",
"\n",
"from google.colab import userdata\n",
"from IPython.display import Markdown\n",
"from langchain.chains import RetrievalQA\n",
"from langchain.prompts import PromptTemplate\n",
"from langchain.retrievers import ContextualCompressionRetriever\n",
"from langchain.retrievers.document_compressors import FlashrankRerank\n",
"from langchain.text_splitter import RecursiveCharacterTextSplitter\n",
"from langchain.vectorstores import Qdrant\n",
"from langchain_community.document_loaders import UnstructuredMarkdownLoader\n",
"from langchain_community.embeddings.fastembed import FastEmbedEmbeddings\n",
"from langchain_core.prompts import ChatPromptTemplate\n",
"from langchain_groq import ChatGroq\n",
"from llama_parse import LlamaParse\n",
"\n",
"os.environ[\"GROQ_API_KEY\"] = userdata.get(\"GROQ_API_KEY\")\n",
"\n",
"\n",
"def print_response(response):\n",
" response_txt = response[\"result\"]\n",
" for chunk in response_txt.split(\"\\n\"):\n",
" if not chunk:\n",
" print()\n",
" continue\n",
" print(\"\\n\".join(textwrap.wrap(chunk, 100, break_long_words=False)))"
],
"metadata": {
"id": "WH_J7_kol_ay"
},
"execution_count": 2,
"outputs": []
},
{
"cell_type": "code",
"source": [
"!mkdir data\n",
"!gdown 1ee-BhQiH-S9a2IkHiFbJz9eX_SfcZ5m9 -O \"data/meta-earnings.pdf\""
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "59M0lL4vjkGW",
"outputId": "ae83f61d-b7bc-4bf2-b84a-d7573e069731"
},
"execution_count": 3,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Downloading...\n",
"From: https://drive.google.com/uc?id=1ee-BhQiH-S9a2IkHiFbJz9eX_SfcZ5m9\n",
"To: /content/data/meta-earnings.pdf\n",
"\r 0% 0.00/160k [00:00<?, ?B/s]\r100% 160k/160k [00:00<00:00, 87.2MB/s]\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"## Document Parsing"
],
"metadata": {
"id": "z6kHJJRDvawJ"
}
},
{
"cell_type": "code",
"source": [
"instruction = \"\"\"The provided document is Meta First Quarter 2024 Results.\n",
"This form provides detailed financial information about the company's performance for a specific quarter.\n",
"It includes unaudited financial statements, management discussion and analysis, and other relevant disclosures required by the SEC.\n",
"It contains many tables.\n",
"Try to be precise while answering the questions\"\"\"\n",
"\n",
"parser = LlamaParse(\n",
" api_key=userdata.get(\"LLAMA_PARSE\"),\n",
" result_type=\"markdown\",\n",
" parsing_instruction=instruction,\n",
" max_timeout=5000,\n",
")\n",
"\n",
"llama_parse_documents = await parser.aload_data(\"./data/meta-earnings.pdf\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "eHRFF7lF0gV2",
"outputId": "4038cb07-d61a-4d13-8f9f-2f3c5a1ace16"
},
"execution_count": 4,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Started parsing the file under job_id 8d990f24-3c58-4399-bda7-2af4324e4dc0\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"parsed_doc = llama_parse_documents[0]"
],
"metadata": {
"id": "tTm_9yk_nMD8"
},
"execution_count": 5,
"outputs": []
},
{
"cell_type": "code",
"source": [
"Markdown(parsed_doc.text[:4096])"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000
},
"id": "6acdg4sq736P",
"outputId": "e0cad626-ab47-45bd-d90b-7499abe491a0"
},
"execution_count": 6,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<IPython.core.display.Markdown object>"
],
"text/markdown": "## Meta Reports First Quarter 2024 Results\n\nMENLO PARK, Calif. – April 24, 2024 – Meta Platforms, Inc. (Nasdaq: META) today reported financial results for the quarter ended March 31, 2024.\n\n\"It's been a good start to the year,\" said Mark Zuckerberg, Meta founder and CEO. \"The new version of Meta AI with Llama 3 is another step towards building the world's leading AI. We're seeing healthy growth across our apps and we continue making steady progress building the metaverse as well.\"\n\n### First Quarter 2024 Financial Highlights\n\n|In millions, except percentages and per share amounts|Three Months Ended March 31,|2024|2023|% Change|\n|---|---|---|---|---|\n|Revenue|$36,455|$28,645|27%| |\n|Costs and expenses|$22,637|$21,418|6%| |\n|Income from operations|$13,818|$7,227|91%| |\n|Operating margin|38%|25%| | |\n|Provision for income taxes|$1,814|$1,598|14%| |\n|Effective tax rate|13%|22%| | |\n|Net income|$12,369|$5,709|117%| |\n|Diluted earnings per share (EPS)|$4.71|$2.20|114%| |\n\n### First Quarter 2024 Operational and Other Financial Highlights\n\n- Family daily active people (DAP) – DAP was 3.24 billion on average for March 2024, an increase of 7% year-over-year.\n- Ad impressions – Ad impressions delivered across our Family of Apps increased by 20% year-over-year.\n- Average price per ad – Average price per ad increased by 6% year-over-year.\n- Revenue – Total revenue and revenue on a constant currency basis were $36.46 billion and $36.35 billion, respectively, both of which increased by 27% year-over-year.\n- Costs and expenses – Total costs and expenses were $22.64 billion, an increase of 6% year-over-year.\n- Capital expenditures – Capital expenditures, including principal payments on finance leases, were $6.72 billion.\n- Capital return program – Share repurchases were $14.64 billion of our Class A common stock and dividends payments were $1.27 billion.\n- Cash, cash equivalents, and marketable securities – Cash, cash equivalents, and marketable securities were $58.12 billion as of March 31, 2024. Free cash flow was $12.53 billion.\n- Headcount – Headcount was 69,329 as of March 31, 2024, a decrease of 10% year-over-year.\n---\n## CFO Outlook Commentary\n\nWe expect second quarter 2024 total revenue to be in the range of $36.5-39 billion. Our guidance assumes foreign currency is a 1% headwind to year-over-year total revenue growth, based on current exchange rates.\n\nWe expect full-year 2024 total expenses to be in the range of $96-99 billion, updated from our prior outlook of $94-99 billion due to higher infrastructure and legal costs. For Reality Labs, we continue to expect operating losses to increase meaningfully year-over-year due to our ongoing product development efforts and our investments to further scale our ecosystem.\n\nWe anticipate our full-year 2024 capital expenditures will be in the range of $35-40 billion, increased from our prior range of $30-37 billion as we continue to accelerate our infrastructure investments to support our artificial intelligence (AI) roadmap. While we are not providing guidance for years beyond 2024, we expect capital expenditures will continue to increase next year as we invest aggressively to support our ambitious AI research and product development efforts.\n\nAbsent any changes to our tax landscape, we expect our full-year 2024 tax rate to be in the mid-teens.\n\nIn addition, we continue to monitor an active regulatory landscape, including the increasing legal and regulatory headwinds in the EU and the U.S. that could significantly impact our business and our financial results.\n\nQ1 was a good start to the year. We're seeing strong momentum within our Family of Apps and are making important progress on our longer-term AI and Reality Labs initiatives that have the potential to transform the way people interact with our services over the coming years.\n---\n## Webcast and Conference Call Information\n\nMeta will host a conference call to discuss the results at 2:00 p.m. PT / 5:00 p.m. ET today. The live webcast of Meta's earnings conference call can be accessed at investor.fb.com, along with the earnings press re"
},
"metadata": {},
"execution_count": 6
}
]
},
{
"cell_type": "code",
"source": [
"document_path = Path(\"data/parsed_document.md\")\n",
"with document_path.open(\"a\") as f:\n",
" f.write(parsed_doc.text)"
],
"metadata": {
"id": "EUnDQkfwyPv3"
},
"execution_count": 7,
"outputs": []
},
{
"cell_type": "markdown",
"source": [
"## Vector Embeddings"
],
"metadata": {
"id": "yF5y2-L0vfLM"
}
},
{
"cell_type": "code",
"source": [
"loader = UnstructuredMarkdownLoader(document_path)\n",
"loaded_documents = loader.load()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "R9Hl1Uly3LtB",
"outputId": "f980129e-efdd-4884-d24b-70c972a071c6"
},
"execution_count": 8,
"outputs": [
{
"output_type": "stream",
"name": "stderr",
"text": [
"[nltk_data] Downloading package averaged_perceptron_tagger to\n",
"[nltk_data] /root/nltk_data...\n",
"[nltk_data] Unzipping taggers/averaged_perceptron_tagger.zip.\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"text_splitter = RecursiveCharacterTextSplitter(chunk_size=2048, chunk_overlap=128)\n",
"docs = text_splitter.split_documents(loaded_documents)\n",
"len(docs)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "_ZrQ4sKg4hxF",
"outputId": "945bce8c-13aa-49de-e608-7958e984e445"
},
"execution_count": 10,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"10"
]
},
"metadata": {},
"execution_count": 10
}
]
},
{
"cell_type": "code",
"source": [
"print(docs[0].page_content)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "RdBs9l3a4jCv",
"outputId": "dbcb9c00-e24b-44ba-ba94-e4b1aa292f95"
},
"execution_count": 11,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Meta Reports First Quarter 2024 Results\n",
"\n",
"MENLO PARK, Calif. – April 24, 2024 – Meta Platforms, Inc. (Nasdaq: META) today reported financial results for the quarter ended March 31, 2024.\n",
"\n",
"\"It's been a good start to the year,\" said Mark Zuckerberg, Meta founder and CEO. \"The new version of Meta AI with Llama 3 is another step towards building the world's leading AI. We're seeing healthy growth across our apps and we continue making steady progress building the metaverse as well.\"\n",
"\n",
"First Quarter 2024 Financial Highlights\n",
"\n",
"In millions, except percentages and per share amounts Three Months Ended March 31, 2024 2023 % Change Revenue $36,455 $28,645 27% Costs and expenses $22,637 $21,418 6% Income from operations $13,818 $7,227 91% Operating margin 38% 25% Provision for income taxes $1,814 $1,598 14% Effective tax rate 13% 22% Net income $12,369 $5,709 117% Diluted earnings per share (EPS) $4.71 $2.20 114%\n",
"\n",
"First Quarter 2024 Operational and Other Financial Highlights\n",
"\n",
"Family daily active people (DAP) – DAP was 3.24 billion on average for March 2024, an increase of 7% year-over-year.\n",
"\n",
"Ad impressions – Ad impressions delivered across our Family of Apps increased by 20% year-over-year.\n",
"\n",
"Average price per ad – Average price per ad increased by 6% year-over-year.\n",
"\n",
"Revenue – Total revenue and revenue on a constant currency basis were $36.46 billion and $36.35 billion, respectively, both of which increased by 27% year-over-year.\n",
"\n",
"Costs and expenses – Total costs and expenses were $22.64 billion, an increase of 6% year-over-year.\n",
"\n",
"Capital expenditures – Capital expenditures, including principal payments on finance leases, were $6.72 billion.\n",
"\n",
"Capital return program – Share repurchases were $14.64 billion of our Class A common stock and dividends payments were $1.27 billion.\n",
"\n",
"Cash, cash equivalents, and marketable securities – Cash, cash equivalents, and marketable securities were $58.12 billion as of March 31, 2024. Free cash flow was $12.53 billion.\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"embeddings = FastEmbedEmbeddings(model_name=\"BAAI/bge-base-en-v1.5\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 209,
"referenced_widgets": [
"326b5526433d4902bd3d31ccd1b9c087",
"057a4ed7f2da410988806acb4404fbc0",
"a9a7df757ae54f5492c12aacdc49e715",
"1d2e201ae4bf48609eb8f5e9af839468",
"d7f2c0ef555f4a56bd50c812e6051e32",
"42c6d28bbe7b46998818804054f75b38",
"cdac95aab5a745cea004a4bc152a08b0",
"762a1751bfa64291aa34636b3443d2e7",
"66009c1ca2e5467582bf46da04b9c397",
"7d41af47fcf341a681c1e24fcf984111",
"300db5e38e0940af8cbdf9fcd868da74",
"5403d252723849aabcbf9d66e9d5f75d",
"f78c8dfb0b644104ad836638552499a1",
"4a85338d03d44a9f8b95102274eb9a11",
"89310cc9df9e4e918455662ba3baf71e",
"dec4da4eec5e46e7b0ef4351403e9700",
"ba8775e7832d4cf89e1a3ba1e9e352a7",
"df5521089beb4e46a40a2ab19d4f7391",
"952bc4fd749f4768ab1b23e9c5a94c6e",
"00cffb0e4cf24ffb890a307e57afdd85",
"bff286ecc8434596a52b74bd0d71cddc",
"733c45e6efa144d5b01558e24d3646b7",
"3994cadcf2494d3d95fb6417e21d0380",
"2d33d2a0f13d45f580c85b5e5fa664da",
"43407fc260194c718d2cf686bdbf1494",
"36cd36a4339940768716c3b3f352aeb8",
"3f67ba8b6eff453e87b8536d696eb3ae",
"b7d40162de7d4b0c869b0f65a1fd45ce",
"fb9403f913034c98ac468dbfb77d27a6",
"15ea0e8ed9764d968e54096f971a567a",
"feba3c7e8f8547bc982372c2e4dc116a",
"42896a2b6e06450390b5e05e7789a6ca",
"19788c55a5e64795a6927cf9d4b6f4ac",
"5208f439666a479aa5dda68c1c2374ca",
"fbe34b7fe413413a83fed0c70d5ae261",
"43cc70af330a43948e92d8973381d00e",
"568fe50cb9974195b9a74e2a748f85e1",
"b1ca5ca48caf48d7b74604c3397db1fc",
"741312b1ca424c0c8ac84747db6d7e2d",
"f915b015df634a1eb665266a1fdf99d7",
"93a939cce2b646e68e8e9e23b7090052",
"a0a9590fd48341fe9abe54acb6d0f0b3",
"236b133c1e26455d9cabb0faf3d16a85",
"16ebf2335b194aa0adaab7432d2caa89",
"6b140bab80eb43d39e6f44d886bffd83",
"77d9f31089994b2e855a2b9e17fce3ae",
"54c5e8fe845f48d592af8ccb933cf636",
"56377b1831af409f806260753da88997",
"197bb8499a894947ba515f2e33a082ec",
"b1a3806658d7415c9c854f10ca6c6106",
"e84c938c3c93479ea7dbb5c0e62e2ddc",
"1516e853177a447d8071bd6e6a4fb62f",
"28827cbbd66f4817b56b74b2db313708",
"d8237c47189942439c15435478885701",
"142c7570473642e4a7eac37291f76003",
"755acb2571f549ce8e23847ac7fd1e2e",
"f129cffe41014170a28a918acb65f7bf",
"9d5c45a0a7504aae9e701386364c3d2d",
"5d0caac313b94e1489edd233fbb2754a",
"bc42ae1b7c8542a0b546ddda51a5b6d5",
"bc8aa6f790ef48fcbcad2ef9d1544db4",
"9b12eb438ecb44a796544870d647e22b",
"60bfdc366ca64618b36a0f49ba6dc0d8",
"48a120680f1d4eca99fa3ba847c8ae06",
"4a7ca1cf8a554d9fa550b60eed1ffac2",
"24dff829c98a417a9a359de35faf06b7"
]
},
"id": "8cUnzAwi-iNE",
"outputId": "fefdbf30-29dd-46f0-bffc-f8b8ef2c902f"
},
"execution_count": 12,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Fetching 5 files: 0%| | 0/5 [00:00<?, ?it/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "326b5526433d4902bd3d31ccd1b9c087"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"tokenizer.json: 0%| | 0.00/711k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "5403d252723849aabcbf9d66e9d5f75d"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"special_tokens_map.json: 0%| | 0.00/695 [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "3994cadcf2494d3d95fb6417e21d0380"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"model_optimized.onnx: 0%| | 0.00/218M [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "5208f439666a479aa5dda68c1c2374ca"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"config.json: 0%| | 0.00/740 [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "6b140bab80eb43d39e6f44d886bffd83"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"tokenizer_config.json: 0%| | 0.00/1.24k [00:00<?, ?B/s]"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "755acb2571f549ce8e23847ac7fd1e2e"
}
},
"metadata": {}
}
]
},
{
"cell_type": "code",
"source": [
"qdrant = Qdrant.from_documents(\n",
" docs,\n",
" embeddings,\n",
" # location=\":memory:\",\n",
" path=\"./db\",\n",
" collection_name=\"document_embeddings\",\n",
")"
],
"metadata": {
"id": "fSh39w9H9fPU"
},
"execution_count": 13,
"outputs": []
},
{
"cell_type": "code",
"source": [
"%%time\n",
"query = \"What is the most important innovation from Meta?\"\n",
"similar_docs = qdrant.similarity_search_with_score(query)"
],
"metadata": {
"id": "zBBp64Dy_5hw",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "914e0ae3-5601-4ab2-dd74-dd751ecb52e9"
},
"execution_count": 14,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"CPU times: user 441 ms, sys: 1.59 ms, total: 443 ms\n",
"Wall time: 470 ms\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"for doc, score in similar_docs:\n",
" print(f\"text: {doc.page_content[:256]}\\n\")\n",
" print(f\"score: {score}\")\n",
" print(\"-\" * 80)\n",
" print()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "R0vjJsDapHD4",
"outputId": "55191051-86a5-493a-ffac-0e44544e7f02"
},
"execution_count": 15,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"text: Meta Reports First Quarter 2024 Results\n",
"\n",
"MENLO PARK, Calif. – April 24, 2024 – Meta Platforms, Inc. (Nasdaq: META) today reported financial results for the quarter ended March 31, 2024.\n",
"\n",
"\"It's been a good start to the year,\" said Mark Zuckerberg, Meta foun\n",
"\n",
"score: 0.6154119568600498\n",
"--------------------------------------------------------------------------------\n",
"\n",
"text: Webcast and Conference Call Information\n",
"\n",
"Meta will host a conference call to discuss the results at 2:00 p.m. PT / 5:00 p.m. ET today. The live webcast of Meta's earnings conference call can be accessed at investor.fb.com, along with the earnings press rel\n",
"\n",
"score: 0.5685995040174998\n",
"--------------------------------------------------------------------------------\n",
"\n",
"text: Reconciliation of cash, cash equivalents, and restricted cash to the condensed consolidated balance sheets\n",
"\n",
"Cash and cash equivalents $32,307 $11,551 Restricted cash, included in prepaid expenses and other current assets 84 224 Restricted cash, included in\n",
"\n",
"score: 0.4989010664241146\n",
"--------------------------------------------------------------------------------\n",
"\n",
"text: This press release contains forward-looking statements regarding our future business plans and expectations. These forward-looking statements are only predictions and may differ materially from actual results due to a variety of factors including: the impa\n",
"\n",
"score: 0.47436779594694456\n",
"--------------------------------------------------------------------------------\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"%%time\n",
"retriever = qdrant.as_retriever(search_kwargs={\"k\": 5})\n",
"retrieved_docs = retriever.invoke(query)"
],
"metadata": {
"id": "pcYQO28-_pE6",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "610cb724-3320-462d-db34-be7179b8b4e6"
},
"execution_count": 16,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"CPU times: user 451 ms, sys: 68 ms, total: 519 ms\n",
"Wall time: 532 ms\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"for doc in retrieved_docs:\n",
" print(f\"id: {doc.metadata['_id']}\\n\")\n",
" print(f\"text: {doc.page_content[:256]}\\n\")\n",
" print(\"-\" * 80)\n",
" print()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "heWeRvZmSfuf",
"outputId": "33d93d7a-d316-4f1a-e957-7016f1a3c3fe"
},
"execution_count": 19,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"id: a66ff31fcf46402a84e705f7bbb9128b\n",
"\n",
"text: Meta Reports First Quarter 2024 Results\n",
"\n",
"MENLO PARK, Calif. – April 24, 2024 – Meta Platforms, Inc. (Nasdaq: META) today reported financial results for the quarter ended March 31, 2024.\n",
"\n",
"\"It's been a good start to the year,\" said Mark Zuckerberg, Meta foun\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\n",
"id: e4807fd4478948229233ca442eb4ed10\n",
"\n",
"text: Webcast and Conference Call Information\n",
"\n",
"Meta will host a conference call to discuss the results at 2:00 p.m. PT / 5:00 p.m. ET today. The live webcast of Meta's earnings conference call can be accessed at investor.fb.com, along with the earnings press rel\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\n",
"id: 6142f92f233f47818ccc41cafc40cdef\n",
"\n",
"text: Reconciliation of cash, cash equivalents, and restricted cash to the condensed consolidated balance sheets\n",
"\n",
"Cash and cash equivalents $32,307 $11,551 Restricted cash, included in prepaid expenses and other current assets 84 224 Restricted cash, included in\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\n",
"id: f6e701a3dfcf465f81c5f8995178a2a8\n",
"\n",
"text: This press release contains forward-looking statements regarding our future business plans and expectations. These forward-looking statements are only predictions and may differ materially from actual results due to a variety of factors including: the impa\n",
"\n",
"--------------------------------------------------------------------------------\n",
"\n",
"id: dfd781501544462daf7e7ea8e9a0c181\n",
"\n",
"text: Headcount – Headcount was 69,329 as of March 31, 2024, a decrease of 10% year-over-year.\n",
"\n",
"CFO Outlook Commentary\n",
"\n",
"We expect second quarter 2024 total revenue to be in the range of $36.5-39 billion. Our guidance assumes foreign currency is a 1% headwind to \n",
"\n",
"--------------------------------------------------------------------------------\n",
"\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"## Reranking"
],
"metadata": {
"id": "SS5zSz0lvnu3"
}
},
{
"cell_type": "code",
"source": [
"compressor = FlashrankRerank(model=\"ms-marco-MiniLM-L-12-v2\")\n",
"compression_retriever = ContextualCompressionRetriever(\n",
" base_compressor=compressor, base_retriever=retriever\n",
")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "83P_6ysFzSxC",
"outputId": "f50b197a-7d64-4bfd-ffc2-cbbf0576d86e"
},
"execution_count": 20,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Downloading ms-marco-MiniLM-L-12-v2...\n"
]
},
{
"output_type": "stream",
"name": "stderr",
"text": [
"ms-marco-MiniLM-L-12-v2.zip: 100%|██████████| 21.6M/21.6M [00:00<00:00, 23.6MiB/s]\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"%%time\n",
"reranked_docs = compression_retriever.invoke(query)\n",
"len(reranked_docs)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "NUVfVgihLgVD",
"outputId": "66907d76-cb24-4d68-e608-b4cbc7eaf356"
},
"execution_count": 21,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Running pairwise ranking..\n",
"CPU times: user 2.92 s, sys: 63.3 ms, total: 2.98 s\n",
"Wall time: 3.28 s\n"
]
},
{
"output_type": "execute_result",
"data": {
"text/plain": [
"3"
]
},
"metadata": {},
"execution_count": 21
}
]
},
{
"cell_type": "code",
"source": [
"for doc in reranked_docs:\n",
" print(f\"id: {doc.metadata['_id']}\\n\")\n",
" print(f\"text: {doc.page_content[:256]}\\n\")\n",
" print(f\"score: {doc.metadata['relevance_score']}\")\n",
" print(\"-\" * 80)\n",
" print()"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "JqHWLMdqPhMT",
"outputId": "47d088dd-7b00-4e79-8733-574aa7a5a708"
},
"execution_count": 22,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"id: a66ff31fcf46402a84e705f7bbb9128b\n",
"\n",
"text: Meta Reports First Quarter 2024 Results\n",
"\n",
"MENLO PARK, Calif. – April 24, 2024 – Meta Platforms, Inc. (Nasdaq: META) today reported financial results for the quarter ended March 31, 2024.\n",
"\n",
"\"It's been a good start to the year,\" said Mark Zuckerberg, Meta foun\n",
"\n",
"score: 0.1433110535144806\n",
"--------------------------------------------------------------------------------\n",
"\n",
"id: e4807fd4478948229233ca442eb4ed10\n",
"\n",
"text: Webcast and Conference Call Information\n",
"\n",
"Meta will host a conference call to discuss the results at 2:00 p.m. PT / 5:00 p.m. ET today. The live webcast of Meta's earnings conference call can be accessed at investor.fb.com, along with the earnings press rel\n",
"\n",
"score: 0.009122291579842567\n",
"--------------------------------------------------------------------------------\n",
"\n",
"id: f6e701a3dfcf465f81c5f8995178a2a8\n",
"\n",
"text: This press release contains forward-looking statements regarding our future business plans and expectations. These forward-looking statements are only predictions and may differ materially from actual results due to a variety of factors including: the impa\n",
"\n",
"score: 8.013377373572439e-05\n",
"--------------------------------------------------------------------------------\n",
"\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"## Q&A Over Document"
],
"metadata": {
"id": "3ra-bCZzvrFy"
}
},
{
"cell_type": "code",
"source": [
"llm = ChatGroq(temperature=0, model_name=\"llama3-70b-8192\")"
],
"metadata": {
"id": "tjOym5svzy2j"
},
"execution_count": 23,
"outputs": []
},
{
"cell_type": "code",
"source": [
"prompt_template = \"\"\"\n",
"Use the following pieces of information to answer the user's question.\n",
"If you don't know the answer, just say that you don't know, don't try to make up an answer.\n",
"\n",
"Context: {context}\n",
"Question: {question}\n",
"\n",
"Answer the question and provide additional helpful information,\n",
"based on the pieces of information, if applicable. Be succinct.\n",
"\n",
"Responses should be properly formatted to be easily read.\n",
"\"\"\"\n",
"\n",
"prompt = PromptTemplate(\n",
" template=prompt_template, input_variables=[\"context\", \"question\"]\n",
")"
],
"metadata": {
"id": "4iqfuyMaBe6j"
},
"execution_count": 24,
"outputs": []
},
{
"cell_type": "code",
"source": [
"qa = RetrievalQA.from_chain_type(\n",
" llm=llm,\n",
" chain_type=\"stuff\",\n",
" retriever=compression_retriever,\n",
" return_source_documents=True,\n",
" chain_type_kwargs={\"prompt\": prompt, \"verbose\": True},\n",
")"
],
"metadata": {
"id": "sz2aMwNWBxvg"
},
"execution_count": 25,
"outputs": []
},
{
"cell_type": "code",
"source": [
"%%time\n",
"response = qa.invoke(\"What is the most significant innovation from Meta?\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "J8lBIegHT0Y6",
"outputId": "7980c9fe-5412-4560-8758-1c69cbf3bf41"
},
"execution_count": 26,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Running pairwise ranking..\n",
"\n",
"\n",
"\u001b[1m> Entering new StuffDocumentsChain chain...\u001b[0m\n",
"\n",
"\n",
"\u001b[1m> Entering new LLMChain chain...\u001b[0m\n",
"Prompt after formatting:\n",
"\u001b[32;1m\u001b[1;3m\n",
"Use the following pieces of information to answer the user's question.\n",
"If you don't know the answer, just say that you don't know, don't try to make up an answer.\n",
"\n",
"Context: Meta Reports First Quarter 2024 Results\n",
"\n",
"MENLO PARK, Calif. – April 24, 2024 – Meta Platforms, Inc. (Nasdaq: META) today reported financial results for the quarter ended March 31, 2024.\n",
"\n",
"\"It's been a good start to the year,\" said Mark Zuckerberg, Meta founder and CEO. \"The new version of Meta AI with Llama 3 is another step towards building the world's leading AI. We're seeing healthy growth across our apps and we continue making steady progress building the metaverse as well.\"\n",
"\n",
"First Quarter 2024 Financial Highlights\n",
"\n",
"In millions, except percentages and per share amounts Three Months Ended March 31, 2024 2023 % Change Revenue $36,455 $28,645 27% Costs and expenses $22,637 $21,418 6% Income from operations $13,818 $7,227 91% Operating margin 38% 25% Provision for income taxes $1,814 $1,598 14% Effective tax rate 13% 22% Net income $12,369 $5,709 117% Diluted earnings per share (EPS) $4.71 $2.20 114%\n",
"\n",
"First Quarter 2024 Operational and Other Financial Highlights\n",
"\n",
"Family daily active people (DAP) – DAP was 3.24 billion on average for March 2024, an increase of 7% year-over-year.\n",
"\n",
"Ad impressions – Ad impressions delivered across our Family of Apps increased by 20% year-over-year.\n",
"\n",
"Average price per ad – Average price per ad increased by 6% year-over-year.\n",
"\n",
"Revenue – Total revenue and revenue on a constant currency basis were $36.46 billion and $36.35 billion, respectively, both of which increased by 27% year-over-year.\n",
"\n",
"Costs and expenses – Total costs and expenses were $22.64 billion, an increase of 6% year-over-year.\n",
"\n",
"Capital expenditures – Capital expenditures, including principal payments on finance leases, were $6.72 billion.\n",
"\n",
"Capital return program – Share repurchases were $14.64 billion of our Class A common stock and dividends payments were $1.27 billion.\n",
"\n",
"Cash, cash equivalents, and marketable securities – Cash, cash equivalents, and marketable securities were $58.12 billion as of March 31, 2024. Free cash flow was $12.53 billion.\n",
"\n",
"Webcast and Conference Call Information\n",
"\n",
"Meta will host a conference call to discuss the results at 2:00 p.m. PT / 5:00 p.m. ET today. The live webcast of Meta's earnings conference call can be accessed at investor.fb.com, along with the earnings press release, financial tables, and slide presentation. Meta uses the investor.fb.com and about.fb.com/news/ websites as well as Mark Zuckerberg's Facebook Page (facebook.com/zuck), Instagram account (instagram.com/zuck) and Threads profile (threads.net/zuck) as means of disclosing material non-public information and for complying with its disclosure obligations under Regulation FD.\n",
"\n",
"Following the call, a replay will be available at the same website. Transcripts of conference calls with publishing equity research analysts held today will also be posted to the investor.fb.com website.\n",
"\n",
"About Meta\n",
"\n",
"Meta builds technologies that help people connect, find communities, and grow businesses. When Facebook launched in 2004, it changed the way people connect. Apps like Messenger, Instagram, and WhatsApp further empowered billions around the world. Now, Meta is moving beyond 2D screens toward immersive experiences like augmented and virtual reality to help build the next evolution in social technology.\n",
"\n",
"Contacts\n",
"\n",
"Investors:\n",
"\n",
"Kennep Dorell\n",
"[email protected] / investor.fb.com\n",
"\n",
"Press:\n",
"\n",
"Ryan Moore\n",
"[email protected] / about.fb.com/news/\n",
"\n",
"Forward-Looking Statements\n",
"\n",
"This press release contains forward-looking statements regarding our future business plans and expectations. These forward-looking statements are only predictions and may differ materially from actual results due to a variety of factors including: the impact of macroeconomic conditions on our business and financial results, including as a result of geopolitical events; our ability to retain or increase users and engagement levels; our reliance on advertising revenue; our dependency on data signals and mobile operating systems, networks, and standards that we do not control; changes to the content or application of third-party policies that impact our advertising practices; risks associated with new products and changes to existing products as well as other new business initiatives, including our artificial intelligence initiatives and metaverse efforts; our emphasis on community growth and engagement and the user experience over short-term financial results; maintaining and enhancing our brand and reputation; our ongoing privacy, safety, security, and content review efforts; competition; risks associated with government actions that could restrict access to our products or impair our ability to sell advertising in certain countries; litigation and government inquiries; privacy, legislative, and regulatory concerns or developments; risks associated with acquisitions; security breaches; our ability to manage our scale and geographically-dispersed operations; and market conditions or other factors affecting the payment of dividends. These and other potential risks and uncertainties that could cause actual results to differ from the results predicted are more fully detailed under the caption \"Risk Factors\" in our Annual Report on Form 10-K filed with the SEC on February 2, 2024, which is available on our Investor Relations website at investor.fb.com and on the SEC website at www.sec.gov. Additional information will also be set forth in our Quarterly Report on Form 10-Q for the quarter ended March 31, 2024. In\n",
"Question: What is the most significant innovation from Meta?\n",
"\n",
"Answer the question and provide additional helpful information,\n",
"based on the pieces of information, if applicable. Be succinct.\n",
"\n",
"Responses should be properly formatted to be easily read.\n",
"\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n",
"\n",
"\u001b[1m> Finished chain.\u001b[0m\n",
"CPU times: user 3.18 s, sys: 134 ms, total: 3.31 s\n",
"Wall time: 7.11 s\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"print_response(response)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "o_PpnlgxY5xz",
"outputId": "d954027f-e638-4917-9bf8-2119f0f58b7c"
},
"execution_count": 27,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Based on the provided information, the most significant innovation from Meta is the new version of\n",
"Meta AI with Llama 3, which is mentioned in the quote from Mark Zuckerberg, Meta founder and CEO.\n",
"This innovation is part of Meta's efforts to build the world's leading AI.\n",
"\n",
"Additionally, the press release highlights Meta's progress in building the metaverse, which is\n",
"another significant innovation from the company.\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"qa = RetrievalQA.from_chain_type(\n",
" llm=llm,\n",
" chain_type=\"stuff\",\n",
" retriever=compression_retriever,\n",
" return_source_documents=True,\n",
" chain_type_kwargs={\"prompt\": prompt, \"verbose\": False},\n",
")"
],
"metadata": {
"id": "lJfS5OIYavyV"
},
"execution_count": 28,
"outputs": []
},
{
"cell_type": "code",
"source": [
"%%time\n",
"response = qa.invoke(\"What is the revenue for 2024 and % change?\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "IObqfsaHYjGm",
"outputId": "65cb4aa2-9bd9-45c7-f086-88e7e7024113"
},
"execution_count": 29,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Running pairwise ranking..\n",
"CPU times: user 2.62 s, sys: 4.05 ms, total: 2.63 s\n",
"Wall time: 4.39 s\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"Markdown(response[\"result\"])"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 175
},
"id": "JevCXm-sbEMo",
"outputId": "f0de1748-d023-48bf-c087-36287a69867d"
},
"execution_count": 30,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<IPython.core.display.Markdown object>"
],
"text/markdown": "**Revenue for 2024 and % Change:**\n\n* Revenue for 2024: $36,455 million\n* % Change: 27% year-over-year\n\n**Additional Helpful Information:**\n\n* Revenue excluding foreign exchange effect: $36,349 million\n* Revenue excluding foreign exchange effect year-over-year change: 27%\n\nNote: The revenue figures mentioned above are for the three months ended March 31, 2024."
},
"metadata": {},
"execution_count": 30
}
]
},
{
"cell_type": "code",
"source": [
"%%time\n",
"response = qa.invoke(\"What is the revenue for 2023?\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "R6cr0QR6C7_L",
"outputId": "6a80a3be-334e-4256-feeb-db5e6bdd5278"
},
"execution_count": 41,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Running pairwise ranking..\n",
"CPU times: user 2.53 s, sys: 6.54 ms, total: 2.53 s\n",
"Wall time: 7.32 s\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"print_response(response)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "NxwcVvEYb6Fi",
"outputId": "98f292f1-0b73-47b7-8855-24a48af33d76"
},
"execution_count": 42,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"The revenue for 2023 is $28,645.\n",
"\n",
"Additional information: This is a 27% increase from the previous year, and the revenue excluding\n",
"foreign exchange effect is also $28,645.\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"%%time\n",
"response = qa.invoke(\n",
" \"How much is the revenue minus the costs and expenses for 2024? Calculate the answer\"\n",
")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "enShZsgADnZt",
"outputId": "49827d54-220f-48e4-cfb8-d987ccec60a0"
},
"execution_count": 33,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Running pairwise ranking..\n",
"CPU times: user 2.68 s, sys: 9.44 ms, total: 2.69 s\n",
"Wall time: 7.01 s\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"print_response(response)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "CtEBlRP0dVaM",
"outputId": "609bee57-aa36-45c8-f976-ae94980fff15"
},
"execution_count": 34,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Based on the provided information, the revenue for Q1 2024 is $36,455 million, and the costs and\n",
"expenses are $22,637 million. To calculate the revenue minus the costs and expenses, we can subtract\n",
"the costs and expenses from the revenue:\n",
"\n",
"$36,455 million (revenue) - $22,637 million (costs and expenses) = $13,818 million\n",
"\n",
"So, the revenue minus the costs and expenses for Q1 2024 is $13,818 million.\n",
"\n",
"Additional helpful information:\n",
"\n",
"* This amount, $13,818 million, is also referred to as the income from operations.\n",
"* The operating margin is 38%, which is calculated by dividing the income from operations by the\n",
"revenue and multiplying by 100.\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"%%time\n",
"response = qa.invoke(\n",
" \"How much is the revenue minus the costs and expenses for 2023? Calculate the answer\"\n",
")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "842BweJKD0J3",
"outputId": "67c43f5b-0c7d-4274-a28d-98b6e79a8a48"
},
"execution_count": 35,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Running pairwise ranking..\n",
"CPU times: user 2.29 s, sys: 9.6 ms, total: 2.3 s\n",
"Wall time: 9 s\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"print_response(response)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "v0Oug1q5n7eW",
"outputId": "69411a01-5277-4aa5-ba30-4cd030082b6d"
},
"execution_count": 36,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Based on the provided information, we can calculate the revenue minus costs and expenses for 2023 as\n",
"follows:\n",
"\n",
"Revenue (2023): $28,645\n",
"Income from operations (2023): $7,227\n",
"\n",
"To find the costs and expenses, we can subtract the income from operations from the revenue:\n",
"\n",
"Costs and expenses (2023) = Revenue - Income from operations\n",
"= $28,645 - $7,227\n",
"= $21,418\n",
"\n",
"So, the revenue minus costs and expenses for 2023 is $7,227.\n",
"\n",
"Additional helpful information:\n",
"\n",
"* The company's revenue has increased by 27% year-over-year, from $28,645 in 2023 to $36,455 in\n",
"2024.\n",
"* The company's income from operations has also increased, from $7,227 in 2023 to $13,818 in 2024.\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"%%time\n",
"response = qa.invoke(\"What is the expected revenue for the second quarter of 2024?\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "D9zNlVvWm9oQ",
"outputId": "a9d82c59-3212-4504-b7f9-e40cc67a797b"
},
"execution_count": 37,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Running pairwise ranking..\n",
"CPU times: user 2.59 s, sys: 9.42 ms, total: 2.6 s\n",
"Wall time: 6.58 s\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"Markdown(response[\"result\"])"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 70
},
"id": "wimlevzZm-w3",
"outputId": "4958bdd5-24aa-4947-883f-2343ee9b1ea4"
},
"execution_count": 38,
"outputs": [
{
"output_type": "execute_result",
"data": {
"text/plain": [
"<IPython.core.display.Markdown object>"
],
"text/markdown": "**Answer:** The expected revenue for the second quarter of 2024 is in the range of $36.5-39 billion.\n\n**Additional information:** This guidance assumes a 1% headwind to year-over-year total revenue growth due to foreign currency exchange rates."
},
"metadata": {},
"execution_count": 38
}
]
},
{
"cell_type": "code",
"source": [
"%%time\n",
"response = qa.invoke(\"What is the overall outlook of Q1 2024?\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "YoToCv3znIVB",
"outputId": "9dc6bf5b-e718-4caa-efaf-318ac0c5db5f"
},
"execution_count": 39,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Running pairwise ranking..\n",
"CPU times: user 3.44 s, sys: 12.9 ms, total: 3.45 s\n",
"Wall time: 8.28 s\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"print_response(response)"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "EFtaBY3Vn09U",
"outputId": "ffbfcacb-3e8a-40d0-8bf4-0e9f0897c85d"
},
"execution_count": 40,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"**Overall Outlook of Q1 2024:**\n",
"\n",
"The overall outlook of Q1 2024 is positive. According to Mark Zuckerberg, \"It's been a good start to\n",
"the year.\" The company has reported strong financial results, with revenue increasing by 27% year-\n",
"over-year to $36.46 billion. Net income has also increased by 117% year-over-year to $12.37 billion.\n",
"\n",
"**Additional Highlights:**\n",
"\n",
"* Family daily active people (DAP) increased by 7% year-over-year to 3.24 billion.\n",
"* Ad impressions increased by 20% year-over-year.\n",
"* Average price per ad increased by 6% year-over-year.\n",
"* Capital expenditures were $6.72 billion, and free cash flow was $12.53 billion.\n",
"* The company has also reported a strong capital return program, with share repurchases of $14.64\n",
"billion and dividend payments of $1.27 billion.\n"
]
}
]
},
{
"cell_type": "markdown",
"source": [
"## References\n",
"\n",
"- [Meta Reports First Quarter 2024 Results](https://s21.q4cdn.com/399680738/files/doc_financials/2024/q1/Meta-03-31-2024-Exhibit-99-1_FINAL.pdf)"
],
"metadata": {
"id": "b9KgJCdYqbI_"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment