nova-triangle / examples /quickstart.py
Wayfinder6's picture
Initial commit: Nova Triangle — three small models that correct each other
13bc746 verified
raw
history blame contribute delete
851 Bytes
"""
Quickstart — see the triangle in action in under a minute.
Usage:
pip install torch transformers
python quickstart.py
Uses the three smallest open models that fit on ~4GB VRAM.
Swap any model name for your own.
"""
from nova_triangle.triangle import Triangle
print("Loading three models (first run downloads them)...\n")
tri = Triangle(
models=[
"HuggingFaceTB/SmolLM2-360M-Instruct",
"Qwen/Qwen2.5-0.5B-Instruct",
"HuggingFaceTB/SmolLM2-135M-Instruct",
],
max_rounds=2,
)
questions = [
"What is the oldest known written language?",
"Explain quantum superposition in one sentence.",
"What happens when three perspectives look at the same problem?",
]
for q in questions:
print(f"Q: {q}")
result = tri.process(q)
print(tri.report(result))
print("-" * 60)
print()