Skip to content

Commit

Permalink
Merge pull request #82 from rhymes-ai/vllm
Browse files Browse the repository at this point in the history
fix: use offical vllm
  • Loading branch information
xffxff authored Nov 27, 2024
2 parents 3233085 + 108b2af commit 7cbf499
Show file tree
Hide file tree
Showing 4 changed files with 242 additions and 270 deletions.
16 changes: 3 additions & 13 deletions inference/notebooks/01_single_image_understanding_vllm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,8 @@
"from PIL import Image\n",
"\n",
"from transformers import AutoTokenizer\n",
"from vllm import LLM, ModelRegistry, SamplingParams\n",
"from vllm.model_executor.models import _MULTIMODAL_MODELS\n",
"from vllm import LLM, SamplingParams\n",
"\n",
"from aria.vllm.aria import AriaForConditionalGeneration\n",
"\n",
"ModelRegistry.register_model(\n",
" \"AriaForConditionalGeneration\", AriaForConditionalGeneration\n",
")\n",
"_MULTIMODAL_MODELS[\"AriaForConditionalGeneration\"] = (\n",
" \"aria\",\n",
" \"AriaForConditionalGeneration\",\n",
")\n",
"\n",
"model_id_or_path = \"rhymes-ai/Aria\"\n",
"\n",
Expand Down Expand Up @@ -574,9 +564,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "aria",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "aria"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand Down
16 changes: 3 additions & 13 deletions inference/notebooks/02_multi_image_understanding_vllm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -109,18 +109,8 @@
"from PIL import Image\n",
"\n",
"from transformers import AutoTokenizer\n",
"from vllm import LLM, ModelRegistry, SamplingParams\n",
"from vllm.model_executor.models import _MULTIMODAL_MODELS\n",
"from vllm import LLM, SamplingParams\n",
"\n",
"from aria.vllm.aria import AriaForConditionalGeneration\n",
"\n",
"ModelRegistry.register_model(\n",
" \"AriaForConditionalGeneration\", AriaForConditionalGeneration\n",
")\n",
"_MULTIMODAL_MODELS[\"AriaForConditionalGeneration\"] = (\n",
" \"aria\",\n",
" \"AriaForConditionalGeneration\",\n",
")\n",
"\n",
"model_id_or_path = \"rhymes-ai/Aria\"\n",
"\n",
Expand Down Expand Up @@ -847,9 +837,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "aria",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "aria"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand Down
16 changes: 3 additions & 13 deletions inference/notebooks/03_multipage_pdf_understanding_vllm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,8 @@
"from PIL import Image\n",
"\n",
"from transformers import AutoTokenizer\n",
"from vllm import LLM, ModelRegistry, SamplingParams\n",
"from vllm.model_executor.models import _MULTIMODAL_MODELS\n",
"from vllm import LLM, SamplingParams\n",
"\n",
"from aria.vllm.aria import AriaForConditionalGeneration\n",
"\n",
"ModelRegistry.register_model(\n",
" \"AriaForConditionalGeneration\", AriaForConditionalGeneration\n",
")\n",
"_MULTIMODAL_MODELS[\"AriaForConditionalGeneration\"] = (\n",
" \"aria\",\n",
" \"AriaForConditionalGeneration\",\n",
")\n",
"\n",
"model_id_or_path = \"rhymes-ai/Aria\"\n",
"\n",
Expand Down Expand Up @@ -714,9 +704,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "aria",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "aria"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand Down
464 changes: 233 additions & 231 deletions inference/notebooks/04_video_understanding_vllm.ipynb

Large diffs are not rendered by default.

0 comments on commit 7cbf499

Please sign in to comment.