WCNegentropy commited on
Commit
55bb408
·
verified ·
1 Parent(s): d55ec07

Remove nested directory: BitTransformerLM/tests/test_act.py

Browse files
Files changed (1) hide show
  1. BitTransformerLM/tests/test_act.py +0 -19
BitTransformerLM/tests/test_act.py DELETED
@@ -1,19 +0,0 @@
1
- import os, sys; sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
2
- import torch
3
- from bit_transformer.model import BitTransformerLM
4
-
5
-
6
- def test_act_halting():
7
- model = BitTransformerLM(
8
- d_model=16,
9
- nhead=2,
10
- num_layers=3,
11
- dim_feedforward=32,
12
- max_seq_len=8,
13
- use_act=True,
14
- act_threshold=0.1,
15
- )
16
- bits = torch.randint(0, 2, (1, 8), dtype=torch.long)
17
- _, telemetry = model(bits)
18
- halt_probs = torch.stack(telemetry["halt_probs"])[:, 0, 0]
19
- assert (halt_probs < 1).sum().item() < model.num_layers