How to use from
llama.cpp
Install from brew
brew install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf cortexso/phi-4-reasoning:
# Run inference directly in the terminal:
llama-cli -hf cortexso/phi-4-reasoning:
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf cortexso/phi-4-reasoning:
# Run inference directly in the terminal:
llama-cli -hf cortexso/phi-4-reasoning:
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 cortexso/phi-4-reasoning:
# Run inference directly in the terminal:
./llama-cli -hf cortexso/phi-4-reasoning:
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 cortexso/phi-4-reasoning:
# Run inference directly in the terminal:
./build/bin/llama-cli -hf cortexso/phi-4-reasoning:
Use Docker
docker model run hf.co/cortexso/phi-4-reasoning:
Quick Links

Overview

Microsoft Research developed and released the Phi-4-reasoning series, a cutting-edge family of reasoning-focused language models optimized for chain-of-thought (CoT), step-by-step problem solving, and high-efficiency inference. These models excel in advanced mathematical reasoning, scientific Q&A, and instruction-following scenarios.

The Phi-4 models introduce extended context lengths, ChatML reasoning templates, and strong performance on benchmark datasets, while maintaining compact sizes that are ideal for memory- and latency-constrained environments.

Variants

Phi-4-reasoning

No Variant Branch Cortex CLI command
1 phi-4-mini-reasoning 4b cortex run phi4:4b
2 phi-4-reasoning 14b cortex run phi4:14b
3 phi-4-reasoning-plus 14b-plus cortex run phi4:14b-plus

Each branch supports multiple quantized GGUF versions:

  • phi-4-mini-reasoning: q2_k, q3_k_l, q3_k_m, q3_k_s, q4_k_m, q4_k_s, q5_k_m, q5_k_s, q6_k, q8_0
  • phi-4-reasoning: q2_k, q3_k_l, q3_k_m, q3_k_s, q4_k_m, q4_k_s, q5_k_m, q5_k_s, q6_k, q8_0
  • phi-4-reasoning-plus: q2_k, q3_k_l, q3_k_m, q3_k_s, q4_k_m, q4_k_s, q5_k_m, q5_k_s, q6_k, q8_0

Use it with Jan (UI)

  1. Install Jan using Quickstart
  2. Use in Jan model Hub:
    cortexso/phi4
    

Use it with Cortex (CLI)

  1. Install Cortex using Quickstart
  2. Run the model with command:
    cortex run phi4
    

Credits

Downloads last month
648
GGUF
Model size
4B params
Architecture
phi3
Hardware compatibility
Log In to add your hardware

2-bit

3-bit

4-bit

5-bit

6-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support