ahczhg
Claude
commited on
Commit
Β·
bb2a7d7
0
Parent(s):
Initial commit: Add LFM2-ColBERT-350M inference example
Browse files- Add Jupyter notebook with complete inference workflow
- Add README with usage instructions and examples
- Add MIT LICENSE
π€ Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
- LFM2-ColBERT-350M.ipynb +1 -0
- LICENSE +21 -0
- README.md +95 -0
LFM2-ColBERT-350M.ipynb
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"gpuType":"L4","provenance":[{"file_id":"https://huggingface.co/LiquidAI/LFM2-ColBERT-350M.ipynb","timestamp":1761664026020}]},"accelerator":"GPU","kaggle":{"accelerator":"gpu"},"language_info":{"name":"python"},"kernelspec":{"name":"python3","display_name":"Python 3"},"widgets":{"application/vnd.jupyter.widget-state+json":{"d826d8488edc4115ab2681119fb8ea12":{"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_e17a87b3086e4589bd43d209848ed375","IPY_MODEL_71ed9bc8c4f94afeb1e8786623a20b8a","IPY_MODEL_0d6318ad694b48b6848d3e3b57df7338"],"layout":"IPY_MODEL_4fa71c2eaebb4076a107bd48b87fdf7f"}},"e17a87b3086e4589bd43d209848ed375":{"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_7d2a0f2d5e604e2eaaab04a297237859","placeholder":"β","style":"IPY_MODEL_0a98ec0362254634bd790fe932d641ce","value":"tokenizer_config.json:β"}},"71ed9bc8c4f94afeb1e8786623a20b8a":{"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_74b4f6897064415a8bee187c3d32b4e8","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_33a4d9a108b24ea081a6769cac5d1149","value":1}},"0d6318ad694b48b6848d3e3b57df7338":{"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_3156fdff69f846a29ab9ea4a0cde518f","placeholder":"β","style":"IPY_MODEL_1481410592d54477a254a832eabffe20","value":"β91.9k/?β[00:00<00:00,β9.21MB/s]"}},"4fa71c2eaebb4076a107bd48b87fdf7f":{"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}},"7d2a0f2d5e604e2eaaab04a297237859":{"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}},"0a98ec0362254634bd790fe932d641ce":{"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":""}},"74b4f6897064415a8bee187c3d32b4e8":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":"20px"}},"33a4d9a108b24ea081a6769cac5d1149":{"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":""}},"3156fdff69f846a29ab9ea4a0cde518f":{"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}},"1481410592d54477a254a832eabffe20":{"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":""}},"8cc45366df294270af74849569e13e54":{"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_20d6d383bf364e54a3099c084c849cde","IPY_MODEL_3d6b91712da64535acc8260640cbc044","IPY_MODEL_afde725ed33b46989640f5f39036e7b0"],"layout":"IPY_MODEL_d89216e4a38645ac9b9c72516fb88fd5"}},"20d6d383bf364e54a3099c084c849cde":{"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_b71daac2c993402487eee77f03b59d14","placeholder":"β","style":"IPY_MODEL_ea03395538f74139b090abd882922261","value":"tokenizer.json:β"}},"3d6b91712da64535acc8260640cbc044":{"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_c852759931d74eec8ea9c33aef724f94","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_d489352481e547478155a999395f9e56","value":1}},"afde725ed33b46989640f5f39036e7b0":{"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_4a453e61da844304bc7e605b9b7e7451","placeholder":"β","style":"IPY_MODEL_c6c73b63855b4ec2880aff706fbb1aeb","value":"β4.73M/?β[00:00<00:00,β14.9MB/s]"}},"d89216e4a38645ac9b9c72516fb88fd5":{"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}},"b71daac2c993402487eee77f03b59d14":{"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}},"ea03395538f74139b090abd882922261":{"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":""}},"c852759931d74eec8ea9c33aef724f94":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":"20px"}},"d489352481e547478155a999395f9e56":{"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":""}},"4a453e61da844304bc7e605b9b7e7451":{"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}},"c6c73b63855b4ec2880aff706fbb1aeb":{"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":""}},"461cf62f0645465d9bd3f17bd6f6eaed":{"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_3199edec84ea48fc8c354057f057a230","IPY_MODEL_b4961065f772462caf5317b515163f24","IPY_MODEL_39aaeab56cc444b7ba99c21e67b1bfc4"],"layout":"IPY_MODEL_6538341eb0c440caac4e964d4ab9ae35"}},"3199edec84ea48fc8c354057f057a230":{"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_60412f999f9f414f8dd0ec1ab81bceb2","placeholder":"β","style":"IPY_MODEL_946eabff127b413bb6b77582d43e417a","value":"special_tokens_map.json:β100%"}},"b4961065f772462caf5317b515163f24":{"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_108c5d09682c454c946d415da2462ca9","max":323,"min":0,"orientation":"horizontal","style":"IPY_MODEL_4a6588b9af92440ea9fd7ac4ba885ec2","value":323}},"39aaeab56cc444b7ba99c21e67b1bfc4":{"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_8f0d7a307fcc4b9d8f163ecc1c67a1ea","placeholder":"β","style":"IPY_MODEL_f3d083c6f556465cbdd75188851da084","value":"β323/323β[00:00<00:00,β43.4kB/s]"}},"6538341eb0c440caac4e964d4ab9ae35":{"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}},"60412f999f9f414f8dd0ec1ab81bceb2":{"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}},"946eabff127b413bb6b77582d43e417a":{"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":""}},"108c5d09682c454c946d415da2462ca9":{"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}},"4a6588b9af92440ea9fd7ac4ba885ec2":{"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":""}},"8f0d7a307fcc4b9d8f163ecc1c67a1ea":{"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}},"f3d083c6f556465cbdd75188851da084":{"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":""}},"77212638431f400f810fcb0811daa168":{"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_508a03d4d6f6426da3702772b7c04c1b","IPY_MODEL_6d732397db05461692ce6706bce9a2f1","IPY_MODEL_1a7a5bbb0a9e4f08bcb22f68e4875688"],"layout":"IPY_MODEL_ef7843b5a2004a4a8ca2bfe817956752"}},"508a03d4d6f6426da3702772b7c04c1b":{"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_ad807489ef6f4839beb0d892e5c0d291","placeholder":"β","style":"IPY_MODEL_abc923e40a534a3b9d70619df241c611","value":"chat_template.jinja:β"}},"6d732397db05461692ce6706bce9a2f1":{"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_1a6b67861c3c4a7a9242957533273e6d","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_dd8cad0312bb4ca080e13df6f59c63c2","value":1}},"1a7a5bbb0a9e4f08bcb22f68e4875688":{"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_6e2d47966f55475cad363ded2380a6e6","placeholder":"β","style":"IPY_MODEL_42753debd1ff4140929d6e124b113243","value":"β1.30k/?β[00:00<00:00,β163kB/s]"}},"ef7843b5a2004a4a8ca2bfe817956752":{"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}},"ad807489ef6f4839beb0d892e5c0d291":{"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}},"abc923e40a534a3b9d70619df241c611":{"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":""}},"1a6b67861c3c4a7a9242957533273e6d":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":"20px"}},"dd8cad0312bb4ca080e13df6f59c63c2":{"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":""}},"6e2d47966f55475cad363ded2380a6e6":{"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}},"42753debd1ff4140929d6e124b113243":{"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":""}},"726e5d67997341f9a939b7bc166c448d":{"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_0bbd09093a9741e48bd572761ff34281","IPY_MODEL_44fbc64fd2724733954bad0a2a2b9241","IPY_MODEL_b09fbd281d4c4e19894d76fbb1241fb6"],"layout":"IPY_MODEL_710480f6f3e9496f9b97b981763e8c6b"}},"0bbd09093a9741e48bd572761ff34281":{"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_6f52ce0a2cb14be59ed25387101e541d","placeholder":"β","style":"IPY_MODEL_8d3cb15cf88c470ba4e43ff3c6863c08","value":"config.json:β"}},"44fbc64fd2724733954bad0a2a2b9241":{"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_2b439504b20740a0a95cd90946b40541","max":1,"min":0,"orientation":"horizontal","style":"IPY_MODEL_46c26390271141daa79b47decbc26b98","value":1}},"b09fbd281d4c4e19894d76fbb1241fb6":{"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_c2534f0f3fb14bf39d1311e64f94e0cb","placeholder":"β","style":"IPY_MODEL_d26cb9137dbb4886a1090031dfdc4eba","value":"β1.22k/?β[00:00<00:00,β156kB/s]"}},"710480f6f3e9496f9b97b981763e8c6b":{"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}},"6f52ce0a2cb14be59ed25387101e541d":{"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}},"8d3cb15cf88c470ba4e43ff3c6863c08":{"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":""}},"2b439504b20740a0a95cd90946b40541":{"model_module":"@jupyter-widgets/base","model_name":"LayoutModel","model_module_version":"1.2.0","state":{"_model_module":"@jupyter-widgets/base","_model_module_version":"1.2.0","_model_name":"LayoutModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"LayoutView","align_content":null,"align_items":null,"align_self":null,"border":null,"bottom":null,"display":null,"flex":null,"flex_flow":null,"grid_area":null,"grid_auto_columns":null,"grid_auto_flow":null,"grid_auto_rows":null,"grid_column":null,"grid_gap":null,"grid_row":null,"grid_template_areas":null,"grid_template_columns":null,"grid_template_rows":null,"height":null,"justify_content":null,"justify_items":null,"left":null,"margin":null,"max_height":null,"max_width":null,"min_height":null,"min_width":null,"object_fit":null,"object_position":null,"order":null,"overflow":null,"overflow_x":null,"overflow_y":null,"padding":null,"right":null,"top":null,"visibility":null,"width":"20px"}},"46c26390271141daa79b47decbc26b98":{"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":""}},"c2534f0f3fb14bf39d1311e64f94e0cb":{"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}},"d26cb9137dbb4886a1090031dfdc4eba":{"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":""}},"db0ce630ed2d45a1ac8260fc298a861a":{"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_54b989ac1cc74eb7aa4245f58bbd57e3","IPY_MODEL_103bf0c13e2f4807acd04f34db4ae152","IPY_MODEL_5d65b0e1695943f2abff304b6bda55c0"],"layout":"IPY_MODEL_fda6581f83ca49798afc5b1d988038a7"}},"54b989ac1cc74eb7aa4245f58bbd57e3":{"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_d2e9ba0643304690890017573b63a79d","placeholder":"β","style":"IPY_MODEL_10a4b5b8bb074d9d833cad4c4e2f0798","value":"model.safetensors:β100%"}},"103bf0c13e2f4807acd04f34db4ae152":{"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_9ddc2bc0703145c08fffdc1021db548f","max":1413306600,"min":0,"orientation":"horizontal","style":"IPY_MODEL_683312b746404406be482d82a3683b7f","value":1413306600}},"5d65b0e1695943f2abff304b6bda55c0":{"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_42da472de6e0434ba76e17aebfa7d186","placeholder":"β","style":"IPY_MODEL_9baa63f0580a437e87c9accffd22c7aa","value":"β1.41G/1.41Gβ[00:19<00:00,β294MB/s]"}},"fda6581f83ca49798afc5b1d988038a7":{"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}},"d2e9ba0643304690890017573b63a79d":{"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}},"10a4b5b8bb074d9d833cad4c4e2f0798":{"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":""}},"9ddc2bc0703145c08fffdc1021db548f":{"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}},"683312b746404406be482d82a3683b7f":{"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":""}},"42da472de6e0434ba76e17aebfa7d186":{"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}},"9baa63f0580a437e87c9accffd22c7aa":{"model_module":"@jupyter-widgets/controls","model_name":"DescriptionStyleModel","model_module_version":"1.5.0","state":{"_model_module":"@jupyter-widgets/controls","_model_module_version":"1.5.0","_model_name":"DescriptionStyleModel","_view_count":null,"_view_module":"@jupyter-widgets/base","_view_module_version":"1.2.0","_view_name":"StyleView","description_width":""}}}}},"cells":[{"cell_type":"markdown","source":["## Local Inference on GPU\n","Model page: https://huggingface.co/LiquidAI/LFM2-ColBERT-350M\n","\n","β οΈ If the generated code snippets do not work, please open an issue on either the [model repo](https://huggingface.co/LiquidAI/LFM2-ColBERT-350M)\n","\t\t\tand/or on [huggingface.js](https://github.com/huggingface/huggingface.js/blob/main/packages/tasks/src/model-libraries-snippets.ts) π"],"metadata":{"id":"m89FIn0hVnms"}},{"cell_type":"markdown","metadata":{"id":"5cf2323e"},"source":["# Task\n","Create a Python example to test the model \"https://huggingface.co/LiquidAI/LFM2-ColBERT-350M\" in the empty cell with id \"A0b83Pz8Vor9\"."]},{"cell_type":"markdown","metadata":{"id":"9760d183"},"source":["## Install necessary libraries\n","\n","### Subtask:\n","Install the required libraries, such as `transformers` and `torch`.\n"]},{"cell_type":"markdown","metadata":{"id":"566dd7b2"},"source":["**Reasoning**:\n","Install the required libraries `transformers` and `torch` using pip.\n","\n"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"24d1eef5","executionInfo":{"status":"ok","timestamp":1761663827886,"user_tz":-120,"elapsed":7040,"user":{"displayName":"","userId":""}},"outputId":"9f889743-cafc-4671-ac4a-67af3fa3651a"},"source":["%pip install transformers torch"],"execution_count":2,"outputs":[{"output_type":"stream","name":"stdout","text":["Requirement already satisfied: transformers in /usr/local/lib/python3.12/dist-packages (4.57.1)\n","Requirement already satisfied: torch in /usr/local/lib/python3.12/dist-packages (2.8.0+cu126)\n","Requirement already satisfied: filelock in /usr/local/lib/python3.12/dist-packages (from transformers) (3.20.0)\n","Requirement already satisfied: huggingface-hub<1.0,>=0.34.0 in /usr/local/lib/python3.12/dist-packages (from transformers) (0.35.3)\n","Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.12/dist-packages (from transformers) (2.0.2)\n","Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.12/dist-packages (from transformers) (25.0)\n","Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.12/dist-packages (from transformers) (6.0.3)\n","Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.12/dist-packages (from transformers) (2024.11.6)\n","Requirement already satisfied: requests in /usr/local/lib/python3.12/dist-packages (from transformers) (2.32.4)\n","Requirement already satisfied: tokenizers<=0.23.0,>=0.22.0 in /usr/local/lib/python3.12/dist-packages (from transformers) (0.22.1)\n","Requirement already satisfied: safetensors>=0.4.3 in /usr/local/lib/python3.12/dist-packages (from transformers) (0.6.2)\n","Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.12/dist-packages (from transformers) (4.67.1)\n","Requirement already satisfied: typing-extensions>=4.10.0 in /usr/local/lib/python3.12/dist-packages (from torch) (4.15.0)\n","Requirement already satisfied: setuptools in /usr/local/lib/python3.12/dist-packages (from torch) (75.2.0)\n","Requirement already satisfied: sympy>=1.13.3 in /usr/local/lib/python3.12/dist-packages (from torch) (1.13.3)\n","Requirement already satisfied: networkx in /usr/local/lib/python3.12/dist-packages (from torch) (3.5)\n","Requirement already satisfied: jinja2 in /usr/local/lib/python3.12/dist-packages (from torch) (3.1.6)\n","Requirement already satisfied: fsspec in /usr/local/lib/python3.12/dist-packages (from torch) (2025.3.0)\n","Requirement already satisfied: nvidia-cuda-nvrtc-cu12==12.6.77 in /usr/local/lib/python3.12/dist-packages (from torch) (12.6.77)\n","Requirement already satisfied: nvidia-cuda-runtime-cu12==12.6.77 in /usr/local/lib/python3.12/dist-packages (from torch) (12.6.77)\n","Requirement already satisfied: nvidia-cuda-cupti-cu12==12.6.80 in /usr/local/lib/python3.12/dist-packages (from torch) (12.6.80)\n","Requirement already satisfied: nvidia-cudnn-cu12==9.10.2.21 in /usr/local/lib/python3.12/dist-packages (from torch) (9.10.2.21)\n","Requirement already satisfied: nvidia-cublas-cu12==12.6.4.1 in /usr/local/lib/python3.12/dist-packages (from torch) (12.6.4.1)\n","Requirement already satisfied: nvidia-cufft-cu12==11.3.0.4 in /usr/local/lib/python3.12/dist-packages (from torch) (11.3.0.4)\n","Requirement already satisfied: nvidia-curand-cu12==10.3.7.77 in /usr/local/lib/python3.12/dist-packages (from torch) (10.3.7.77)\n","Requirement already satisfied: nvidia-cusolver-cu12==11.7.1.2 in /usr/local/lib/python3.12/dist-packages (from torch) (11.7.1.2)\n","Requirement already satisfied: nvidia-cusparse-cu12==12.5.4.2 in /usr/local/lib/python3.12/dist-packages (from torch) (12.5.4.2)\n","Requirement already satisfied: nvidia-cusparselt-cu12==0.7.1 in /usr/local/lib/python3.12/dist-packages (from torch) (0.7.1)\n","Requirement already satisfied: nvidia-nccl-cu12==2.27.3 in /usr/local/lib/python3.12/dist-packages (from torch) (2.27.3)\n","Requirement already satisfied: nvidia-nvtx-cu12==12.6.77 in /usr/local/lib/python3.12/dist-packages (from torch) (12.6.77)\n","Requirement already satisfied: nvidia-nvjitlink-cu12==12.6.85 in /usr/local/lib/python3.12/dist-packages (from torch) (12.6.85)\n","Requirement already satisfied: nvidia-cufile-cu12==1.11.1.6 in /usr/local/lib/python3.12/dist-packages (from torch) (1.11.1.6)\n","Requirement already satisfied: triton==3.4.0 in /usr/local/lib/python3.12/dist-packages (from torch) (3.4.0)\n","Requirement already satisfied: hf-xet<2.0.0,>=1.1.3 in /usr/local/lib/python3.12/dist-packages (from huggingface-hub<1.0,>=0.34.0->transformers) (1.1.10)\n","Requirement already satisfied: mpmath<1.4,>=1.1.0 in /usr/local/lib/python3.12/dist-packages (from sympy>=1.13.3->torch) (1.3.0)\n","Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.12/dist-packages (from jinja2->torch) (3.0.3)\n","Requirement already satisfied: charset_normalizer<4,>=2 in /usr/local/lib/python3.12/dist-packages (from requests->transformers) (3.4.4)\n","Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.12/dist-packages (from requests->transformers) (3.11)\n","Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.12/dist-packages (from requests->transformers) (2.5.0)\n","Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.12/dist-packages (from requests->transformers) (2025.10.5)\n"]}]},{"cell_type":"markdown","metadata":{"id":"8c2e85f9"},"source":["## Load the model and tokenizer\n","\n","### Subtask:\n","Load the LFM2-ColBERT-350M model and its corresponding tokenizer from Hugging Face.\n"]},{"cell_type":"markdown","metadata":{"id":"73b8d6f2"},"source":["**Reasoning**:\n","Import the necessary classes and load the tokenizer and model from Hugging Face.\n","\n"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/","height":209,"referenced_widgets":["d826d8488edc4115ab2681119fb8ea12","e17a87b3086e4589bd43d209848ed375","71ed9bc8c4f94afeb1e8786623a20b8a","0d6318ad694b48b6848d3e3b57df7338","4fa71c2eaebb4076a107bd48b87fdf7f","7d2a0f2d5e604e2eaaab04a297237859","0a98ec0362254634bd790fe932d641ce","74b4f6897064415a8bee187c3d32b4e8","33a4d9a108b24ea081a6769cac5d1149","3156fdff69f846a29ab9ea4a0cde518f","1481410592d54477a254a832eabffe20","8cc45366df294270af74849569e13e54","20d6d383bf364e54a3099c084c849cde","3d6b91712da64535acc8260640cbc044","afde725ed33b46989640f5f39036e7b0","d89216e4a38645ac9b9c72516fb88fd5","b71daac2c993402487eee77f03b59d14","ea03395538f74139b090abd882922261","c852759931d74eec8ea9c33aef724f94","d489352481e547478155a999395f9e56","4a453e61da844304bc7e605b9b7e7451","c6c73b63855b4ec2880aff706fbb1aeb","461cf62f0645465d9bd3f17bd6f6eaed","3199edec84ea48fc8c354057f057a230","b4961065f772462caf5317b515163f24","39aaeab56cc444b7ba99c21e67b1bfc4","6538341eb0c440caac4e964d4ab9ae35","60412f999f9f414f8dd0ec1ab81bceb2","946eabff127b413bb6b77582d43e417a","108c5d09682c454c946d415da2462ca9","4a6588b9af92440ea9fd7ac4ba885ec2","8f0d7a307fcc4b9d8f163ecc1c67a1ea","f3d083c6f556465cbdd75188851da084","77212638431f400f810fcb0811daa168","508a03d4d6f6426da3702772b7c04c1b","6d732397db05461692ce6706bce9a2f1","1a7a5bbb0a9e4f08bcb22f68e4875688","ef7843b5a2004a4a8ca2bfe817956752","ad807489ef6f4839beb0d892e5c0d291","abc923e40a534a3b9d70619df241c611","1a6b67861c3c4a7a9242957533273e6d","dd8cad0312bb4ca080e13df6f59c63c2","6e2d47966f55475cad363ded2380a6e6","42753debd1ff4140929d6e124b113243","726e5d67997341f9a939b7bc166c448d","0bbd09093a9741e48bd572761ff34281","44fbc64fd2724733954bad0a2a2b9241","b09fbd281d4c4e19894d76fbb1241fb6","710480f6f3e9496f9b97b981763e8c6b","6f52ce0a2cb14be59ed25387101e541d","8d3cb15cf88c470ba4e43ff3c6863c08","2b439504b20740a0a95cd90946b40541","46c26390271141daa79b47decbc26b98","c2534f0f3fb14bf39d1311e64f94e0cb","d26cb9137dbb4886a1090031dfdc4eba","db0ce630ed2d45a1ac8260fc298a861a","54b989ac1cc74eb7aa4245f58bbd57e3","103bf0c13e2f4807acd04f34db4ae152","5d65b0e1695943f2abff304b6bda55c0","fda6581f83ca49798afc5b1d988038a7","d2e9ba0643304690890017573b63a79d","10a4b5b8bb074d9d833cad4c4e2f0798","9ddc2bc0703145c08fffdc1021db548f","683312b746404406be482d82a3683b7f","42da472de6e0434ba76e17aebfa7d186","9baa63f0580a437e87c9accffd22c7aa"]},"id":"960cd71c","executionInfo":{"status":"ok","timestamp":1761663820842,"user_tz":-120,"elapsed":48717,"user":{"displayName":"","userId":""}},"outputId":"919ec603-8f74-40b8-f6ca-98e69376c4e6"},"source":["from transformers import AutoTokenizer, AutoModel\n","\n","model_name = \"LiquidAI/LFM2-ColBERT-350M\"\n","tokenizer = AutoTokenizer.from_pretrained(model_name)\n","model = AutoModel.from_pretrained(model_name)"],"execution_count":1,"outputs":[{"output_type":"display_data","data":{"text/plain":["tokenizer_config.json: 0.00B [00:00, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"d826d8488edc4115ab2681119fb8ea12"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["tokenizer.json: 0.00B [00:00, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"8cc45366df294270af74849569e13e54"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["special_tokens_map.json: 0%| | 0.00/323 [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"461cf62f0645465d9bd3f17bd6f6eaed"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["chat_template.jinja: 0.00B [00:00, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"77212638431f400f810fcb0811daa168"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["config.json: 0.00B [00:00, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"726e5d67997341f9a939b7bc166c448d"}},"metadata":{}},{"output_type":"display_data","data":{"text/plain":["model.safetensors: 0%| | 0.00/1.41G [00:00<?, ?B/s]"],"application/vnd.jupyter.widget-view+json":{"version_major":2,"version_minor":0,"model_id":"db0ce630ed2d45a1ac8260fc298a861a"}},"metadata":{}}]},{"cell_type":"markdown","metadata":{"id":"e9426fab"},"source":["## Prepare input data\n","\n","### Subtask:\n","Create some example input data (queries and documents) for testing the model.\n"]},{"cell_type":"markdown","metadata":{"id":"13ddb54b"},"source":["**Reasoning**:\n","Create example queries and documents as lists of strings.\n","\n"]},{"cell_type":"code","metadata":{"id":"e5049a6c","executionInfo":{"status":"ok","timestamp":1761663833481,"user_tz":-120,"elapsed":4,"user":{"displayName":"","userId":""}}},"source":["queries = [\n"," \"What is the capital of France?\",\n"," \"Tell me about machine learning.\",\n"," \"How to train a neural network?\"\n","]\n","\n","documents = [\n"," \"Paris is the capital and most populous city of France.\",\n"," \"Machine learning is a field of artificial intelligence that enables computers to learn from data.\",\n"," \"Training a neural network involves feeding it data and adjusting its weights.\",\n"," \"The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris.\"\n","]"],"execution_count":3,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"9392b411"},"source":["## Perform inference\n","\n","### Subtask:\n","Use the loaded model to perform inference on the input data and get the results.\n"]},{"cell_type":"markdown","metadata":{"id":"0d18e44e"},"source":["**Reasoning**:\n","Tokenize the queries and documents and then pass them through the model to get embeddings.\n","\n"]},{"cell_type":"code","metadata":{"id":"0R920u5hWSr-","executionInfo":{"status":"ok","timestamp":1761663856738,"user_tz":-120,"elapsed":729,"user":{"displayName":"","userId":""}}},"source":["import torch\n","\n","encoded_queries = tokenizer(queries, padding=True, truncation=True, return_tensors=\"pt\")\n","encoded_documents = tokenizer(documents, padding=True, truncation=True, return_tensors=\"pt\")\n","\n","with torch.no_grad():\n"," query_embeddings = model(**encoded_queries)\n"," document_embeddings = model(**encoded_documents)"],"execution_count":5,"outputs":[]},{"cell_type":"markdown","metadata":{"id":"8756eb2f"},"source":["## Interpret results\n","\n","### Subtask:\n","Interpret the results of the inference.\n"]},{"cell_type":"markdown","metadata":{"id":"42c6f2fa"},"source":["**Reasoning**:\n","Calculate the cosine similarity between query and document embeddings, rank documents by similarity, and print the results.\n","\n"]},{"cell_type":"code","metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"b78378ea","executionInfo":{"status":"ok","timestamp":1761663871901,"user_tz":-120,"elapsed":4,"user":{"displayName":"","userId":""}},"outputId":"c0c13250-d16a-4c35-9d69-1a44df819fc4"},"source":["from sklearn.metrics.pairwise import cosine_similarity\n","\n","query_embeddings_mean = query_embeddings.last_hidden_state.mean(dim=1).numpy()\n","document_embeddings_mean = document_embeddings.last_hidden_state.mean(dim=1).numpy()\n","\n","similarity_scores = cosine_similarity(query_embeddings_mean, document_embeddings_mean)\n","\n","for i, query in enumerate(queries):\n"," print(f\"Query: {query}\")\n"," ranked_document_indices = similarity_scores[i].argsort()[::-1]\n"," for rank, doc_idx in enumerate(ranked_document_indices):\n"," print(f\" Rank {rank + 1}: {documents[doc_idx]} (Similarity: {similarity_scores[i][doc_idx]:.4f})\")\n"," print(\"-\" * 30)"],"execution_count":6,"outputs":[{"output_type":"stream","name":"stdout","text":["Query: What is the capital of France?\n"," Rank 1: Paris is the capital and most populous city of France. (Similarity: 0.9447)\n"," Rank 2: The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris. (Similarity: 0.9347)\n"," Rank 3: Machine learning is a field of artificial intelligence that enables computers to learn from data. (Similarity: 0.8941)\n"," Rank 4: Training a neural network involves feeding it data and adjusting its weights. (Similarity: 0.8837)\n","------------------------------\n","Query: Tell me about machine learning.\n"," Rank 1: Machine learning is a field of artificial intelligence that enables computers to learn from data. (Similarity: 0.9436)\n"," Rank 2: Training a neural network involves feeding it data and adjusting its weights. (Similarity: 0.9003)\n"," Rank 3: The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris. (Similarity: 0.8692)\n"," Rank 4: Paris is the capital and most populous city of France. (Similarity: 0.8416)\n","------------------------------\n","Query: How to train a neural network?\n"," Rank 1: Training a neural network involves feeding it data and adjusting its weights. (Similarity: 0.9694)\n"," Rank 2: Machine learning is a field of artificial intelligence that enables computers to learn from data. (Similarity: 0.9267)\n"," Rank 3: The Eiffel Tower is a wrought-iron lattice tower on the Champ de Mars in Paris. (Similarity: 0.8868)\n"," Rank 4: Paris is the capital and most populous city of France. (Similarity: 0.8449)\n","------------------------------\n"]}]},{"cell_type":"markdown","metadata":{"id":"82e624ee"},"source":["## Summary:\n","\n","### Data Analysis Key Findings\n","\n","* The `transformers` and `torch` libraries were successfully installed.\n","* The \"LiquidAI/LFM2-ColBERT-350M\" model and its tokenizer were successfully loaded from Hugging Face.\n","* Example query and document data were created as Python lists.\n","* The model was used to generate embeddings for the queries and documents after tokenization.\n","* Cosine similarity was calculated between the mean of the query and document embeddings.\n","* Documents were ranked based on their similarity scores for each query.\n","\n","### Insights or Next Steps\n","\n","* The model appears to effectively rank documents based on their relevance to the queries, as indicated by the higher similarity scores for relevant document pairs.\n","* Further evaluation could involve using a larger and more diverse dataset, and comparing the performance against other retrieval models.\n"]}]}
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2025
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LFM2-ColBERT-350M Inference Example
|
| 2 |
+
|
| 3 |
+
This repository demonstrates local GPU inference using the [LiquidAI/LFM2-ColBERT-350M](https://huggingface.co/LiquidAI/LFM2-ColBERT-350M) model for document retrieval and ranking tasks.
|
| 4 |
+
|
| 5 |
+
## Overview
|
| 6 |
+
|
| 7 |
+
The LFM2-ColBERT-350M is a neural retrieval model that uses contextualized embeddings to rank documents based on their relevance to queries. This project provides a complete example of:
|
| 8 |
+
|
| 9 |
+
- Loading the model and tokenizer
|
| 10 |
+
- Processing queries and documents
|
| 11 |
+
- Computing similarity scores
|
| 12 |
+
- Ranking documents by relevance
|
| 13 |
+
|
| 14 |
+
## Requirements
|
| 15 |
+
|
| 16 |
+
- Python 3.7+
|
| 17 |
+
- PyTorch
|
| 18 |
+
- Transformers
|
| 19 |
+
- scikit-learn
|
| 20 |
+
- CUDA-capable GPU (recommended)
|
| 21 |
+
|
| 22 |
+
## Installation
|
| 23 |
+
|
| 24 |
+
Install the required dependencies:
|
| 25 |
+
|
| 26 |
+
```bash
|
| 27 |
+
pip install transformers torch scikit-learn
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
+
## Usage
|
| 31 |
+
|
| 32 |
+
The Jupyter notebook demonstrates a complete workflow:
|
| 33 |
+
|
| 34 |
+
1. **Install Dependencies**: Installs `transformers` and `torch`
|
| 35 |
+
2. **Load Model**: Loads the LFM2-ColBERT-350M model from Hugging Face
|
| 36 |
+
3. **Prepare Data**: Creates example queries and documents
|
| 37 |
+
4. **Generate Embeddings**: Computes embeddings for queries and documents
|
| 38 |
+
5. **Rank Results**: Uses cosine similarity to rank documents by relevance
|
| 39 |
+
|
| 40 |
+
### Quick Start
|
| 41 |
+
|
| 42 |
+
Open the `LFM2-ColBERT-350M.ipynb` notebook in Jupyter and run all cells. The example demonstrates:
|
| 43 |
+
|
| 44 |
+
```python
|
| 45 |
+
queries = [
|
| 46 |
+
"What is the capital of France?",
|
| 47 |
+
"Tell me about machine learning.",
|
| 48 |
+
"How to train a neural network?"
|
| 49 |
+
]
|
| 50 |
+
|
| 51 |
+
documents = [
|
| 52 |
+
"Paris is the capital and most populous city of France.",
|
| 53 |
+
"Machine learning is a field of artificial intelligence...",
|
| 54 |
+
# More documents...
|
| 55 |
+
]
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
The model successfully ranks relevant documents higher for each query.
|
| 59 |
+
|
| 60 |
+
## Results
|
| 61 |
+
|
| 62 |
+
The example shows effective document ranking with high similarity scores for relevant query-document pairs:
|
| 63 |
+
|
| 64 |
+
- Query about France's capital correctly ranks Paris-related documents highest
|
| 65 |
+
- Machine learning queries prioritize ML-related content
|
| 66 |
+
- Neural network training queries rank technical documents first
|
| 67 |
+
|
| 68 |
+
## Model Information
|
| 69 |
+
|
| 70 |
+
- **Model**: [LiquidAI/LFM2-ColBERT-350M](https://huggingface.co/LiquidAI/LFM2-ColBERT-350M)
|
| 71 |
+
- **Task**: Document retrieval and ranking
|
| 72 |
+
- **Parameters**: 350M
|
| 73 |
+
- **Architecture**: ColBERT-style retrieval model
|
| 74 |
+
|
| 75 |
+
## Next Steps
|
| 76 |
+
|
| 77 |
+
- Evaluate on larger, more diverse datasets
|
| 78 |
+
- Compare performance with other retrieval models
|
| 79 |
+
- Fine-tune on domain-specific data
|
| 80 |
+
- Implement batch processing for larger document collections
|
| 81 |
+
|
| 82 |
+
## License
|
| 83 |
+
|
| 84 |
+
MIT License - see [LICENSE](LICENSE) file for details
|
| 85 |
+
|
| 86 |
+
## Acknowledgments
|
| 87 |
+
|
| 88 |
+
- Model developed by [LiquidAI](https://huggingface.co/LiquidAI)
|
| 89 |
+
- Built using [Hugging Face Transformers](https://huggingface.co/transformers)
|
| 90 |
+
|
| 91 |
+
## Issues
|
| 92 |
+
|
| 93 |
+
If you encounter any problems or have questions:
|
| 94 |
+
- Check the [model repository](https://huggingface.co/LiquidAI/LFM2-ColBERT-350M) for model-specific issues
|
| 95 |
+
- Open an issue in this repository for implementation questions
|