Instructions to use WithinUsAI/Phi4-Reasoner-Uncensored-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use WithinUsAI/Phi4-Reasoner-Uncensored-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="WithinUsAI/Phi4-Reasoner-Uncensored-gguf", filename="Phi-4-Reasoner-Uncensored-Q4_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use WithinUsAI/Phi4-Reasoner-Uncensored-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M
Use Docker
docker model run hf.co/WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use WithinUsAI/Phi4-Reasoner-Uncensored-gguf with Ollama:
ollama run hf.co/WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M
- Unsloth Studio
How to use WithinUsAI/Phi4-Reasoner-Uncensored-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for WithinUsAI/Phi4-Reasoner-Uncensored-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for WithinUsAI/Phi4-Reasoner-Uncensored-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for WithinUsAI/Phi4-Reasoner-Uncensored-gguf to start chatting
- Pi
How to use WithinUsAI/Phi4-Reasoner-Uncensored-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use WithinUsAI/Phi4-Reasoner-Uncensored-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use WithinUsAI/Phi4-Reasoner-Uncensored-gguf with Docker Model Runner:
docker model run hf.co/WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M
- Lemonade
How to use WithinUsAI/Phi4-Reasoner-Uncensored-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull WithinUsAI/Phi4-Reasoner-Uncensored-gguf:Q4_K_M
Run and chat with the model
lemonade run user.Phi4-Reasoner-Uncensored-gguf-Q4_K_M
List all available models
lemonade list
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Phi4-Reasoner-Uncensored-GGUF
Model Summary
Phi4-Reasoner-Uncensored-GGUF is an uncensored GGUF conversion of Microsoft's reasoning-focused Phi-4 Mini Reasoning model, released for local inference, research, experimentation, and open-ended instruction following.
This version aims to preserve the strong reasoning, mathematics, coding, analytical thinking, and multi-step problem-solving capabilities of the original model while reducing alignment restrictions and response filtering commonly present in safety-tuned releases.
The model is intended for users who prefer maximum output freedom and direct responses during local deployment.
Key Features
- ๐ง Strong reasoning capabilities
- ๐ Advanced mathematical problem solving
- ๐ป Coding and debugging assistance
- ๐ Long-context support
- ๐ Reduced alignment restrictions
- โก GGUF format for llama.cpp-compatible runtimes
- ๐ฅ๏ธ Suitable for local deployment
- ๐ Works with LM Studio, Ollama, KoboldCPP, Jan, Open WebUI, and llama.cpp
Base Model
This model is derived from:
Phi-4-mini-reasoning is a 3.8B parameter transformer model specifically trained for reasoning-intensive tasks and mathematical problem solving. Microsoft reports strong performance across benchmarks including AIME, MATH-500, and GPQA. (Hugging Face)
Modifications
Phi4-Reasoner-Uncensored-GGUF introduces the following changes:
- Removal or reduction of refusal behavior where possible
- Reduced safety filtering
- Increased willingness to answer controversial, fictional, speculative, and unrestricted prompts
- Preservation of reasoning-focused behavior
- GGUF conversion for efficient local inference
- Quantized variants for resource-constrained hardware
No claims are made that all alignment mechanisms have been completely removed.
Intended Use
Recommended
- Research
- Education
- Coding assistance
- Mathematical reasoning
- Creative writing
- Story generation
- Roleplay
- Simulation
- Agent frameworks
- Local AI assistants
- Experimental AI research
Not Recommended
- Medical diagnosis
- Legal advice
- Financial advice
- High-risk autonomous systems
- Safety-critical environments
Users are responsible for validating all outputs.
Context Length
| Feature | Value |
|---|---|
| Parameters | 3.8B |
| Context Length | 128K |
| Architecture | Decoder-Only Transformer |
| Vocabulary | 200K+ Tokens |
| Format | GGUF |
Based on the original Phi-4-mini-reasoning architecture. (Hugging Face)
Prompt Format
Chat Template
<|system|>
You are a helpful reasoning assistant.
<|end|>
<|user|>
Explain how binary search works.
<|end|>
<|assistant|>
Recommended Settings
temperature: 0.6
top_p: 0.95
min_p: 0.05
repeat_penalty: 1.05
max_tokens: 4096
Example Use Cases
Mathematics
- Algebra
- Calculus
- Statistics
- Proof generation
- Olympiad-style reasoning
Coding
- Python
- JavaScript
- C++
- Rust
- SQL
- Debugging
- Code explanation
Reasoning
- Logic puzzles
- Multi-step planning
- Research assistance
- Agent workflows
Creative Tasks
- Worldbuilding
- Character creation
- Fiction writing
- Interactive storytelling
Hardware Requirements
Approximate recommendations:
| Quant | RAM Requirement |
|---|---|
| Q4_K_M | 6-8 GB |
Actual requirements vary by context size and backend.
Limitations
Like all language models, this model may:
- Hallucinate facts
- Generate incorrect reasoning
- Produce inaccurate citations
- Reflect biases present in training data
- Generate offensive or controversial content
- Produce unsafe outputs if prompted
Users should independently verify important information.
License
This repository inherits the license and usage requirements of the original Microsoft Phi-4-mini-reasoning release.
Please review the original license before commercial deployment:
Original Phi-4-mini-reasoning License and Model Card
Acknowledgements
Special thanks to:
Created by: WithinUsAI Model: Phi4-Reasoner-Uncensored-GGUF Type: Reasoning LLM / GGUF Status: Community Release Version: 1.0
- Downloads last month
- 582
4-bit