This commit is contained in:
rasbt 2026-01-27 16:04:03 -06:00
parent 341ff65beb
commit ea8cf1fbc3
No known key found for this signature in database
4 changed files with 12 additions and 3 deletions

View File

@ -79,5 +79,4 @@ jobs:
shell: bash
run: |
source .venv/bin/activate
uv pip install transformers -U
pytest pkg/llms_from_scratch/tests/

View File

@ -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

View File

@ -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

View File

@ -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()