3.4 KiB
license, base_model, language, pipeline_tag, library_name, tags
| license | base_model | language | pipeline_tag | library_name | tags | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| mit |
|
|
text-generation | transformers |
|
TOI-157-Phi-4-Reasoning-Mini
TOI-157-Phi-4-Reasoning-Mini is a reasoning-focused model fine-tuned on Microsoft’s Phi-4-mini-reasoning for Edge-level Abliterated Reasoning and optimized polished token probabilities, enhancing balanced multilingual generation across mathematics and general-purpose reasoning. It specializes in event-driven logic, structured analysis, and precise probabilistic modeling—making it an ideal tool for researchers, educators, and developers working with uncertainty and structured reasoning.
Key Features
-
Abliterated Reasoning Enhanced reasoning precision through polished token probability distributions in Phi-based models, ensuring balanced and context-aware outputs.
-
Event Simulation & Logical Analysis Models random events, probability-driven reasoning, and logical decision-making with strong consistency.
-
Multilingual Mathematical & General-Purpose Problem Solving Delivers robust performance in math, probability, and structured multilingual tasks, enabling wide applicability in global research and education.
-
Hybrid Symbolic-Probabilistic Thinking Combines structured logic, probabilistic inference, and reasoning fluency, providing accuracy across uncertainty-driven tasks.
-
Structured Output Mastery Generates well-structured outputs in LaTeX, Markdown, JSON, CSV, and YAML, supporting technical workflows and data-driven research.
-
Optimized Lightweight Footprint Compact mini parameter size, deployable on edge devices, offline clusters, and mid-range GPUs, while maintaining reasoning quality.
Quickstart with Transformers
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
torch.random.manual_seed(0)
model_id = "prithivMLmods/TOI-157-Phi-4-Reasoning-Mini"
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="cuda",
torch_dtype="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
messages = [{
"role": "user",
"content": "How to solve 3*x^2 + 4*x + 5 = 1?"
}]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt",
)
outputs = model.generate(
**inputs.to(model.device),
max_new_tokens=32768,
temperature=0.8,
top_p=0.95,
do_sample=True,
)
outputs = tokenizer.batch_decode(outputs[:, inputs["input_ids"].shape[-1]:])
print(outputs[0])
Intended Use
- Balanced multilingual reasoning and probability modeling
- Event simulation, uncertainty analysis, and structured problem solving
- Educational and research-focused reasoning tasks
- Lightweight deployment in constrained environments
- Technical content and structured data generation
Limitations
- Focused on reasoning and mathematics—less suited for creative writing
- Smaller size may limit depth on highly complex, multi-step tasks
- Prioritizes structured reasoning and probabilistic accuracy over conversational or emotional tone.
