Skip to content

Commit

Permalink
Fix notebook (currently broken) (#362)
Browse files Browse the repository at this point in the history
* Fix notebook (currently broken)

* Fix formatting
  • Loading branch information
viswavi authored Sep 23, 2023
1 parent dcc04e9 commit f32e45f
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions prompt2model_demo.ipynb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -21,6 +22,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -39,6 +41,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -65,6 +68,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -82,6 +86,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -100,6 +105,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -137,6 +143,7 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -161,17 +168,15 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Retrieve Model\n",
"\n",
"First, we retrieve a base model that we will train. We can use the `DescriptionModelRetr
iever` to do so. We can set `model_size_limit_bytes` to set the maximum size of a model (in by
tes) to retrieve. In this block we use a maximum model size of 3GB by default.\n",
"First, we retrieve a base model that we will train. We can use the `DescriptionModelRetriever` to do so. We can set `model_size_limit_bytes` to set the maximum size of a model (in bytes) to retrieve. In this block we use a maximum model size of 3GB by default.\n",
"\n",
"This class returns a list of pretrained Hugging Face models. You can choose the first on
e by default."
"This class returns a list of pretrained Hugging Face models. You can choose the first one by default."
]
},
{
Expand All @@ -186,14 +191,14 @@ e by default."
" model_descriptions_index_path=\"huggingface_data/huggingface_models/model_info/\",\n",
" use_bm25=True,\n",
" use_HyDE=True,\n",
" model_size_limit_bytes=3e9,\n",
")\n",
"top_model_names = retriever.retrieve(prompt_spec)\n",
"pre_train_model_name = top_model_names[0]\n",
"print(pre_train_model_name)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -216,6 +221,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -240,6 +246,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -259,6 +266,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -280,6 +288,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -297,6 +306,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -331,6 +341,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -349,6 +360,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -368,6 +380,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -400,6 +413,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -430,6 +444,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -476,6 +491,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand All @@ -502,6 +518,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -541,6 +558,7 @@ e by default."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down

0 comments on commit f32e45f

Please sign in to comment.