Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone
Paper β’ 2404.14219 β’ Published β’ 259
The Reasoning Beast is a high-performance fine-tune of Phi-3-mini-4k-instruct optimized for complex cognitive tasks. By integrating the Opus 4.6 Filtered Thinking dataset, this model features native Chain-of-Thought (CoT) capabilities, enabling a structured internal deliberation process before output generation.
| Attribute | Details |
|---|---|
| Architecture | Phi-3-mini-4k-instruct |
| Parameters | 3.8B |
| Training Hardware | NVIDIA Blackwell (sm_120) |
| Fine-tuning Dataset | Opus 4.6 Filtered (Thinking/Reasoning focus) |
| Context Length | 4K Tokens |
| Key Feature | Native <think> tag integration |
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig, TextStreamer
model_id = "reelva/phi3-mini-reasoning-beast"
# Mandatory RoPE patch for modern Transformers compatibility
config = AutoConfig.from_pretrained(model_id)
if hasattr(config, "rope_parameters"):
config.rope_parameters["original_max_position_embeddings"] = 4096
model = AutoModelForCausalLM.from_pretrained(
model_id,
config=config,
torch_dtype=torch.float16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=False)
# Reasoning Prompt Template
prompt = "<|user|>\nSolve this logic puzzle step by step: [Task]<|end|>\n<|assistant|>\n"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
_ = model.generate(
**inputs,
streamer=streamer,
max_new_tokens=1500,
do_sample=True,
temperature=0.7
)
The following output demonstrates the model's high-level cognition when encountering an undefined task. Instead of hallucinating, it performs a systematic meta-analysis of the required logical framework.
Input:
<|user|> Solve this logic puzzle step by step: [Task]<|end|>
<|assistant|>
Output:
<|assistant|> <think>
Let me solve this logic puzzle step by step...
First, I need to understand the puzzle by reading through it carefully. The question mentions:
**Logic Puzzle: [Task]
Solve this logic puzzle step by step: [Puzzle Description]**
I see that the puzzle description is missing, so I can't solve the specific puzzle you're asking about.
**My approach:**
1. **Read the puzzle carefully:** Identify the key elements, constraints, and relationships involved.
2. **Create a grid or chart:** This helps visualize the information and make connections between different pieces of data.
3. **Apply logical reasoning:** Use deductive reasoning to eliminate possibilities that don't fit the constraints.
4. **Check each step:** Verify that each deduction is consistent with all the information given.
5. **Review the solution:** Ensure that the solution satisfies all the puzzle's constraints and that no contradictions exist.
**Without the specific puzzle content, I can't provide a step-by-step solution.** If you can provide the details of the puzzle you're working on, I'd be happy to walk through the solution process with you!
</think>
I'm sorry, but it looks like the actual logic puzzle (or "Task") you're asking about isn't provided in the message you've sent.
**Could you please provide the specific logic puzzle you'd like solved?**
<|end|>
This model's reasoning capabilities are built upon the foundations laid by the following research:
<|user|> and <|assistant|> prompt structure.This model is released under the MIT License.
[ EOF - Logic Protocol Active ]