
jaredpalmer/kev on GitHub
- Stars
- 6,337
- Forks
- 347
- Language
- Python
- License
- Apache-2.0
- Last push
- 24 Sep 2026
Read from GitHub on . Counts change daily.
How it uses Jev
return [p.tolist() for p in ps], meta, len(enc["ids"]), ms
def systemone(name, req, calibrated):
"""The /v1/systemone response kev.serve would return for this request."""
tok = LOADED[name][0]
ps, meta, n_tokens, ms = probs(name, req, calibrated)
answers = to_answers(ps, meta)
return {"model": MODELS[name], "answers": answers, "usage": {"input_tokens": n_tokens, "output_tokens": output_tokens(tok, answers)}, "latency_ms": round(ms, 1)}
def stability(name, req, calibrated, n_perm):
"""Re-run the first Choice question with 2+ options under shuffled option orders (kev.serve /v1/systemone/permute)."""
target = next((qid for qid, q in req.questions.items() if q.type == "choice" and len(q.criteria) >= 2), None)
if target is None: return "_No Choice question with two or more options to permute._"

