MCPcopy Create free account
hub / github.com/RightNow-AI/TIDE / test_get_final_norm

Method test_get_final_norm

tests/test_adapters.py:37–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 3

TinyModelClass · 0.90
get_adapterFunction · 0.90
get_final_normMethod · 0.45

Tested by

no test coverage detected