Spaces:
Sleeping
Sleeping
Download scripts/test_cumulative_lock.py from spitfire4794/test1111111: direct link, hf CLI and curl.
- Browser
- Download file 718 Bytes
-
https://huggingface.co/spaces/spitfire4794/test1111111/resolve/main/scripts/test_cumulative_lock.py
- Command line
-
hf download hf://spaces/spitfire4794/test1111111/scripts/test_cumulative_lock.py
-
curl -L -o test_cumulative_lock.py https://huggingface.co/spaces/spitfire4794/test1111111/resolve/main/scripts/test_cumulative_lock.py
718 Bytes
| """Verify cumulative page locking across all five loaded models.""" | |
| from cism import Engine | |
| models = [ | |
| "SupraLabs/Supra-Mini-v5-8M", | |
| "SupraLabs/Supra2-Medium-Base", | |
| "SupraLabs/Supra-50M-Base", | |
| "veyra-ai/Veyra2-Blueberry-10M-Base", | |
| "HuggingFaceTB/SmolLM2-135M", | |
| ] | |
| engines = [] | |
| total_locked = 0 | |
| for model in models: | |
| engine = Engine.from_pretrained(model, precision="int8", local_files_only=True) | |
| locked = engine.lock_pages() | |
| total_locked += locked | |
| name = model.split("/")[-1] | |
| status = "OK" if locked else "FAILED" | |
| print(f"{name:28} {engine.info['weight_bytes'] / 1e6:7.1f} MB -> {status}") | |
| engines.append(engine) | |
| print(f"cumulative locked: {total_locked / 1e6:.1f} MB") | |