Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Oct 23, 2024
1 parent ef60ae1 commit df187db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ch05/07_gpt_to_llama/tests/test-requirements-extra.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
transformers>=4.44.2
transformers>=4.44.2
litgpt>=0.5.0
6 changes: 4 additions & 2 deletions ch05/07_gpt_to_llama/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ def test_rope_llama3(notebook):
torch.testing.assert_close(queries_rot, litgpt_queries_rot)



def test_rope_llama3_12(notebook):

nb1 = notebook["converting-gpt-to-llama2"]
Expand Down Expand Up @@ -312,7 +311,10 @@ class RoPEConfig:
}

litgpt_cos, litgpt_sin = litgpt_build_rope_cache(
context_len, n_elem=head_dim, base=rope_theta, extra_config=litgpt_rope_config
context_len,
n_elem=head_dim,
base=rope_theta,
extra_config=litgpt_rope_config
)
litgpt_queries_rot = litgpt_apply_rope(queries, litgpt_cos, litgpt_sin)
litgpt_keys_rot = litgpt_apply_rope(keys, litgpt_cos, litgpt_sin)
Expand Down

0 comments on commit df187db

Please sign in to comment.