diff --git a/ch02/02_bonus_bytepair-encoder/compare-bpe-tiktoken.ipynb b/ch02/02_bonus_bytepair-encoder/compare-bpe-tiktoken.ipynb index 8fdbc21..9e2ad95 100644 --- a/ch02/02_bonus_bytepair-encoder/compare-bpe-tiktoken.ipynb +++ b/ch02/02_bonus_bytepair-encoder/compare-bpe-tiktoken.ipynb @@ -1,5 +1,23 @@ { "cells": [ + { + "cell_type": "markdown", + "id": "8a9e554f-58e3-4787-832d-d149add1b857", + "metadata": {}, + "source": [ + "- Install the additional package requirements for this bonus notebook by uncommenting and running the following cell:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d70bae22-b540-4a13-ab01-e748cb9d55c9", + "metadata": {}, + "outputs": [], + "source": [ + "# pip install -r requirements-extra.txt" + ] + }, { "cell_type": "markdown", "id": "a9adc3bf-353c-411e-a471-0e92786e7103", @@ -8,16 +26,6 @@ "# Using BytePair encodding from `tiktoken`" ] }, - { - "cell_type": "code", - "execution_count": 1, - "id": "4036ffa3-0e5c-433a-a997-4ed7d33de0b2", - "metadata": {}, - "outputs": [], - "source": [ - "# !pip install tiktoken" - ] - }, { "cell_type": "code", "execution_count": 2, @@ -205,16 +213,6 @@ "# Using the BytePair Tokenizer in HuggingFace transformers" ] }, - { - "cell_type": "code", - "execution_count": 12, - "id": "5bfff386-f725-4137-9c50-e5da0c38bea0", - "metadata": {}, - "outputs": [], - "source": [ - "# pip install transformers" - ] - }, { "cell_type": "code", "execution_count": 13, diff --git a/ch02/02_bonus_bytepair-encoder/requirements-extra.txt b/ch02/02_bonus_bytepair-encoder/requirements-extra.txt new file mode 100644 index 0000000..cd1a94c --- /dev/null +++ b/ch02/02_bonus_bytepair-encoder/requirements-extra.txt @@ -0,0 +1,3 @@ +requests +tqdm +transformers>=4.33.2