Views
No views yet
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 |
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer, AutoConfig, TextStreamer
3
4model_id = "reelva/phi3-mini-reasoning-beast"
5
6# Mandatory RoPE patch for modern Transformers compatibility
7config = AutoConfig.from_pretrained(model_id)
8if hasattr(config, "rope_parameters"):
9 config.rope_parameters["original_max_position_embeddings"] = 4096
10
11model = AutoModelForCausalLM.from_pretrained(
12 model_id,
13 config=config,
14 torch_dtype=torch.float16,
15 device_map="auto"
16)
17tokenizer = AutoTokenizer.from_pretrained(model_id)
18streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=False)
19
20# Reasoning Prompt Template
21prompt = "<|user|>\nSolve this logic puzzle step by step: [Task]<|end|>\n<|assistant|>\n"
22inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
23
24_ = model.generate(
25 **inputs,
26 streamer=streamer,
27 max_new_tokens=1500,
28 do_sample=True,
29 temperature=0.7
30)1<|user|> Solve this logic puzzle step by step: [Task]<|end|>
2<|assistant|>1<|assistant|> <think>
2Let me solve this logic puzzle step by step...
3
4First, I need to understand the puzzle by reading through it carefully. The question mentions:
5
6**Logic Puzzle: [Task]
7Solve this logic puzzle step by step: [Puzzle Description]**
8
9I see that the puzzle description is missing, so I can't solve the specific puzzle you're asking about.
10
11**My approach:**
121. **Read the puzzle carefully:** Identify the key elements, constraints, and relationships involved.
132. **Create a grid or chart:** This helps visualize the information and make connections between different pieces of data.
143. **Apply logical reasoning:** Use deductive reasoning to eliminate possibilities that don't fit the constraints.
154. **Check each step:** Verify that each deduction is consistent with all the information given.
165. **Review the solution:** Ensure that the solution satisfies all the puzzle's constraints and that no contradictions exist.
17
18**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!
19</think>
20
21I'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.
22
23**Could you please provide the specific logic puzzle you'd like solved?**
24<|end|><|user|> and <|assistant|> prompt structure.