Skip to content

Commit 6ada72e

Browse files
authored
Merge pull request #180 from LLaVA-VL/patch-add_doc
Update LLaVA OneVision model to lmms-lab/llava-onevision-qwen2-7b-ov
2 parents e988491 + d2c86b4 commit 6ada72e

File tree

1 file changed

+54
-4
lines changed

1 file changed

+54
-4
lines changed

docs/LLaVA_OneVision_Tutorials.ipynb

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,59 @@
233233
},
234234
{
235235
"cell_type": "code",
236-
"execution_count": null,
236+
"execution_count": 1,
237237
"metadata": {},
238-
"outputs": [],
238+
"outputs": [
239+
{
240+
"name": "stderr",
241+
"output_type": "stream",
242+
"text": [
243+
"/home/tiger/miniconda3/envs/public_llava/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
244+
" from .autonotebook import tqdm as notebook_tqdm\n",
245+
"/home/tiger/miniconda3/envs/public_llava/lib/python3.10/site-packages/huggingface_hub/file_download.py:1150: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.\n",
246+
" warnings.warn(\n",
247+
"Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"
248+
]
249+
},
250+
{
251+
"name": "stdout",
252+
"output_type": "stream",
253+
"text": [
254+
"Loaded LLaVA model: lmms-lab/llava-onevision-qwen2-7b-ov\n"
255+
]
256+
},
257+
{
258+
"name": "stderr",
259+
"output_type": "stream",
260+
"text": [
261+
"Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n",
262+
"You are using a model of type llava to instantiate a model of type llava_qwen. This is not supported for all configurations of models and can yield errors.\n"
263+
]
264+
},
265+
{
266+
"name": "stdout",
267+
"output_type": "stream",
268+
"text": [
269+
"Loading vision tower: google/siglip-so400m-patch14-384\n"
270+
]
271+
},
272+
{
273+
"name": "stderr",
274+
"output_type": "stream",
275+
"text": [
276+
"Loading checkpoint shards: 100%|██████████| 4/4 [00:08<00:00, 2.07s/it]\n"
277+
]
278+
},
279+
{
280+
"name": "stdout",
281+
"output_type": "stream",
282+
"text": [
283+
"Model Class: LlavaQwenForCausalLM\n",
284+
"(16, 1024, 576, 3)\n",
285+
"The video features a person standing on a stage, dressed in a black shirt and dark pants. A large hand appears from the background, reaching towards the person's pocket. The text 'Source: Joshua AG' is displayed at the top left corner of the frames, and 'EVAN CARMICHAEL' is shown in the top right corner. The text 'Anyone know what this pocket is for?' appears as the hand continues to reach into the pocket. The person then looks down at their pocket, and the text 'I've always wondered that' appears. The hand finally pulls out a small white device labeled 'iPod Nano'. The person holds up the iPod Nano, and the text 'is the new iPod Nano' appears. The video concludes with a close-up of the person holding the iPod Nano, showing it from different angles.\n"
286+
]
287+
}
288+
],
239289
"source": [
240290
"from operator import attrgetter\n",
241291
"from llava.model.builder import load_pretrained_model\n",
@@ -254,7 +304,7 @@
254304
"\n",
255305
"warnings.filterwarnings(\"ignore\")\n",
256306
"# Load the OneVision model\n",
257-
"pretrained = \"lmms-lab/llava-onevision-qwen2-0.5b-ov\"\n",
307+
"pretrained = \"lmms-lab/llava-onevision-qwen2-7b-ov\"\n",
258308
"model_name = \"llava_qwen\"\n",
259309
"device = \"cuda\"\n",
260310
"device_map = \"auto\"\n",
@@ -327,7 +377,7 @@
327377
"name": "python",
328378
"nbconvert_exporter": "python",
329379
"pygments_lexer": "ipython3",
330-
"version": "3.9.2"
380+
"version": "3.10.14"
331381
},
332382
"vscode": {
333383
"interpreter": {

0 commit comments

Comments
 (0)