Download engine/tests/test_model.py from lorcapoul/smol-neuron-studio: direct link, hf CLI and curl.
- Browser
- Download file 631 Bytes
-
https://huggingface.co/spaces/lorcapoul/smol-neuron-studio/resolve/main/engine/tests/test_model.py
- Command line
-
hf download hf://spaces/lorcapoul/smol-neuron-studio/engine/tests/test_model.py
-
curl -L -o test_model.py https://huggingface.co/spaces/lorcapoul/smol-neuron-studio/resolve/main/engine/tests/test_model.py
631 Bytes
| from app.model import down_proj, get_model | |
| def test_metadatos_coinciden_con_config(loaded): | |
| config, info = loaded.model.config, loaded.info | |
| assert info.num_layers == config.num_hidden_layers | |
| assert info.units_per_layer == [config.intermediate_size] * config.num_hidden_layers | |
| assert info.hidden_size == config.hidden_size | |
| assert info.vocab_size == config.vocab_size | |
| def test_down_proj_entrada_son_las_neuronas(loaded): | |
| for i, units in enumerate(loaded.info.units_per_layer): | |
| assert down_proj(loaded.model, i).in_features == units | |
| def test_carga_unica(loaded): | |
| assert get_model() is loaded | |