Instructions to use yixuanzheng/Thinking-Jev-RMT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use yixuanzheng/Thinking-Jev-RMT with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
File size: 945 Bytes
bfa7eb6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | from jev_latent import LatentJev
m = LatentJev.from_pretrained(".")
story = ("There are five boxes, numbered 1 to 5. Box 1 holds the red ball. Box 2 holds the blue cube. Box 3 holds the green ring. "
"Box 4 holds the yellow coin. Box 5 holds the white shell.\n"
"The contents of box 1 and box 2 are exchanged.\nThe contents of box 2 and box 5 are exchanged.\nThe contents of box 3 and box 5 are exchanged.\n")
q = {"where": {"type": "choice", "instructions": "After all the swaps, which box holds the red ball?", "criteria": {f"box {b}": None for b in range(1, 6)}}}
for r in m.decide(story, q, max_depth=4)["by_depth"]:
print(r["depth"], r["answers"]["where"]["choice"], r["answers"]["where"]["probabilities"])
# stop and think branches from one saved prefix
s = m.step(m.start(story))
m.save(s, "prefix.safetensors")
s = m.load("prefix.safetensors")
print("stop ", m.answer(s, q))
print("think", m.answer(m.step(s), q))
|