From 2db32776c1e2a10c2751606b9c3074d6f6d6b84b Mon Sep 17 00:00:00 2001 From: Jerryleerbay Date: Sat, 14 Jun 2025 04:08:51 -0700 Subject: [PATCH] Created using Colab --- Copy_of_Eso_LMs_Sampler.ipynb | 2283 +++++++++++++++++++++++++++++++++ 1 file changed, 2283 insertions(+) create mode 100644 Copy_of_Eso_LMs_Sampler.ipynb diff --git a/Copy_of_Eso_LMs_Sampler.ipynb b/Copy_of_Eso_LMs_Sampler.ipynb new file mode 100644 index 0000000000000..b0c64eba82d4f --- /dev/null +++ b/Copy_of_Eso_LMs_Sampler.ipynb @@ -0,0 +1,2283 @@ +{ + "nbformat": 4, + "nbformat_minor": 0, + "metadata": { + "colab": { + "provenance": [], + "gpuType": "T4", + "include_colab_link": true + }, + "kernelspec": { + "name": "python3", + "display_name": "Python 3" + }, + "language_info": { + "name": "python" + }, + "accelerator": "GPU", + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "1ed1a6057714463db291c477af14216a": { + "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_83af8ab9bed5432fbb9c0d1a56fbbf1f", + "IPY_MODEL_1fd43bd426554d2bb7fe3f05353d3f64", + "IPY_MODEL_e8fa55263da343dba7a8296c32290366" + ], + "layout": "IPY_MODEL_a42a1da0e1914d00b48ee07bf2e50b87" + } + }, + "83af8ab9bed5432fbb9c0d1a56fbbf1f": { + "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_1333a0188d37419fb8d0f53fb7c320a9", + "placeholder": "​", + "style": "IPY_MODEL_fd520f927d12457cb9bea3d43c6dcb7e", + "value": "config.json: 100%" + } + }, + "1fd43bd426554d2bb7fe3f05353d3f64": { + "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_59f4d3650ae5454ab157dbc2f6602f04", + "max": 500, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_e2060fac3cda473bae756112eadf933c", + "value": 500 + } + }, + "e8fa55263da343dba7a8296c32290366": { + "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_fc72226c5f4a433fb11d3f6e3c4928b7", + "placeholder": "​", + "style": "IPY_MODEL_4da7287920394d96972d82c12e792982", + "value": " 500/500 [00:00<00:00, 8.80kB/s]" + } + }, + "a42a1da0e1914d00b48ee07bf2e50b87": { + "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 + } + }, + "1333a0188d37419fb8d0f53fb7c320a9": { + "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 + } + }, + "fd520f927d12457cb9bea3d43c6dcb7e": { + "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": "" + } + }, + "59f4d3650ae5454ab157dbc2f6602f04": { + "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 + } + }, + "e2060fac3cda473bae756112eadf933c": { + "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": "" + } + }, + "fc72226c5f4a433fb11d3f6e3c4928b7": { + "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 + } + }, + "4da7287920394d96972d82c12e792982": { + "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": "" + } + }, + "adcadb6861b540398e7402e62a4d8b1b": { + "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_a2c313ed724548068e4faf005dcc38d7", + "IPY_MODEL_e22224ce908f42abbd111f8e4879c661", + "IPY_MODEL_4ae3d08c83124b76ac3d204dcbad1ea3" + ], + "layout": "IPY_MODEL_0bb9a169aff64b469486e922f6c7c18e" + } + }, + "a2c313ed724548068e4faf005dcc38d7": { + "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_ee2239d29dfb481dbe58c88e170e1e10", + "placeholder": "​", + "style": "IPY_MODEL_381ee7a6b72d4fa9b46ce35a05d5d412", + "value": "config.py: 100%" + } + }, + "e22224ce908f42abbd111f8e4879c661": { + "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_96c6af201bda41ac920dd4f8dd2c7b60", + "max": 685, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_d0a1c4744da14591b90c24c9de9e647c", + "value": 685 + } + }, + "4ae3d08c83124b76ac3d204dcbad1ea3": { + "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_51499ad6951d44278f58d6d130f3d489", + "placeholder": "​", + "style": "IPY_MODEL_a4fcb705b2f14c019b75080e900f0a89", + "value": " 685/685 [00:00<00:00, 20.8kB/s]" + } + }, + "0bb9a169aff64b469486e922f6c7c18e": { + "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 + } + }, + "ee2239d29dfb481dbe58c88e170e1e10": { + "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 + } + }, + "381ee7a6b72d4fa9b46ce35a05d5d412": { + "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": "" + } + }, + "96c6af201bda41ac920dd4f8dd2c7b60": { + "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 + } + }, + "d0a1c4744da14591b90c24c9de9e647c": { + "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": "" + } + }, + "51499ad6951d44278f58d6d130f3d489": { + "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 + } + }, + "a4fcb705b2f14c019b75080e900f0a89": { + "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": "" + } + }, + "c18973e56d06421c8e12a8bd865206be": { + "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_6fedad7c84c44ccc9313a81124cf6f26", + "IPY_MODEL_a0e092d547f54eb988fc1b3cb6c752a7", + "IPY_MODEL_34c7224d1c824493832e245f4dbf2615" + ], + "layout": "IPY_MODEL_e4b74ff81a914798b5b77739de0c6774" + } + }, + "6fedad7c84c44ccc9313a81124cf6f26": { + "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_c00d0d1a3199472d9db0b971f41a8949", + "placeholder": "​", + "style": "IPY_MODEL_9aa2a9d5504948acbef61872963e78b1", + "value": "model.py: 100%" + } + }, + "a0e092d547f54eb988fc1b3cb6c752a7": { + "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_ee50941e51e042fc9aa974d0e9563d94", + "max": 35570, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_c09dfd9d7b6b4791bdf05f14a3fb6159", + "value": 35570 + } + }, + "34c7224d1c824493832e245f4dbf2615": { + "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_d2477fb68caf455aa5067aa1b4b2600a", + "placeholder": "​", + "style": "IPY_MODEL_bc6dc4d8af4d45f48e499d335d11547c", + "value": " 35.6k/35.6k [00:00<00:00, 941kB/s]" + } + }, + "e4b74ff81a914798b5b77739de0c6774": { + "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 + } + }, + "c00d0d1a3199472d9db0b971f41a8949": { + "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 + } + }, + "9aa2a9d5504948acbef61872963e78b1": { + "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": "" + } + }, + "ee50941e51e042fc9aa974d0e9563d94": { + "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 + } + }, + "c09dfd9d7b6b4791bdf05f14a3fb6159": { + "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": "" + } + }, + "d2477fb68caf455aa5067aa1b4b2600a": { + "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 + } + }, + "bc6dc4d8af4d45f48e499d335d11547c": { + "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": "" + } + }, + "622f12cc33884927919fcc1f05b8a362": { + "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_ebb4043bfa2845e2af3e8222532270f9", + "IPY_MODEL_6a754d0f4f8c47f48166cd2b27ff7a12", + "IPY_MODEL_5b664b02e19d43f783c78025ce55eb66" + ], + "layout": "IPY_MODEL_828fe227663846c1a34932467abeefac" + } + }, + "ebb4043bfa2845e2af3e8222532270f9": { + "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_dbbdcb714227484b80fabd28f0fe3cbc", + "placeholder": "​", + "style": "IPY_MODEL_8e78aefdd41a46c9b94537afd7bfdb9b", + "value": "model.safetensors: 100%" + } + }, + "6a754d0f4f8c47f48166cd2b27ff7a12": { + "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_3b3410ee2feb4945a2c7ab205af12a32", + "max": 678522728, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_a469c408810b44ed9f0b1fe8d5d1ffa9", + "value": 678522728 + } + }, + "5b664b02e19d43f783c78025ce55eb66": { + "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_d914ced17c58451886be606812744f83", + "placeholder": "​", + "style": "IPY_MODEL_da16e7d8e765466eaa7c2437b49c1e31", + "value": " 679M/679M [00:10<00:00, 51.4MB/s]" + } + }, + "828fe227663846c1a34932467abeefac": { + "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 + } + }, + "dbbdcb714227484b80fabd28f0fe3cbc": { + "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 + } + }, + "8e78aefdd41a46c9b94537afd7bfdb9b": { + "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": "" + } + }, + "3b3410ee2feb4945a2c7ab205af12a32": { + "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 + } + }, + "a469c408810b44ed9f0b1fe8d5d1ffa9": { + "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": "" + } + }, + "d914ced17c58451886be606812744f83": { + "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 + } + }, + "da16e7d8e765466eaa7c2437b49c1e31": { + "model_module": "@jupyter-widgets/controls", + "model_name": "DescriptionStyleModel", + "model_module_version": "1.5.0", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + } + } + } + }, + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "view-in-github", + "colab_type": "text" + }, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "markdown", + "source": [ + "# Esoteric Language Models\n", + "\n", + "This Colab demonstrates sample generation with our Eso-LM (B) models released on HuggingFace, trained on OpenWebText for 250K steps.\n", + "\n", + "Our codebase contains the sampler as well. Use our codebase instead if you need to generate a large number of samples.\n", + "\n", + "Currently, neither this notebook nor the codebase supports sampling of our Eso-LM (A) models.\n", + "\n", + "📖 paper: https://arxiv.org/abs/2506.01928\n", + "\n", + "🏕 code: https://github.com/s-sahoo/Eso-LMs\n", + "\n", + "📑 Blog: https://s-sahoo.com/Eso-LMs/\n", + "\n", + "🤗 Huggingface: [Eso-LMs](https://huggingface.co/collections/sahoo-diffusion/eso-lms-6838e86cb2c49f45302f0092)" + ], + "metadata": { + "id": "uq45tdoNk3gw" + } + }, + { + "cell_type": "code", + "source": [ + "# try running the cells below first before running this cell\n", + "# if cells below run successfully, there's no need to run this cell\n", + "! pip install numpy==2.0.2\n", + "! pip install torch==2.6.0+cu124\n", + "! pip install transformers==4.52.2" + ], + "metadata": { + "id": "gaJZfph2v3iU", + "colab": { + "base_uri": "https://localhost:8080/" + }, + "outputId": "3b2cd645-c1c6-43bb-ef59-6ba7253fda69" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "Requirement already satisfied: numpy==2.0.2 in /usr/local/lib/python3.11/dist-packages (2.0.2)\n", + "Requirement already satisfied: torch==2.6.0+cu124 in /usr/local/lib/python3.11/dist-packages (2.6.0+cu124)\n", + "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from torch==2.6.0+cu124) (3.18.0)\n", + "Requirement already satisfied: typing-extensions>=4.10.0 in /usr/local/lib/python3.11/dist-packages (from torch==2.6.0+cu124) (4.13.2)\n", + "Requirement already satisfied: networkx in /usr/local/lib/python3.11/dist-packages (from torch==2.6.0+cu124) (3.4.2)\n", + "Requirement already satisfied: jinja2 in /usr/local/lib/python3.11/dist-packages (from torch==2.6.0+cu124) (3.1.6)\n", + "Requirement already satisfied: fsspec in /usr/local/lib/python3.11/dist-packages (from torch==2.6.0+cu124) (2025.3.2)\n", + "Collecting nvidia-cuda-nvrtc-cu12==12.4.127 (from torch==2.6.0+cu124)\n", + " Downloading nvidia_cuda_nvrtc_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-cuda-runtime-cu12==12.4.127 (from torch==2.6.0+cu124)\n", + " Downloading nvidia_cuda_runtime_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-cuda-cupti-cu12==12.4.127 (from torch==2.6.0+cu124)\n", + " Downloading nvidia_cuda_cupti_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cudnn-cu12==9.1.0.70 (from torch==2.6.0+cu124)\n", + " Downloading nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cublas-cu12==12.4.5.8 (from torch==2.6.0+cu124)\n", + " Downloading nvidia_cublas_cu12-12.4.5.8-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-cufft-cu12==11.2.1.3 (from torch==2.6.0+cu124)\n", + " Downloading nvidia_cufft_cu12-11.2.1.3-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-curand-cu12==10.3.5.147 (from torch==2.6.0+cu124)\n", + " Downloading nvidia_curand_cu12-10.3.5.147-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Collecting nvidia-cusolver-cu12==11.6.1.9 (from torch==2.6.0+cu124)\n", + " Downloading nvidia_cusolver_cu12-11.6.1.9-py3-none-manylinux2014_x86_64.whl.metadata (1.6 kB)\n", + "Collecting nvidia-cusparse-cu12==12.3.1.170 (from torch==2.6.0+cu124)\n", + " Downloading nvidia_cusparse_cu12-12.3.1.170-py3-none-manylinux2014_x86_64.whl.metadata (1.6 kB)\n", + "Requirement already satisfied: nvidia-cusparselt-cu12==0.6.2 in /usr/local/lib/python3.11/dist-packages (from torch==2.6.0+cu124) (0.6.2)\n", + "Requirement already satisfied: nvidia-nccl-cu12==2.21.5 in /usr/local/lib/python3.11/dist-packages (from torch==2.6.0+cu124) (2.21.5)\n", + "Requirement already satisfied: nvidia-nvtx-cu12==12.4.127 in /usr/local/lib/python3.11/dist-packages (from torch==2.6.0+cu124) (12.4.127)\n", + "Collecting nvidia-nvjitlink-cu12==12.4.127 (from torch==2.6.0+cu124)\n", + " Downloading nvidia_nvjitlink_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl.metadata (1.5 kB)\n", + "Requirement already satisfied: triton==3.2.0 in /usr/local/lib/python3.11/dist-packages (from torch==2.6.0+cu124) (3.2.0)\n", + "Requirement already satisfied: sympy==1.13.1 in /usr/local/lib/python3.11/dist-packages (from torch==2.6.0+cu124) (1.13.1)\n", + "Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.11/dist-packages (from sympy==1.13.1->torch==2.6.0+cu124) (1.3.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.11/dist-packages (from jinja2->torch==2.6.0+cu124) (3.0.2)\n", + "Downloading nvidia_cublas_cu12-12.4.5.8-py3-none-manylinux2014_x86_64.whl (363.4 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m363.4/363.4 MB\u001b[0m \u001b[31m4.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cuda_cupti_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl (13.8 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.8/13.8 MB\u001b[0m \u001b[31m40.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cuda_nvrtc_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl (24.6 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m24.6/24.6 MB\u001b[0m \u001b[31m42.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cuda_runtime_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl (883 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m883.7/883.7 kB\u001b[0m \u001b[31m49.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cudnn_cu12-9.1.0.70-py3-none-manylinux2014_x86_64.whl (664.8 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m664.8/664.8 MB\u001b[0m \u001b[31m2.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cufft_cu12-11.2.1.3-py3-none-manylinux2014_x86_64.whl (211.5 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m211.5/211.5 MB\u001b[0m \u001b[31m7.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_curand_cu12-10.3.5.147-py3-none-manylinux2014_x86_64.whl (56.3 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.3/56.3 MB\u001b[0m \u001b[31m14.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cusolver_cu12-11.6.1.9-py3-none-manylinux2014_x86_64.whl (127.9 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m127.9/127.9 MB\u001b[0m \u001b[31m8.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_cusparse_cu12-12.3.1.170-py3-none-manylinux2014_x86_64.whl (207.5 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m207.5/207.5 MB\u001b[0m \u001b[31m6.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hDownloading nvidia_nvjitlink_cu12-12.4.127-py3-none-manylinux2014_x86_64.whl (21.1 MB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m21.1/21.1 MB\u001b[0m \u001b[31m36.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hInstalling collected packages: nvidia-nvjitlink-cu12, nvidia-curand-cu12, nvidia-cufft-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, nvidia-cublas-cu12, nvidia-cusparse-cu12, nvidia-cudnn-cu12, nvidia-cusolver-cu12\n", + " Attempting uninstall: nvidia-nvjitlink-cu12\n", + " Found existing installation: nvidia-nvjitlink-cu12 12.5.82\n", + " Uninstalling nvidia-nvjitlink-cu12-12.5.82:\n", + " Successfully uninstalled nvidia-nvjitlink-cu12-12.5.82\n", + " Attempting uninstall: nvidia-curand-cu12\n", + " Found existing installation: nvidia-curand-cu12 10.3.6.82\n", + " Uninstalling nvidia-curand-cu12-10.3.6.82:\n", + " Successfully uninstalled nvidia-curand-cu12-10.3.6.82\n", + " Attempting uninstall: nvidia-cufft-cu12\n", + " Found existing installation: nvidia-cufft-cu12 11.2.3.61\n", + " Uninstalling nvidia-cufft-cu12-11.2.3.61:\n", + " Successfully uninstalled nvidia-cufft-cu12-11.2.3.61\n", + " Attempting uninstall: nvidia-cuda-runtime-cu12\n", + " Found existing installation: nvidia-cuda-runtime-cu12 12.5.82\n", + " Uninstalling nvidia-cuda-runtime-cu12-12.5.82:\n", + " Successfully uninstalled nvidia-cuda-runtime-cu12-12.5.82\n", + " Attempting uninstall: nvidia-cuda-nvrtc-cu12\n", + " Found existing installation: nvidia-cuda-nvrtc-cu12 12.5.82\n", + " Uninstalling nvidia-cuda-nvrtc-cu12-12.5.82:\n", + " Successfully uninstalled nvidia-cuda-nvrtc-cu12-12.5.82\n", + " Attempting uninstall: nvidia-cuda-cupti-cu12\n", + " Found existing installation: nvidia-cuda-cupti-cu12 12.5.82\n", + " Uninstalling nvidia-cuda-cupti-cu12-12.5.82:\n", + " Successfully uninstalled nvidia-cuda-cupti-cu12-12.5.82\n", + " Attempting uninstall: nvidia-cublas-cu12\n", + " Found existing installation: nvidia-cublas-cu12 12.5.3.2\n", + " Uninstalling nvidia-cublas-cu12-12.5.3.2:\n", + " Successfully uninstalled nvidia-cublas-cu12-12.5.3.2\n", + " Attempting uninstall: nvidia-cusparse-cu12\n", + " Found existing installation: nvidia-cusparse-cu12 12.5.1.3\n", + " Uninstalling nvidia-cusparse-cu12-12.5.1.3:\n", + " Successfully uninstalled nvidia-cusparse-cu12-12.5.1.3\n", + " Attempting uninstall: nvidia-cudnn-cu12\n", + " Found existing installation: nvidia-cudnn-cu12 9.3.0.75\n", + " Uninstalling nvidia-cudnn-cu12-9.3.0.75:\n", + " Successfully uninstalled nvidia-cudnn-cu12-9.3.0.75\n", + " Attempting uninstall: nvidia-cusolver-cu12\n", + " Found existing installation: nvidia-cusolver-cu12 11.6.3.83\n", + " Uninstalling nvidia-cusolver-cu12-11.6.3.83:\n", + " Successfully uninstalled nvidia-cusolver-cu12-11.6.3.83\n", + "Successfully installed nvidia-cublas-cu12-12.4.5.8 nvidia-cuda-cupti-cu12-12.4.127 nvidia-cuda-nvrtc-cu12-12.4.127 nvidia-cuda-runtime-cu12-12.4.127 nvidia-cudnn-cu12-9.1.0.70 nvidia-cufft-cu12-11.2.1.3 nvidia-curand-cu12-10.3.5.147 nvidia-cusolver-cu12-11.6.1.9 nvidia-cusparse-cu12-12.3.1.170 nvidia-nvjitlink-cu12-12.4.127\n", + "Requirement already satisfied: transformers==4.52.2 in /usr/local/lib/python3.11/dist-packages (4.52.2)\n", + "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from transformers==4.52.2) (3.18.0)\n", + "Requirement already satisfied: huggingface-hub<1.0,>=0.30.0 in /usr/local/lib/python3.11/dist-packages (from transformers==4.52.2) (0.31.4)\n", + "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.11/dist-packages (from transformers==4.52.2) (2.0.2)\n", + "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.11/dist-packages (from transformers==4.52.2) (24.2)\n", + "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.11/dist-packages (from transformers==4.52.2) (6.0.2)\n", + "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.11/dist-packages (from transformers==4.52.2) (2024.11.6)\n", + "Requirement already satisfied: requests in /usr/local/lib/python3.11/dist-packages (from transformers==4.52.2) (2.32.3)\n", + "Requirement already satisfied: tokenizers<0.22,>=0.21 in /usr/local/lib/python3.11/dist-packages (from transformers==4.52.2) (0.21.1)\n", + "Requirement already satisfied: safetensors>=0.4.3 in /usr/local/lib/python3.11/dist-packages (from transformers==4.52.2) (0.5.3)\n", + "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.11/dist-packages (from transformers==4.52.2) (4.67.1)\n", + "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub<1.0,>=0.30.0->transformers==4.52.2) (2025.3.2)\n", + "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub<1.0,>=0.30.0->transformers==4.52.2) (4.13.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests->transformers==4.52.2) (3.4.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests->transformers==4.52.2) (3.10)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests->transformers==4.52.2) (2.4.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests->transformers==4.52.2) (2025.4.26)\n" + ] + } + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "5c4PMMabWdxF" + }, + "outputs": [], + "source": [ + "import numpy as np\n", + "import torch\n", + "import torch.nn.functional as F\n", + "import transformers\n", + "from transformers import AutoModelForMaskedLM, AutoTokenizer" + ] + }, + { + "cell_type": "code", + "source": [ + "hf_model = AutoModelForMaskedLM.from_pretrained(\n", + " 'sahoo-diffusion/Eso-LM-B-alpha-0_25', trust_remote_code=True)\n", + "# hf_model = AutoModelForMaskedLM.from_pretrained(\n", + "# 'sahoo-diffusion/Eso-LM-B-alpha-1', trust_remote_code=True)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 304, + "referenced_widgets": [ + "1ed1a6057714463db291c477af14216a", + "83af8ab9bed5432fbb9c0d1a56fbbf1f", + "1fd43bd426554d2bb7fe3f05353d3f64", + "e8fa55263da343dba7a8296c32290366", + "a42a1da0e1914d00b48ee07bf2e50b87", + "1333a0188d37419fb8d0f53fb7c320a9", + "fd520f927d12457cb9bea3d43c6dcb7e", + "59f4d3650ae5454ab157dbc2f6602f04", + "e2060fac3cda473bae756112eadf933c", + "fc72226c5f4a433fb11d3f6e3c4928b7", + "4da7287920394d96972d82c12e792982", + "adcadb6861b540398e7402e62a4d8b1b", + "a2c313ed724548068e4faf005dcc38d7", + "e22224ce908f42abbd111f8e4879c661", + "4ae3d08c83124b76ac3d204dcbad1ea3", + "0bb9a169aff64b469486e922f6c7c18e", + "ee2239d29dfb481dbe58c88e170e1e10", + "381ee7a6b72d4fa9b46ce35a05d5d412", + "96c6af201bda41ac920dd4f8dd2c7b60", + "d0a1c4744da14591b90c24c9de9e647c", + "51499ad6951d44278f58d6d130f3d489", + "a4fcb705b2f14c019b75080e900f0a89", + "c18973e56d06421c8e12a8bd865206be", + "6fedad7c84c44ccc9313a81124cf6f26", + "a0e092d547f54eb988fc1b3cb6c752a7", + "34c7224d1c824493832e245f4dbf2615", + "e4b74ff81a914798b5b77739de0c6774", + "c00d0d1a3199472d9db0b971f41a8949", + "9aa2a9d5504948acbef61872963e78b1", + "ee50941e51e042fc9aa974d0e9563d94", + "c09dfd9d7b6b4791bdf05f14a3fb6159", + "d2477fb68caf455aa5067aa1b4b2600a", + "bc6dc4d8af4d45f48e499d335d11547c", + "622f12cc33884927919fcc1f05b8a362", + "ebb4043bfa2845e2af3e8222532270f9", + "6a754d0f4f8c47f48166cd2b27ff7a12", + "5b664b02e19d43f783c78025ce55eb66", + "828fe227663846c1a34932467abeefac", + "dbbdcb714227484b80fabd28f0fe3cbc", + "8e78aefdd41a46c9b94537afd7bfdb9b", + "3b3410ee2feb4945a2c7ab205af12a32", + "a469c408810b44ed9f0b1fe8d5d1ffa9", + "d914ced17c58451886be606812744f83", + "da16e7d8e765466eaa7c2437b49c1e31" + ] + }, + "id": "jIea9YZQlCj-", + "outputId": "91777965-36f3-4eb9-a1d6-ad958188dcf6" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + "config.json: 0%| | 0.00/500 [00:00 0:\n", + " # Remove all tokens with a probability less than\n", + " # the last token of the top-k\n", + " values, _ = torch.topk(logits, k=top_k, dim=-1)\n", + " to_remove_mask = (\n", + " logits < torch.min(values, dim=-1, keepdim=True)[0]\n", + " ) # min returns a tuple (values, indices)\n", + " logits[to_remove_mask] = filter_value\n", + "\n", + " if top_p > 0.0:\n", + " sorted_logits, sorted_indices = torch.sort(\n", + " logits, descending=True, dim=-1)\n", + " cum_probs = torch.cumsum(\n", + " torch.softmax(sorted_logits, dim=-1), dim=-1)\n", + "\n", + " sorted_indices_to_remove = cum_probs > top_p\n", + " # Ensures at least one token is kept\n", + " sorted_indices_to_remove[..., 1:] = \\\n", + " sorted_indices_to_remove[..., :-1].clone()\n", + " sorted_indices_to_remove[..., 0] = 0\n", + "\n", + " mask_to_remove = torch.empty_like(sorted_indices_to_remove)\n", + " mask_to_remove.scatter_(dim=-1,\n", + " index=sorted_indices,\n", + " src=sorted_indices_to_remove)\n", + " logits[mask_to_remove] = filter_value\n", + "\n", + " if dim != -1:\n", + " logits = torch.transpose(logits, dim, -1)\n", + "\n", + " return logits\n", + "\n", + "def get_reverse_indices(indices):\n", + " \"\"\"\n", + " indices: LongTensor of shape [B, N] representing permutations\n", + " returns: LongTensor of shape [B, N] representing the inverse permutations\n", + " \"\"\"\n", + " B, N = indices.shape\n", + " reverse_indices = torch.empty_like(indices)\n", + " arange = torch.arange(N, device=indices.device).unsqueeze(0).expand(B, -1)\n", + " reverse_indices.scatter_(1, indices, arange)\n", + " return reverse_indices" + ], + "metadata": { + "id": "nrrDwCJHng35", + "cellView": "form" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "#@title EsoLMBSampler class\n", + "class EsoLMBSampler:\n", + " def __init__(self, backbone_wrapper, device):\n", + " self.backbone = backbone_wrapper.backbone.to(device)\n", + " self.tokenizer = transformers.AutoTokenizer.from_pretrained('gpt2')\n", + " self.device = device\n", + " self.vocab_size = backbone_wrapper.config.vocab_size\n", + " self.mask_index = backbone_wrapper.config.mask_index\n", + " self.num_tokens = backbone_wrapper.config.model_length\n", + " self.rotary_dim = (\n", + " backbone_wrapper.config.hidden_size //\n", + " backbone_wrapper.config.n_heads)\n", + " self.neg_infinity = -1000000.0\n", + " self.noise = None\n", + "\n", + " def _tokens_unmasked_per_step(self, num_steps):\n", + " remaining_tokens = self.num_tokens\n", + " num_tokens_to_unmask = []\n", + " dt = 1 / num_steps\n", + " # Assumes a log-linear schedule.\n", + " for t in np.linspace(1, dt, num_steps):\n", + " _, alpha_t = self.noise(t)\n", + " _, alpha_s = self.noise(t - dt)\n", + " n_unmask = np.random.binomial(\n", + " remaining_tokens, (alpha_s - alpha_t) / (1 - alpha_t))\n", + " if n_unmask != 0:\n", + " num_tokens_to_unmask.append(n_unmask)\n", + " remaining_tokens -= n_unmask\n", + " if remaining_tokens != 0 and self.noise.alpha_0 == 1:\n", + " num_tokens_to_unmask.append(remaining_tokens)\n", + " return num_tokens_to_unmask\n", + "\n", + " def prior_sample(self, *batch_dims):\n", + " return self.mask_index * torch.ones(\n", + " * batch_dims, dtype=torch.int64, device=self.device)\n", + "\n", + " def _sort_rotary_cos_sin(self, rotary_cos_sin, sort_idx):\n", + " # example cos shape: (1, 128, 3, 1, 32)\n", + " # 128 for seq_len, 3 for qkv, 32 for head dim\n", + " cos, sin = rotary_cos_sin\n", + " bs = sort_idx.shape[0]\n", + " cos = cos.expand(bs, -1, -1, -1, -1)\n", + " sin = sin.expand(bs, -1, -1, -1, -1)\n", + " cos = torch.gather(\n", + " cos, dim=1,\n", + " index=sort_idx[:, :, None, None, None].expand(\n", + " -1, -1, 3, -1, self.rotary_dim)).contiguous()\n", + " sin = torch.gather(\n", + " sin, dim=1,\n", + " index=sort_idx[:, :, None, None, None].expand(\n", + " -1, -1, 3, -1, self.rotary_dim)).contiguous()\n", + " return cos, sin\n", + "\n", + " def _diffusion_features(self, zt, sort_idx):\n", + " x = self.backbone.vocab_embed(zt)\n", + " rotary_cos_sin = self.backbone.rotary_emb(x)\n", + " rotary_cos_sin = self._sort_rotary_cos_sin(\n", + " rotary_cos_sin, sort_idx)\n", + " return {'x': x, 'rotary': rotary_cos_sin}\n", + "\n", + " def _forward_sample(self, zt, sort_idx,\n", + " last_k_start, curr_k_start, curr_k_end):\n", + " ones = torch.ones(zt.shape[0], device=zt.device)\n", + " features = self._diffusion_features(zt=zt, sort_idx=sort_idx)\n", + " zeros = torch.zeros(zt.shape[0], device=zt.device)\n", + " t_cond = F.silu(self.backbone.sigma_map(zeros))\n", + "\n", + " x = features['x']\n", + " rotary = features['rotary']\n", + "\n", + " x = x[:, last_k_start:curr_k_end, :]\n", + " cos, sin = rotary\n", + " rotary = (cos[:, :curr_k_end], sin[:, :curr_k_end])\n", + " num_clean = curr_k_start - last_k_start\n", + " num_clean_and_mask = curr_k_end - last_k_start\n", + "\n", + " with torch.amp.autocast('cuda', enabled=False):\n", + " for i in range(len(self.backbone.blocks)):\n", + " x = self.backbone.blocks[i](\n", + " x, rotary, c=t_cond,\n", + " attn_mask=None,\n", + " kv_cache=True,\n", + " num_clean=num_clean,\n", + " num_clean_and_mask=num_clean_and_mask)\n", + " x = self.backbone.output_layer(x, c=t_cond)\n", + "\n", + " x = x[:, num_clean:, :]\n", + "\n", + " return x\n", + "\n", + " @torch.no_grad()\n", + " def generate_samples(self, num_samples,\n", + " alpha_0=0, num_diffusion_steps=1000,\n", + " p_nucleus=0.9, use_float64=True):\n", + " \"\"\"Generate samples from the model with KV caching enabled.\"\"\"\n", + " self.noise = LogLinear(alpha_0=alpha_0)\n", + "\n", + " unmask_k_tokens = self._tokens_unmasked_per_step(\n", + " num_diffusion_steps)\n", + " num_diffusion_tokens = sum(unmask_k_tokens)\n", + "\n", + " # shuffle diffusion tokens to be generated by diffusion\n", + " # don't shuffle tokens to be generated sequentially\n", + " sort_idx = torch.rand(\n", + " num_samples, self.num_tokens).argsort(\n", + " descending=False).to(self.device)\n", + " sort_idx[:, num_diffusion_tokens:] = (\n", + " sort_idx[:, num_diffusion_tokens:].sort().values)\n", + "\n", + " x = self.prior_sample(num_samples, self.num_tokens)\n", + " x = torch.gather(x, dim=1, index=sort_idx)\n", + "\n", + " if len(unmask_k_tokens) != 0:\n", + " unmask_k_tokens = unmask_k_tokens + [1] * (\n", + " self.num_tokens - num_diffusion_tokens)\n", + " else:\n", + " unmask_k_tokens = [1] * self.num_tokens\n", + " assert sum(unmask_k_tokens) == self.num_tokens\n", + " noise = torch.distributions.Gumbel(0, 1).sample(\n", + " (num_samples, self.num_tokens,\n", + " self.vocab_size)).to(self.device)\n", + " unmasked_tokens = 0\n", + " self.backbone.reset_kv_cache()\n", + " for i, k in enumerate(unmask_k_tokens):\n", + " if i == 0:\n", + " last_k_start = 0\n", + " else:\n", + " last_k_start = unmasked_tokens - unmask_k_tokens[i-1]\n", + " log_p_x0 = self._forward_sample(\n", + " zt=x, # shape[1] is model.length\n", + " sort_idx=sort_idx, # shape[1] is model.length\n", + " last_k_start=last_k_start,\n", + " curr_k_start=unmasked_tokens, # also last_k_end\n", + " curr_k_end=unmasked_tokens+k)\n", + " if use_float64:\n", + " log_p_x0 = log_p_x0.to(torch.float64)\n", + " log_p_x0[:, :, self.mask_index] = self.neg_infinity\n", + " if p_nucleus < 1:\n", + " # top_k_top_p_filtering takes in logits (normalized or\n", + " # unnormalized) and returns logits (unnormalized)\n", + " log_p_x0 = top_k_top_p_filtering(log_p_x0, top_p=p_nucleus)\n", + " indices = slice(unmasked_tokens, unmasked_tokens + k)\n", + " y = (log_p_x0 + noise[:, indices, :]).argmax(-1)\n", + " x[:, indices] = y\n", + " unmasked_tokens += k\n", + " self.backbone.reset_kv_cache()\n", + " sort_idx_reversed = get_reverse_indices(sort_idx)\n", + " x = torch.gather(x, dim=1, index=sort_idx_reversed)\n", + " return self.tokenizer.batch_decode(x)" + ], + "metadata": { + "id": "-PiIVynIlBMI", + "cellView": "form" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "code", + "source": [ + "sampler = EsoLMBSampler(hf_model, device='cuda')" + ], + "metadata": { + "id": "qeDVGI64lTjr" + }, + "execution_count": null, + "outputs": [] + }, + { + "cell_type": "markdown", + "source": [ + "## Generate samples" + ], + "metadata": { + "id": "JYWI1b66wBTX" + } + }, + { + "cell_type": "markdown", + "source": [ + "$\\alpha_0$ is the proportion of tokens generated by diffusion.\n", + "\n", + "$T$ is the number of diffusion steps. $T$ matters less when $\\alpha_0^\\text{eval}$ is small.\n", + "\n", + "**NOTE**: $\\alpha_0^\\text{eval}$ used for generating samples can be different from $\\alpha_0^\\text{train}$ used for training." + ], + "metadata": { + "id": "9oQ7BVCy0Efp" + } + }, + { + "cell_type": "markdown", + "source": [ + "$\\alpha_0^\\text{eval}=1$ with $T=1024$:" + ], + "metadata": { + "id": "xW9lhgKb5scH" + } + }, + { + "cell_type": "code", + "source": [ + "# if alpha_0=0.25 for training, gen ppl = 72.36\n", + "# if alpha_0=1 for training, gen ppl = 49.4\n", + "samples = sampler.generate_samples(\n", + " num_samples=2, alpha_0=1, num_diffusion_steps=1024)\n", + "for sample in samples:\n", + " print(sample)\n", + " print('\\n' * 5)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "SAF2vKKJrm40", + "outputId": "ef87b265-1af4-4bf2-9e5d-ccf1d1f434f1" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + " The image in the image was blurry in the form of physical detail that is in between two objects to be blurred.”\n", + "\n", + "The image says the story of what took place after the killing, and Lutmret, whom she described in court, said: “She said it was her God-given Instagram, and she said that it was a little more.“This was a long, die, the meaning: from day one like on a who, from and who is carrying a weapon, [the person carries the weapon], Haidulall told the court, who sought her death by calling for the picture back, “she believed she was actually posting an image of any object that could be the weapon.”\n", + "\n", + "Online reaction\n", + "\n", + "Abeh was shocked when asked about what she was saying, to hear the images in the comments. It seemed as though her friend Uday Saleh was unfamiliar with the question at all.\n", + "\n", + "As the new article about the image, been posted by @Police is using social media media to contact the victim’s family. But that is clearly wrong, but I am now being interviewed by an expert at psychology, what’s I mean, Micah Pellington, it contains yet another possible understanding of (brain and) science that defines how one of the most important elements of thought, and behavior of the object’s creators determined as a matter of the brain and consciousness.”\n", + "\n", + "Colin contacted me and CNN editors to help with an idea of “Galactic evolution,”� containing a lengthy message that other users take from the brain-based models called WMR messages. The question is, can shed light of how a user is asked to receive the message sent by the users send, the image along with other evidence of the information stored. For the subjects, we had to find resources for anyone who made three-dimensional objects. But we could extend this science, because the question was simple enough to study and experiment into prominent parts of today’s culture. In a way, image matters, and we think it’s possible to get the full effect of objectivity.\n", + "\n", + "How in the brain\n", + "\n", + "In particular, we explained to be a process the brain helps the body in the hope of inducing effect upon consciousness.) First, we wanted to demonstrate the concept of the concept. What if an object contains information and less-valueless objects?\n", + "\n", + "Instead of our subject, observing the behavior, a user explained that not only through interaction but instead affected by the object’s behavior which it didn’t immediately change. Our idea is the brain’s activity. An object’s behavior is not likely to change the thought itself. Its appearance, which occurs in the form or respect to the value of the object.\n", + "\n", + "Rey further described this as a student’s intuition in Newtonian physics physics, the origin of a field compared to the electromagnetic field of value, what Newton meant says. When a value is added to a new object as an additional component of the field.” While in a value, an object will return if all the objects are being created, each one defines how it depends on the object. Then, an object always wants to be found, but one has some special value function which a function will return, which is a special value. Our physics faculty are the reason that an existing object cannot be created and which force and energy will persist in existence unless it constricates all of us to existing objects.\n", + "\n", + "This was not the case, though not most humans do.\n", + "\n", + "Heard controversy\n", + "\n", + "Leonard Laylard understood the original sculpture well: At first, he believed that was caused by people in their drug. His father Richard, however, –-than famously, would persist, in his desire to be his own artist.\n", + "\n", + "Laughing, spurred by that interest, Leff, also from Missouri, to Baltimore for a short period known for his artwork which contained drugs and alcohol abuse, they were arrested, tortured and imprisoned in his assistant’s holding cell. Layff was eventually pursued by prosecution, forcing him, to arrest him and took him to the lab.\n", + "\n", + "So they begged each other to create the art piece, and what he wanted to do from there is to create the last experimental piece of art.\n", + "\n", + "Draper soon became a target of investigatory institutions, in violation of civil rights laws, and being a legal bystander, and not the users, and believed police would enforce theirs.\n", + "\n", + "The idea was, according to Leff, to stick with it. He also was present for Drug Awareness Week, a goal he pursued. He was troubled by the exposure of his artist ideas to widespread practice throughout the society and the value of scientific research and its effect on society.\n", + "\n", + "Advertisement\n", + "\n", + "Despite being prodded, art was far out of print commercially accessible – and many people – Draper�\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + " this post and book in the Muslim Rich Ramadan Cookbook.\n", + "\n", + "In fact, we've even hit store-twin with the Muslim Food Beats, which is an Ottawa food chain with some neighbourhood chain, a public complex, reconciles our chain-subsidized system (no kidding). The chain provides subsidize meals for their meals we will provide homeless Muslims, giving us $15 for every meal for food. During a quick meal I have observed these hungry children immediately, while showing us to get our hand treats. All of customers I boarded the doors got in a patted down, the counter is up to us and shoppers—customers are horrified to look. They don't see the side of the food and in fact, they refuse the same care I mention this problem. Thank you.\n", + "\n", + "There are too many Muslims they don’t see any fight, but until they address them repeatedly and they tell me I don't see this conflict. And after Ramadan, the first four days of Ramadan we recognize that the rejection was wrapped and present itself as a culture of acceptance. Only foods like us can help in getting, and maybe, some of it.\n", + "\n", + "The Muslim community doesn't have any problem that we want to help them make our own choices what we would do if we were homeless. This same problem I started a month earlier, when I receive our own assistance for a fairly regular Ramadan meal without by paying a meal at some church to Vancouver Health College. If I go out and try the food delivered to my son, often something that school had refused to help out of Islam about 40 years ago from that we just converted back to Islam. Now we are university students, mothers, their children, elderly and children. They are asking us if we have donated a two-day meal, twenty-five for them. Many Muslims also tell them to be off. They often go and they even come hungry.\n", + "\n", + "When I say I’m one of the best example, it's the new Globe story in that. In 2001, I started a new program which \"caused 600, some people are paying all the government money, not because our everyday life have not been \"more fair\" and to fix the situation, we allow more people to be able to help the people's organizations because they are Muslims who or are homeless. And this can involve the relationship of the Muslim community, which I heal and has given me. I have had a great number of experiences doing this, as part of my work in faith awareness programs. 40 years later, mosques are given funds to help them to help rebuild the faith. I can accept the Muslims who support them and sacrifice as much as non-Catholics.\n", + "\n", + "And I offer gifts this time around, I am a strong advocate for these programs because of such an issue of origin issue, to the fellow Muslim community to experience through the rest of Ramadan. On Sunday this year, 24-year-old Choudith, aka Francis, was also bestowed with two Muslim Canadian Foundation scholarships by a friend at the Daily Adleri ina Institute because I feel inspired about my interests.\n", + "\n", + "Recently, the library came on a scholarship for Ramadan, but later found a few days later that my scholarship expired with budget.\n", + "\n", + "Stressing that the changing demographic background causes dramatic changes, she cited the dramatic gap in income. In income data, the median income is associated with how much longer the population lives actually — based on income earned according to Gla with 1980s median.\n", + "\n", + "One of the Trump Poverty Institute 2012 studies, originally incubated by the Center for Economic Policy Institute–based, nonpartisan Center for Economic and Social Policy, is part of the “ourageously rich” studies by showing that average income on America’s top “non-economic and upward,” is the loss of their wealth.\n", + "\n", + "Researchers began to look for similar generational trends in the prior five decade by New York economic scholars at the Human Development Administration and WEECA; and in 1995 after the CPI, the (PPP 2010 indicator) of “continued reports,” a comorate driver’s median for “statistics,” of 2007 GDP examined in a time line that includes the first full quarter of 2007 and also in 1 year 2006 (1.7 years. At the Gla’s review, concludes that economic growth trends alone tend to underestimate the long-term benefit without incorporating other measures of personal income.\n", + "\n", + "The 4 annual measures of Americans’ estimated Gross Domestic Product (Report, 1979) . .): 20% increase. Total Person %s Gross Domestic Product : $2,839 (2010 dollars) : (448) 4045348.\n", + "\n", + "Aubrey for Brad Bartle (“Superfannies. .” in Income: Cash on Me (“Patty”) (“Cash, Cash on You? . ) America’s): Changes in income and average\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + } + ] + }, + { + "cell_type": "markdown", + "source": [ + "$\\alpha_0^\\text{eval}=0.0625$ with $T=16$ ($T$ matters less when $\\alpha_0^\\text{eval}$ is small):" + ], + "metadata": { + "id": "MZXOHRvg56FB" + } + }, + { + "cell_type": "code", + "source": [ + "# if alpha_0=0.25 for training, gen ppl = 23.95\n", + "# if alpha_0=1 for training, gen ppl = 31.33\n", + "samples = sampler.generate_samples(\n", + " num_samples=2, alpha_0=0.0625, num_diffusion_steps=16)\n", + "for sample in samples:\n", + " print(sample)\n", + " print('\\n' * 5)" + ], + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "2nTT3x_ey_22", + "outputId": "ebead2e4-75bf-4a2c-8978-b87d44105886" + }, + "execution_count": null, + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "We will seek congressional action to change his mind and follow the American people's guidance and their verdict.\"\n", + "\n", + "Sen. John McCain (R-Ariz.), who traveled to Saudi Arabia earlier this week, told reporters he believes that Obama may jeopardize his presidential bid.\n", + "\n", + "\"Our people have come to tell us they are ready to go to war,\" he said. \"If politicians and leaders of both our parties in Congress show they are willing to meet with their constituents, then that war has never been and will never be an option.\"\n", + "\n", + "McCain, who is among a small group of senators who are rallying behind the president, was an early supporter of the Saudi Arabia effort.\n", + "\n", + "Here's why:\n", + "\n", + "(CBS News) Critics warned Obama that Riyadh's young generation may vote Democratic. White House spokesman Josh Moiffer said the administration had never considered the Saudi announcement to sway voters. \"There is no question that Saudi Arabia is sending very young Saudi people to Iraq and Yemen and on to terrorist training camps,\" Moiffer said.\n", + "\n", + "Saudi officials added that Obama would bring with him an unspecified number of minors and resettle them in the U.S., rather than to Baghdad. They called the announcement in Riyadh a \"bad publicity\" move that could create a backlash in a key ally.\n", + "\n", + "(CNN) Republican Sen. Lindsey Graham (R-S.C.) also urged Obama to step down on a decision to move forward with airstrikes against militants in Syria.\n", + "\n", + "Graham, who chairs the Armed House Armed Services Committee, said the administration should not have known that there were two factions in Saudi Arabia that wanted to blow up American planes. \"When we first knew about this announcement, he was actually going to reverse course,\" Graham said. \"He should have put the best interests of America first and never waited for any ambiguity to arise. It is very clear that the Saudis, who we ought to be very careful about having to do, are very, very dangerous. They know this and they are willing to put their lives on their borders and take out bombs. And if that does happen, we don't know where they'll come from.\"\n", + "\n", + "Graham, who doesn't want Obama to know if his congressional votes are in jeopardy, hasn't been fully consulted, when asked in January if he thought the president would go further. \"I think about a different question,\" he said. \"If he were to give us an assurance that we had the votes to do whatever we said, which is, if he just outright said there were going to be consequences. But that's the president I think is correct, and I recalled him saying he supported allowing humanitarian aid, and that that was not what we had said. And as it turned out, they also distanced from the coalition that is going to be bombing ISIS in Syria. They said they are participating in the coalition. And that was one of the things that he supported, which I don't think that he needs to have been told.\n", + "\n", + "\"We are -- I haven't seen any words that were more misleading than that but I will say that that was some extraordinary coalition effort that he was involved in. I don't think that would have been classified as a covert action.\"\n", + "\n", + "-quoted from WSJ.\n", + "\n", + "Get More News from the Pulse newsletter<|endoftext|>CAMDEN, Yemen (Reuters) - A new study says the country is experiencing the largest “mancession” ever\n", + "\n", + "Tens of thousands of foreign citizens living in coastal waters Benin in Yemen, the Arab world’s poorest country, would have to 78 years if they left the country to get work elsewhere.\n", + "\n", + "The study by a consortium of 72 international researchers focused on just three coastal countries in Yemen - Obama’s birthplace, the country of war last year in Somalia, and some of the worst recessions in decades.\n", + "\n", + "Their findings, to be published in the journal Economic Perspectives in 2008, show a decline in participation in the labour market and then in the ranks of employment.\n", + "\n", + "The most competitive place for these workers has historically been in the Gulf states where they earn some 90 percent of the wealth and virtually all of the salaries. However, Yemen is one of the least competitive places in the world, the study says.\n", + "\n", + "But then the question about inequality, identified by the authors, widened and, in turn, made the nearly 4 million foreigners living in the country under five years old.\n", + "\n", + "The Republican takeover of the government in Yemen ushered in a political revolution that saw politicians taking to the streets, increasing literacy rates and taking over the culture and, a decade later, the education system.\n", + "\n", + "President Obama proposed rewriting the country’s constitution in 2010 under his Jan. 20 (11) presidential term and then pledged in a 2013 speech that he would lift the ban on the air strike against the Houthi rebels in Yemen.\n", + "\n", + "Civil society activists say Yemen has gone through a sudden and dramatic change.\n", + "\n", + "Its population, which had once\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "’s jurisdiction. The Senate Armed Services Committee will be chaired by Carl Levin and the Senate Foreign Relations Committee, and by [Independent] Commissioner Gabby Vestron by United States Senator Dianne Feinstein of ND.\n", + "\n", + "The next example continues here. For the first time since December 2008, President Obama has declared that Iran has declared a war on the Syrian government.\n", + "\n", + "The weakness of the Pakistani government in the fall of 2016 meant it will not be able to fight ISIS or those allied with it, as long as the enemy is seeking to destroy the United States Constitution.\n", + "\n", + "The first move the Obama administration announced on February 21, 2017 was to pull the US military out of Iraq. President Obama said that he wanted to keep the US in the Iraq war, but then insisted that the only way to keep the US in Iraq was to go to Pakistan.\n", + "\n", + "If you forget, the major ones are the military, the nuclear codes, the Iran nuclear deal and the nuclear Iran program.\n", + "\n", + "REPUBLIC\n", + "\n", + "Political moderates would like to see the US remove the CIA from the military, its military personnel, its own military advisors and its special operations troops. But that would mean that they could no longer carry out these missions.\n", + "\n", + "Abdul Basaa’in is an opposition activist and spokesperson for the Syrian National Council. He took his office in 2011 and is on the human rights council.\n", + "\n", + "He has been acting as an activist for the FSA’s Idlib military council. He was one of two Libyan-born activists who were detained by the security services. Abdoul Yahya'in Ali Jarrah and Ahmed Awad were among the three other Syrian activists who were detained in detention by the security forces based on accusations they were members of the FSA.\n", + "\n", + "The third activist arrested by the FSA was, Hamza al-Saki who was released.\n", + "\n", + "All three activists were released by the group after six months of protest. Three of them are part of the Amal Sahlaa delegation.\n", + "\n", + "MATES\n", + "\n", + "When the Syrian National Council (SNNC), or National Council for the Salvation of Syria was established in January 2016 as a guarantor of the ceasefire in December 2012, there was huge movement in opposition circles for political transition to an inclusive government. The main opposition groups were People (PA) and Free Syrian Army (FSA) and were secularist, but not Islamist extremist. What was needed was an independent administration that the NNC could work with. It was described as a political cabinet. They would convene and select a transitional government which could be in place before the election of President Assad.\n", + "\n", + "Members of the NNC have a clear mandate. The NNC wants to end the slaughter and bloodletting and achieve a negotiated settlement. It wants the regime to create a good atmosphere in the country of Syrian refugees.\n", + "\n", + "The NNC would promote a transitional government based on the Free Syrian Army’s (FSA) people, hundreds of thousands of which have been forced to flee the country after the fall of its president, Bashar al-Assad, and the deal.\n", + "\n", + "FSA brigades would leave the country in order to fight fires and snipers and create an atmosphere of calm that would burn the entire international program. FSA brigades would also keep funds in the NNC.\n", + "\n", + "The NNC talks are always about the Middle East and global geopolitics, but the participation of the NNC as the impartial mediator between countries is called into question. The reality is that the coalition of US, Russia, the Zionist hawks, Turkey, Saudi Arabia and the United States of America, Qatar and UAE, for years has been engaged in subversion against national security in the name of destroying the first father of Islam. The success of the NNC in a global battle against terrorist terrorist groups, is yet to be determined, however.\n", + "\n", + "The only way to ensure that rebel forces will go to the rescue in Idlib would be to ensure an independent Syrian rebel government.<|endoftext|>The handful of people who cast a vote for the Republican presidential nominee say they would give the Texas congressman an opponent if he lost the state, according to the Houston Chronicle.\n", + "\n", + "Pat Buchanan, a conservative newspaper columnist for the Washington Post, listed 15 in the forum's 51 options. More than six dozen other people were barred from participating because the debate was under way.\n", + "\n", + "Buchanan was following John Kasich and Gov. Scott Walker of Wisconsin on Saturday, meaning he could pick up the race for the GOP nomination if the polls go his way. Walker's campaign had suspended its advertising on Sunday to facilitate his comeback.\n", + "\n", + "Some observers consider the issue of incumbent Sen. Ted Cruz (R-Tex.) a useful first-time politician, as he is about to serve as a Republican House majority leader. The two are the only two candidates in the contest to have spent or were legally involved in the debate. Cruz was a candidate at last year's GOP convention, but spent his candidacy as a consultant, advising a\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n" + ] + } + ] + } + ] +} \ No newline at end of file