Edit model card

Llama-3.1-8B-MultiReflection-Instruct

This model is inspired by OpenAI's o1 reasoning model. The dataset was synthetically generated using Claude 3.5 Sonnet.

Training

image/png

The training was done on Google Colab's free T4, using unsloth (duration: 52.32 minutes). The configuration is as follows:

  • LoRA Rank: 128
  • Packing: enabled
  • Batch size: 2
  • Gradient accumulation steps: 4
  • Epoches: 3
  • Steps: 30
  • Max sequence length: 4096

The training data comprised of 81 examples, each approximatly 3000 tokens.

Notes

  • It tends to produce very verbose and long reasoning responses
  • The coherency seems fairly good if you used the recommended sampling parameters
  • You should use at least 16k context, as each response is usually 2000-3000 tokens long

Recommended Sampling Parameters:

  • Temperature: 0.15
  • Min-P: 0.2
  • Top-K: 50
  • Top-P: 1
  • Max Tokens: uncapped
  • Frequency Penalty: 0.5
  • Presence Penalty: 0.1

Recommended System Prompt:

You are an advanced agentic assistant designed to complete tasks and provide general insight. Your responses will be formatted in XML. Start your responses with a <thinking> XML tag. You should write general process of how to complete the task provided by the user in this area. You may add nested tags, such as multiple <thinking> tags. <reflection> tags may also be used, if you've detected any inconsistencies or errors in your thinking. After completing a detailed thinking process, generate a draft response in <draft> tags. Review this response in <reflection> tags again, and refine your response as needed. Remember that you may (and are encouraged to) include multiple thinking, reflection and drafts. Provide your final response in <output> tags.

I initially thought the model was going to be medicore, but here's a sample output (quantized Q6_K, the fp16 is probably even better):

Can you teach me a cool math proof?
<thinking>
To create an engaging math proof, I should:
1. Choose a well-known and interesting proof
2. Break it down into simple steps
3. Ask the user questions to keep them engaged
4. Use LaTeX for math symbols
5. Provide explanations and context for each step
</thinking>

<draft>
Let's explore the fascinating world of math proofs together. I'd like to introduce you to the "Proof of the Pythagorean Theorem" - a classic and beautiful result in geometry.

Here's the theorem we'll be proving:

a2+b2=c2a^2 + b^2 = c^2

where $a$ and $b$ are the lengths of the legs of a right triangle, and $c$ is the length of the hypotenuse.

To make this proof more engaging, I'll ask you questions along the way. Are you ready to get started?

1. Can you draw a simple right triangle with legs of length $a$ and $b$, and a hypotenuse of length $c$?
</draft>

<reflection>
The draft is a good start, but I should:
1. Provide more context about the proof
2. Explain why this theorem is important
3. Ask more questions to keep the user engaged
4. Use LaTeX for math symbols
</reflection>

<thinking>
Let me revise the draft to address these points:
1. I'll explain why the Pythagorean Theorem is important
2. I'll ask more questions to keep the user engaged
3. I'll use LaTeX for math symbols
4. I'll provide more context about the proof
</thinking>

<draft>
Let's embark on an exciting journey through the world of math proofs. Today, we'll explore the "Proof of the Pythagorean Theorem" - a fundamental result in geometry that has far-reaching implications in various fields, including physics, engineering, and architecture.

Here's the theorem we'll be proving:

a2+b2=c2a^2 + b^2 = c^2

where $a$ and $b$ are the lengths of the legs of a right triangle, and $c$ is the length of the hypotenuse.

This theorem is crucial because it allows us to calculate the length of the hypotenuse (the longest side) of a right triangle, given the lengths of the other two sides. It's a powerful tool in many real-world applications, such as building design, bridge construction, and even computer graphics.

To make this proof more engaging, I'll ask you questions along the way. Are you ready to get started?

1. Can you draw a simple right triangle with legs of length $a$ and $b$, and a hypotenuse of length $c$?
2. What do you think might be a good way to approach this proof? Do you have any ideas?
</draft>

<reflection>
The revised draft is much better, but I should:
1. Provide more details about the proof
2. Explain the concept of similar triangles
3. Use more LaTeX for math symbols
4. Ask more questions to keep the user engaged
</reflection>

<thinking>
Let me revise the draft again to address these points:
1. I'll provide more details about the proof
2. I'll explain the concept of similar triangles
3. I'll use more LaTeX for math symbols
4. I'll ask more questions to keep the user engaged
</thinking>

<draft>
Let's dive into the fascinating world of math proofs. Today, we'll explore the "Proof of the Pythagorean Theorem" - a fundamental result in geometry that has far-reaching implications in various fields, including physics, engineering, and architecture.

Here's the theorem we'll be proving:

a2+b2=c2a^2 + b^2 = c^2

where $a$ and $b$ are the lengths of the legs of a right triangle, and $c$ is the length of the hypotenuse.

This theorem is crucial because it allows us to calculate the length of the hypotenuse (the longest side) of a right triangle, given the lengths of the other two sides. It's a powerful tool in many real-world applications, such as building design, bridge construction, and even computer graphics.

To make this proof more engaging, I'll ask you questions along the way. Are you ready to get started?

1. Can you draw a simple right triangle with legs of length $a$ and $b$, and a hypotenuse of length $c$?
2. What do you think might be a good way to approach this proof? Do you have any ideas?

Let's start by considering two similar triangles. Similar triangles are triangles that have the same shape, but not necessarily the same size. In this case, we'll use the concept of similar triangles to relate the lengths of the sides of the right triangle.

Here's a diagram of the two similar triangles:

Triangle ABCTriangle ADEaa2bb2cc2\begin{array}{ccc}
\text{Triangle } ABC & \text{Triangle } ADE \\
a & \frac{a}{2} \\
b & \frac{b}{2} \\
c & \frac{c}{2} \\
\end{array}

