Skip to content

Commit

Permalink
[no ci] minor edit
Browse files Browse the repository at this point in the history
  • Loading branch information
amaiya committed Apr 1, 2023
1 parent ed38b6e commit cb43890
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
```python
# Example: Generative AI in ktrain
from ktrain.text.generative_ai import GenerativeAI
model = GenerativeAI(device='cpu') # use device='cuda' if you have a good GPU!
model = GenerativeAI() # needs at least 16GB of GPU memory
prompt = """Extract the names of people in the supplied sentences. Here is an example:
Sentence:Paul Newman is a great actor.
People:
Expand Down
4 changes: 2 additions & 2 deletions examples/text/generative_ai_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"\n",
"*ktrain* supports a Generative AI module that is currently based on an instruction-fine-tuned version of GPT-J. 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, you can use a CPU (provided it has at least 16GB of RAM), but output will be generated very slowly (depending on the number of CPU cores). We will use a CPU in this example, but you should either leave blank 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, you can use a CPU (provided it has at least 16GB of RAM), but output will be generated very 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."
]
},
{
Expand All @@ -28,7 +28,7 @@
"outputs": [],
"source": [
"from ktrain.text.generative_ai import GenerativeAI\n",
"model = GenerativeAI(device='cpu') # leave blank or use device='cuda' if you have a good GPU!"
"model = GenerativeAI(device='cpu') # omit device argument or use device='cuda' if you have a good GPU!"
]
},
{
Expand Down

0 comments on commit cb43890

Please sign in to comment.