Skip to content

Commit 27d5c7c

Browse files
authored
add command to start jupyterlab (NVIDIA#51)
* add command to start jupyterlab * Fix link to gemma model card
1 parent 94bd8f2 commit 27d5c7c

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

models/Gemma/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Gemma
22

33
[Gemma](https://ai.google.dev/gemma/docs) is a family of decoder-only, text-to-text large language models for English language, built from the same research and technology used to create the [Gemini models](https://blog.google/technology/ai/google-gemini-ai/). Gemma models have open weights and offer pre-trained variants and instruction-tuned variants. These models are well-suited for a variety of text generation tasks, including question answering, summarization, and reasoning. Their relatively small size makes it possible to deploy them in environments with limited resources such as a laptop, desktop, or your own cloud infrastructure, democratizing access to state-of-the-art AI models and helping foster innovation for everyone.
4-
For more details, refer the the [Gemma model card](https://ai.google.com/gemma/docs/model_card) released by Google.
4+
For more details, refer the the [Gemma model card](https://ai.google.dev/gemma/docs/model_card) released by Google.
55

66

77
## Customizing Gemma with NeMo Framework
@@ -53,7 +53,11 @@ docker pull nvcr.io/nvidia/nemo:24.01.gemma
5353
The best way to run this notebook is from within the container. You can do that by launching the container with the following command
5454

5555
```bash
56-
docker run -it --rm --gpus all --network host -v $(pwd):/workspace nvcr.io/nvidia/nemo:24.01.gemma
56+
docker run -it --rm --gpus all --ipc host --network host -v $(pwd):/workspace nvcr.io/nvidia/nemo:24.01.gemma
5757
```
5858

59-
Then, from within the container, start the jupyter server with
59+
Then, from within the container, start the jupyter server with
60+
61+
```bash
62+
jupyter lab --no-browser --port=8080 --allow-root --ip 0.0.0.0
63+
```

models/Gemma/lora.ipynb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"[Gemma](https://ai.google.com/gemma/docs/model_card) is a groundbreaking new open model in the Gemini family of models from Google. Gemma is just as powerful as previous models but compact enough to run locally on NVIDIA RTX GPUs. Gemma is available in 2 sizes: 2B and 7B parameters. With NVIDIA NeMo, you can customize Gemma to fit your usecase and deploy an optimized model on your NVIDIA GPU.\n",
14+
"[Gemma](https://ai.google.dev/gemma/docs/model_card) is a groundbreaking new open model in the Gemini family of models from Google. Gemma is just as powerful as previous models but compact enough to run locally on NVIDIA RTX GPUs. Gemma is available in 2 sizes: 2B and 7B parameters. With NVIDIA NeMo, you can customize Gemma to fit your usecase and deploy an optimized model on your NVIDIA GPU.\n",
1515
"\n",
1616
"In this tutorial, we'll go over a specific kind of customization -- Low-rank adapter tuning to follow a specific output format (also known as LoRA). To learn how to perform full parameter supervised fine-tuning for instruction following (also known as SFT), see the [companion notebook](./sft.ipynb). For LoRA, we'll perform all operations within the notebook on a single GPU. The compute resources needed for training depend on which Gemma model you use. For the 7 billion parameter variant of Gemma, you'll need a GPU with 80GB of memory. For the 2 billion parameter model, 40GB will do. \n",
1717
"\n",
@@ -74,10 +74,14 @@
7474
"The best way to run this notebook is from within the container. You can do that by launching the container with the following command\n",
7575
"\n",
7676
"```bash\n",
77-
"docker run -it --rm --gpus all --network host -v $(pwd):/workspace nvcr.io/nvidia/nemo:24.01.gemma\n",
77+
"docker run -it --rm --gpus all --ipc=host --network host -v $(pwd):/workspace nvcr.io/nvidia/nemo:24.01.gemma\n",
7878
"```\n",
7979
"\n",
8080
"Then, from within the container, start the jupyter server with\n",
81+
"\n",
82+
"```bash\n",
83+
"jupyter lab --no-browser --port=8080 --allow-root --ip 0.0.0.0\n",
84+
"```\n",
8185
"\n"
8286
]
8387
},

models/Gemma/sft.ipynb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"[Gemma](https://ai.google.com/gemma/docs/model_card) is a groundbreaking new open model in the Gemini family of models from Google. Gemma is just as powerful as previous models but compact enough to run locally on NVIDIA RTX GPUs. Gemma is available in 2 sizes: 2B and 7B parameters. With NVIDIA NeMo, you can customize Gemma to fit your usecase and deploy an optimized model on your NVIDIA GPU.\n",
14+
"[Gemma](https://ai.google.dev/gemma/docs/model_card) is a groundbreaking new open model in the Gemini family of models from Google. Gemma is just as powerful as previous models but compact enough to run locally on NVIDIA RTX GPUs. Gemma is available in 2 sizes: 2B and 7B parameters. With NVIDIA NeMo, you can customize Gemma to fit your usecase and deploy an optimized model on your NVIDIA GPU.\n",
1515
"\n",
1616
"In this tutorial, we'll go over a specific kind of customization -- full parameter supervised fine-tuning for instruction following (also known as SFT). To learn how to perform Low-rank adapter (LoRA) tuning to follow a specific output format, see the [companion notebook](./lora.ipynb). For LoRA, we'll show how you can kick off a multi-GPU training job with an example script so that you can train on 8 GPUs. The exact number of GPUs needed will depend on which model you use and what kind of GPUs you use, but we recommend using 8 A100-80GB GPUs.\n",
1717
"\n",
@@ -72,11 +72,14 @@
7272
"The best way to run this notebook is from within the container. You can do that by launching the container with the following command\n",
7373
"\n",
7474
"```bash\n",
75-
"docker run -it --rm --gpus all --network host -v $(pwd):/workspace nvcr.io/nvidia/nemo:24.01.gemma\n",
75+
"docker run -it --rm --gpus all --ipc=host --network host -v $(pwd):/workspace nvcr.io/nvidia/nemo:24.01.gemma\n",
7676
"```\n",
7777
"\n",
7878
"Then, from within the container, start the jupyter server with\n",
79-
"\n"
79+
"\n",
80+
"```bash\n",
81+
"jupyter lab --no-browser --port=8080 --allow-root --ip 0.0.0.0\n",
82+
"```"
8083
]
8184
},
8285
{

0 commit comments

Comments
 (0)