AtoMinima / example.py
arthurblg1802's picture
AtoMinima: 420-parameter character-level GPT
104858e verified
Raw History Blame Contribute Delete
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)))