Views
No views yet
Problem + Model final answer + Reasoning Bubblesmlx-lm using 8-bit affine quantization with group size 64.pip install mlx-lm1from mlx_lm import load, generate
2
3model, tokenizer = load("omercelik/Trace-Inverter-4B-MLX-8bit")
4
5messages = [
6 {
7 "role": "system",
8 "content": (
9 "You are a trace inversion model. Given a problem, a final answer, "
10 "and several compressed reasoning bubbles, reconstruct a detailed "
11 "reasoning trace that could plausibly lead to the final answer."
12 ),
13 },
14 {
15 "role": "user",
16 "content": """Problem:
17If a pizza needs 10 cups of water, 16 cups of flour, and salt equal to half the flour amount, what is the combined total?
18
19Model final answer:
2034 cups.
21
22Reasoning Bubbles:
23I need to calculate the salt first because it is defined as half of the flour amount. Then I should add water, flour, and salt together to get the combined total.
24
25Reconstruct the full reasoning trace.""",
26 },
27]
28
29prompt = tokenizer.apply_chat_template(
30 messages,
31 add_generation_prompt=True,
32 return_dict=False,
33)
34
35response = generate(
36 model,
37 tokenizer,
38 prompt=prompt,
39 max_tokens=512,
40 verbose=True,
41)1.0.<tool_call>. Post-processing is recommended when generating datasets.