├── .gitignore ├── README.md ├── img └── diff.png └── vllm_baichuan.ipynb /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.iml 3 | __pycache__/ 4 | .idea/ 5 | .pytest_cache/ 6 | *.egg-info/ 7 | __pycache__ 8 | .DS_Store 9 | .cache/ 10 | logging.log 11 | build/ 12 | dist/ 13 | .coverage 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vllm-cn 2 | ---- 3 | 根据 [官方首页文章](https://vllm.ai/),vllm 能极大提高大语言模型推理阶段的吞吐性能,这对计算资源有限,受限于推理效率的一些情况来说无疑是一大福音 4 | ![](https://vllm.ai/assets/figures/perf_a100_n1_light.png) 5 | 6 | 但是截止 2023.7.8,[vllm 文档](https://vllm.readthedocs.io/en/latest/models/supported_models.html) 显示其尚未支持目前热度较高的一些中文大模型,比如 baichuan-inc/baichuan-7B, THUDM/chatglm-6b 7 | 8 | 于是本人在另一个 [repo](https://github.com/gameofdimension/vllm) 实现了 vllm 对 baichuan-inc/baichuan-7B 的支持。运行官方的测试脚本,确实也可以看到 5+ 倍的效率提升。目前代码已提交 PR 期望能合并到官方 repo 9 | 10 | ![](img/diff.png) 11 | 12 | ### 测试 13 | 14 | baichuan-inc/baichuan-7B 的 vllm 适配测试可参考 [这里](https://github.com/gameofdimension/vllm-cn/blob/master/vllm_baichuan.ipynb)。也可直接 colab 运行Build。但是因为模型较大,需要选用 A100 gpu 或者更高配置 15 | 16 | 17 | ### 现况 18 | - [chatglm2/3,包括对 tp 的支持](https://github.com/vllm-project/vllm/pull/1558),code reviewing 19 | - 官方已实现[若干中文大语言模型](https://github.com/vllm-project/vllm/tree/main/vllm/model_executor/models):aquila,baichuan,qwen 20 | 21 | ### 感谢 22 | 23 | - [NLP(十七):从 FlashAttention 到 PagedAttention, 如何进一步优化 Attention 性能](https://zhuanlan.zhihu.com/p/638468472) 24 | - [Adding a New Model](https://vllm.readthedocs.io/en/latest/models/adding_model.html) 25 | -------------------------------------------------------------------------------- /img/diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gameofdimension/vllm-cn/c24979906ef787d29bbdb550156ac88c2e3898f6/img/diff.png -------------------------------------------------------------------------------- /vllm_baichuan.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "nbformat": 4, 3 | "nbformat_minor": 0, 4 | "metadata": { 5 | "colab": { 6 | "provenance": [], 7 | "machine_shape": "hm", 8 | "gpuType": "A100" 9 | }, 10 | "kernelspec": { 11 | "name": "python3", 12 | "display_name": "Python 3" 13 | }, 14 | "language_info": { 15 | "name": "python" 16 | }, 17 | "accelerator": "GPU", 18 | "widgets": { 19 | "application/vnd.jupyter.widget-state+json": { 20 | "3e5621d5141b4302b5d030a703add6ef": { 21 | "model_module": "@jupyter-widgets/controls", 22 | "model_name": "HBoxModel", 23 | "model_module_version": "1.5.0", 24 | "state": { 25 | "_dom_classes": [], 26 | "_model_module": "@jupyter-widgets/controls", 27 | "_model_module_version": "1.5.0", 28 | "_model_name": "HBoxModel", 29 | "_view_count": null, 30 | "_view_module": "@jupyter-widgets/controls", 31 | "_view_module_version": "1.5.0", 32 | "_view_name": "HBoxView", 33 | "box_style": "", 34 | "children": [ 35 | "IPY_MODEL_78cb98c0cb394b999cd4ccabb4a9ade9", 36 | "IPY_MODEL_5f3fd0707ff342528507d2b4029ca5a8", 37 | "IPY_MODEL_57f24e8a31a04cbe9dbd3e90b8277f97" 38 | ], 39 | "layout": "IPY_MODEL_ab6e411ddc574058a8aacb0e26bd8ea4" 40 | } 41 | }, 42 | "78cb98c0cb394b999cd4ccabb4a9ade9": { 43 | "model_module": "@jupyter-widgets/controls", 44 | "model_name": "HTMLModel", 45 | "model_module_version": "1.5.0", 46 | "state": { 47 | "_dom_classes": [], 48 | "_model_module": "@jupyter-widgets/controls", 49 | "_model_module_version": "1.5.0", 50 | "_model_name": "HTMLModel", 51 | "_view_count": null, 52 | "_view_module": "@jupyter-widgets/controls", 53 | "_view_module_version": "1.5.0", 54 | "_view_name": "HTMLView", 55 | "description": "", 56 | "description_tooltip": null, 57 | "layout": "IPY_MODEL_d2a820cafddd4212b9ef8e63f6ec0f59", 58 | "placeholder": "​", 59 | "style": "IPY_MODEL_cebed09ed6ba4945a2a20dd3c997ccb1", 60 | "value": "Downloading (…)lve/main/config.json: 100%" 61 | } 62 | }, 63 | "5f3fd0707ff342528507d2b4029ca5a8": { 64 | "model_module": "@jupyter-widgets/controls", 65 | "model_name": "FloatProgressModel", 66 | "model_module_version": "1.5.0", 67 | "state": { 68 | "_dom_classes": [], 69 | "_model_module": "@jupyter-widgets/controls", 70 | "_model_module_version": "1.5.0", 71 | "_model_name": "FloatProgressModel", 72 | "_view_count": null, 73 | "_view_module": "@jupyter-widgets/controls", 74 | "_view_module_version": "1.5.0", 75 | "_view_name": "ProgressView", 76 | "bar_style": "success", 77 | "description": "", 78 | "description_tooltip": null, 79 | "layout": "IPY_MODEL_2d70aa77a5a64251b4c587eef3c8d0d1", 80 | "max": 656, 81 | "min": 0, 82 | "orientation": "horizontal", 83 | "style": "IPY_MODEL_4e62f6b0c0e340e5a4fb0dd75a8fe73a", 84 | "value": 656 85 | } 86 | }, 87 | "57f24e8a31a04cbe9dbd3e90b8277f97": { 88 | "model_module": "@jupyter-widgets/controls", 89 | "model_name": "HTMLModel", 90 | "model_module_version": "1.5.0", 91 | "state": { 92 | "_dom_classes": [], 93 | "_model_module": "@jupyter-widgets/controls", 94 | "_model_module_version": "1.5.0", 95 | "_model_name": "HTMLModel", 96 | "_view_count": null, 97 | "_view_module": "@jupyter-widgets/controls", 98 | "_view_module_version": "1.5.0", 99 | "_view_name": "HTMLView", 100 | "description": "", 101 | "description_tooltip": null, 102 | "layout": "IPY_MODEL_6db60b2c8cec49588607a2798b1e1276", 103 | "placeholder": "​", 104 | "style": "IPY_MODEL_e0dcdd9851a4483aaf450ab548f397f9", 105 | "value": " 656/656 [00:00<00:00, 55.3kB/s]" 106 | } 107 | }, 108 | "ab6e411ddc574058a8aacb0e26bd8ea4": { 109 | "model_module": "@jupyter-widgets/base", 110 | "model_name": "LayoutModel", 111 | "model_module_version": "1.2.0", 112 | "state": { 113 | "_model_module": "@jupyter-widgets/base", 114 | "_model_module_version": "1.2.0", 115 | "_model_name": "LayoutModel", 116 | "_view_count": null, 117 | "_view_module": "@jupyter-widgets/base", 118 | "_view_module_version": "1.2.0", 119 | "_view_name": "LayoutView", 120 | "align_content": null, 121 | "align_items": null, 122 | "align_self": null, 123 | "border": null, 124 | "bottom": null, 125 | "display": null, 126 | "flex": null, 127 | "flex_flow": null, 128 | "grid_area": null, 129 | "grid_auto_columns": null, 130 | "grid_auto_flow": null, 131 | "grid_auto_rows": null, 132 | "grid_column": null, 133 | "grid_gap": null, 134 | "grid_row": null, 135 | "grid_template_areas": null, 136 | "grid_template_columns": null, 137 | "grid_template_rows": null, 138 | "height": null, 139 | "justify_content": null, 140 | "justify_items": null, 141 | "left": null, 142 | "margin": null, 143 | "max_height": null, 144 | "max_width": null, 145 | "min_height": null, 146 | "min_width": null, 147 | "object_fit": null, 148 | "object_position": null, 149 | "order": null, 150 | "overflow": null, 151 | "overflow_x": null, 152 | "overflow_y": null, 153 | "padding": null, 154 | "right": null, 155 | "top": null, 156 | "visibility": null, 157 | "width": null 158 | } 159 | }, 160 | "d2a820cafddd4212b9ef8e63f6ec0f59": { 161 | "model_module": "@jupyter-widgets/base", 162 | "model_name": "LayoutModel", 163 | "model_module_version": "1.2.0", 164 | "state": { 165 | "_model_module": "@jupyter-widgets/base", 166 | "_model_module_version": "1.2.0", 167 | "_model_name": "LayoutModel", 168 | "_view_count": null, 169 | "_view_module": "@jupyter-widgets/base", 170 | "_view_module_version": "1.2.0", 171 | "_view_name": "LayoutView", 172 | "align_content": null, 173 | "align_items": null, 174 | "align_self": null, 175 | "border": null, 176 | "bottom": null, 177 | "display": null, 178 | "flex": null, 179 | "flex_flow": null, 180 | "grid_area": null, 181 | "grid_auto_columns": null, 182 | "grid_auto_flow": null, 183 | "grid_auto_rows": null, 184 | "grid_column": null, 185 | "grid_gap": null, 186 | "grid_row": null, 187 | "grid_template_areas": null, 188 | "grid_template_columns": null, 189 | "grid_template_rows": null, 190 | "height": null, 191 | "justify_content": null, 192 | "justify_items": null, 193 | "left": null, 194 | "margin": null, 195 | "max_height": null, 196 | "max_width": null, 197 | "min_height": null, 198 | "min_width": null, 199 | "object_fit": null, 200 | "object_position": null, 201 | "order": null, 202 | "overflow": null, 203 | "overflow_x": null, 204 | "overflow_y": null, 205 | "padding": null, 206 | "right": null, 207 | "top": null, 208 | "visibility": null, 209 | "width": null 210 | } 211 | }, 212 | "cebed09ed6ba4945a2a20dd3c997ccb1": { 213 | "model_module": "@jupyter-widgets/controls", 214 | "model_name": "DescriptionStyleModel", 215 | "model_module_version": "1.5.0", 216 | "state": { 217 | "_model_module": "@jupyter-widgets/controls", 218 | "_model_module_version": "1.5.0", 219 | "_model_name": "DescriptionStyleModel", 220 | "_view_count": null, 221 | "_view_module": "@jupyter-widgets/base", 222 | "_view_module_version": "1.2.0", 223 | "_view_name": "StyleView", 224 | "description_width": "" 225 | } 226 | }, 227 | "2d70aa77a5a64251b4c587eef3c8d0d1": { 228 | "model_module": "@jupyter-widgets/base", 229 | "model_name": "LayoutModel", 230 | "model_module_version": "1.2.0", 231 | "state": { 232 | "_model_module": "@jupyter-widgets/base", 233 | "_model_module_version": "1.2.0", 234 | "_model_name": "LayoutModel", 235 | "_view_count": null, 236 | "_view_module": "@jupyter-widgets/base", 237 | "_view_module_version": "1.2.0", 238 | "_view_name": "LayoutView", 239 | "align_content": null, 240 | "align_items": null, 241 | "align_self": null, 242 | "border": null, 243 | "bottom": null, 244 | "display": null, 245 | "flex": null, 246 | "flex_flow": null, 247 | "grid_area": null, 248 | "grid_auto_columns": null, 249 | "grid_auto_flow": null, 250 | "grid_auto_rows": null, 251 | "grid_column": null, 252 | "grid_gap": null, 253 | "grid_row": null, 254 | "grid_template_areas": null, 255 | "grid_template_columns": null, 256 | "grid_template_rows": null, 257 | "height": null, 258 | "justify_content": null, 259 | "justify_items": null, 260 | "left": null, 261 | "margin": null, 262 | "max_height": null, 263 | "max_width": null, 264 | "min_height": null, 265 | "min_width": null, 266 | "object_fit": null, 267 | "object_position": null, 268 | "order": null, 269 | "overflow": null, 270 | "overflow_x": null, 271 | "overflow_y": null, 272 | "padding": null, 273 | "right": null, 274 | "top": null, 275 | "visibility": null, 276 | "width": null 277 | } 278 | }, 279 | "4e62f6b0c0e340e5a4fb0dd75a8fe73a": { 280 | "model_module": "@jupyter-widgets/controls", 281 | "model_name": "ProgressStyleModel", 282 | "model_module_version": "1.5.0", 283 | "state": { 284 | "_model_module": "@jupyter-widgets/controls", 285 | "_model_module_version": "1.5.0", 286 | "_model_name": "ProgressStyleModel", 287 | "_view_count": null, 288 | "_view_module": "@jupyter-widgets/base", 289 | "_view_module_version": "1.2.0", 290 | "_view_name": "StyleView", 291 | "bar_color": null, 292 | "description_width": "" 293 | } 294 | }, 295 | "6db60b2c8cec49588607a2798b1e1276": { 296 | "model_module": "@jupyter-widgets/base", 297 | "model_name": "LayoutModel", 298 | "model_module_version": "1.2.0", 299 | "state": { 300 | "_model_module": "@jupyter-widgets/base", 301 | "_model_module_version": "1.2.0", 302 | "_model_name": "LayoutModel", 303 | "_view_count": null, 304 | "_view_module": "@jupyter-widgets/base", 305 | "_view_module_version": "1.2.0", 306 | "_view_name": "LayoutView", 307 | "align_content": null, 308 | "align_items": null, 309 | "align_self": null, 310 | "border": null, 311 | "bottom": null, 312 | "display": null, 313 | "flex": null, 314 | "flex_flow": null, 315 | "grid_area": null, 316 | "grid_auto_columns": null, 317 | "grid_auto_flow": null, 318 | "grid_auto_rows": null, 319 | "grid_column": null, 320 | "grid_gap": null, 321 | "grid_row": null, 322 | "grid_template_areas": null, 323 | "grid_template_columns": null, 324 | "grid_template_rows": null, 325 | "height": null, 326 | "justify_content": null, 327 | "justify_items": null, 328 | "left": null, 329 | "margin": null, 330 | "max_height": null, 331 | "max_width": null, 332 | "min_height": null, 333 | "min_width": null, 334 | "object_fit": null, 335 | "object_position": null, 336 | "order": null, 337 | "overflow": null, 338 | "overflow_x": null, 339 | "overflow_y": null, 340 | "padding": null, 341 | "right": null, 342 | "top": null, 343 | "visibility": null, 344 | "width": null 345 | } 346 | }, 347 | "e0dcdd9851a4483aaf450ab548f397f9": { 348 | "model_module": "@jupyter-widgets/controls", 349 | "model_name": "DescriptionStyleModel", 350 | "model_module_version": "1.5.0", 351 | "state": { 352 | "_model_module": "@jupyter-widgets/controls", 353 | "_model_module_version": "1.5.0", 354 | "_model_name": "DescriptionStyleModel", 355 | "_view_count": null, 356 | "_view_module": "@jupyter-widgets/base", 357 | "_view_module_version": "1.2.0", 358 | "_view_name": "StyleView", 359 | "description_width": "" 360 | } 361 | }, 362 | "400fafafa77b4ed3b0a22391294ee1ba": { 363 | "model_module": "@jupyter-widgets/controls", 364 | "model_name": "HBoxModel", 365 | "model_module_version": "1.5.0", 366 | "state": { 367 | "_dom_classes": [], 368 | "_model_module": "@jupyter-widgets/controls", 369 | "_model_module_version": "1.5.0", 370 | "_model_name": "HBoxModel", 371 | "_view_count": null, 372 | "_view_module": "@jupyter-widgets/controls", 373 | "_view_module_version": "1.5.0", 374 | "_view_name": "HBoxView", 375 | "box_style": "", 376 | "children": [ 377 | "IPY_MODEL_d9e37f09b0e6444ab8b07657bd0cbf13", 378 | "IPY_MODEL_8b3ff13f77fa462db1e848fbcbf79dc2", 379 | "IPY_MODEL_a47af1e2ece04a3d9823107ad9451891" 380 | ], 381 | "layout": "IPY_MODEL_39a0cb7695314f60897b8d28960dc522" 382 | } 383 | }, 384 | "d9e37f09b0e6444ab8b07657bd0cbf13": { 385 | "model_module": "@jupyter-widgets/controls", 386 | "model_name": "HTMLModel", 387 | "model_module_version": "1.5.0", 388 | "state": { 389 | "_dom_classes": [], 390 | "_model_module": "@jupyter-widgets/controls", 391 | "_model_module_version": "1.5.0", 392 | "_model_name": "HTMLModel", 393 | "_view_count": null, 394 | "_view_module": "@jupyter-widgets/controls", 395 | "_view_module_version": "1.5.0", 396 | "_view_name": "HTMLView", 397 | "description": "", 398 | "description_tooltip": null, 399 | "layout": "IPY_MODEL_5247d30ac4e64e95822a5975ca731516", 400 | "placeholder": "​", 401 | "style": "IPY_MODEL_136e073f15794f8aa4f7c2d0409cce13", 402 | "value": "Downloading (…)guration_baichuan.py: 100%" 403 | } 404 | }, 405 | "8b3ff13f77fa462db1e848fbcbf79dc2": { 406 | "model_module": "@jupyter-widgets/controls", 407 | "model_name": "FloatProgressModel", 408 | "model_module_version": "1.5.0", 409 | "state": { 410 | "_dom_classes": [], 411 | "_model_module": "@jupyter-widgets/controls", 412 | "_model_module_version": "1.5.0", 413 | "_model_name": "FloatProgressModel", 414 | "_view_count": null, 415 | "_view_module": "@jupyter-widgets/controls", 416 | "_view_module_version": "1.5.0", 417 | "_view_name": "ProgressView", 418 | "bar_style": "success", 419 | "description": "", 420 | "description_tooltip": null, 421 | "layout": "IPY_MODEL_016604de0ecc4fc4ba90b1b2a8aaf90b", 422 | "max": 2345, 423 | "min": 0, 424 | "orientation": "horizontal", 425 | "style": "IPY_MODEL_f1c8c6ae66304aa9b4511e03d12ac695", 426 | "value": 2345 427 | } 428 | }, 429 | "a47af1e2ece04a3d9823107ad9451891": { 430 | "model_module": "@jupyter-widgets/controls", 431 | "model_name": "HTMLModel", 432 | "model_module_version": "1.5.0", 433 | "state": { 434 | "_dom_classes": [], 435 | "_model_module": "@jupyter-widgets/controls", 436 | "_model_module_version": "1.5.0", 437 | "_model_name": "HTMLModel", 438 | "_view_count": null, 439 | "_view_module": "@jupyter-widgets/controls", 440 | "_view_module_version": "1.5.0", 441 | "_view_name": "HTMLView", 442 | "description": "", 443 | "description_tooltip": null, 444 | "layout": "IPY_MODEL_7b0d2b67b7794dcaa1892753d27b7e0f", 445 | "placeholder": "​", 446 | "style": "IPY_MODEL_c5d8506f2857446bbca5a01249c15524", 447 | "value": " 2.35k/2.35k [00:00<00:00, 217kB/s]" 448 | } 449 | }, 450 | "39a0cb7695314f60897b8d28960dc522": { 451 | "model_module": "@jupyter-widgets/base", 452 | "model_name": "LayoutModel", 453 | "model_module_version": "1.2.0", 454 | "state": { 455 | "_model_module": "@jupyter-widgets/base", 456 | "_model_module_version": "1.2.0", 457 | "_model_name": "LayoutModel", 458 | "_view_count": null, 459 | "_view_module": "@jupyter-widgets/base", 460 | "_view_module_version": "1.2.0", 461 | "_view_name": "LayoutView", 462 | "align_content": null, 463 | "align_items": null, 464 | "align_self": null, 465 | "border": null, 466 | "bottom": null, 467 | "display": null, 468 | "flex": null, 469 | "flex_flow": null, 470 | "grid_area": null, 471 | "grid_auto_columns": null, 472 | "grid_auto_flow": null, 473 | "grid_auto_rows": null, 474 | "grid_column": null, 475 | "grid_gap": null, 476 | "grid_row": null, 477 | "grid_template_areas": null, 478 | "grid_template_columns": null, 479 | "grid_template_rows": null, 480 | "height": null, 481 | "justify_content": null, 482 | "justify_items": null, 483 | "left": null, 484 | "margin": null, 485 | "max_height": null, 486 | "max_width": null, 487 | "min_height": null, 488 | "min_width": null, 489 | "object_fit": null, 490 | "object_position": null, 491 | "order": null, 492 | "overflow": null, 493 | "overflow_x": null, 494 | "overflow_y": null, 495 | "padding": null, 496 | "right": null, 497 | "top": null, 498 | "visibility": null, 499 | "width": null 500 | } 501 | }, 502 | "5247d30ac4e64e95822a5975ca731516": { 503 | "model_module": "@jupyter-widgets/base", 504 | "model_name": "LayoutModel", 505 | "model_module_version": "1.2.0", 506 | "state": { 507 | "_model_module": "@jupyter-widgets/base", 508 | "_model_module_version": "1.2.0", 509 | "_model_name": "LayoutModel", 510 | "_view_count": null, 511 | "_view_module": "@jupyter-widgets/base", 512 | "_view_module_version": "1.2.0", 513 | "_view_name": "LayoutView", 514 | "align_content": null, 515 | "align_items": null, 516 | "align_self": null, 517 | "border": null, 518 | "bottom": null, 519 | "display": null, 520 | "flex": null, 521 | "flex_flow": null, 522 | "grid_area": null, 523 | "grid_auto_columns": null, 524 | "grid_auto_flow": null, 525 | "grid_auto_rows": null, 526 | "grid_column": null, 527 | "grid_gap": null, 528 | "grid_row": null, 529 | "grid_template_areas": null, 530 | "grid_template_columns": null, 531 | "grid_template_rows": null, 532 | "height": null, 533 | "justify_content": null, 534 | "justify_items": null, 535 | "left": null, 536 | "margin": null, 537 | "max_height": null, 538 | "max_width": null, 539 | "min_height": null, 540 | "min_width": null, 541 | "object_fit": null, 542 | "object_position": null, 543 | "order": null, 544 | "overflow": null, 545 | "overflow_x": null, 546 | "overflow_y": null, 547 | "padding": null, 548 | "right": null, 549 | "top": null, 550 | "visibility": null, 551 | "width": null 552 | } 553 | }, 554 | "136e073f15794f8aa4f7c2d0409cce13": { 555 | "model_module": "@jupyter-widgets/controls", 556 | "model_name": "DescriptionStyleModel", 557 | "model_module_version": "1.5.0", 558 | "state": { 559 | "_model_module": "@jupyter-widgets/controls", 560 | "_model_module_version": "1.5.0", 561 | "_model_name": "DescriptionStyleModel", 562 | "_view_count": null, 563 | "_view_module": "@jupyter-widgets/base", 564 | "_view_module_version": "1.2.0", 565 | "_view_name": "StyleView", 566 | "description_width": "" 567 | } 568 | }, 569 | "016604de0ecc4fc4ba90b1b2a8aaf90b": { 570 | "model_module": "@jupyter-widgets/base", 571 | "model_name": "LayoutModel", 572 | "model_module_version": "1.2.0", 573 | "state": { 574 | "_model_module": "@jupyter-widgets/base", 575 | "_model_module_version": "1.2.0", 576 | "_model_name": "LayoutModel", 577 | "_view_count": null, 578 | "_view_module": "@jupyter-widgets/base", 579 | "_view_module_version": "1.2.0", 580 | "_view_name": "LayoutView", 581 | "align_content": null, 582 | "align_items": null, 583 | "align_self": null, 584 | "border": null, 585 | "bottom": null, 586 | "display": null, 587 | "flex": null, 588 | "flex_flow": null, 589 | "grid_area": null, 590 | "grid_auto_columns": null, 591 | "grid_auto_flow": null, 592 | "grid_auto_rows": null, 593 | "grid_column": null, 594 | "grid_gap": null, 595 | "grid_row": null, 596 | "grid_template_areas": null, 597 | "grid_template_columns": null, 598 | "grid_template_rows": null, 599 | "height": null, 600 | "justify_content": null, 601 | "justify_items": null, 602 | "left": null, 603 | "margin": null, 604 | "max_height": null, 605 | "max_width": null, 606 | "min_height": null, 607 | "min_width": null, 608 | "object_fit": null, 609 | "object_position": null, 610 | "order": null, 611 | "overflow": null, 612 | "overflow_x": null, 613 | "overflow_y": null, 614 | "padding": null, 615 | "right": null, 616 | "top": null, 617 | "visibility": null, 618 | "width": null 619 | } 620 | }, 621 | "f1c8c6ae66304aa9b4511e03d12ac695": { 622 | "model_module": "@jupyter-widgets/controls", 623 | "model_name": "ProgressStyleModel", 624 | "model_module_version": "1.5.0", 625 | "state": { 626 | "_model_module": "@jupyter-widgets/controls", 627 | "_model_module_version": "1.5.0", 628 | "_model_name": "ProgressStyleModel", 629 | "_view_count": null, 630 | "_view_module": "@jupyter-widgets/base", 631 | "_view_module_version": "1.2.0", 632 | "_view_name": "StyleView", 633 | "bar_color": null, 634 | "description_width": "" 635 | } 636 | }, 637 | "7b0d2b67b7794dcaa1892753d27b7e0f": { 638 | "model_module": "@jupyter-widgets/base", 639 | "model_name": "LayoutModel", 640 | "model_module_version": "1.2.0", 641 | "state": { 642 | "_model_module": "@jupyter-widgets/base", 643 | "_model_module_version": "1.2.0", 644 | "_model_name": "LayoutModel", 645 | "_view_count": null, 646 | "_view_module": "@jupyter-widgets/base", 647 | "_view_module_version": "1.2.0", 648 | "_view_name": "LayoutView", 649 | "align_content": null, 650 | "align_items": null, 651 | "align_self": null, 652 | "border": null, 653 | "bottom": null, 654 | "display": null, 655 | "flex": null, 656 | "flex_flow": null, 657 | "grid_area": null, 658 | "grid_auto_columns": null, 659 | "grid_auto_flow": null, 660 | "grid_auto_rows": null, 661 | "grid_column": null, 662 | "grid_gap": null, 663 | "grid_row": null, 664 | "grid_template_areas": null, 665 | "grid_template_columns": null, 666 | "grid_template_rows": null, 667 | "height": null, 668 | "justify_content": null, 669 | "justify_items": null, 670 | "left": null, 671 | "margin": null, 672 | "max_height": null, 673 | "max_width": null, 674 | "min_height": null, 675 | "min_width": null, 676 | "object_fit": null, 677 | "object_position": null, 678 | "order": null, 679 | "overflow": null, 680 | "overflow_x": null, 681 | "overflow_y": null, 682 | "padding": null, 683 | "right": null, 684 | "top": null, 685 | "visibility": null, 686 | "width": null 687 | } 688 | }, 689 | "c5d8506f2857446bbca5a01249c15524": { 690 | "model_module": "@jupyter-widgets/controls", 691 | "model_name": "DescriptionStyleModel", 692 | "model_module_version": "1.5.0", 693 | "state": { 694 | "_model_module": "@jupyter-widgets/controls", 695 | "_model_module_version": "1.5.0", 696 | "_model_name": "DescriptionStyleModel", 697 | "_view_count": null, 698 | "_view_module": "@jupyter-widgets/base", 699 | "_view_module_version": "1.2.0", 700 | "_view_name": "StyleView", 701 | "description_width": "" 702 | } 703 | }, 704 | "6d2980f665324419a6f85b9d8ba7a91b": { 705 | "model_module": "@jupyter-widgets/controls", 706 | "model_name": "HBoxModel", 707 | "model_module_version": "1.5.0", 708 | "state": { 709 | "_dom_classes": [], 710 | "_model_module": "@jupyter-widgets/controls", 711 | "_model_module_version": "1.5.0", 712 | "_model_name": "HBoxModel", 713 | "_view_count": null, 714 | "_view_module": "@jupyter-widgets/controls", 715 | "_view_module_version": "1.5.0", 716 | "_view_name": "HBoxView", 717 | "box_style": "", 718 | "children": [ 719 | "IPY_MODEL_6cb6153c384d47539dd5f0a339c826f5", 720 | "IPY_MODEL_e538419d96ac46399fa36afb56a579fb", 721 | "IPY_MODEL_f5dc1b47a04349b8b05efd40e84aac31" 722 | ], 723 | "layout": "IPY_MODEL_2faad7ebd9584afaa73581d66e5dcb15" 724 | } 725 | }, 726 | "6cb6153c384d47539dd5f0a339c826f5": { 727 | "model_module": "@jupyter-widgets/controls", 728 | "model_name": "HTMLModel", 729 | "model_module_version": "1.5.0", 730 | "state": { 731 | "_dom_classes": [], 732 | "_model_module": "@jupyter-widgets/controls", 733 | "_model_module_version": "1.5.0", 734 | "_model_name": "HTMLModel", 735 | "_view_count": null, 736 | "_view_module": "@jupyter-widgets/controls", 737 | "_view_module_version": "1.5.0", 738 | "_view_name": "HTMLView", 739 | "description": "", 740 | "description_tooltip": null, 741 | "layout": "IPY_MODEL_3cf908670a6343c18067eb862e89f41b", 742 | "placeholder": "​", 743 | "style": "IPY_MODEL_0d9209294fc94521b80456ae7a7bb5f2", 744 | "value": "Downloading (…)okenizer_config.json: 100%" 745 | } 746 | }, 747 | "e538419d96ac46399fa36afb56a579fb": { 748 | "model_module": "@jupyter-widgets/controls", 749 | "model_name": "FloatProgressModel", 750 | "model_module_version": "1.5.0", 751 | "state": { 752 | "_dom_classes": [], 753 | "_model_module": "@jupyter-widgets/controls", 754 | "_model_module_version": "1.5.0", 755 | "_model_name": "FloatProgressModel", 756 | "_view_count": null, 757 | "_view_module": "@jupyter-widgets/controls", 758 | "_view_module_version": "1.5.0", 759 | "_view_name": "ProgressView", 760 | "bar_style": "success", 761 | "description": "", 762 | "description_tooltip": null, 763 | "layout": "IPY_MODEL_e15a935044714473b45bd5d44a605066", 764 | "max": 802, 765 | "min": 0, 766 | "orientation": "horizontal", 767 | "style": "IPY_MODEL_bfb064fec7a54facac9c619492f935c9", 768 | "value": 802 769 | } 770 | }, 771 | "f5dc1b47a04349b8b05efd40e84aac31": { 772 | "model_module": "@jupyter-widgets/controls", 773 | "model_name": "HTMLModel", 774 | "model_module_version": "1.5.0", 775 | "state": { 776 | "_dom_classes": [], 777 | "_model_module": "@jupyter-widgets/controls", 778 | "_model_module_version": "1.5.0", 779 | "_model_name": "HTMLModel", 780 | "_view_count": null, 781 | "_view_module": "@jupyter-widgets/controls", 782 | "_view_module_version": "1.5.0", 783 | "_view_name": "HTMLView", 784 | "description": "", 785 | "description_tooltip": null, 786 | "layout": "IPY_MODEL_d35b6a9a0eff44d4a409f33c2f9c14ad", 787 | "placeholder": "​", 788 | "style": "IPY_MODEL_31bd94bbdb07449b9e5ce927078d2dda", 789 | "value": " 802/802 [00:00<00:00, 63.2kB/s]" 790 | } 791 | }, 792 | "2faad7ebd9584afaa73581d66e5dcb15": { 793 | "model_module": "@jupyter-widgets/base", 794 | "model_name": "LayoutModel", 795 | "model_module_version": "1.2.0", 796 | "state": { 797 | "_model_module": "@jupyter-widgets/base", 798 | "_model_module_version": "1.2.0", 799 | "_model_name": "LayoutModel", 800 | "_view_count": null, 801 | "_view_module": "@jupyter-widgets/base", 802 | "_view_module_version": "1.2.0", 803 | "_view_name": "LayoutView", 804 | "align_content": null, 805 | "align_items": null, 806 | "align_self": null, 807 | "border": null, 808 | "bottom": null, 809 | "display": null, 810 | "flex": null, 811 | "flex_flow": null, 812 | "grid_area": null, 813 | "grid_auto_columns": null, 814 | "grid_auto_flow": null, 815 | "grid_auto_rows": null, 816 | "grid_column": null, 817 | "grid_gap": null, 818 | "grid_row": null, 819 | "grid_template_areas": null, 820 | "grid_template_columns": null, 821 | "grid_template_rows": null, 822 | "height": null, 823 | "justify_content": null, 824 | "justify_items": null, 825 | "left": null, 826 | "margin": null, 827 | "max_height": null, 828 | "max_width": null, 829 | "min_height": null, 830 | "min_width": null, 831 | "object_fit": null, 832 | "object_position": null, 833 | "order": null, 834 | "overflow": null, 835 | "overflow_x": null, 836 | "overflow_y": null, 837 | "padding": null, 838 | "right": null, 839 | "top": null, 840 | "visibility": null, 841 | "width": null 842 | } 843 | }, 844 | "3cf908670a6343c18067eb862e89f41b": { 845 | "model_module": "@jupyter-widgets/base", 846 | "model_name": "LayoutModel", 847 | "model_module_version": "1.2.0", 848 | "state": { 849 | "_model_module": "@jupyter-widgets/base", 850 | "_model_module_version": "1.2.0", 851 | "_model_name": "LayoutModel", 852 | "_view_count": null, 853 | "_view_module": "@jupyter-widgets/base", 854 | "_view_module_version": "1.2.0", 855 | "_view_name": "LayoutView", 856 | "align_content": null, 857 | "align_items": null, 858 | "align_self": null, 859 | "border": null, 860 | "bottom": null, 861 | "display": null, 862 | "flex": null, 863 | "flex_flow": null, 864 | "grid_area": null, 865 | "grid_auto_columns": null, 866 | "grid_auto_flow": null, 867 | "grid_auto_rows": null, 868 | "grid_column": null, 869 | "grid_gap": null, 870 | "grid_row": null, 871 | "grid_template_areas": null, 872 | "grid_template_columns": null, 873 | "grid_template_rows": null, 874 | "height": null, 875 | "justify_content": null, 876 | "justify_items": null, 877 | "left": null, 878 | "margin": null, 879 | "max_height": null, 880 | "max_width": null, 881 | "min_height": null, 882 | "min_width": null, 883 | "object_fit": null, 884 | "object_position": null, 885 | "order": null, 886 | "overflow": null, 887 | "overflow_x": null, 888 | "overflow_y": null, 889 | "padding": null, 890 | "right": null, 891 | "top": null, 892 | "visibility": null, 893 | "width": null 894 | } 895 | }, 896 | "0d9209294fc94521b80456ae7a7bb5f2": { 897 | "model_module": "@jupyter-widgets/controls", 898 | "model_name": "DescriptionStyleModel", 899 | "model_module_version": "1.5.0", 900 | "state": { 901 | "_model_module": "@jupyter-widgets/controls", 902 | "_model_module_version": "1.5.0", 903 | "_model_name": "DescriptionStyleModel", 904 | "_view_count": null, 905 | "_view_module": "@jupyter-widgets/base", 906 | "_view_module_version": "1.2.0", 907 | "_view_name": "StyleView", 908 | "description_width": "" 909 | } 910 | }, 911 | "e15a935044714473b45bd5d44a605066": { 912 | "model_module": "@jupyter-widgets/base", 913 | "model_name": "LayoutModel", 914 | "model_module_version": "1.2.0", 915 | "state": { 916 | "_model_module": "@jupyter-widgets/base", 917 | "_model_module_version": "1.2.0", 918 | "_model_name": "LayoutModel", 919 | "_view_count": null, 920 | "_view_module": "@jupyter-widgets/base", 921 | "_view_module_version": "1.2.0", 922 | "_view_name": "LayoutView", 923 | "align_content": null, 924 | "align_items": null, 925 | "align_self": null, 926 | "border": null, 927 | "bottom": null, 928 | "display": null, 929 | "flex": null, 930 | "flex_flow": null, 931 | "grid_area": null, 932 | "grid_auto_columns": null, 933 | "grid_auto_flow": null, 934 | "grid_auto_rows": null, 935 | "grid_column": null, 936 | "grid_gap": null, 937 | "grid_row": null, 938 | "grid_template_areas": null, 939 | "grid_template_columns": null, 940 | "grid_template_rows": null, 941 | "height": null, 942 | "justify_content": null, 943 | "justify_items": null, 944 | "left": null, 945 | "margin": null, 946 | "max_height": null, 947 | "max_width": null, 948 | "min_height": null, 949 | "min_width": null, 950 | "object_fit": null, 951 | "object_position": null, 952 | "order": null, 953 | "overflow": null, 954 | "overflow_x": null, 955 | "overflow_y": null, 956 | "padding": null, 957 | "right": null, 958 | "top": null, 959 | "visibility": null, 960 | "width": null 961 | } 962 | }, 963 | "bfb064fec7a54facac9c619492f935c9": { 964 | "model_module": "@jupyter-widgets/controls", 965 | "model_name": "ProgressStyleModel", 966 | "model_module_version": "1.5.0", 967 | "state": { 968 | "_model_module": "@jupyter-widgets/controls", 969 | "_model_module_version": "1.5.0", 970 | "_model_name": "ProgressStyleModel", 971 | "_view_count": null, 972 | "_view_module": "@jupyter-widgets/base", 973 | "_view_module_version": "1.2.0", 974 | "_view_name": "StyleView", 975 | "bar_color": null, 976 | "description_width": "" 977 | } 978 | }, 979 | "d35b6a9a0eff44d4a409f33c2f9c14ad": { 980 | "model_module": "@jupyter-widgets/base", 981 | "model_name": "LayoutModel", 982 | "model_module_version": "1.2.0", 983 | "state": { 984 | "_model_module": "@jupyter-widgets/base", 985 | "_model_module_version": "1.2.0", 986 | "_model_name": "LayoutModel", 987 | "_view_count": null, 988 | "_view_module": "@jupyter-widgets/base", 989 | "_view_module_version": "1.2.0", 990 | "_view_name": "LayoutView", 991 | "align_content": null, 992 | "align_items": null, 993 | "align_self": null, 994 | "border": null, 995 | "bottom": null, 996 | "display": null, 997 | "flex": null, 998 | "flex_flow": null, 999 | "grid_area": null, 1000 | "grid_auto_columns": null, 1001 | "grid_auto_flow": null, 1002 | "grid_auto_rows": null, 1003 | "grid_column": null, 1004 | "grid_gap": null, 1005 | "grid_row": null, 1006 | "grid_template_areas": null, 1007 | "grid_template_columns": null, 1008 | "grid_template_rows": null, 1009 | "height": null, 1010 | "justify_content": null, 1011 | "justify_items": null, 1012 | "left": null, 1013 | "margin": null, 1014 | "max_height": null, 1015 | "max_width": null, 1016 | "min_height": null, 1017 | "min_width": null, 1018 | "object_fit": null, 1019 | "object_position": null, 1020 | "order": null, 1021 | "overflow": null, 1022 | "overflow_x": null, 1023 | "overflow_y": null, 1024 | "padding": null, 1025 | "right": null, 1026 | "top": null, 1027 | "visibility": null, 1028 | "width": null 1029 | } 1030 | }, 1031 | "31bd94bbdb07449b9e5ce927078d2dda": { 1032 | "model_module": "@jupyter-widgets/controls", 1033 | "model_name": "DescriptionStyleModel", 1034 | "model_module_version": "1.5.0", 1035 | "state": { 1036 | "_model_module": "@jupyter-widgets/controls", 1037 | "_model_module_version": "1.5.0", 1038 | "_model_name": "DescriptionStyleModel", 1039 | "_view_count": null, 1040 | "_view_module": "@jupyter-widgets/base", 1041 | "_view_module_version": "1.2.0", 1042 | "_view_name": "StyleView", 1043 | "description_width": "" 1044 | } 1045 | }, 1046 | "7f8d78a4185041198792f2d8e8b6a467": { 1047 | "model_module": "@jupyter-widgets/controls", 1048 | "model_name": "HBoxModel", 1049 | "model_module_version": "1.5.0", 1050 | "state": { 1051 | "_dom_classes": [], 1052 | "_model_module": "@jupyter-widgets/controls", 1053 | "_model_module_version": "1.5.0", 1054 | "_model_name": "HBoxModel", 1055 | "_view_count": null, 1056 | "_view_module": "@jupyter-widgets/controls", 1057 | "_view_module_version": "1.5.0", 1058 | "_view_name": "HBoxView", 1059 | "box_style": "", 1060 | "children": [ 1061 | "IPY_MODEL_97fbadd14b69420888dcacba4846c577", 1062 | "IPY_MODEL_6b03b8cc12434887aab0a549e2b4ead0", 1063 | "IPY_MODEL_3109652be7444381a3e37d6fb4ac28b3" 1064 | ], 1065 | "layout": "IPY_MODEL_6ca3b513dfc94fb9b5e04e3a060787f8" 1066 | } 1067 | }, 1068 | "97fbadd14b69420888dcacba4846c577": { 1069 | "model_module": "@jupyter-widgets/controls", 1070 | "model_name": "HTMLModel", 1071 | "model_module_version": "1.5.0", 1072 | "state": { 1073 | "_dom_classes": [], 1074 | "_model_module": "@jupyter-widgets/controls", 1075 | "_model_module_version": "1.5.0", 1076 | "_model_name": "HTMLModel", 1077 | "_view_count": null, 1078 | "_view_module": "@jupyter-widgets/controls", 1079 | "_view_module_version": "1.5.0", 1080 | "_view_name": "HTMLView", 1081 | "description": "", 1082 | "description_tooltip": null, 1083 | "layout": "IPY_MODEL_169b5ddfd462450d88864672bedc75b8", 1084 | "placeholder": "​", 1085 | "style": "IPY_MODEL_90412a372c4248fdba01ce1caa47ba4b", 1086 | "value": "Downloading (…)nization_baichuan.py: 100%" 1087 | } 1088 | }, 1089 | "6b03b8cc12434887aab0a549e2b4ead0": { 1090 | "model_module": "@jupyter-widgets/controls", 1091 | "model_name": "FloatProgressModel", 1092 | "model_module_version": "1.5.0", 1093 | "state": { 1094 | "_dom_classes": [], 1095 | "_model_module": "@jupyter-widgets/controls", 1096 | "_model_module_version": "1.5.0", 1097 | "_model_name": "FloatProgressModel", 1098 | "_view_count": null, 1099 | "_view_module": "@jupyter-widgets/controls", 1100 | "_view_module_version": "1.5.0", 1101 | "_view_name": "ProgressView", 1102 | "bar_style": "success", 1103 | "description": "", 1104 | "description_tooltip": null, 1105 | "layout": "IPY_MODEL_05df3ee9380646baa0ededb99e8c9135", 1106 | "max": 9574, 1107 | "min": 0, 1108 | "orientation": "horizontal", 1109 | "style": "IPY_MODEL_d0c2b331b84e486eba8b134d8b162441", 1110 | "value": 9574 1111 | } 1112 | }, 1113 | "3109652be7444381a3e37d6fb4ac28b3": { 1114 | "model_module": "@jupyter-widgets/controls", 1115 | "model_name": "HTMLModel", 1116 | "model_module_version": "1.5.0", 1117 | "state": { 1118 | "_dom_classes": [], 1119 | "_model_module": "@jupyter-widgets/controls", 1120 | "_model_module_version": "1.5.0", 1121 | "_model_name": "HTMLModel", 1122 | "_view_count": null, 1123 | "_view_module": "@jupyter-widgets/controls", 1124 | "_view_module_version": "1.5.0", 1125 | "_view_name": "HTMLView", 1126 | "description": "", 1127 | "description_tooltip": null, 1128 | "layout": "IPY_MODEL_6bb0ef4c1bbb4cf9b53d2e63eec5c611", 1129 | "placeholder": "​", 1130 | "style": "IPY_MODEL_68804ac3966d4d43abf917026224fb0b", 1131 | "value": " 9.57k/9.57k [00:00<00:00, 770kB/s]" 1132 | } 1133 | }, 1134 | "6ca3b513dfc94fb9b5e04e3a060787f8": { 1135 | "model_module": "@jupyter-widgets/base", 1136 | "model_name": "LayoutModel", 1137 | "model_module_version": "1.2.0", 1138 | "state": { 1139 | "_model_module": "@jupyter-widgets/base", 1140 | "_model_module_version": "1.2.0", 1141 | "_model_name": "LayoutModel", 1142 | "_view_count": null, 1143 | "_view_module": "@jupyter-widgets/base", 1144 | "_view_module_version": "1.2.0", 1145 | "_view_name": "LayoutView", 1146 | "align_content": null, 1147 | "align_items": null, 1148 | "align_self": null, 1149 | "border": null, 1150 | "bottom": null, 1151 | "display": null, 1152 | "flex": null, 1153 | "flex_flow": null, 1154 | "grid_area": null, 1155 | "grid_auto_columns": null, 1156 | "grid_auto_flow": null, 1157 | "grid_auto_rows": null, 1158 | "grid_column": null, 1159 | "grid_gap": null, 1160 | "grid_row": null, 1161 | "grid_template_areas": null, 1162 | "grid_template_columns": null, 1163 | "grid_template_rows": null, 1164 | "height": null, 1165 | "justify_content": null, 1166 | "justify_items": null, 1167 | "left": null, 1168 | "margin": null, 1169 | "max_height": null, 1170 | "max_width": null, 1171 | "min_height": null, 1172 | "min_width": null, 1173 | "object_fit": null, 1174 | "object_position": null, 1175 | "order": null, 1176 | "overflow": null, 1177 | "overflow_x": null, 1178 | "overflow_y": null, 1179 | "padding": null, 1180 | "right": null, 1181 | "top": null, 1182 | "visibility": null, 1183 | "width": null 1184 | } 1185 | }, 1186 | "169b5ddfd462450d88864672bedc75b8": { 1187 | "model_module": "@jupyter-widgets/base", 1188 | "model_name": "LayoutModel", 1189 | "model_module_version": "1.2.0", 1190 | "state": { 1191 | "_model_module": "@jupyter-widgets/base", 1192 | "_model_module_version": "1.2.0", 1193 | "_model_name": "LayoutModel", 1194 | "_view_count": null, 1195 | "_view_module": "@jupyter-widgets/base", 1196 | "_view_module_version": "1.2.0", 1197 | "_view_name": "LayoutView", 1198 | "align_content": null, 1199 | "align_items": null, 1200 | "align_self": null, 1201 | "border": null, 1202 | "bottom": null, 1203 | "display": null, 1204 | "flex": null, 1205 | "flex_flow": null, 1206 | "grid_area": null, 1207 | "grid_auto_columns": null, 1208 | "grid_auto_flow": null, 1209 | "grid_auto_rows": null, 1210 | "grid_column": null, 1211 | "grid_gap": null, 1212 | "grid_row": null, 1213 | "grid_template_areas": null, 1214 | "grid_template_columns": null, 1215 | "grid_template_rows": null, 1216 | "height": null, 1217 | "justify_content": null, 1218 | "justify_items": null, 1219 | "left": null, 1220 | "margin": null, 1221 | "max_height": null, 1222 | "max_width": null, 1223 | "min_height": null, 1224 | "min_width": null, 1225 | "object_fit": null, 1226 | "object_position": null, 1227 | "order": null, 1228 | "overflow": null, 1229 | "overflow_x": null, 1230 | "overflow_y": null, 1231 | "padding": null, 1232 | "right": null, 1233 | "top": null, 1234 | "visibility": null, 1235 | "width": null 1236 | } 1237 | }, 1238 | "90412a372c4248fdba01ce1caa47ba4b": { 1239 | "model_module": "@jupyter-widgets/controls", 1240 | "model_name": "DescriptionStyleModel", 1241 | "model_module_version": "1.5.0", 1242 | "state": { 1243 | "_model_module": "@jupyter-widgets/controls", 1244 | "_model_module_version": "1.5.0", 1245 | "_model_name": "DescriptionStyleModel", 1246 | "_view_count": null, 1247 | "_view_module": "@jupyter-widgets/base", 1248 | "_view_module_version": "1.2.0", 1249 | "_view_name": "StyleView", 1250 | "description_width": "" 1251 | } 1252 | }, 1253 | "05df3ee9380646baa0ededb99e8c9135": { 1254 | "model_module": "@jupyter-widgets/base", 1255 | "model_name": "LayoutModel", 1256 | "model_module_version": "1.2.0", 1257 | "state": { 1258 | "_model_module": "@jupyter-widgets/base", 1259 | "_model_module_version": "1.2.0", 1260 | "_model_name": "LayoutModel", 1261 | "_view_count": null, 1262 | "_view_module": "@jupyter-widgets/base", 1263 | "_view_module_version": "1.2.0", 1264 | "_view_name": "LayoutView", 1265 | "align_content": null, 1266 | "align_items": null, 1267 | "align_self": null, 1268 | "border": null, 1269 | "bottom": null, 1270 | "display": null, 1271 | "flex": null, 1272 | "flex_flow": null, 1273 | "grid_area": null, 1274 | "grid_auto_columns": null, 1275 | "grid_auto_flow": null, 1276 | "grid_auto_rows": null, 1277 | "grid_column": null, 1278 | "grid_gap": null, 1279 | "grid_row": null, 1280 | "grid_template_areas": null, 1281 | "grid_template_columns": null, 1282 | "grid_template_rows": null, 1283 | "height": null, 1284 | "justify_content": null, 1285 | "justify_items": null, 1286 | "left": null, 1287 | "margin": null, 1288 | "max_height": null, 1289 | "max_width": null, 1290 | "min_height": null, 1291 | "min_width": null, 1292 | "object_fit": null, 1293 | "object_position": null, 1294 | "order": null, 1295 | "overflow": null, 1296 | "overflow_x": null, 1297 | "overflow_y": null, 1298 | "padding": null, 1299 | "right": null, 1300 | "top": null, 1301 | "visibility": null, 1302 | "width": null 1303 | } 1304 | }, 1305 | "d0c2b331b84e486eba8b134d8b162441": { 1306 | "model_module": "@jupyter-widgets/controls", 1307 | "model_name": "ProgressStyleModel", 1308 | "model_module_version": "1.5.0", 1309 | "state": { 1310 | "_model_module": "@jupyter-widgets/controls", 1311 | "_model_module_version": "1.5.0", 1312 | "_model_name": "ProgressStyleModel", 1313 | "_view_count": null, 1314 | "_view_module": "@jupyter-widgets/base", 1315 | "_view_module_version": "1.2.0", 1316 | "_view_name": "StyleView", 1317 | "bar_color": null, 1318 | "description_width": "" 1319 | } 1320 | }, 1321 | "6bb0ef4c1bbb4cf9b53d2e63eec5c611": { 1322 | "model_module": "@jupyter-widgets/base", 1323 | "model_name": "LayoutModel", 1324 | "model_module_version": "1.2.0", 1325 | "state": { 1326 | "_model_module": "@jupyter-widgets/base", 1327 | "_model_module_version": "1.2.0", 1328 | "_model_name": "LayoutModel", 1329 | "_view_count": null, 1330 | "_view_module": "@jupyter-widgets/base", 1331 | "_view_module_version": "1.2.0", 1332 | "_view_name": "LayoutView", 1333 | "align_content": null, 1334 | "align_items": null, 1335 | "align_self": null, 1336 | "border": null, 1337 | "bottom": null, 1338 | "display": null, 1339 | "flex": null, 1340 | "flex_flow": null, 1341 | "grid_area": null, 1342 | "grid_auto_columns": null, 1343 | "grid_auto_flow": null, 1344 | "grid_auto_rows": null, 1345 | "grid_column": null, 1346 | "grid_gap": null, 1347 | "grid_row": null, 1348 | "grid_template_areas": null, 1349 | "grid_template_columns": null, 1350 | "grid_template_rows": null, 1351 | "height": null, 1352 | "justify_content": null, 1353 | "justify_items": null, 1354 | "left": null, 1355 | "margin": null, 1356 | "max_height": null, 1357 | "max_width": null, 1358 | "min_height": null, 1359 | "min_width": null, 1360 | "object_fit": null, 1361 | "object_position": null, 1362 | "order": null, 1363 | "overflow": null, 1364 | "overflow_x": null, 1365 | "overflow_y": null, 1366 | "padding": null, 1367 | "right": null, 1368 | "top": null, 1369 | "visibility": null, 1370 | "width": null 1371 | } 1372 | }, 1373 | "68804ac3966d4d43abf917026224fb0b": { 1374 | "model_module": "@jupyter-widgets/controls", 1375 | "model_name": "DescriptionStyleModel", 1376 | "model_module_version": "1.5.0", 1377 | "state": { 1378 | "_model_module": "@jupyter-widgets/controls", 1379 | "_model_module_version": "1.5.0", 1380 | "_model_name": "DescriptionStyleModel", 1381 | "_view_count": null, 1382 | "_view_module": "@jupyter-widgets/base", 1383 | "_view_module_version": "1.2.0", 1384 | "_view_name": "StyleView", 1385 | "description_width": "" 1386 | } 1387 | }, 1388 | "504273f6c2db4c1ca94b4a31931846ca": { 1389 | "model_module": "@jupyter-widgets/controls", 1390 | "model_name": "HBoxModel", 1391 | "model_module_version": "1.5.0", 1392 | "state": { 1393 | "_dom_classes": [], 1394 | "_model_module": "@jupyter-widgets/controls", 1395 | "_model_module_version": "1.5.0", 1396 | "_model_name": "HBoxModel", 1397 | "_view_count": null, 1398 | "_view_module": "@jupyter-widgets/controls", 1399 | "_view_module_version": "1.5.0", 1400 | "_view_name": "HBoxView", 1401 | "box_style": "", 1402 | "children": [ 1403 | "IPY_MODEL_be53a798cc4246ab93a2456b0ecc40c8", 1404 | "IPY_MODEL_755602432a474433ad5c6692e7e3e6f5", 1405 | "IPY_MODEL_d2866ab2321042d281d55b47f079fd52" 1406 | ], 1407 | "layout": "IPY_MODEL_78ab21f9788944fba36ab24f1eb428b7" 1408 | } 1409 | }, 1410 | "be53a798cc4246ab93a2456b0ecc40c8": { 1411 | "model_module": "@jupyter-widgets/controls", 1412 | "model_name": "HTMLModel", 1413 | "model_module_version": "1.5.0", 1414 | "state": { 1415 | "_dom_classes": [], 1416 | "_model_module": "@jupyter-widgets/controls", 1417 | "_model_module_version": "1.5.0", 1418 | "_model_name": "HTMLModel", 1419 | "_view_count": null, 1420 | "_view_module": "@jupyter-widgets/controls", 1421 | "_view_module_version": "1.5.0", 1422 | "_view_name": "HTMLView", 1423 | "description": "", 1424 | "description_tooltip": null, 1425 | "layout": "IPY_MODEL_2ac5a224f58d425594c9656f9feff151", 1426 | "placeholder": "​", 1427 | "style": "IPY_MODEL_46410e1229e840eb92cedb4457ef32f8", 1428 | "value": "Downloading tokenizer.model: 100%" 1429 | } 1430 | }, 1431 | "755602432a474433ad5c6692e7e3e6f5": { 1432 | "model_module": "@jupyter-widgets/controls", 1433 | "model_name": "FloatProgressModel", 1434 | "model_module_version": "1.5.0", 1435 | "state": { 1436 | "_dom_classes": [], 1437 | "_model_module": "@jupyter-widgets/controls", 1438 | "_model_module_version": "1.5.0", 1439 | "_model_name": "FloatProgressModel", 1440 | "_view_count": null, 1441 | "_view_module": "@jupyter-widgets/controls", 1442 | "_view_module_version": "1.5.0", 1443 | "_view_name": "ProgressView", 1444 | "bar_style": "success", 1445 | "description": "", 1446 | "description_tooltip": null, 1447 | "layout": "IPY_MODEL_46a6e27ba4bf402784b9322e845360e0", 1448 | "max": 1136699, 1449 | "min": 0, 1450 | "orientation": "horizontal", 1451 | "style": "IPY_MODEL_4f9d8308bc794972b888a2fa543d5e37", 1452 | "value": 1136699 1453 | } 1454 | }, 1455 | "d2866ab2321042d281d55b47f079fd52": { 1456 | "model_module": "@jupyter-widgets/controls", 1457 | "model_name": "HTMLModel", 1458 | "model_module_version": "1.5.0", 1459 | "state": { 1460 | "_dom_classes": [], 1461 | "_model_module": "@jupyter-widgets/controls", 1462 | "_model_module_version": "1.5.0", 1463 | "_model_name": "HTMLModel", 1464 | "_view_count": null, 1465 | "_view_module": "@jupyter-widgets/controls", 1466 | "_view_module_version": "1.5.0", 1467 | "_view_name": "HTMLView", 1468 | "description": "", 1469 | "description_tooltip": null, 1470 | "layout": "IPY_MODEL_79adc9ec7f90446bbb9b751467088b9e", 1471 | "placeholder": "​", 1472 | "style": "IPY_MODEL_6593fcbbd183447baf29ae49138abcb1", 1473 | "value": " 1.14M/1.14M [00:00<00:00, 41.4MB/s]" 1474 | } 1475 | }, 1476 | "78ab21f9788944fba36ab24f1eb428b7": { 1477 | "model_module": "@jupyter-widgets/base", 1478 | "model_name": "LayoutModel", 1479 | "model_module_version": "1.2.0", 1480 | "state": { 1481 | "_model_module": "@jupyter-widgets/base", 1482 | "_model_module_version": "1.2.0", 1483 | "_model_name": "LayoutModel", 1484 | "_view_count": null, 1485 | "_view_module": "@jupyter-widgets/base", 1486 | "_view_module_version": "1.2.0", 1487 | "_view_name": "LayoutView", 1488 | "align_content": null, 1489 | "align_items": null, 1490 | "align_self": null, 1491 | "border": null, 1492 | "bottom": null, 1493 | "display": null, 1494 | "flex": null, 1495 | "flex_flow": null, 1496 | "grid_area": null, 1497 | "grid_auto_columns": null, 1498 | "grid_auto_flow": null, 1499 | "grid_auto_rows": null, 1500 | "grid_column": null, 1501 | "grid_gap": null, 1502 | "grid_row": null, 1503 | "grid_template_areas": null, 1504 | "grid_template_columns": null, 1505 | "grid_template_rows": null, 1506 | "height": null, 1507 | "justify_content": null, 1508 | "justify_items": null, 1509 | "left": null, 1510 | "margin": null, 1511 | "max_height": null, 1512 | "max_width": null, 1513 | "min_height": null, 1514 | "min_width": null, 1515 | "object_fit": null, 1516 | "object_position": null, 1517 | "order": null, 1518 | "overflow": null, 1519 | "overflow_x": null, 1520 | "overflow_y": null, 1521 | "padding": null, 1522 | "right": null, 1523 | "top": null, 1524 | "visibility": null, 1525 | "width": null 1526 | } 1527 | }, 1528 | "2ac5a224f58d425594c9656f9feff151": { 1529 | "model_module": "@jupyter-widgets/base", 1530 | "model_name": "LayoutModel", 1531 | "model_module_version": "1.2.0", 1532 | "state": { 1533 | "_model_module": "@jupyter-widgets/base", 1534 | "_model_module_version": "1.2.0", 1535 | "_model_name": "LayoutModel", 1536 | "_view_count": null, 1537 | "_view_module": "@jupyter-widgets/base", 1538 | "_view_module_version": "1.2.0", 1539 | "_view_name": "LayoutView", 1540 | "align_content": null, 1541 | "align_items": null, 1542 | "align_self": null, 1543 | "border": null, 1544 | "bottom": null, 1545 | "display": null, 1546 | "flex": null, 1547 | "flex_flow": null, 1548 | "grid_area": null, 1549 | "grid_auto_columns": null, 1550 | "grid_auto_flow": null, 1551 | "grid_auto_rows": null, 1552 | "grid_column": null, 1553 | "grid_gap": null, 1554 | "grid_row": null, 1555 | "grid_template_areas": null, 1556 | "grid_template_columns": null, 1557 | "grid_template_rows": null, 1558 | "height": null, 1559 | "justify_content": null, 1560 | "justify_items": null, 1561 | "left": null, 1562 | "margin": null, 1563 | "max_height": null, 1564 | "max_width": null, 1565 | "min_height": null, 1566 | "min_width": null, 1567 | "object_fit": null, 1568 | "object_position": null, 1569 | "order": null, 1570 | "overflow": null, 1571 | "overflow_x": null, 1572 | "overflow_y": null, 1573 | "padding": null, 1574 | "right": null, 1575 | "top": null, 1576 | "visibility": null, 1577 | "width": null 1578 | } 1579 | }, 1580 | "46410e1229e840eb92cedb4457ef32f8": { 1581 | "model_module": "@jupyter-widgets/controls", 1582 | "model_name": "DescriptionStyleModel", 1583 | "model_module_version": "1.5.0", 1584 | "state": { 1585 | "_model_module": "@jupyter-widgets/controls", 1586 | "_model_module_version": "1.5.0", 1587 | "_model_name": "DescriptionStyleModel", 1588 | "_view_count": null, 1589 | "_view_module": "@jupyter-widgets/base", 1590 | "_view_module_version": "1.2.0", 1591 | "_view_name": "StyleView", 1592 | "description_width": "" 1593 | } 1594 | }, 1595 | "46a6e27ba4bf402784b9322e845360e0": { 1596 | "model_module": "@jupyter-widgets/base", 1597 | "model_name": "LayoutModel", 1598 | "model_module_version": "1.2.0", 1599 | "state": { 1600 | "_model_module": "@jupyter-widgets/base", 1601 | "_model_module_version": "1.2.0", 1602 | "_model_name": "LayoutModel", 1603 | "_view_count": null, 1604 | "_view_module": "@jupyter-widgets/base", 1605 | "_view_module_version": "1.2.0", 1606 | "_view_name": "LayoutView", 1607 | "align_content": null, 1608 | "align_items": null, 1609 | "align_self": null, 1610 | "border": null, 1611 | "bottom": null, 1612 | "display": null, 1613 | "flex": null, 1614 | "flex_flow": null, 1615 | "grid_area": null, 1616 | "grid_auto_columns": null, 1617 | "grid_auto_flow": null, 1618 | "grid_auto_rows": null, 1619 | "grid_column": null, 1620 | "grid_gap": null, 1621 | "grid_row": null, 1622 | "grid_template_areas": null, 1623 | "grid_template_columns": null, 1624 | "grid_template_rows": null, 1625 | "height": null, 1626 | "justify_content": null, 1627 | "justify_items": null, 1628 | "left": null, 1629 | "margin": null, 1630 | "max_height": null, 1631 | "max_width": null, 1632 | "min_height": null, 1633 | "min_width": null, 1634 | "object_fit": null, 1635 | "object_position": null, 1636 | "order": null, 1637 | "overflow": null, 1638 | "overflow_x": null, 1639 | "overflow_y": null, 1640 | "padding": null, 1641 | "right": null, 1642 | "top": null, 1643 | "visibility": null, 1644 | "width": null 1645 | } 1646 | }, 1647 | "4f9d8308bc794972b888a2fa543d5e37": { 1648 | "model_module": "@jupyter-widgets/controls", 1649 | "model_name": "ProgressStyleModel", 1650 | "model_module_version": "1.5.0", 1651 | "state": { 1652 | "_model_module": "@jupyter-widgets/controls", 1653 | "_model_module_version": "1.5.0", 1654 | "_model_name": "ProgressStyleModel", 1655 | "_view_count": null, 1656 | "_view_module": "@jupyter-widgets/base", 1657 | "_view_module_version": "1.2.0", 1658 | "_view_name": "StyleView", 1659 | "bar_color": null, 1660 | "description_width": "" 1661 | } 1662 | }, 1663 | "79adc9ec7f90446bbb9b751467088b9e": { 1664 | "model_module": "@jupyter-widgets/base", 1665 | "model_name": "LayoutModel", 1666 | "model_module_version": "1.2.0", 1667 | "state": { 1668 | "_model_module": "@jupyter-widgets/base", 1669 | "_model_module_version": "1.2.0", 1670 | "_model_name": "LayoutModel", 1671 | "_view_count": null, 1672 | "_view_module": "@jupyter-widgets/base", 1673 | "_view_module_version": "1.2.0", 1674 | "_view_name": "LayoutView", 1675 | "align_content": null, 1676 | "align_items": null, 1677 | "align_self": null, 1678 | "border": null, 1679 | "bottom": null, 1680 | "display": null, 1681 | "flex": null, 1682 | "flex_flow": null, 1683 | "grid_area": null, 1684 | "grid_auto_columns": null, 1685 | "grid_auto_flow": null, 1686 | "grid_auto_rows": null, 1687 | "grid_column": null, 1688 | "grid_gap": null, 1689 | "grid_row": null, 1690 | "grid_template_areas": null, 1691 | "grid_template_columns": null, 1692 | "grid_template_rows": null, 1693 | "height": null, 1694 | "justify_content": null, 1695 | "justify_items": null, 1696 | "left": null, 1697 | "margin": null, 1698 | "max_height": null, 1699 | "max_width": null, 1700 | "min_height": null, 1701 | "min_width": null, 1702 | "object_fit": null, 1703 | "object_position": null, 1704 | "order": null, 1705 | "overflow": null, 1706 | "overflow_x": null, 1707 | "overflow_y": null, 1708 | "padding": null, 1709 | "right": null, 1710 | "top": null, 1711 | "visibility": null, 1712 | "width": null 1713 | } 1714 | }, 1715 | "6593fcbbd183447baf29ae49138abcb1": { 1716 | "model_module": "@jupyter-widgets/controls", 1717 | "model_name": "DescriptionStyleModel", 1718 | "model_module_version": "1.5.0", 1719 | "state": { 1720 | "_model_module": "@jupyter-widgets/controls", 1721 | "_model_module_version": "1.5.0", 1722 | "_model_name": "DescriptionStyleModel", 1723 | "_view_count": null, 1724 | "_view_module": "@jupyter-widgets/base", 1725 | "_view_module_version": "1.2.0", 1726 | "_view_name": "StyleView", 1727 | "description_width": "" 1728 | } 1729 | }, 1730 | "3cb36e30b9914e41aa1d62166f3b6008": { 1731 | "model_module": "@jupyter-widgets/controls", 1732 | "model_name": "HBoxModel", 1733 | "model_module_version": "1.5.0", 1734 | "state": { 1735 | "_dom_classes": [], 1736 | "_model_module": "@jupyter-widgets/controls", 1737 | "_model_module_version": "1.5.0", 1738 | "_model_name": "HBoxModel", 1739 | "_view_count": null, 1740 | "_view_module": "@jupyter-widgets/controls", 1741 | "_view_module_version": "1.5.0", 1742 | "_view_name": "HBoxView", 1743 | "box_style": "", 1744 | "children": [ 1745 | "IPY_MODEL_d85ead165f2649f183fe6528143f8e17", 1746 | "IPY_MODEL_5fec92aca12e433ca4c784c7feeb4b83", 1747 | "IPY_MODEL_ee55caef7b604ae9bd61e842f798e379" 1748 | ], 1749 | "layout": "IPY_MODEL_6cbf0e55e0ab4af1b47aed43c602b20b" 1750 | } 1751 | }, 1752 | "d85ead165f2649f183fe6528143f8e17": { 1753 | "model_module": "@jupyter-widgets/controls", 1754 | "model_name": "HTMLModel", 1755 | "model_module_version": "1.5.0", 1756 | "state": { 1757 | "_dom_classes": [], 1758 | "_model_module": "@jupyter-widgets/controls", 1759 | "_model_module_version": "1.5.0", 1760 | "_model_name": "HTMLModel", 1761 | "_view_count": null, 1762 | "_view_module": "@jupyter-widgets/controls", 1763 | "_view_module_version": "1.5.0", 1764 | "_view_name": "HTMLView", 1765 | "description": "", 1766 | "description_tooltip": null, 1767 | "layout": "IPY_MODEL_4f2bb9e32595412fba837430ba9d7dcf", 1768 | "placeholder": "​", 1769 | "style": "IPY_MODEL_321012c035af46edb81c52326d3c5554", 1770 | "value": "Downloading (…)cial_tokens_map.json: 100%" 1771 | } 1772 | }, 1773 | "5fec92aca12e433ca4c784c7feeb4b83": { 1774 | "model_module": "@jupyter-widgets/controls", 1775 | "model_name": "FloatProgressModel", 1776 | "model_module_version": "1.5.0", 1777 | "state": { 1778 | "_dom_classes": [], 1779 | "_model_module": "@jupyter-widgets/controls", 1780 | "_model_module_version": "1.5.0", 1781 | "_model_name": "FloatProgressModel", 1782 | "_view_count": null, 1783 | "_view_module": "@jupyter-widgets/controls", 1784 | "_view_module_version": "1.5.0", 1785 | "_view_name": "ProgressView", 1786 | "bar_style": "success", 1787 | "description": "", 1788 | "description_tooltip": null, 1789 | "layout": "IPY_MODEL_5c8211ad53924a9881fd005a2d1c9349", 1790 | "max": 411, 1791 | "min": 0, 1792 | "orientation": "horizontal", 1793 | "style": "IPY_MODEL_7a289ba9d172406b9ff70bfbc1a7830e", 1794 | "value": 411 1795 | } 1796 | }, 1797 | "ee55caef7b604ae9bd61e842f798e379": { 1798 | "model_module": "@jupyter-widgets/controls", 1799 | "model_name": "HTMLModel", 1800 | "model_module_version": "1.5.0", 1801 | "state": { 1802 | "_dom_classes": [], 1803 | "_model_module": "@jupyter-widgets/controls", 1804 | "_model_module_version": "1.5.0", 1805 | "_model_name": "HTMLModel", 1806 | "_view_count": null, 1807 | "_view_module": "@jupyter-widgets/controls", 1808 | "_view_module_version": "1.5.0", 1809 | "_view_name": "HTMLView", 1810 | "description": "", 1811 | "description_tooltip": null, 1812 | "layout": "IPY_MODEL_4af226e419ee4e54833e82523738e58f", 1813 | "placeholder": "​", 1814 | "style": "IPY_MODEL_6ae245c91d304235848c80d10856475e", 1815 | "value": " 411/411 [00:00<00:00, 36.9kB/s]" 1816 | } 1817 | }, 1818 | "6cbf0e55e0ab4af1b47aed43c602b20b": { 1819 | "model_module": "@jupyter-widgets/base", 1820 | "model_name": "LayoutModel", 1821 | "model_module_version": "1.2.0", 1822 | "state": { 1823 | "_model_module": "@jupyter-widgets/base", 1824 | "_model_module_version": "1.2.0", 1825 | "_model_name": "LayoutModel", 1826 | "_view_count": null, 1827 | "_view_module": "@jupyter-widgets/base", 1828 | "_view_module_version": "1.2.0", 1829 | "_view_name": "LayoutView", 1830 | "align_content": null, 1831 | "align_items": null, 1832 | "align_self": null, 1833 | "border": null, 1834 | "bottom": null, 1835 | "display": null, 1836 | "flex": null, 1837 | "flex_flow": null, 1838 | "grid_area": null, 1839 | "grid_auto_columns": null, 1840 | "grid_auto_flow": null, 1841 | "grid_auto_rows": null, 1842 | "grid_column": null, 1843 | "grid_gap": null, 1844 | "grid_row": null, 1845 | "grid_template_areas": null, 1846 | "grid_template_columns": null, 1847 | "grid_template_rows": null, 1848 | "height": null, 1849 | "justify_content": null, 1850 | "justify_items": null, 1851 | "left": null, 1852 | "margin": null, 1853 | "max_height": null, 1854 | "max_width": null, 1855 | "min_height": null, 1856 | "min_width": null, 1857 | "object_fit": null, 1858 | "object_position": null, 1859 | "order": null, 1860 | "overflow": null, 1861 | "overflow_x": null, 1862 | "overflow_y": null, 1863 | "padding": null, 1864 | "right": null, 1865 | "top": null, 1866 | "visibility": null, 1867 | "width": null 1868 | } 1869 | }, 1870 | "4f2bb9e32595412fba837430ba9d7dcf": { 1871 | "model_module": "@jupyter-widgets/base", 1872 | "model_name": "LayoutModel", 1873 | "model_module_version": "1.2.0", 1874 | "state": { 1875 | "_model_module": "@jupyter-widgets/base", 1876 | "_model_module_version": "1.2.0", 1877 | "_model_name": "LayoutModel", 1878 | "_view_count": null, 1879 | "_view_module": "@jupyter-widgets/base", 1880 | "_view_module_version": "1.2.0", 1881 | "_view_name": "LayoutView", 1882 | "align_content": null, 1883 | "align_items": null, 1884 | "align_self": null, 1885 | "border": null, 1886 | "bottom": null, 1887 | "display": null, 1888 | "flex": null, 1889 | "flex_flow": null, 1890 | "grid_area": null, 1891 | "grid_auto_columns": null, 1892 | "grid_auto_flow": null, 1893 | "grid_auto_rows": null, 1894 | "grid_column": null, 1895 | "grid_gap": null, 1896 | "grid_row": null, 1897 | "grid_template_areas": null, 1898 | "grid_template_columns": null, 1899 | "grid_template_rows": null, 1900 | "height": null, 1901 | "justify_content": null, 1902 | "justify_items": null, 1903 | "left": null, 1904 | "margin": null, 1905 | "max_height": null, 1906 | "max_width": null, 1907 | "min_height": null, 1908 | "min_width": null, 1909 | "object_fit": null, 1910 | "object_position": null, 1911 | "order": null, 1912 | "overflow": null, 1913 | "overflow_x": null, 1914 | "overflow_y": null, 1915 | "padding": null, 1916 | "right": null, 1917 | "top": null, 1918 | "visibility": null, 1919 | "width": null 1920 | } 1921 | }, 1922 | "321012c035af46edb81c52326d3c5554": { 1923 | "model_module": "@jupyter-widgets/controls", 1924 | "model_name": "DescriptionStyleModel", 1925 | "model_module_version": "1.5.0", 1926 | "state": { 1927 | "_model_module": "@jupyter-widgets/controls", 1928 | "_model_module_version": "1.5.0", 1929 | "_model_name": "DescriptionStyleModel", 1930 | "_view_count": null, 1931 | "_view_module": "@jupyter-widgets/base", 1932 | "_view_module_version": "1.2.0", 1933 | "_view_name": "StyleView", 1934 | "description_width": "" 1935 | } 1936 | }, 1937 | "5c8211ad53924a9881fd005a2d1c9349": { 1938 | "model_module": "@jupyter-widgets/base", 1939 | "model_name": "LayoutModel", 1940 | "model_module_version": "1.2.0", 1941 | "state": { 1942 | "_model_module": "@jupyter-widgets/base", 1943 | "_model_module_version": "1.2.0", 1944 | "_model_name": "LayoutModel", 1945 | "_view_count": null, 1946 | "_view_module": "@jupyter-widgets/base", 1947 | "_view_module_version": "1.2.0", 1948 | "_view_name": "LayoutView", 1949 | "align_content": null, 1950 | "align_items": null, 1951 | "align_self": null, 1952 | "border": null, 1953 | "bottom": null, 1954 | "display": null, 1955 | "flex": null, 1956 | "flex_flow": null, 1957 | "grid_area": null, 1958 | "grid_auto_columns": null, 1959 | "grid_auto_flow": null, 1960 | "grid_auto_rows": null, 1961 | "grid_column": null, 1962 | "grid_gap": null, 1963 | "grid_row": null, 1964 | "grid_template_areas": null, 1965 | "grid_template_columns": null, 1966 | "grid_template_rows": null, 1967 | "height": null, 1968 | "justify_content": null, 1969 | "justify_items": null, 1970 | "left": null, 1971 | "margin": null, 1972 | "max_height": null, 1973 | "max_width": null, 1974 | "min_height": null, 1975 | "min_width": null, 1976 | "object_fit": null, 1977 | "object_position": null, 1978 | "order": null, 1979 | "overflow": null, 1980 | "overflow_x": null, 1981 | "overflow_y": null, 1982 | "padding": null, 1983 | "right": null, 1984 | "top": null, 1985 | "visibility": null, 1986 | "width": null 1987 | } 1988 | }, 1989 | "7a289ba9d172406b9ff70bfbc1a7830e": { 1990 | "model_module": "@jupyter-widgets/controls", 1991 | "model_name": "ProgressStyleModel", 1992 | "model_module_version": "1.5.0", 1993 | "state": { 1994 | "_model_module": "@jupyter-widgets/controls", 1995 | "_model_module_version": "1.5.0", 1996 | "_model_name": "ProgressStyleModel", 1997 | "_view_count": null, 1998 | "_view_module": "@jupyter-widgets/base", 1999 | "_view_module_version": "1.2.0", 2000 | "_view_name": "StyleView", 2001 | "bar_color": null, 2002 | "description_width": "" 2003 | } 2004 | }, 2005 | "4af226e419ee4e54833e82523738e58f": { 2006 | "model_module": "@jupyter-widgets/base", 2007 | "model_name": "LayoutModel", 2008 | "model_module_version": "1.2.0", 2009 | "state": { 2010 | "_model_module": "@jupyter-widgets/base", 2011 | "_model_module_version": "1.2.0", 2012 | "_model_name": "LayoutModel", 2013 | "_view_count": null, 2014 | "_view_module": "@jupyter-widgets/base", 2015 | "_view_module_version": "1.2.0", 2016 | "_view_name": "LayoutView", 2017 | "align_content": null, 2018 | "align_items": null, 2019 | "align_self": null, 2020 | "border": null, 2021 | "bottom": null, 2022 | "display": null, 2023 | "flex": null, 2024 | "flex_flow": null, 2025 | "grid_area": null, 2026 | "grid_auto_columns": null, 2027 | "grid_auto_flow": null, 2028 | "grid_auto_rows": null, 2029 | "grid_column": null, 2030 | "grid_gap": null, 2031 | "grid_row": null, 2032 | "grid_template_areas": null, 2033 | "grid_template_columns": null, 2034 | "grid_template_rows": null, 2035 | "height": null, 2036 | "justify_content": null, 2037 | "justify_items": null, 2038 | "left": null, 2039 | "margin": null, 2040 | "max_height": null, 2041 | "max_width": null, 2042 | "min_height": null, 2043 | "min_width": null, 2044 | "object_fit": null, 2045 | "object_position": null, 2046 | "order": null, 2047 | "overflow": null, 2048 | "overflow_x": null, 2049 | "overflow_y": null, 2050 | "padding": null, 2051 | "right": null, 2052 | "top": null, 2053 | "visibility": null, 2054 | "width": null 2055 | } 2056 | }, 2057 | "6ae245c91d304235848c80d10856475e": { 2058 | "model_module": "@jupyter-widgets/controls", 2059 | "model_name": "DescriptionStyleModel", 2060 | "model_module_version": "1.5.0", 2061 | "state": { 2062 | "_model_module": "@jupyter-widgets/controls", 2063 | "_model_module_version": "1.5.0", 2064 | "_model_name": "DescriptionStyleModel", 2065 | "_view_count": null, 2066 | "_view_module": "@jupyter-widgets/base", 2067 | "_view_module_version": "1.2.0", 2068 | "_view_name": "StyleView", 2069 | "description_width": "" 2070 | } 2071 | }, 2072 | "791e60753ad34d948480c7cfc8a6cf10": { 2073 | "model_module": "@jupyter-widgets/controls", 2074 | "model_name": "HBoxModel", 2075 | "model_module_version": "1.5.0", 2076 | "state": { 2077 | "_dom_classes": [], 2078 | "_model_module": "@jupyter-widgets/controls", 2079 | "_model_module_version": "1.5.0", 2080 | "_model_name": "HBoxModel", 2081 | "_view_count": null, 2082 | "_view_module": "@jupyter-widgets/controls", 2083 | "_view_module_version": "1.5.0", 2084 | "_view_name": "HBoxView", 2085 | "box_style": "", 2086 | "children": [ 2087 | "IPY_MODEL_f705d343034540b49de22404dff26a56", 2088 | "IPY_MODEL_61773de94f444b5e864ac7301f21bda6", 2089 | "IPY_MODEL_d8ab6aea18d24e3d8ee5f76d4b6c3327" 2090 | ], 2091 | "layout": "IPY_MODEL_6952cef103c54cc8b3595b918b899735" 2092 | } 2093 | }, 2094 | "f705d343034540b49de22404dff26a56": { 2095 | "model_module": "@jupyter-widgets/controls", 2096 | "model_name": "HTMLModel", 2097 | "model_module_version": "1.5.0", 2098 | "state": { 2099 | "_dom_classes": [], 2100 | "_model_module": "@jupyter-widgets/controls", 2101 | "_model_module_version": "1.5.0", 2102 | "_model_name": "HTMLModel", 2103 | "_view_count": null, 2104 | "_view_module": "@jupyter-widgets/controls", 2105 | "_view_module_version": "1.5.0", 2106 | "_view_name": "HTMLView", 2107 | "description": "", 2108 | "description_tooltip": null, 2109 | "layout": "IPY_MODEL_d91c3502166f4e55923786378622b101", 2110 | "placeholder": "​", 2111 | "style": "IPY_MODEL_2587458051e14c59942174126d75f32f", 2112 | "value": "Downloading pytorch_model.bin: 100%" 2113 | } 2114 | }, 2115 | "61773de94f444b5e864ac7301f21bda6": { 2116 | "model_module": "@jupyter-widgets/controls", 2117 | "model_name": "FloatProgressModel", 2118 | "model_module_version": "1.5.0", 2119 | "state": { 2120 | "_dom_classes": [], 2121 | "_model_module": "@jupyter-widgets/controls", 2122 | "_model_module_version": "1.5.0", 2123 | "_model_name": "FloatProgressModel", 2124 | "_view_count": null, 2125 | "_view_module": "@jupyter-widgets/controls", 2126 | "_view_module_version": "1.5.0", 2127 | "_view_name": "ProgressView", 2128 | "bar_style": "success", 2129 | "description": "", 2130 | "description_tooltip": null, 2131 | "layout": "IPY_MODEL_98f1be1443dd4a22977da5230d76c0c5", 2132 | "max": 14001182896, 2133 | "min": 0, 2134 | "orientation": "horizontal", 2135 | "style": "IPY_MODEL_12dcb85173e140469eed573777d63ba9", 2136 | "value": 14001182896 2137 | } 2138 | }, 2139 | "d8ab6aea18d24e3d8ee5f76d4b6c3327": { 2140 | "model_module": "@jupyter-widgets/controls", 2141 | "model_name": "HTMLModel", 2142 | "model_module_version": "1.5.0", 2143 | "state": { 2144 | "_dom_classes": [], 2145 | "_model_module": "@jupyter-widgets/controls", 2146 | "_model_module_version": "1.5.0", 2147 | "_model_name": "HTMLModel", 2148 | "_view_count": null, 2149 | "_view_module": "@jupyter-widgets/controls", 2150 | "_view_module_version": "1.5.0", 2151 | "_view_name": "HTMLView", 2152 | "description": "", 2153 | "description_tooltip": null, 2154 | "layout": "IPY_MODEL_af654d70230640ee995505fab1f850d0", 2155 | "placeholder": "​", 2156 | "style": "IPY_MODEL_7999d5d5a32c4a74824128070621ded6", 2157 | "value": " 14.0G/14.0G [00:43<00:00, 391MB/s]" 2158 | } 2159 | }, 2160 | "6952cef103c54cc8b3595b918b899735": { 2161 | "model_module": "@jupyter-widgets/base", 2162 | "model_name": "LayoutModel", 2163 | "model_module_version": "1.2.0", 2164 | "state": { 2165 | "_model_module": "@jupyter-widgets/base", 2166 | "_model_module_version": "1.2.0", 2167 | "_model_name": "LayoutModel", 2168 | "_view_count": null, 2169 | "_view_module": "@jupyter-widgets/base", 2170 | "_view_module_version": "1.2.0", 2171 | "_view_name": "LayoutView", 2172 | "align_content": null, 2173 | "align_items": null, 2174 | "align_self": null, 2175 | "border": null, 2176 | "bottom": null, 2177 | "display": null, 2178 | "flex": null, 2179 | "flex_flow": null, 2180 | "grid_area": null, 2181 | "grid_auto_columns": null, 2182 | "grid_auto_flow": null, 2183 | "grid_auto_rows": null, 2184 | "grid_column": null, 2185 | "grid_gap": null, 2186 | "grid_row": null, 2187 | "grid_template_areas": null, 2188 | "grid_template_columns": null, 2189 | "grid_template_rows": null, 2190 | "height": null, 2191 | "justify_content": null, 2192 | "justify_items": null, 2193 | "left": null, 2194 | "margin": null, 2195 | "max_height": null, 2196 | "max_width": null, 2197 | "min_height": null, 2198 | "min_width": null, 2199 | "object_fit": null, 2200 | "object_position": null, 2201 | "order": null, 2202 | "overflow": null, 2203 | "overflow_x": null, 2204 | "overflow_y": null, 2205 | "padding": null, 2206 | "right": null, 2207 | "top": null, 2208 | "visibility": null, 2209 | "width": null 2210 | } 2211 | }, 2212 | "d91c3502166f4e55923786378622b101": { 2213 | "model_module": "@jupyter-widgets/base", 2214 | "model_name": "LayoutModel", 2215 | "model_module_version": "1.2.0", 2216 | "state": { 2217 | "_model_module": "@jupyter-widgets/base", 2218 | "_model_module_version": "1.2.0", 2219 | "_model_name": "LayoutModel", 2220 | "_view_count": null, 2221 | "_view_module": "@jupyter-widgets/base", 2222 | "_view_module_version": "1.2.0", 2223 | "_view_name": "LayoutView", 2224 | "align_content": null, 2225 | "align_items": null, 2226 | "align_self": null, 2227 | "border": null, 2228 | "bottom": null, 2229 | "display": null, 2230 | "flex": null, 2231 | "flex_flow": null, 2232 | "grid_area": null, 2233 | "grid_auto_columns": null, 2234 | "grid_auto_flow": null, 2235 | "grid_auto_rows": null, 2236 | "grid_column": null, 2237 | "grid_gap": null, 2238 | "grid_row": null, 2239 | "grid_template_areas": null, 2240 | "grid_template_columns": null, 2241 | "grid_template_rows": null, 2242 | "height": null, 2243 | "justify_content": null, 2244 | "justify_items": null, 2245 | "left": null, 2246 | "margin": null, 2247 | "max_height": null, 2248 | "max_width": null, 2249 | "min_height": null, 2250 | "min_width": null, 2251 | "object_fit": null, 2252 | "object_position": null, 2253 | "order": null, 2254 | "overflow": null, 2255 | "overflow_x": null, 2256 | "overflow_y": null, 2257 | "padding": null, 2258 | "right": null, 2259 | "top": null, 2260 | "visibility": null, 2261 | "width": null 2262 | } 2263 | }, 2264 | "2587458051e14c59942174126d75f32f": { 2265 | "model_module": "@jupyter-widgets/controls", 2266 | "model_name": "DescriptionStyleModel", 2267 | "model_module_version": "1.5.0", 2268 | "state": { 2269 | "_model_module": "@jupyter-widgets/controls", 2270 | "_model_module_version": "1.5.0", 2271 | "_model_name": "DescriptionStyleModel", 2272 | "_view_count": null, 2273 | "_view_module": "@jupyter-widgets/base", 2274 | "_view_module_version": "1.2.0", 2275 | "_view_name": "StyleView", 2276 | "description_width": "" 2277 | } 2278 | }, 2279 | "98f1be1443dd4a22977da5230d76c0c5": { 2280 | "model_module": "@jupyter-widgets/base", 2281 | "model_name": "LayoutModel", 2282 | "model_module_version": "1.2.0", 2283 | "state": { 2284 | "_model_module": "@jupyter-widgets/base", 2285 | "_model_module_version": "1.2.0", 2286 | "_model_name": "LayoutModel", 2287 | "_view_count": null, 2288 | "_view_module": "@jupyter-widgets/base", 2289 | "_view_module_version": "1.2.0", 2290 | "_view_name": "LayoutView", 2291 | "align_content": null, 2292 | "align_items": null, 2293 | "align_self": null, 2294 | "border": null, 2295 | "bottom": null, 2296 | "display": null, 2297 | "flex": null, 2298 | "flex_flow": null, 2299 | "grid_area": null, 2300 | "grid_auto_columns": null, 2301 | "grid_auto_flow": null, 2302 | "grid_auto_rows": null, 2303 | "grid_column": null, 2304 | "grid_gap": null, 2305 | "grid_row": null, 2306 | "grid_template_areas": null, 2307 | "grid_template_columns": null, 2308 | "grid_template_rows": null, 2309 | "height": null, 2310 | "justify_content": null, 2311 | "justify_items": null, 2312 | "left": null, 2313 | "margin": null, 2314 | "max_height": null, 2315 | "max_width": null, 2316 | "min_height": null, 2317 | "min_width": null, 2318 | "object_fit": null, 2319 | "object_position": null, 2320 | "order": null, 2321 | "overflow": null, 2322 | "overflow_x": null, 2323 | "overflow_y": null, 2324 | "padding": null, 2325 | "right": null, 2326 | "top": null, 2327 | "visibility": null, 2328 | "width": null 2329 | } 2330 | }, 2331 | "12dcb85173e140469eed573777d63ba9": { 2332 | "model_module": "@jupyter-widgets/controls", 2333 | "model_name": "ProgressStyleModel", 2334 | "model_module_version": "1.5.0", 2335 | "state": { 2336 | "_model_module": "@jupyter-widgets/controls", 2337 | "_model_module_version": "1.5.0", 2338 | "_model_name": "ProgressStyleModel", 2339 | "_view_count": null, 2340 | "_view_module": "@jupyter-widgets/base", 2341 | "_view_module_version": "1.2.0", 2342 | "_view_name": "StyleView", 2343 | "bar_color": null, 2344 | "description_width": "" 2345 | } 2346 | }, 2347 | "af654d70230640ee995505fab1f850d0": { 2348 | "model_module": "@jupyter-widgets/base", 2349 | "model_name": "LayoutModel", 2350 | "model_module_version": "1.2.0", 2351 | "state": { 2352 | "_model_module": "@jupyter-widgets/base", 2353 | "_model_module_version": "1.2.0", 2354 | "_model_name": "LayoutModel", 2355 | "_view_count": null, 2356 | "_view_module": "@jupyter-widgets/base", 2357 | "_view_module_version": "1.2.0", 2358 | "_view_name": "LayoutView", 2359 | "align_content": null, 2360 | "align_items": null, 2361 | "align_self": null, 2362 | "border": null, 2363 | "bottom": null, 2364 | "display": null, 2365 | "flex": null, 2366 | "flex_flow": null, 2367 | "grid_area": null, 2368 | "grid_auto_columns": null, 2369 | "grid_auto_flow": null, 2370 | "grid_auto_rows": null, 2371 | "grid_column": null, 2372 | "grid_gap": null, 2373 | "grid_row": null, 2374 | "grid_template_areas": null, 2375 | "grid_template_columns": null, 2376 | "grid_template_rows": null, 2377 | "height": null, 2378 | "justify_content": null, 2379 | "justify_items": null, 2380 | "left": null, 2381 | "margin": null, 2382 | "max_height": null, 2383 | "max_width": null, 2384 | "min_height": null, 2385 | "min_width": null, 2386 | "object_fit": null, 2387 | "object_position": null, 2388 | "order": null, 2389 | "overflow": null, 2390 | "overflow_x": null, 2391 | "overflow_y": null, 2392 | "padding": null, 2393 | "right": null, 2394 | "top": null, 2395 | "visibility": null, 2396 | "width": null 2397 | } 2398 | }, 2399 | "7999d5d5a32c4a74824128070621ded6": { 2400 | "model_module": "@jupyter-widgets/controls", 2401 | "model_name": "DescriptionStyleModel", 2402 | "model_module_version": "1.5.0", 2403 | "state": { 2404 | "_model_module": "@jupyter-widgets/controls", 2405 | "_model_module_version": "1.5.0", 2406 | "_model_name": "DescriptionStyleModel", 2407 | "_view_count": null, 2408 | "_view_module": "@jupyter-widgets/base", 2409 | "_view_module_version": "1.2.0", 2410 | "_view_name": "StyleView", 2411 | "description_width": "" 2412 | } 2413 | } 2414 | } 2415 | } 2416 | }, 2417 | "cells": [ 2418 | { 2419 | "cell_type": "markdown", 2420 | "source": [ 2421 | "# 为 vllm 增加对 baichuan-inc/baichuan-7B 的支持" 2422 | ], 2423 | "metadata": { 2424 | "id": "I2XX2NZfDAbB" 2425 | } 2426 | }, 2427 | { 2428 | "cell_type": "markdown", 2429 | "source": [ 2430 | "### 拉取代码" 2431 | ], 2432 | "metadata": { 2433 | "id": "XB-Wx2reDoYQ" 2434 | } 2435 | }, 2436 | { 2437 | "cell_type": "code", 2438 | "source": [ 2439 | "!rm -fr vllm && git clone https://github.com/gameofdimension/vllm.git" 2440 | ], 2441 | "metadata": { 2442 | "colab": { 2443 | "base_uri": "https://localhost:8080/" 2444 | }, 2445 | "id": "h9VFtAgaYZ7s", 2446 | "outputId": "3611ebf6-9ba5-407a-cc1f-67f1980ca099" 2447 | }, 2448 | "execution_count": 1, 2449 | "outputs": [ 2450 | { 2451 | "output_type": "stream", 2452 | "name": "stdout", 2453 | "text": [ 2454 | "Cloning into 'vllm'...\n", 2455 | "remote: Enumerating objects: 2253, done.\u001b[K\n", 2456 | "remote: Counting objects: 100% (1511/1511), done.\u001b[K\n", 2457 | "remote: Compressing objects: 100% (794/794), done.\u001b[K\n", 2458 | "remote: Total 2253 (delta 1015), reused 982 (delta 710), pack-reused 742\u001b[K\n", 2459 | "Receiving objects: 100% (2253/2253), 3.08 MiB | 30.02 MiB/s, done.\n", 2460 | "Resolving deltas: 100% (1358/1358), done.\n" 2461 | ] 2462 | } 2463 | ] 2464 | }, 2465 | { 2466 | "cell_type": "code", 2467 | "source": [ 2468 | "%cd /content/vllm" 2469 | ], 2470 | "metadata": { 2471 | "colab": { 2472 | "base_uri": "https://localhost:8080/" 2473 | }, 2474 | "id": "7Nen2k5RGOr1", 2475 | "outputId": "b2c84406-2b16-412f-baa3-8ff73c958617" 2476 | }, 2477 | "execution_count": 2, 2478 | "outputs": [ 2479 | { 2480 | "output_type": "stream", 2481 | "name": "stdout", 2482 | "text": [ 2483 | "/content/vllm\n" 2484 | ] 2485 | } 2486 | ] 2487 | }, 2488 | { 2489 | "cell_type": "code", 2490 | "source": [ 2491 | "!git checkout baichuan && git pull" 2492 | ], 2493 | "metadata": { 2494 | "colab": { 2495 | "base_uri": "https://localhost:8080/" 2496 | }, 2497 | "id": "MAGsCctv07ZE", 2498 | "outputId": "4c397e4b-c544-4520-9112-ad25c347f785" 2499 | }, 2500 | "execution_count": 3, 2501 | "outputs": [ 2502 | { 2503 | "output_type": "stream", 2504 | "name": "stdout", 2505 | "text": [ 2506 | "Branch 'baichuan' set up to track remote branch 'baichuan' from 'origin'.\n", 2507 | "Switched to a new branch 'baichuan'\n", 2508 | "Already up to date.\n" 2509 | ] 2510 | } 2511 | ] 2512 | }, 2513 | { 2514 | "cell_type": "markdown", 2515 | "source": [ 2516 | "### 安装依赖" 2517 | ], 2518 | "metadata": { 2519 | "id": "QSxR1veJDrgD" 2520 | } 2521 | }, 2522 | { 2523 | "cell_type": "code", 2524 | "source": [ 2525 | "!pip install -r requirements.txt" 2526 | ], 2527 | "metadata": { 2528 | "colab": { 2529 | "base_uri": "https://localhost:8080/" 2530 | }, 2531 | "id": "57oy4wcf0lIY", 2532 | "outputId": "c74b7e6b-aade-4715-ebcf-56d4bdbd1b92" 2533 | }, 2534 | "execution_count": 4, 2535 | "outputs": [ 2536 | { 2537 | "output_type": "stream", 2538 | "name": "stdout", 2539 | "text": [ 2540 | "Requirement already satisfied: ninja in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 1)) (1.11.1)\n", 2541 | "Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 2)) (5.9.5)\n", 2542 | "Requirement already satisfied: ray in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 3)) (2.5.1)\n", 2543 | "Requirement already satisfied: sentencepiece in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 4)) (0.1.99)\n", 2544 | "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 5)) (1.22.4)\n", 2545 | "Requirement already satisfied: torch>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 6)) (2.0.1+cu118)\n", 2546 | "Requirement already satisfied: transformers>=4.28.0 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 7)) (4.28.1)\n", 2547 | "Requirement already satisfied: xformers>=0.0.19 in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 8)) (0.0.20)\n", 2548 | "Requirement already satisfied: fastapi in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 9)) (0.99.1)\n", 2549 | "Requirement already satisfied: uvicorn in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 10)) (0.22.0)\n", 2550 | "Requirement already satisfied: pydantic in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 11)) (1.10.9)\n", 2551 | "Requirement already satisfied: fschat in /usr/local/lib/python3.10/dist-packages (from -r requirements.txt (line 12)) (0.2.18)\n", 2552 | "Requirement already satisfied: attrs in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (23.1.0)\n", 2553 | "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (8.1.3)\n", 2554 | "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (3.12.2)\n", 2555 | "Requirement already satisfied: jsonschema in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (4.3.3)\n", 2556 | "Requirement already satisfied: msgpack<2.0.0,>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (1.0.5)\n", 2557 | "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (23.1)\n", 2558 | "Requirement already satisfied: protobuf!=3.19.5,>=3.15.3 in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (3.20.3)\n", 2559 | "Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (6.0)\n", 2560 | "Requirement already satisfied: aiosignal in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (1.3.1)\n", 2561 | "Requirement already satisfied: frozenlist in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (1.3.3)\n", 2562 | "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (2.27.1)\n", 2563 | "Requirement already satisfied: grpcio<=1.51.3,>=1.42.0 in /usr/local/lib/python3.10/dist-packages (from ray->-r requirements.txt (line 3)) (1.51.3)\n", 2564 | "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch>=2.0.0->-r requirements.txt (line 6)) (4.6.3)\n", 2565 | "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=2.0.0->-r requirements.txt (line 6)) (1.11.1)\n", 2566 | "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=2.0.0->-r requirements.txt (line 6)) (3.1)\n", 2567 | "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=2.0.0->-r requirements.txt (line 6)) (3.1.2)\n", 2568 | "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch>=2.0.0->-r requirements.txt (line 6)) (2.0.0)\n", 2569 | "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=2.0.0->-r requirements.txt (line 6)) (3.25.2)\n", 2570 | "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=2.0.0->-r requirements.txt (line 6)) (16.0.6)\n", 2571 | "Requirement already satisfied: huggingface-hub<1.0,>=0.11.0 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.28.0->-r requirements.txt (line 7)) (0.16.3)\n", 2572 | "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.28.0->-r requirements.txt (line 7)) (2022.10.31)\n", 2573 | "Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.28.0->-r requirements.txt (line 7)) (0.13.3)\n", 2574 | "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.28.0->-r requirements.txt (line 7)) (4.65.0)\n", 2575 | "Requirement already satisfied: pyre-extensions==0.0.29 in /usr/local/lib/python3.10/dist-packages (from xformers>=0.0.19->-r requirements.txt (line 8)) (0.0.29)\n", 2576 | "Requirement already satisfied: typing-inspect in /usr/local/lib/python3.10/dist-packages (from pyre-extensions==0.0.29->xformers>=0.0.19->-r requirements.txt (line 8)) (0.9.0)\n", 2577 | "Requirement already satisfied: starlette<0.28.0,>=0.27.0 in /usr/local/lib/python3.10/dist-packages (from fastapi->-r requirements.txt (line 9)) (0.27.0)\n", 2578 | "Requirement already satisfied: h11>=0.8 in /usr/local/lib/python3.10/dist-packages (from uvicorn->-r requirements.txt (line 10)) (0.14.0)\n", 2579 | "Requirement already satisfied: accelerate in /usr/local/lib/python3.10/dist-packages (from fschat->-r requirements.txt (line 12)) (0.20.3)\n", 2580 | "Requirement already satisfied: gradio==3.35.2 in /usr/local/lib/python3.10/dist-packages (from fschat->-r requirements.txt (line 12)) (3.35.2)\n", 2581 | "Requirement already satisfied: httpx in /usr/local/lib/python3.10/dist-packages (from fschat->-r requirements.txt (line 12)) (0.24.1)\n", 2582 | "Requirement already satisfied: markdown2[all] in /usr/local/lib/python3.10/dist-packages (from fschat->-r requirements.txt (line 12)) (2.4.9)\n", 2583 | "Requirement already satisfied: nh3 in /usr/local/lib/python3.10/dist-packages (from fschat->-r requirements.txt (line 12)) (0.2.14)\n", 2584 | "Requirement already satisfied: peft in /usr/local/lib/python3.10/dist-packages (from fschat->-r requirements.txt (line 12)) (0.3.0)\n", 2585 | "Requirement already satisfied: prompt-toolkit>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from fschat->-r requirements.txt (line 12)) (3.0.38)\n", 2586 | "Requirement already satisfied: rich>=10.0.0 in /usr/local/lib/python3.10/dist-packages (from fschat->-r requirements.txt (line 12)) (13.4.2)\n", 2587 | "Requirement already satisfied: shortuuid in /usr/local/lib/python3.10/dist-packages (from fschat->-r requirements.txt (line 12)) (1.0.11)\n", 2588 | "Requirement already satisfied: tiktoken in /usr/local/lib/python3.10/dist-packages (from fschat->-r requirements.txt (line 12)) (0.4.0)\n", 2589 | "Requirement already satisfied: wandb in /usr/local/lib/python3.10/dist-packages (from fschat->-r requirements.txt (line 12)) (0.15.5)\n", 2590 | "Requirement already satisfied: aiofiles in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (23.1.0)\n", 2591 | "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (3.8.4)\n", 2592 | "Requirement already satisfied: altair>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (4.2.2)\n", 2593 | "Requirement already satisfied: ffmpy in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (0.3.0)\n", 2594 | "Requirement already satisfied: gradio-client>=0.2.7 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (0.2.7)\n", 2595 | "Requirement already satisfied: markdown-it-py[linkify]>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (2.2.0)\n", 2596 | "Requirement already satisfied: markupsafe in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (2.1.3)\n", 2597 | "Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (3.7.1)\n", 2598 | "Requirement already satisfied: mdit-py-plugins<=0.3.3 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (0.3.3)\n", 2599 | "Requirement already satisfied: orjson in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (3.9.1)\n", 2600 | "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (1.5.3)\n", 2601 | "Requirement already satisfied: pillow in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (8.4.0)\n", 2602 | "Requirement already satisfied: pydub in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (0.25.1)\n", 2603 | "Requirement already satisfied: pygments>=2.12.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (2.14.0)\n", 2604 | "Requirement already satisfied: python-multipart in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (0.0.6)\n", 2605 | "Requirement already satisfied: semantic-version in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (2.10.0)\n", 2606 | "Requirement already satisfied: websockets>=10.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->-r requirements.txt (line 12)) (11.0.3)\n", 2607 | "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.11.0->transformers>=4.28.0->-r requirements.txt (line 7)) (2023.6.0)\n", 2608 | "Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prompt-toolkit>=3.0.0->fschat->-r requirements.txt (line 12)) (0.2.6)\n", 2609 | "Requirement already satisfied: anyio<5,>=3.4.0 in /usr/local/lib/python3.10/dist-packages (from starlette<0.28.0,>=0.27.0->fastapi->-r requirements.txt (line 9)) (3.7.0)\n", 2610 | "Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx->fschat->-r requirements.txt (line 12)) (2023.5.7)\n", 2611 | "Requirement already satisfied: httpcore<0.18.0,>=0.15.0 in /usr/local/lib/python3.10/dist-packages (from httpx->fschat->-r requirements.txt (line 12)) (0.17.3)\n", 2612 | "Requirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from httpx->fschat->-r requirements.txt (line 12)) (3.4)\n", 2613 | "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->fschat->-r requirements.txt (line 12)) (1.3.0)\n", 2614 | "Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from jsonschema->ray->-r requirements.txt (line 3)) (0.19.3)\n", 2615 | "Requirement already satisfied: wavedrom in /usr/local/lib/python3.10/dist-packages (from markdown2[all]->fschat->-r requirements.txt (line 12)) (2.0.3.post3)\n", 2616 | "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->ray->-r requirements.txt (line 3)) (1.26.16)\n", 2617 | "Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from requests->ray->-r requirements.txt (line 3)) (2.0.12)\n", 2618 | "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=2.0.0->-r requirements.txt (line 6)) (1.3.0)\n", 2619 | "Requirement already satisfied: GitPython!=3.1.29,>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->-r requirements.txt (line 12)) (3.1.31)\n", 2620 | "Requirement already satisfied: sentry-sdk>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->-r requirements.txt (line 12)) (1.27.1)\n", 2621 | "Requirement already satisfied: docker-pycreds>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->-r requirements.txt (line 12)) (0.4.0)\n", 2622 | "Requirement already satisfied: pathtools in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->-r requirements.txt (line 12)) (0.1.2)\n", 2623 | "Requirement already satisfied: setproctitle in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->-r requirements.txt (line 12)) (1.3.2)\n", 2624 | "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->-r requirements.txt (line 12)) (67.7.2)\n", 2625 | "Requirement already satisfied: appdirs>=1.4.3 in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->-r requirements.txt (line 12)) (1.4.4)\n", 2626 | "Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair>=4.2.0->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (0.4)\n", 2627 | "Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair>=4.2.0->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (0.12.0)\n", 2628 | "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5,>=3.4.0->starlette<0.28.0,>=0.27.0->fastapi->-r requirements.txt (line 9)) (1.1.1)\n", 2629 | "Requirement already satisfied: six>=1.4.0 in /usr/local/lib/python3.10/dist-packages (from docker-pycreds>=0.4.0->wandb->fschat->-r requirements.txt (line 12)) (1.16.0)\n", 2630 | "Requirement already satisfied: gitdb<5,>=4.0.1 in /usr/local/lib/python3.10/dist-packages (from GitPython!=3.1.29,>=1.0.0->wandb->fschat->-r requirements.txt (line 12)) (4.0.10)\n", 2631 | "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py[linkify]>=2.0.0->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (0.1.2)\n", 2632 | "Requirement already satisfied: linkify-it-py<3,>=1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py[linkify]>=2.0.0->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (2.0.2)\n", 2633 | "Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (2.8.2)\n", 2634 | "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (2022.7.1)\n", 2635 | "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (6.0.4)\n", 2636 | "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (4.0.2)\n", 2637 | "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (1.9.2)\n", 2638 | "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (1.1.0)\n", 2639 | "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (0.11.0)\n", 2640 | "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (4.40.0)\n", 2641 | "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (1.4.4)\n", 2642 | "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (3.1.0)\n", 2643 | "Requirement already satisfied: mypy-extensions>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from typing-inspect->pyre-extensions==0.0.29->xformers>=0.0.19->-r requirements.txt (line 8)) (1.0.0)\n", 2644 | "Requirement already satisfied: svgwrite in /usr/local/lib/python3.10/dist-packages (from wavedrom->markdown2[all]->fschat->-r requirements.txt (line 12)) (1.4.3)\n", 2645 | "Requirement already satisfied: smmap<6,>=3.0.1 in /usr/local/lib/python3.10/dist-packages (from gitdb<5,>=4.0.1->GitPython!=3.1.29,>=1.0.0->wandb->fschat->-r requirements.txt (line 12)) (5.0.0)\n", 2646 | "Requirement already satisfied: uc-micro-py in /usr/local/lib/python3.10/dist-packages (from linkify-it-py<3,>=1->markdown-it-py[linkify]>=2.0.0->gradio==3.35.2->fschat->-r requirements.txt (line 12)) (1.0.2)\n" 2647 | ] 2648 | } 2649 | ] 2650 | }, 2651 | { 2652 | "cell_type": "markdown", 2653 | "source": [ 2654 | "### 从源码安装 vllm" 2655 | ], 2656 | "metadata": { 2657 | "id": "wsfD3Hu4Dvt3" 2658 | } 2659 | }, 2660 | { 2661 | "cell_type": "code", 2662 | "source": [ 2663 | "!pip install -e ." 2664 | ], 2665 | "metadata": { 2666 | "colab": { 2667 | "base_uri": "https://localhost:8080/" 2668 | }, 2669 | "id": "o21yzsd90oaf", 2670 | "outputId": "a8afefb7-d52c-4220-bbfe-f6fbeb4bbf77" 2671 | }, 2672 | "execution_count": 5, 2673 | "outputs": [ 2674 | { 2675 | "output_type": "stream", 2676 | "name": "stdout", 2677 | "text": [ 2678 | "Obtaining file:///content/vllm\n", 2679 | " Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", 2680 | " Checking if build backend supports build_editable ... \u001b[?25l\u001b[?25hdone\n", 2681 | " Getting requirements to build editable ... \u001b[?25l\u001b[?25hdone\n", 2682 | " Preparing editable metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", 2683 | "Requirement already satisfied: ninja in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (1.11.1)\n", 2684 | "Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (5.9.5)\n", 2685 | "Requirement already satisfied: ray in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (2.5.1)\n", 2686 | "Requirement already satisfied: sentencepiece in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (0.1.99)\n", 2687 | "Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (1.22.4)\n", 2688 | "Requirement already satisfied: torch>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (2.0.1+cu118)\n", 2689 | "Requirement already satisfied: transformers>=4.28.0 in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (4.28.1)\n", 2690 | "Requirement already satisfied: xformers>=0.0.19 in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (0.0.20)\n", 2691 | "Requirement already satisfied: fastapi in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (0.99.1)\n", 2692 | "Requirement already satisfied: uvicorn in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (0.22.0)\n", 2693 | "Requirement already satisfied: pydantic in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (1.10.9)\n", 2694 | "Requirement already satisfied: fschat in /usr/local/lib/python3.10/dist-packages (from vllm==0.1.2) (0.2.18)\n", 2695 | "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch>=2.0.0->vllm==0.1.2) (3.12.2)\n", 2696 | "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch>=2.0.0->vllm==0.1.2) (4.6.3)\n", 2697 | "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=2.0.0->vllm==0.1.2) (1.11.1)\n", 2698 | "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=2.0.0->vllm==0.1.2) (3.1)\n", 2699 | "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=2.0.0->vllm==0.1.2) (3.1.2)\n", 2700 | "Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch>=2.0.0->vllm==0.1.2) (2.0.0)\n", 2701 | "Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=2.0.0->vllm==0.1.2) (3.25.2)\n", 2702 | "Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=2.0.0->vllm==0.1.2) (16.0.6)\n", 2703 | "Requirement already satisfied: huggingface-hub<1.0,>=0.11.0 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.28.0->vllm==0.1.2) (0.16.3)\n", 2704 | "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.28.0->vllm==0.1.2) (23.1)\n", 2705 | "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.28.0->vllm==0.1.2) (6.0)\n", 2706 | "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.28.0->vllm==0.1.2) (2022.10.31)\n", 2707 | "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers>=4.28.0->vllm==0.1.2) (2.27.1)\n", 2708 | "Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.28.0->vllm==0.1.2) (0.13.3)\n", 2709 | "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers>=4.28.0->vllm==0.1.2) (4.65.0)\n", 2710 | "Requirement already satisfied: pyre-extensions==0.0.29 in /usr/local/lib/python3.10/dist-packages (from xformers>=0.0.19->vllm==0.1.2) (0.0.29)\n", 2711 | "Requirement already satisfied: typing-inspect in /usr/local/lib/python3.10/dist-packages (from pyre-extensions==0.0.29->xformers>=0.0.19->vllm==0.1.2) (0.9.0)\n", 2712 | "Requirement already satisfied: starlette<0.28.0,>=0.27.0 in /usr/local/lib/python3.10/dist-packages (from fastapi->vllm==0.1.2) (0.27.0)\n", 2713 | "Requirement already satisfied: accelerate in /usr/local/lib/python3.10/dist-packages (from fschat->vllm==0.1.2) (0.20.3)\n", 2714 | "Requirement already satisfied: gradio==3.35.2 in /usr/local/lib/python3.10/dist-packages (from fschat->vllm==0.1.2) (3.35.2)\n", 2715 | "Requirement already satisfied: httpx in /usr/local/lib/python3.10/dist-packages (from fschat->vllm==0.1.2) (0.24.1)\n", 2716 | "Requirement already satisfied: markdown2[all] in /usr/local/lib/python3.10/dist-packages (from fschat->vllm==0.1.2) (2.4.9)\n", 2717 | "Requirement already satisfied: nh3 in /usr/local/lib/python3.10/dist-packages (from fschat->vllm==0.1.2) (0.2.14)\n", 2718 | "Requirement already satisfied: peft in /usr/local/lib/python3.10/dist-packages (from fschat->vllm==0.1.2) (0.3.0)\n", 2719 | "Requirement already satisfied: prompt-toolkit>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from fschat->vllm==0.1.2) (3.0.38)\n", 2720 | "Requirement already satisfied: rich>=10.0.0 in /usr/local/lib/python3.10/dist-packages (from fschat->vllm==0.1.2) (13.4.2)\n", 2721 | "Requirement already satisfied: shortuuid in /usr/local/lib/python3.10/dist-packages (from fschat->vllm==0.1.2) (1.0.11)\n", 2722 | "Requirement already satisfied: tiktoken in /usr/local/lib/python3.10/dist-packages (from fschat->vllm==0.1.2) (0.4.0)\n", 2723 | "Requirement already satisfied: wandb in /usr/local/lib/python3.10/dist-packages (from fschat->vllm==0.1.2) (0.15.5)\n", 2724 | "Requirement already satisfied: aiofiles in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (23.1.0)\n", 2725 | "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (3.8.4)\n", 2726 | "Requirement already satisfied: altair>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (4.2.2)\n", 2727 | "Requirement already satisfied: ffmpy in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (0.3.0)\n", 2728 | "Requirement already satisfied: gradio-client>=0.2.7 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (0.2.7)\n", 2729 | "Requirement already satisfied: markdown-it-py[linkify]>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (2.2.0)\n", 2730 | "Requirement already satisfied: markupsafe in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (2.1.3)\n", 2731 | "Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (3.7.1)\n", 2732 | "Requirement already satisfied: mdit-py-plugins<=0.3.3 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (0.3.3)\n", 2733 | "Requirement already satisfied: orjson in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (3.9.1)\n", 2734 | "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (1.5.3)\n", 2735 | "Requirement already satisfied: pillow in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (8.4.0)\n", 2736 | "Requirement already satisfied: pydub in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (0.25.1)\n", 2737 | "Requirement already satisfied: pygments>=2.12.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (2.14.0)\n", 2738 | "Requirement already satisfied: python-multipart in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (0.0.6)\n", 2739 | "Requirement already satisfied: semantic-version in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (2.10.0)\n", 2740 | "Requirement already satisfied: websockets>=10.0 in /usr/local/lib/python3.10/dist-packages (from gradio==3.35.2->fschat->vllm==0.1.2) (11.0.3)\n", 2741 | "Requirement already satisfied: click>=7.0 in /usr/local/lib/python3.10/dist-packages (from uvicorn->vllm==0.1.2) (8.1.3)\n", 2742 | "Requirement already satisfied: h11>=0.8 in /usr/local/lib/python3.10/dist-packages (from uvicorn->vllm==0.1.2) (0.14.0)\n", 2743 | "Requirement already satisfied: attrs in /usr/local/lib/python3.10/dist-packages (from ray->vllm==0.1.2) (23.1.0)\n", 2744 | "Requirement already satisfied: jsonschema in /usr/local/lib/python3.10/dist-packages (from ray->vllm==0.1.2) (4.3.3)\n", 2745 | "Requirement already satisfied: msgpack<2.0.0,>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from ray->vllm==0.1.2) (1.0.5)\n", 2746 | "Requirement already satisfied: protobuf!=3.19.5,>=3.15.3 in /usr/local/lib/python3.10/dist-packages (from ray->vllm==0.1.2) (3.20.3)\n", 2747 | "Requirement already satisfied: aiosignal in /usr/local/lib/python3.10/dist-packages (from ray->vllm==0.1.2) (1.3.1)\n", 2748 | "Requirement already satisfied: frozenlist in /usr/local/lib/python3.10/dist-packages (from ray->vllm==0.1.2) (1.3.3)\n", 2749 | "Requirement already satisfied: grpcio<=1.51.3,>=1.42.0 in /usr/local/lib/python3.10/dist-packages (from ray->vllm==0.1.2) (1.51.3)\n", 2750 | "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.11.0->transformers>=4.28.0->vllm==0.1.2) (2023.6.0)\n", 2751 | "Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prompt-toolkit>=3.0.0->fschat->vllm==0.1.2) (0.2.6)\n", 2752 | "Requirement already satisfied: anyio<5,>=3.4.0 in /usr/local/lib/python3.10/dist-packages (from starlette<0.28.0,>=0.27.0->fastapi->vllm==0.1.2) (3.7.0)\n", 2753 | "Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx->fschat->vllm==0.1.2) (2023.5.7)\n", 2754 | "Requirement already satisfied: httpcore<0.18.0,>=0.15.0 in /usr/local/lib/python3.10/dist-packages (from httpx->fschat->vllm==0.1.2) (0.17.3)\n", 2755 | "Requirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from httpx->fschat->vllm==0.1.2) (3.4)\n", 2756 | "Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx->fschat->vllm==0.1.2) (1.3.0)\n", 2757 | "Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /usr/local/lib/python3.10/dist-packages (from jsonschema->ray->vllm==0.1.2) (0.19.3)\n", 2758 | "Requirement already satisfied: wavedrom in /usr/local/lib/python3.10/dist-packages (from markdown2[all]->fschat->vllm==0.1.2) (2.0.3.post3)\n", 2759 | "Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers>=4.28.0->vllm==0.1.2) (1.26.16)\n", 2760 | "Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from requests->transformers>=4.28.0->vllm==0.1.2) (2.0.12)\n", 2761 | "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=2.0.0->vllm==0.1.2) (1.3.0)\n", 2762 | "Requirement already satisfied: GitPython!=3.1.29,>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->vllm==0.1.2) (3.1.31)\n", 2763 | "Requirement already satisfied: sentry-sdk>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->vllm==0.1.2) (1.27.1)\n", 2764 | "Requirement already satisfied: docker-pycreds>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->vllm==0.1.2) (0.4.0)\n", 2765 | "Requirement already satisfied: pathtools in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->vllm==0.1.2) (0.1.2)\n", 2766 | "Requirement already satisfied: setproctitle in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->vllm==0.1.2) (1.3.2)\n", 2767 | "Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->vllm==0.1.2) (67.7.2)\n", 2768 | "Requirement already satisfied: appdirs>=1.4.3 in /usr/local/lib/python3.10/dist-packages (from wandb->fschat->vllm==0.1.2) (1.4.4)\n", 2769 | "Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair>=4.2.0->gradio==3.35.2->fschat->vllm==0.1.2) (0.4)\n", 2770 | "Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair>=4.2.0->gradio==3.35.2->fschat->vllm==0.1.2) (0.12.0)\n", 2771 | "Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5,>=3.4.0->starlette<0.28.0,>=0.27.0->fastapi->vllm==0.1.2) (1.1.1)\n", 2772 | "Requirement already satisfied: six>=1.4.0 in /usr/local/lib/python3.10/dist-packages (from docker-pycreds>=0.4.0->wandb->fschat->vllm==0.1.2) (1.16.0)\n", 2773 | "Requirement already satisfied: gitdb<5,>=4.0.1 in /usr/local/lib/python3.10/dist-packages (from GitPython!=3.1.29,>=1.0.0->wandb->fschat->vllm==0.1.2) (4.0.10)\n", 2774 | "Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py[linkify]>=2.0.0->gradio==3.35.2->fschat->vllm==0.1.2) (0.1.2)\n", 2775 | "Requirement already satisfied: linkify-it-py<3,>=1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py[linkify]>=2.0.0->gradio==3.35.2->fschat->vllm==0.1.2) (2.0.2)\n", 2776 | "Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->gradio==3.35.2->fschat->vllm==0.1.2) (2.8.2)\n", 2777 | "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->gradio==3.35.2->fschat->vllm==0.1.2) (2022.7.1)\n", 2778 | "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.35.2->fschat->vllm==0.1.2) (6.0.4)\n", 2779 | "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.35.2->fschat->vllm==0.1.2) (4.0.2)\n", 2780 | "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->gradio==3.35.2->fschat->vllm==0.1.2) (1.9.2)\n", 2781 | "Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.35.2->fschat->vllm==0.1.2) (1.1.0)\n", 2782 | "Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.35.2->fschat->vllm==0.1.2) (0.11.0)\n", 2783 | "Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.35.2->fschat->vllm==0.1.2) (4.40.0)\n", 2784 | "Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.35.2->fschat->vllm==0.1.2) (1.4.4)\n", 2785 | "Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib->gradio==3.35.2->fschat->vllm==0.1.2) (3.1.0)\n", 2786 | "Requirement already satisfied: mypy-extensions>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from typing-inspect->pyre-extensions==0.0.29->xformers>=0.0.19->vllm==0.1.2) (1.0.0)\n", 2787 | "Requirement already satisfied: svgwrite in /usr/local/lib/python3.10/dist-packages (from wavedrom->markdown2[all]->fschat->vllm==0.1.2) (1.4.3)\n", 2788 | "Requirement already satisfied: smmap<6,>=3.0.1 in /usr/local/lib/python3.10/dist-packages (from gitdb<5,>=4.0.1->GitPython!=3.1.29,>=1.0.0->wandb->fschat->vllm==0.1.2) (5.0.0)\n", 2789 | "Requirement already satisfied: uc-micro-py in /usr/local/lib/python3.10/dist-packages (from linkify-it-py<3,>=1->markdown-it-py[linkify]>=2.0.0->gradio==3.35.2->fschat->vllm==0.1.2) (1.0.2)\n", 2790 | "Building wheels for collected packages: vllm\n", 2791 | " Building editable for vllm (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", 2792 | " Created wheel for vllm: filename=vllm-0.1.2-0.editable-cp310-cp310-linux_x86_64.whl size=8342 sha256=31dfb83e037dc56e54192400f0fae5971cb1cf5101462d4c7d702b3f234766fb\n", 2793 | " Stored in directory: /tmp/pip-ephem-wheel-cache-cfrusn8s/wheels/35/28/89/44ebc8017c7395bab306eb7218f34e5d09408126dd82c20f16\n", 2794 | "Successfully built vllm\n", 2795 | "Installing collected packages: vllm\n", 2796 | " Attempting uninstall: vllm\n", 2797 | " Found existing installation: vllm 0.1.2\n", 2798 | " Uninstalling vllm-0.1.2:\n", 2799 | " Successfully uninstalled vllm-0.1.2\n", 2800 | "Successfully installed vllm-0.1.2\n" 2801 | ] 2802 | } 2803 | ] 2804 | }, 2805 | { 2806 | "cell_type": "markdown", 2807 | "source": [ 2808 | "### 验证语言模型功能正常" 2809 | ], 2810 | "metadata": { 2811 | "id": "6bhid21TEN2-" 2812 | } 2813 | }, 2814 | { 2815 | "cell_type": "code", 2816 | "source": [ 2817 | "from vllm import LLM, SamplingParams\n", 2818 | "llm = LLM(model=\"baichuan-inc/baichuan-7B\")" 2819 | ], 2820 | "metadata": { 2821 | "colab": { 2822 | "base_uri": "https://localhost:8080/", 2823 | "height": 348, 2824 | "referenced_widgets": [ 2825 | "3e5621d5141b4302b5d030a703add6ef", 2826 | "78cb98c0cb394b999cd4ccabb4a9ade9", 2827 | "5f3fd0707ff342528507d2b4029ca5a8", 2828 | "57f24e8a31a04cbe9dbd3e90b8277f97", 2829 | "ab6e411ddc574058a8aacb0e26bd8ea4", 2830 | "d2a820cafddd4212b9ef8e63f6ec0f59", 2831 | "cebed09ed6ba4945a2a20dd3c997ccb1", 2832 | "2d70aa77a5a64251b4c587eef3c8d0d1", 2833 | "4e62f6b0c0e340e5a4fb0dd75a8fe73a", 2834 | "6db60b2c8cec49588607a2798b1e1276", 2835 | "e0dcdd9851a4483aaf450ab548f397f9", 2836 | "400fafafa77b4ed3b0a22391294ee1ba", 2837 | "d9e37f09b0e6444ab8b07657bd0cbf13", 2838 | "8b3ff13f77fa462db1e848fbcbf79dc2", 2839 | "a47af1e2ece04a3d9823107ad9451891", 2840 | "39a0cb7695314f60897b8d28960dc522", 2841 | "5247d30ac4e64e95822a5975ca731516", 2842 | "136e073f15794f8aa4f7c2d0409cce13", 2843 | "016604de0ecc4fc4ba90b1b2a8aaf90b", 2844 | "f1c8c6ae66304aa9b4511e03d12ac695", 2845 | "7b0d2b67b7794dcaa1892753d27b7e0f", 2846 | "c5d8506f2857446bbca5a01249c15524", 2847 | "6d2980f665324419a6f85b9d8ba7a91b", 2848 | "6cb6153c384d47539dd5f0a339c826f5", 2849 | "e538419d96ac46399fa36afb56a579fb", 2850 | "f5dc1b47a04349b8b05efd40e84aac31", 2851 | "2faad7ebd9584afaa73581d66e5dcb15", 2852 | "3cf908670a6343c18067eb862e89f41b", 2853 | "0d9209294fc94521b80456ae7a7bb5f2", 2854 | "e15a935044714473b45bd5d44a605066", 2855 | "bfb064fec7a54facac9c619492f935c9", 2856 | "d35b6a9a0eff44d4a409f33c2f9c14ad", 2857 | "31bd94bbdb07449b9e5ce927078d2dda", 2858 | "7f8d78a4185041198792f2d8e8b6a467", 2859 | "97fbadd14b69420888dcacba4846c577", 2860 | "6b03b8cc12434887aab0a549e2b4ead0", 2861 | "3109652be7444381a3e37d6fb4ac28b3", 2862 | "6ca3b513dfc94fb9b5e04e3a060787f8", 2863 | "169b5ddfd462450d88864672bedc75b8", 2864 | "90412a372c4248fdba01ce1caa47ba4b", 2865 | "05df3ee9380646baa0ededb99e8c9135", 2866 | "d0c2b331b84e486eba8b134d8b162441", 2867 | "6bb0ef4c1bbb4cf9b53d2e63eec5c611", 2868 | "68804ac3966d4d43abf917026224fb0b", 2869 | "504273f6c2db4c1ca94b4a31931846ca", 2870 | "be53a798cc4246ab93a2456b0ecc40c8", 2871 | "755602432a474433ad5c6692e7e3e6f5", 2872 | "d2866ab2321042d281d55b47f079fd52", 2873 | "78ab21f9788944fba36ab24f1eb428b7", 2874 | "2ac5a224f58d425594c9656f9feff151", 2875 | "46410e1229e840eb92cedb4457ef32f8", 2876 | "46a6e27ba4bf402784b9322e845360e0", 2877 | "4f9d8308bc794972b888a2fa543d5e37", 2878 | "79adc9ec7f90446bbb9b751467088b9e", 2879 | "6593fcbbd183447baf29ae49138abcb1", 2880 | "3cb36e30b9914e41aa1d62166f3b6008", 2881 | "d85ead165f2649f183fe6528143f8e17", 2882 | "5fec92aca12e433ca4c784c7feeb4b83", 2883 | "ee55caef7b604ae9bd61e842f798e379", 2884 | "6cbf0e55e0ab4af1b47aed43c602b20b", 2885 | "4f2bb9e32595412fba837430ba9d7dcf", 2886 | "321012c035af46edb81c52326d3c5554", 2887 | "5c8211ad53924a9881fd005a2d1c9349", 2888 | "7a289ba9d172406b9ff70bfbc1a7830e", 2889 | "4af226e419ee4e54833e82523738e58f", 2890 | "6ae245c91d304235848c80d10856475e", 2891 | "791e60753ad34d948480c7cfc8a6cf10", 2892 | "f705d343034540b49de22404dff26a56", 2893 | "61773de94f444b5e864ac7301f21bda6", 2894 | "d8ab6aea18d24e3d8ee5f76d4b6c3327", 2895 | "6952cef103c54cc8b3595b918b899735", 2896 | "d91c3502166f4e55923786378622b101", 2897 | "2587458051e14c59942174126d75f32f", 2898 | "98f1be1443dd4a22977da5230d76c0c5", 2899 | "12dcb85173e140469eed573777d63ba9", 2900 | "af654d70230640ee995505fab1f850d0", 2901 | "7999d5d5a32c4a74824128070621ded6" 2902 | ] 2903 | }, 2904 | "id": "aIVjvykwPGYj", 2905 | "outputId": "72eec5ce-6cf4-4b65-8fc8-ef3123028592" 2906 | }, 2907 | "execution_count": 6, 2908 | "outputs": [ 2909 | { 2910 | "output_type": "display_data", 2911 | "data": { 2912 | "text/plain": [ 2913 | "Downloading (…)lve/main/config.json: 0%| | 0.00/656 [00:00] 641.67M 272MB/s in 2.4s \n", 3150 | "\n", 3151 | "2023-07-07 12:19:38 (272 MB/s) - ‘ShareGPT_V3_unfiltered_cleaned_split.json’ saved [672837942/672837942]\n", 3152 | "\n" 3153 | ] 3154 | } 3155 | ] 3156 | }, 3157 | { 3158 | "cell_type": "markdown", 3159 | "source": [ 3160 | "### 测试 vllm 吞吐。因为模型较大,上面一步的显存如果没有释放,可能需要重启 kernel,并且跳过上面调用 python api 的测试,直接执行运行以下的 cells" 3161 | ], 3162 | "metadata": { 3163 | "id": "sfu1WgMfE6I4" 3164 | } 3165 | }, 3166 | { 3167 | "cell_type": "code", 3168 | "source": [ 3169 | "!python3 benchmarks/benchmark_throughput.py --model \"baichuan-inc/baichuan-7B\" --dataset ./ShareGPT_V3_unfiltered_cleaned_split.json" 3170 | ], 3171 | "metadata": { 3172 | "colab": { 3173 | "base_uri": "https://localhost:8080/" 3174 | }, 3175 | "id": "nrJkdV1zFGro", 3176 | "outputId": "b2f8836e-d506-491b-f18a-445709569f92" 3177 | }, 3178 | "execution_count": 7, 3179 | "outputs": [ 3180 | { 3181 | "output_type": "stream", 3182 | "name": "stdout", 3183 | "text": [ 3184 | "Namespace(backend='vllm', dataset='./ShareGPT_V3_unfiltered_cleaned_split.json', model='baichuan-inc/baichuan-7B', tokenizer='baichuan-inc/baichuan-7B', tensor_parallel_size=1, n=1, use_beam_search=False, num_prompts=1000, seed=0, hf_max_batch_size=None)\n", 3185 | "Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.\n", 3186 | "WARNING 07-07 12:19:42 tokenizer.py:46] Using a slow tokenizer. This might cause a significant slowdown. Consider using a fast tokenizer instead.\n", 3187 | "Explicitly passing a `revision` is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.\n", 3188 | "INFO 07-07 12:25:42 llm_engine.py:60] Initializing an LLM engine with config: model='baichuan-inc/baichuan-7B', tokenizer='baichuan-inc/baichuan-7B', tokenizer_mode=auto, dtype=torch.float16, use_dummy_weights=False, download_dir=None, use_np_weights=False, tensor_parallel_size=1, seed=0)\n", 3189 | "Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.\n", 3190 | "WARNING 07-07 12:25:43 tokenizer.py:46] Using a slow tokenizer. This might cause a significant slowdown. Consider using a fast tokenizer instead.\n", 3191 | "INFO 07-07 12:28:45 llm_engine.py:131] # GPU blocks: 2743, # CPU blocks: 512\n", 3192 | "Processed prompts: 100% 1000/1000 [12:02<00:00, 1.38it/s]\n", 3193 | "Throughput: 1.38 requests/s, 693.05 tokens/s\n" 3194 | ] 3195 | } 3196 | ] 3197 | }, 3198 | { 3199 | "cell_type": "markdown", 3200 | "source": [ 3201 | "### 测试 huggingface 吞吐" 3202 | ], 3203 | "metadata": { 3204 | "id": "amog6z0kFaau" 3205 | } 3206 | }, 3207 | { 3208 | "cell_type": "code", 3209 | "source": [ 3210 | "!python3 benchmarks/benchmark_throughput.py --num-prompts 100 --model \"baichuan-inc/baichuan-7B\" --dataset ./ShareGPT_V3_unfiltered_cleaned_split.json --backend hf --hf-max-batch-size 4" 3211 | ], 3212 | "metadata": { 3213 | "colab": { 3214 | "base_uri": "https://localhost:8080/" 3215 | }, 3216 | "id": "y70i2HwRFijZ", 3217 | "outputId": "96422e17-649b-4ef5-e30f-62ef859ca22d" 3218 | }, 3219 | "execution_count": 11, 3220 | "outputs": [ 3221 | { 3222 | "output_type": "stream", 3223 | "name": "stdout", 3224 | "text": [ 3225 | "Namespace(backend='hf', dataset='./ShareGPT_V3_unfiltered_cleaned_split.json', model='baichuan-inc/baichuan-7B', tokenizer='baichuan-inc/baichuan-7B', tensor_parallel_size=1, n=1, use_beam_search=False, num_prompts=100, seed=0, hf_max_batch_size=4)\n", 3226 | "Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.\n", 3227 | "WARNING 07-07 13:13:34 tokenizer.py:46] Using a slow tokenizer. This might cause a significant slowdown. Consider using a fast tokenizer instead.\n", 3228 | "Explicitly passing a `revision` is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.\n", 3229 | "Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.\n", 3230 | "2023-07-07 13:19:35.162808: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n", 3231 | "100% 100/100 [09:15<00:00, 5.55s/it]\n", 3232 | "Throughput: 0.18 requests/s, 86.87 tokens/s\n" 3233 | ] 3234 | } 3235 | ] 3236 | }, 3237 | { 3238 | "cell_type": "code", 3239 | "source": [ 3240 | "from transformers import AutoConfig\n", 3241 | "config = AutoConfig.from_pretrained(\"baichuan-inc/baichuan-7B\", trust_remote_code=True)\n", 3242 | "print(config.model_type)" 3243 | ], 3244 | "metadata": { 3245 | "colab": { 3246 | "base_uri": "https://localhost:8080/" 3247 | }, 3248 | "id": "G8p-M73qZvR6", 3249 | "outputId": "30bbf098-38b3-4b6b-c8fe-5a6478211c2c" 3250 | }, 3251 | "execution_count": 12, 3252 | "outputs": [ 3253 | { 3254 | "output_type": "stream", 3255 | "name": "stderr", 3256 | "text": [ 3257 | "Explicitly passing a `revision` is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.\n" 3258 | ] 3259 | }, 3260 | { 3261 | "output_type": "stream", 3262 | "name": "stdout", 3263 | "text": [ 3264 | "baichuan\n" 3265 | ] 3266 | } 3267 | ] 3268 | }, 3269 | { 3270 | "cell_type": "code", 3271 | "source": [], 3272 | "metadata": { 3273 | "id": "RFDjNVC6jW-r" 3274 | }, 3275 | "execution_count": null, 3276 | "outputs": [] 3277 | } 3278 | ] 3279 | } --------------------------------------------------------------------------------