LOGIC-LORA-27B
LOGIC Framework (Lay Out Problem, Options, Groundwork, Inference, Conclusion)
Example Output
<layOutProblem>
Explain the problem or question in detail.
</layOutProblem>
<options>
List different strategies or paths you might take to solve the problem.
</options>
<groundwork>
Note important facts, formulas, or references needed. Establish constraints.
</groundwork>
<inference>
Perform detailed reasoning or computations. Validate steps or check for errors.
</inference>
<conclusion>
Present the clear answer or outcome.
</conclusion>
Why Use LOGIC? Emphasizes exploring multiple options. Encourages building a strong groundwork of facts or constraints. Includes inference to handle the step-by-step thinking process. Ends with a conclusion that ties it all together.
Model Details
- Model Name: LOGIC-LORA-27B
- Base Architecture: gemma3
- Application: Reasoning using LOGIC Framework
- Release Date: 20-March-2025
system_prompt = \
f"""You are given a problem.
You are LOGIC
Always follow the format
layOutProblem
options
groundwork
inference
conclusion
Explain the problem or question in detail.
Place it between <layOutProblem> and </layOutProblem>
List different strategies or paths you might take to solve the problem.
Place it between <options> and </options>
Note important facts, formulas, or references needed. Establish constraints.
Place it between <groundwork> and </groundwork>
Think about the problem and provide your working out.
Place it between <inference> and </inference>.
Then, provide your solution between <conclusion> and </conclusion>
"""
system_prompt
Example Prompt
system_prompt = \
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": "A triangle has sides 13, 14, and 15. Find the radius of its circumcircle."},
]
text = tokenizer.apply_chat_template(
messages,
add_generation_prompt = True,
tokenize = False,
)
from transformers import TextStreamer
_ = model.generate(
**tokenizer(text, return_tensors = "pt").to("cuda"),
max_new_tokens = 1024,
temperature = 1.0, top_p = 0.95, top_k = 64,
streamer = TextStreamer(tokenizer, skip_prompt = True),
)
system_prompt
Example Output
<layOutProblem>
The problem asks us to find the radius of the circumcircle of a triangle with sides of length 13, 14, and 15. The circumcircle is the circle that passes through all three vertices of the triangle. The radius of the circumcircle is often denoted by *R*. We are given the lengths of the three sides of the triangle, and we need to determine the radius of the circle that circumscribes it.
</layOutProblem>
<options>
1. **Use the formula R = abc / 4K**, where a, b, and c are the side lengths and K is the area of the triangle. This requires us to first calculate the area of the triangle. We can use Heron's formula to find the area.
2. **Use the Law of Sines:** a/sin(A) = b/sin(B) = c/sin(C) = 2R. This requires us to find one of the angles of the triangle, which can be done using the Law of Cosines.
3. **Coordinate Geometry:** Place the triangle on a coordinate plane and find the circumcenter, then calculate the distance from the circumcenter to any vertex. This is generally more complex.
</options>
<groundwork>
* **Heron's Formula:** For a triangle with sides a, b, and c, the area K is given by K = sqrt(s(s-a)(s-b)(s-c)), where s is the semi-perimeter, s = (a+b+c)/2.
* **Law of Cosines:** c² = a² + b² - 2ab*cos(C)
* **Law of Sines:** a/sin(A) = b/sin(B) = c/sin(C) = 2R
* **Circumradius Formula:** R = abc / 4K
* **Side lengths:** a = 13, b = 14, c = 15
* **Constraint:** The radius must be a positive real number.
</groundwork>
<inference>
Let's use the formula R = abc / 4K. First, we need to find the area K using Heron's formula.
The semi-perimeter s = (13 + 14 + 15) / 2 = 42 / 2 = 21.
Now, we can calculate the area K:
K = sqrt(21(21-13)(21-14)(21-15)) = sqrt(21 * 8 * 7 * 6) = sqrt(3 * 7 * 2³ * 7 * 2 * 3) = sqrt(2⁴ * 3² * 7²) = 2² * 3 * 7 = 4 * 21 = 84.
Now we can find the circumradius R:
R = (13 * 14 * 15) / (4 * 84) = (13 * 14 * 15) / 336 = (13 * 2 * 7 * 3 * 5) / (2⁴ * 3 * 7) = (13 * 5) / 8 = 65 / 8 = 8.125
</inference>
<conclusion>
The radius of the circumcircle is 65/8 or 8.125.
</conclusion>
- Downloads last month
- 25
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
HF Inference deployability: The model has no pipeline_tag.