From f492c949d39f3dbd1c2daaff79af994d53be2ab3 Mon Sep 17 00:00:00 2001 From: Sebastian Raschka Date: Fri, 26 Sep 2025 22:19:57 -0500 Subject: [PATCH] Requirements update (#851) * Requirements update * Code change to tricker workers * update --- pkg/llms_from_scratch/ch02.py | 1 + requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/llms_from_scratch/ch02.py b/pkg/llms_from_scratch/ch02.py index 47e74df..53ab35d 100644 --- a/pkg/llms_from_scratch/ch02.py +++ b/pkg/llms_from_scratch/ch02.py @@ -33,6 +33,7 @@ class GPTDatasetV1(Dataset): def create_dataloader_v1(txt, batch_size=4, max_length=256, stride=128, shuffle=True, drop_last=True, num_workers=0): + # Initialize the tokenizer tokenizer = tiktoken.get_encoding("gpt2") diff --git a/requirements.txt b/requirements.txt index f61d513..1619bea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,6 @@ matplotlib >= 3.7.1 # ch04; ch06; ch07 tensorflow>=2.16.2; sys_platform == 'darwin' and platform_machine == 'x86_64' # Intel macOS tensorflow >= 2.18.0; sys_platform != 'darwin' or platform_machine != 'x86_64' # ch05; ch06; ch07 tqdm >= 4.66.1 # ch05; ch07 -numpy >= 1.26, < 2.1 # dependency of several other libraries like torch and pandas +numpy >= 1.26 # dependency of several other libraries like torch and pandas pandas >= 2.2.1 # ch06 psutil >= 5.9.5 # ch07; already installed automatically as dependency of torch