Skip to content

Commit

Permalink
Update test_model.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-mapache authored Aug 8, 2024
1 parent c3e933b commit 7febb97
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def test_attention(fairscale_init):
iattention.v_projector.weight.copy_(attention.wv.weight)
iattention.output_projector.weight.copy_(attention.wo.weight)

iattention.cuda()
iattention.eval()

output2 = iattention(x, freqs_cis, 0)
Expand Down Expand Up @@ -163,7 +162,6 @@ def test_decoder():
transformer_block.attention.cache_k.random_()
transformer_block.attention.cache_v.random_()

transformer_block
transformer_block.eval()

itransformer_block.attention.k_cache.sequence_cache.copy_(transformer_block.attention.cache_k.transpose(1, 2))
Expand All @@ -177,8 +175,6 @@ def test_decoder():
itransformer_block.ffn.output_layer.weight.copy_(transformer_block.feed_forward.w2.weight)
itransformer_block.ffn.gate_layer.weight.copy_(transformer_block.feed_forward.w3.weight)

itransformer_block

x = torch.randn(2, 2048, 4096)

freqs_cis = precompute_freqs_cis(4096, 2048 * 2, 500000)
Expand Down

0 comments on commit 7febb97

Please sign in to comment.