# Notebook dependencies. See README.md.
#
# The generation loop is plain transformers so that checkpoints are swappable;
# reasoning-from-scratch is here only for the ch03 grading harness and ch02's
# get_device, both of which are model-agnostic.

torch>=2.7,<2.11
transformers>=4.56        # 4.51+ for the Qwen3 chat template's enable_thinking flag; 4.56+
                          # because from_pretrained's dtype= argument was spelled torch_dtype=
                          # before that, and older versions swallow the new name into config
                          # kwargs and load the model in fp32 without saying so
accelerate>=0.30
tokenizers>=0.21.2

reasoning-from-scratch>=0.2.0   # ch02 get_device, ch03 grading harness
sympy>=1.14.0                   # grade_answer's equivalence check
requests>=2.31                  # load_math500_test fetches the dataset on first run

matplotlib>=3.9
numpy>=1.26                     # page 6's flip-point strip is an image of a boolean matrix
jupyterlab>=4.4
huggingface_hub>=0.24           # manifest records the model repo revision
tqdm>=4.66                      # sweep bars, and the harness's downloaded/total fetch bar
ipywidgets>=8.1                 # NOT optional in a notebook. Without it tqdm.auto falls back to
                                # the text bar, whose carriage-return redraws a terminal collapses
                                # in place but a notebook renderer retains -- a sweep with 15 bars
                                # over 100 items becomes ~15,000 retained output events and several
                                # GB in the editor process, while the kernel sits idle at 2 GB

bitsandbytes>=0.43              # NOT optional for page 9's FULL mode: PRM_QUANT="8bit" needs it,
                                # because a 7.6B grader in bf16 is ~15 GB and does not fit beside
                                # its activations on a 16 GB card. An environment without it lands
                                # in the PRM loader's failure path, and page 9 raises there rather
                                # than publishing a checker-only run under a FULL label. Also
                                # page 6's LOAD_IN_4BIT fallback on small VRAM
