Skip to content

Commit

Permalink
Add ColQwen2 notebook example
Browse files Browse the repository at this point in the history
  • Loading branch information
Jo Kristian Bergum committed Oct 1, 2024
1 parent 22be413 commit 0d17124
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
"\n",
"For a simpler example where we use one vespa document = One PDF page, see [simplified-retrieval-with-colpali](https://pyvespa.readthedocs.io/en/latest/examples/simplified-retrieval-with-colpali-vlm_Vespa-cloud.html).\n",
"\n",
"Consider following the [ColQWen2](https://pyvespa.readthedocs.io/en/latest/examples/pdf-retrieval-with-ColQwen2-vlm_Vespa-cloud.html) notebook instead as it\n",
"use a better model with improved performance (Both accuracy and speed).\n",
"\n",
"We also store the base64 encoded image, and page meta data like title and url so that we can display it in the result page, but also\n",
"use it for RAG with powerful LLMs with vision capabilities. \n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,32 +796,17 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Setting application...\n",
"Running: vespa config set application samples.visionrag5\n",
"Setting target cloud...\n",
"Running: vespa config set target cloud\n",
"\n",
"No api-key found for control plane access. Using access token.\n",
"Checking for access token in auth.json...\n",
"Successfully obtained access token for control plane access.\n"
]
}
],
"outputs": [],
"source": [
"from vespa.deployment import VespaCloud\n",
"import os\n",
"\n",
"os.environ['TOKENIZERS_PARALLELISM'] = \"false\"\n",
"\n",
"# Replace with your tenant name from the Vespa Cloud Console\n",
"tenant_name = \"samples\" \n",
"tenant_name = \"vespa-team\" \n",
"\n",
"key = os.getenv(\"VESPA_TEAM_API_KEY\", None)\n",
"if key is not None:\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"This notebook demonstrates how to represent [ColPali](https://huggingface.co/vidore/colpali) in Vespa\n",
"and to scale to large collections. Also see the blog post: [Scaling ColPali to billions of PDFs with Vespa](https://blog.vespa.ai/scaling-colpali-to-billions/)\n",
"\n",
"Consider following the [ColQWen2](https://pyvespa.readthedocs.io/en/latest/examples/pdf-retrieval-with-ColQwen2-vlm_Vespa-cloud.html) notebook instead as it\n",
"use a better model with improved performance (Both accuracy and speed).\n",
"\n",
"ColPali is a powerful visual language model that can generate embeddings for images (screenshots of PDF pages) and text queries.\n",
"\n",
"In this notebook, we will use ColPali to generate embeddings for images of PDF _pages_ and store the embeddings in Vespa. \n",
Expand Down Expand Up @@ -1276,7 +1279,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.11.10"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down

0 comments on commit 0d17124

Please sign in to comment.