From 551450d92ab4009ba140fc2a6deb59f724a54e7d Mon Sep 17 00:00:00 2001 From: Bijay Regmi Date: Wed, 20 Nov 2024 00:16:20 +0100 Subject: [PATCH] adjust var name to not override builtin --- ...cument-retrieval-vision-language-models-cloud.ipynb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sphinx/source/examples/colpali-document-retrieval-vision-language-models-cloud.ipynb b/docs/sphinx/source/examples/colpali-document-retrieval-vision-language-models-cloud.ipynb index 124450c1..86a00aa3 100644 --- a/docs/sphinx/source/examples/colpali-document-retrieval-vision-language-models-cloud.ipynb +++ b/docs/sphinx/source/examples/colpali-document-retrieval-vision-language-models-cloud.ipynb @@ -142,19 +142,19 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "if torch.cuda.is_available():\n", " device = torch.device(\"cuda\")\n", - " type = torch.bfloat16\n", + " dtype = torch.bfloat16\n", "elif torch.backends.mps.is_available():\n", " device = torch.device(\"mps\")\n", - " type = torch.float32\n", + " dtype = torch.float32\n", "else:\n", " device = torch.device(\"cpu\")\n", - " type = torch.float32" + " dtype = torch.float32" ] }, { @@ -339,7 +339,7 @@ "source": [ "model_name = \"vidore/colpali-v1.2\"\n", "model = ColPali.from_pretrained(\n", - " \"vidore/colpaligemma-3b-pt-448-base\", torch_dtype=type\n", + " \"vidore/colpaligemma-3b-pt-448-base\", torch_dtype=dtype\n", ").eval()\n", "model.load_adapter(model_name)\n", "model = model.eval()\n",