Skip to content

Commit

Permalink
Fixing second-person lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanMullins committed Jul 9, 2024
1 parent def3ac6 commit 70c3db9
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions site/en/gemma/docs/lit_gemma.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,10 @@
"source": [
"## Install LIT and Keras NLP\n",
"\n",
"Here, we use the KerasNLP implementation of Gemma (more on how to configure this\n",
"below). You will need a recent version of `keras` (3.0+) `keras-nlp`\n",
"(0.12+) and `lit-nlp` (1.2+), and a Kaggle account to download the base model."
"This notebook uses the KerasNLP implementation of Gemma (more on how to \n",
"configure this below). You will need a recent version of `keras` (3.0+) \n",
"`keras-nlp` (0.12+) and `lit-nlp` (1.2+), and a Kaggle account to download the \n",
"base model."
]
},
{
Expand All @@ -153,10 +154,10 @@
"source": [
"### Kaggle Access\n",
"\n",
"KerasNLP stores their pre-trained model weights on Kaggle. We use the\n",
"[`kagglehub` package](https://github.com/Kaggle/kagglehub#authenticate) to\n",
"autheticate with this service. Be sure to also accept the license agreement for\n",
"[Gemma](https://www.kaggle.com/models/keras/gemma) from your Kaggle account.\n",
"KerasNLP stores their pre-trained model weights on Kaggle. The\n",
"[`kagglehub` package](https://github.com/Kaggle/kagglehub#authenticate) is used\n",
"to autheticate with this service. Be sure to also accept the license agreement \n",
"for [Gemma](https://www.kaggle.com/models/keras/gemma) from your Kaggle account.\n",
"\n",
"See the Appendix at the end for more information on how to set up a Kaggle\n",
"account."
Expand Down Expand Up @@ -190,9 +191,14 @@
"id": "v12sUSdiNPje"
},
"source": [
"LIT provides a function, `make_notebook_widget()` for configuring our prompt debugging tools in a notebook context. The first two arguments define the `datasets` and `models`, respectively, and are required. The remaining parameters allow you to choose \n",
"LIT provides a function, `make_notebook_widget()` for configuring our prompt \n",
"debugging tools in a notebook context. \n",
"\n",
"We provide a dataset of sample prompts that support the case studies later in this document. If you"
"LIT provides a dataset of sample prompts that accompany the tutorial linked \n",
"later in this document.\n",
"\n",
"See the comments below for configuring the widget to use different models and/or\n",
"datasets."
]
},
{
Expand All @@ -210,9 +216,9 @@
"#\n",
"# * `datasets_config`: A list of strings containing the dataset names and\n",
"# paths to load from, as \"dataset:path\", where path can be a URL or a\n",
"# local file path. Here, we use a special value, `sample_prompts`, to load\n",
"# the example prompts provided in the LIT distribution; no other special\n",
"# values are supported.\n",
"# local file path. The example below uses a special value,\n",
"# `sample_prompts`, to load the example prompts provided in the LIT\n",
"# distribution; no other special values are supported.\n",
"# * `models_config`: A list of strings containing the model names and paths to\n",
"# load from, as \"model:path\", where path can be a URL, a local file path,\n",
"# or the name of a preset for the configured deep learning framework.\n",
Expand Down Expand Up @@ -284,9 +290,9 @@
"\n",
"[Salience methods][salience-explorable] allow you to inspect which parts of an \n",
"input are important to the model for different parts of its generated output. \n",
"LIT's [Sequence Salience module][lit-seq-sal] extends these methods so that we\n",
"can explain importance at multiple levels of granularity: from tokens to words\n",
"to sentences and beyond.\n",
"LIT's [Sequence Salience module][lit-seq-sal] extends these methods to explain \n",
"the importance of sequences at multiple levels of granularity: from tokens to \n",
"words to sentences and beyond.\n",
"\n",
"You can use LIT in the cell above to play around with the Sequence Salience \n",
"module on your own. For a more guided learning experience, you can follow long \n",
Expand All @@ -312,9 +318,12 @@
"source": [
"# Appendix: Accessing Gemma on Kaggle Hub\n",
"\n",
"We use the KerasNLP implementation of Gemma in this document. KerasNLP stores their pre-trained model weights on Kaggle, and Gemma requires authentication and license acknowledgement to access those weights.\n",
"This notebook uses the KerasNLP implementation of Gemma in this document. \n",
"KerasNLP stores their pre-trained model weights on Kaggle, and Gemma requires \n",
"authentication and license acknowledgement to access those weights.\n",
"\n",
"The following instruction walk you through how to set up a Kaggle account and authenticate with Kaggle using the `kagglehub` package.\n",
"The following instruction walk you through how to set up a Kaggle account and \n",
"authenticate with Kaggle using the `kagglehub` package.\n",
"\n",
"1. Create a Kaggle account if you don't have one\n",
" * Go to: https://www.kaggle.com/account/login?phase=startRegisterTab\n",
Expand Down

0 comments on commit 70c3db9

Please sign in to comment.