diff --git a/Hugging Face/Hugging_Face_Few_Shot_Learning_with_Inference_API.ipynb b/Hugging Face/Hugging_Face_Few_Shot_Learning_with_Inference_API.ipynb index aa725e0723..1348c34f53 100644 --- a/Hugging Face/Hugging_Face_Few_Shot_Learning_with_Inference_API.ipynb +++ b/Hugging Face/Hugging_Face_Few_Shot_Learning_with_Inference_API.ipynb @@ -70,7 +70,7 @@ ] }, "source": [ - "**Description:** This notebook demonstrates how to utilize the inference endpoints of hugging face models. Additionally, it demonstrates how to use few shot learning for a specific task in a model." + "**Description:** This notebook demonstrates how to utilize the inference endpoints (additional information can be found here: link) of hugging face models. Additionally, it demonstrates how to use few shot learning for a specific task in a model." ] }, { @@ -183,6 +183,14 @@ "source": [ "### Add the Model and API token\n", "\n", + "#### Steps to get API token\n", + "- Create an account on Hugging Face\n", + "- Log in, and click on profile icon (top right corner)\n", + "- Go to settings\n", + "- Click on Access tokens\n", + "- Now, create a new access token with name: \"gpt-inference\" and role: \"read\"\n", + "- Copy the generated token and paste it below\n", + "\n", "We will use gpt-neo-1.3B model for our demonstration. " ] }, @@ -291,7 +299,7 @@ "id": "f0724801-389c-4184-b3a1-a3491573e24e", "metadata": {}, "source": [ - " The model usually takes time to load in the hugging face server. For example, model gpt-neo-1.3B takes approximately 212 seconds" + ">The model usually takes time to load in the hugging face server. For example, model gpt-neo-1.3B takes approximately 212 seconds" ] }, { @@ -302,7 +310,9 @@ "tags": [] }, "source": [ - "### Zero-shot" + "### Zero-shot\n", + "\n", + "Zero-shot learning means to generate meaningful responses from model for tasks or topics it has never been explicitly trained on, showcasing a capacity to generalize and understand novel concepts without specific examples during training." ] }, { @@ -357,7 +367,9 @@ "tags": [] }, "source": [ - "### One-shot" + "### One-shot\n", + "\n", + "One-shot learning refers to the model's ability to understand and generate meaningful responses after being exposed to a single example or prompt during the inference phase, showcasing its capacity to generalize knowledge from limited input." ] }, { @@ -412,7 +424,9 @@ "id": "96831b89-e92f-4ddb-8703-0124c26c8613", "metadata": {}, "source": [ - "### Two-shot" + "### Two-shot\n", + "\n", + "Similar to one-shot, we will have the model exposed to two examples to generalize knowledge and make predictions." ] }, {