diff --git a/.github/workflows/basic-tests-linux-uv.yml b/.github/workflows/basic-tests-linux-uv.yml index 4600121..d93a213 100644 --- a/.github/workflows/basic-tests-linux-uv.yml +++ b/.github/workflows/basic-tests-linux-uv.yml @@ -79,5 +79,4 @@ jobs: shell: bash run: | source .venv/bin/activate - uv pip install transformers -U pytest pkg/llms_from_scratch/tests/ diff --git a/.github/workflows/basic-tests-macos-uv.yml b/.github/workflows/basic-tests-macos-uv.yml index 39efd26..3cac9f0 100644 --- a/.github/workflows/basic-tests-macos-uv.yml +++ b/.github/workflows/basic-tests-macos-uv.yml @@ -47,7 +47,6 @@ jobs: shell: bash run: | source .venv/bin/activate - uv pip install transformers -U pytest setup/02_installing-python-libraries/tests.py pytest ch04/01_main-chapter-code/tests.py pytest ch05/01_main-chapter-code/tests.py diff --git a/.github/workflows/basic-tests-windows-uv-pip.yml b/.github/workflows/basic-tests-windows-uv-pip.yml index 8e11a81..41f333d 100644 --- a/.github/workflows/basic-tests-windows-uv-pip.yml +++ b/.github/workflows/basic-tests-windows-uv-pip.yml @@ -49,7 +49,6 @@ jobs: shell: bash run: | source .venv/Scripts/activate - uv pip install transformers -U pytest setup/02_installing-python-libraries/tests.py pytest ch04/01_main-chapter-code/tests.py pytest ch05/01_main-chapter-code/tests.py diff --git a/ch05/07_gpt_to_llama/tests/tests_rope_and_parts.py b/ch05/07_gpt_to_llama/tests/tests_rope_and_parts.py index 22e00e9..3ff3694 100644 --- a/ch05/07_gpt_to_llama/tests/tests_rope_and_parts.py +++ b/ch05/07_gpt_to_llama/tests/tests_rope_and_parts.py @@ -177,6 +177,10 @@ def test_rope_llama2(notebook): max_position_embeddings: int = 8192 hidden_size = head_dim * num_heads num_attention_heads = num_heads + rope_parameters = {"rope_type": "default", "rope_theta": theta_base} + + def standardize_rope_params(self): + return config = RoPEConfig() rot_emb = LlamaRotaryEmbedding(config=config) @@ -242,6 +246,10 @@ def test_rope_llama3(notebook): max_position_embeddings: int = 8192 hidden_size = head_dim * num_heads num_attention_heads = num_heads + rope_parameters = {"rope_type": "default", "rope_theta": theta_base} + + def standardize_rope_params(self): + return config = RoPEConfig() rot_emb = LlamaRotaryEmbedding(config=config) @@ -320,6 +328,10 @@ def test_rope_llama3_12(notebook): max_position_embeddings: int = 8192 hidden_size = head_dim * num_heads num_attention_heads = num_heads + rope_parameters = {**hf_rope_params, "rope_theta": rope_theta} + + def standardize_rope_params(self): + return config = RoPEConfig()