Notice that the two triangles are similar because they have the same angles (all right angles in this case). This means that their corresponding sides are proportional.

Now, let's use this similarity to relate the lengths of the sides of the two triangles. We can set up a proportion based on the corresponding sides:

aa2=bb2=cc2\frac{a}{\frac{a}{2}} = \frac{b}{\frac{b}{2}} = \frac{c}{\frac{c}{2}}

Simplifying this proportion, we get:

2a=a22a = \frac{a}{2}

2b=b22b = \frac{b}{2}

2c=c22c = \frac{c}{2}

Now, let's square both sides of each equation:

4a2=a244a^2 = \frac{a^2}{4}

4b2=b244b^2 = \frac{b^2}{4}

4c2=c244c^2 = \frac{c^2}{4}

Multiplying both sides of each equation by 4, we get:

16a2=a216a^2 = a^2

16b2=b216b^2 = b^2

16c2=c216c^2 = c^2

Now, let's add the three equations together:

16a2+16b2+16c2=a2+b2+c216a^2 + 16b^2 + 16c^2 = a^2 + b^2 + c^2

Dividing both sides by 16, we get:

a2+b2+c2=116(a2+b2+c2)a^2 + b^2 + c^2 = \frac{1}{16}(a^2 + b^2 + c^2)

This equation is true for any right triangle, so we can conclude that:

a2+b2=c2a^2 + b^2 = c^2

This is the Pythagorean Theorem!

Now, it's your turn again. Can you think of any real-world applications of this theorem? Do you have any questions about the proof?
</draft>

<reflection>
The revised draft is excellent. It provides a clear and engaging explanation of the Pythagorean Theorem, along with a step-by-step proof. The use of LaTeX for math symbols is also well done. I'm confident that this will be a helpful and enjoyable experience for the user.
</reflection>

<output>
Let's embark on an exciting journey through the world of math proofs. Today, we'll explore the "Proof of the Pythagorean Theorem" - a fundamental result in geometry that has far-reaching implications in various fields, including physics, engineering, and architecture.

Here's the theorem we'll be proving:

a2+b2=c2a^2 + b^2 = c^2

where $a$ and $b$ are the lengths of the legs of a right triangle, and $c$ is the length of the hypotenuse.

This theorem is crucial because it allows us to calculate the length of the hypotenuse (the longest side) of a right triangle, given the lengths of the other two sides. It's a powerful tool in many real-world applications, such as building design, bridge construction, and even computer graphics.

To make this proof more engaging, I'll ask you questions along the way. Are you ready to get started?

1. Can you draw a simple right triangle with legs of length $a$ and $b$, and a hypotenuse of length $c$?
2. What do you think might be a good way to approach this proof? Do you have any ideas?

Let's start by considering two similar triangles. Similar triangles are triangles that have the same shape, but not necessarily the same size. In this case, we'll use the concept of similar triangles to relate the lengths of the sides of the right triangle.

Here's a diagram of the two similar triangles:

Triangle ABCTriangle ADEaa2bb2cc2\begin{array}{ccc}
\text{Triangle } ABC & \text{Triangle } ADE \\
a & \frac{a}{2} \\
b & \frac{b}{2} \\
c & \frac{c}{2} \\
\end{array}

Notice that the two triangles are similar because they have the same angles (all right angles in this case). This means that their corresponding sides are proportional.

Now, let's use this similarity to relate the lengths of the sides of the two triangles. We can set up a proportion based on the corresponding sides:

aa2=bb2=cc2\frac{a}{\frac{a}{2}} = \frac{b}{\frac{b}{2}} = \frac{c}{\frac{c}{2}}

Simplifying this proportion, we get:

2a=a22a = \frac{a}{2}

2b=b22b = \frac{b}{2}

2c=c22c = \frac{c}{2}

Now, let's square both sides of each equation:

4a2=a244a^2 = \frac{a^2}{4}

4b2=b244b^2 = \frac{b^2}{4}

4c2=c244c^2 = \frac{c^2}{4}

Multiplying both sides of each equation by 4, we get:

16a2=a216a^2 = a^2

16b2=b216b^2 = b^2

16c2=c216c^2 = c^2

Now, let's add the three equations together:

16a2+16b2+16c2=a2+b2+c216a^2 + 16b^2 + 16c^2 = a^2 + b^2 + c^2

Dividing both sides by 16, we get:

a2+b2+c2=116(a2+b2+c2)a^2 + b^2 + c^2 = \frac{1}{16}(a^2 + b^2 + c^2)

This equation is true for any right triangle, so we can conclude that:

a2+b2=c2a^2 + b^2 = c^2

This is the Pythagorean Theorem!

Now, it's your turn again. Can you think of any real-world applications of this theorem? Do you have any questions about the proof?

Remember, this is a proof, not a mathematical exercise. Feel free to ask questions or share your thoughts about the theorem and its implications.
</output>

Open LLM Leaderboard Evaluation Results

Detailed results can be found here

Metric Value
Avg. 26.12
IFEval (0-Shot) 71.25
BBH (3-Shot) 28.45
MATH Lvl 5 (4-Shot) 12.54
GPQA (0-shot) 5.70
MuSR (0-shot) 8.52
MMLU-PRO (5-shot) 30.27
Downloads last month
2,458
Safetensors
Model size
8.03B params
Tensor type
FP16
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for leafspark/Llama-3.1-8B-MultiReflection-Instruct

Finetuned
(400)
this model
Merges
2 models
Quantizations
8 models

Dataset used to train leafspark/Llama-3.1-8B-MultiReflection-Instruct

Evaluation results