(self)
| 35 | assert hidden.shape == (2, 16, 64) |
| 36 | |
| 37 | def test_get_final_norm(self): |
| 38 | model = TinyModel() |
| 39 | adapter = get_adapter(model) |
| 40 | norm = adapter.get_final_norm(model) |
| 41 | assert isinstance(norm, nn.Module) |
| 42 | x = torch.randn(2, 64) |
| 43 | out = norm(x) |
| 44 | assert out.shape == (2, 64) |
| 45 | |
| 46 | def test_get_lm_head(self): |
| 47 | model = TinyModel(vocab_size=256) |
nothing calls this directly
no test coverage detected