Solomon / mlx /examples /decide.py
kelseyway's picture
Make MLX adapter-only and include the reproducible BF16 converter
5c0a4a8
Raw
History Blame Contribute Delete
763 Bytes
from solomon_mlx import Solomon
model = Solomon.load("models/quality")
questions = {
"certified": {"type": "noul", "instructions": "Is Rookwood Ltd certified?"},
"auditor": {
"type": "choice",
"instructions": "Who performs the audit?",
"options": ["The Buyer", "The grower", "An independent auditor"],
},
"severity": {
"type": "score",
"instructions": "What is the breach severity?",
"levels": ["none recorded", "minor", "material"],
},
}
with model.prefill(
"Rookwood Ltd is certified. An independent auditor performs the audit. One minor breach is recorded."
) as state:
print(model.decide(state=state, questions=questions, evidence="support"))
state.save("document-replay.json")