Skip to content

Commit

Permalink
[no ci] minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
amaiya committed Apr 2, 2023
1 parent 67c9726 commit 6b033df
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/text/generative_ai_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
"\n",
"*ktrain* supports a Generative AI module that is currently based on an instruction-fine-tuned version of GPT-J trained on NLP Cloud. Think of it as a lightweight version of ChatGPT that can be run locally on your own machine. As a smaller model, it will not perform as well as GPT-4, ChatGPT, etc. However, since it does not communicate with external APIs like OpenAI, it can be used with non-public data.\n",
"\n",
"The model requires a GPU with at least 16GB of GPU memory or VRAM. If you have less than this (or no GPU at all), you can use a CPU (provided you have enough RAM), but output will be generated more slowly (depending on the number of CPU cores). We will use a CPU in this example, but you should either omit the `device` parameter or explicitly supply `device=cuda` if you have a GPU with at least 16GB of GPU memory."
"The model requires a GPU with at least 16GB of GPU memory or VRAM. If you have less than this (or no GPU at all), you can use a CPU (provided you have enough RAM) by supplying `device=\"cpu\"` as an argument:\n",
"```python\n",
"model = GenerativeAI(device='cpu')\n",
"```\n",
"In this notebook, we omit the `device` argument, in which case a GPU will be used if available (and a CPU will be used if not)."
]
},
{
Expand All @@ -28,7 +32,7 @@
"outputs": [],
"source": [
"from ktrain.text.generative_ai import GenerativeAI\n",
"model = GenerativeAI(device='cpu') # omit device argument or use device='cuda' if you have a good GPU!"
"model = GenerativeAI()"
]
},
{
Expand Down

0 comments on commit 6b033df

Please sign in to comment.