Instructions to use reelva/phi3-mini-reasoning-beast with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use reelva/phi3-mini-reasoning-beast with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="reelva/phi3-mini-reasoning-beast", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("reelva/phi3-mini-reasoning-beast", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("reelva/phi3-mini-reasoning-beast", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use reelva/phi3-mini-reasoning-beast with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "reelva/phi3-mini-reasoning-beast" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "reelva/phi3-mini-reasoning-beast", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/reelva/phi3-mini-reasoning-beast
- SGLang
How to use reelva/phi3-mini-reasoning-beast with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "reelva/phi3-mini-reasoning-beast" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "reelva/phi3-mini-reasoning-beast", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "reelva/phi3-mini-reasoning-beast" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "reelva/phi3-mini-reasoning-beast", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use reelva/phi3-mini-reasoning-beast with Docker Model Runner:
docker model run hf.co/reelva/phi3-mini-reasoning-beast
π§ Phi-3 Mini Reasoning Beast
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.
π Specifications
| 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 |
π οΈ Quick Start (Fixes RoPE KeyError)
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
)
β‘ Reasoning Demonstration (Zero-Shot Capability)
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|>
π Citations & References
This model's reasoning capabilities are built upon the foundations laid by the following research:
- Phi-3 Technical Report: Phi-3: A Highly Capable Language Model Locally on Your Phone
- Chain-of-Thought Prompting: Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Training Methodology: Inspired by advanced CoT fine-tuning on high-quality synthetic reasoning datasets and the "Abliterated" architectural concepts.
β οΈ Limitations and Usage
- Objective: Optimized for logical reasoning, mathematical deduction, and code analysis.
- Safety: Due to its experimental reasoning stream, standard safety guardrails may behave differently. Use with professional discretion.
- Context: Best performance is achieved using the
<|user|>and<|assistant|>prompt structure.
π License
This model is released under the MIT License.
[ EOF - Logic Protocol Active ]
- Downloads last month
- 29