Skip to content

Commit

Permalink
Minor fixes in notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
calpt committed Aug 4, 2024
1 parent bc90220 commit aea6c09
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Currently, adapters integrates all architectures and methods listed below:
| Prompt Tuning | [Lester et al. (2021)](https://aclanthology.org/2021.emnlp-main.243/) | [Docs](https://docs.adapterhub.ml/methods.html#prompt-tuning) |
| QLoRA | [Dettmers et al. (2023)](https://arxiv.org/pdf/2305.14314.pdf) | [Notebook](https://colab.research.google.com/github/Adapter-Hub/adapters/blob/main/notebooks/QLoRA_Llama_Finetuning.ipynb) |
| ReFT | [Wu et al. (2024)](https://arxiv.org/pdf/2404.03592) | [Docs](https://docs.adapterhub.ml/methods.html#reft) |
| Adapter Task Arithmetics | [Chronopoulou et al. (2023)](https://arxiv.org/abs/2311.09344) and [Zhang et al. (2023)](https://proceedings.neurips.cc/paper_files/paper/2023/hash/299a08ee712d4752c890938da99a77c6-Abstract-Conference.html) | [Docs](https://docs.adapterhub.ml/merging_adapters.html), [Notebook](https://colab.research.google.com/github/Adapter-Hub/adapters/blob/main/notebooks/06_Task_Arithmetics.ipynb)|
| Adapter Task Arithmetics | [Chronopoulou et al. (2023)](https://arxiv.org/abs/2311.09344)<br> [Zhang et al. (2023)](https://proceedings.neurips.cc/paper_files/paper/2023/hash/299a08ee712d4752c890938da99a77c6-Abstract-Conference.html) | [Docs](https://docs.adapterhub.ml/merging_adapters.html), [Notebook](https://colab.research.google.com/github/Adapter-Hub/adapters/blob/main/notebooks/06_Task_Arithmetics.ipynb)|


## Supported Models
Expand Down
9 changes: 4 additions & 5 deletions notebooks/01_Adapter_Training.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@
"source": [
"**Here comes the important part!**\n",
"\n",
"We add a new adapter to our model by calling `add_adapter()`. We pass a name (`\"rotten_tomatoes\"`) and an adapter configuration. `\"bn_seq\"` denotes a [sequential bottleneck adapter](https://docs.adapterhub.ml/methods.html#bottleneck-adapters) configuration.\n",
"_Adapters_ supports a diverse range of different adapter configurations. For example, `config=\"lora\"` can be passed for training a [LoRA](https://docs.adapterhub.ml/methods.html#lora) adapter or `config=\"prefix_tuning\"` for a [prefix tuning](https://docs.adapterhub.ml/methods.html#prefix-tuning). You can find all currently supported configs [here](https://docs.adapterhub.ml/methods.html#prefix-tuning).\n",
"We add a new adapter to our model by calling `add_adapter()`. We pass a name (`\"rotten_tomatoes\"`) and an adapter configuration. `\"seq_bn\"` denotes a [sequential bottleneck adapter](https://docs.adapterhub.ml/methods.html#bottleneck-adapters) configuration.\n",
"_Adapters_ supports a diverse range of different adapter configurations. For example, `config=\"lora\"` can be passed for training a [LoRA](https://docs.adapterhub.ml/methods.html#lora) adapter, `config=\"prefix_tuning\"` for [prefix tuning](https://docs.adapterhub.ml/methods.html#prefix-tuning) or `config=\"loreft\"` for [LoReFT](https://docs.adapterhub.ml/methods.html#reft). You can find all currently supported configs [here](https://docs.adapterhub.ml/methods.html).\n",
"\n",
"Next, we add a binary classification head. It's convenient to give the prediction head the same name as the adapter. This allows us to activate both together in the next step. The `train_adapter()` method does two things:\n",
"\n",
Expand Down Expand Up @@ -528,7 +528,6 @@
"model.push_adapter_to_hub(\n",
" \"my-awesome-adapter\",\n",
" \"rotten_tomatoes\",\n",
" adapterhub_tag=\"sentiment/rotten_tomatoes\",\n",
" datasets_tag=\"rotten_tomatoes\"\n",
")"
]
Expand All @@ -537,7 +536,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This will create a repository _my-awesome-adapter_ under your username, generate a default adapter card as README.md and upload the adapter named `rotten_tomatoes` together with the adapter card to the new repository. Passing `adapterhub_tag` is required to make sure your adapter is features on [adapterhub.ml/explore](https://adapterhub.ml/explore), our Hub page. [Learn more](https://docs.adapterhub.ml/huggingface_hub.html)."
"This will create a repository _my-awesome-adapter_ under your username, generate a default adapter card as README.md and upload the adapter named `rotten_tomatoes` together with the adapter card to the new repository. [Learn more](https://docs.adapterhub.ml/huggingface_hub.html)."
]
},
{
Expand Down Expand Up @@ -567,7 +566,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.8.10"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
3 changes: 1 addition & 2 deletions notebooks/07_Complex_Adapter_Configuration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,6 @@
"model.push_adapter_to_hub(\n",
" \"my-awesome-adapter\",\n",
" \"xsum\",\n",
" adapterhub_tag=\"sum/xsum\",\n",
")"
]
},
Expand All @@ -818,7 +817,7 @@
"id": "78jqOTrLR8HN"
},
"source": [
"This will create a repository _my-awesome-adapter_ under your username, generate a default adapter card as README.md and upload the adapter named `xsum` together with the adapter card to the new repository. Passing `adapterhub_tag` is required to make sure your adapter is features on [adapterhub.ml/explore](https://adapterhub.ml/explore), our Hub page. [Learn more](https://docs.adapterhub.ml/huggingface_hub.html)."
"This will create a repository _my-awesome-adapter_ under your username, generate a default adapter card as README.md and upload the adapter named `xsum` together with the adapter card to the new repository. [Learn more](https://docs.adapterhub.ml/huggingface_hub.html)."
]
}
],
Expand Down

0 comments on commit aea6c09

Please sign in to comment.