Download example.py from arthurblg1802/AtoMinima: direct link, hf CLI and curl.
- Browser
- Download file 412 Bytes
-
https://huggingface.co/arthurblg1802/AtoMinima/resolve/main/example.py
- Command line
-
hf download hf://arthurblg1802/AtoMinima/example.py
-
curl -L -o example.py https://huggingface.co/arthurblg1802/AtoMinima/resolve/main/example.py
412 Bytes
| """Load AtoMinima from the Hub and generate text. Run: python example.py""" | |
| import atominima | |
| model = atominima.from_pretrained("arthurblg1802/AtoMinima") | |
| print("parameters:", sum(p.numel() for p in model.parameters())) | |
| for prompt in ["the water cycle begins when", "Question: what is 4 + 5\nAnswer:"]: | |
| print("\nprompt:", repr(prompt)) | |
| print("output:", repr(model.generate(prompt, max_new_tokens=80))) | |