[whatmodel.sh](../../README.md) / Phi-1 (1.3B) # Phi-1 (1.3B) Microsoft · released 2023-09 · 1.42B params · mit **score 22.4** ±4.1 · #696 of 732 · from 3 benchmark results across 2 sources Score within the [LMArena (text)](https://whatmodel.sh/?set=lmarena-text&score=set) comparison set only. ## What it's good at ● marks Phi-1 (1.3B) among every model on that task or test, worst to best.
task    vs the others          rank  counts  tests
coding  ▁▁●▃▅▇█▇▅▄▃▁   #457 of 469*     75%      4
coding · #457 of 469 · 75% of its score Beats [Molmo 7B-D (0924)](molmo-7b-d.md), [DeepSeek R1 Distill Qwen 1.5B](deepseek-r1-distill-qwen-1-5b.md), [Qwen3 0.6B](qwen3-0-6b.md) here, though they rank higher overall.
test               result  vs the others in its run   difficulty        counts  why
CRUXEval-O          21.7%  ●·▂▃▁█▁▂···▁ beats 0/22    medium · avg 51%     39%  blunt
CRUXEval-I          13.1%  ●··▁▅▂█▇▁··▁ beats 0/22    medium · avg 52%     36%  typical
HumanEval (maker)   50.6%  ▁▁▁▁▂▂▆●█▅▂▁ beats 94/205  easy · avg 76%         —  not counted yet: no other model in the …
MBPP (maker)        55.5%  ▁▁▁▄▅█●▅▄▁▂▁ beats 48/86   easy · avg 67%         —  not counted yet: no other model in the …
other tests (1)
test                                result  vs the others in its run   difficulty        counts  why
Open PT-LLM Leaderboard average (…   27.5%  ●▁▁▁▁▁▁▁▂█▅▁ beats 35/276  medium · avg 72%     18%  noisy
## How the score was worked out Each result implies a score on its own, after adjusting for how hard that test is and who ran it. The model's score is their weighted average, with a small pull toward the middle for thinly tested models. Each test's weight is its *counts* column above; here it is added up by who ran the tests. [Method](../method.md)
source                                 results  share of the score
CRUXEval published evaluation results        2   75% ▇▇▇▇▇▇▇▇▇
Open Portuguese LLM Leaderboard              1   18% ▇▇
prior: pull toward the middle                     8% ▇
weighted average                                = 22.4
Licences: CRUXEval published evaluation results ([MIT](../../licenses/cruxeval-published-results-MIT.txt)) · Open Portuguese LLM Leaderboard ([Apache-2.0](../../licenses/hf-leaderboard-spaces-Apache-2.0.txt))
Not counted (2)
source                  test       score  why
Textbooks Are All You…  HumanEval  50.6%  too few models have it yet
Textbooks Are All You…  MBPP       55.5%  too few models have it yet
## How to run it ### llama.cpp (recommended) 1. Install llama.cpp. Homebrew and winget installs name the commands llama-cli and llama-server instead. [Other ways to install](https://github.com/ggml-org/llama.cpp/blob/master/docs/install.md) ```sh # macOS / Linux curl -LsSf https://llama.app/install.sh | sh # Windows irm https://llama.app/install.ps1 | iex ``` 2. Run Phi-1 (1.3B) (Q4_K_M, needs ~0.9 GB, from [huggingface.co/mradermacher](https://huggingface.co/mradermacher/phi-1-GGUF/tree/2d9381278a8afd694482fdeb277261db3ebdd1fb)) ```sh llama cli -hf mradermacher/phi-1-GGUF:Q4_K_M ``` 3. Or start a local server and open the address it prints (http://localhost:9931) ```sh llama serve -hf mradermacher/phi-1-GGUF:Q4_K_M ``` Other versions: Q8_0 (~1.5 GB) `llama cli -hf mradermacher/phi-1-GGUF:Q8_0` ### LM Studio 1. Install LM Studio. Open the app once before using the lms command. [Download it (macOS / Windows / Linux)](https://lmstudio.ai/download) 2. Run Phi-1 (1.3B) (Q4_K_M, needs ~0.9 GB, from [huggingface.co/mradermacher](https://huggingface.co/mradermacher/phi-1-GGUF/tree/2d9381278a8afd694482fdeb277261db3ebdd1fb)) ```sh lms get https://huggingface.co/mradermacher/phi-1-GGUF@Q4_K_M -y ``` 3. Then run lms ls to see its name, and lms chat followed by that name Other versions: Q8_0 (~1.5 GB) `lms get https://huggingface.co/mradermacher/phi-1-GGUF@Q8_0 -y` ### Ollama 1. Install Ollama. [Download it (macOS / Windows)](https://ollama.com/download) ```sh # Linux curl -fsSL https://ollama.com/install.sh | sh ``` 2. Run Phi-1 (1.3B) (Q4_K_M, needs ~0.9 GB, from [huggingface.co/mradermacher](https://huggingface.co/mradermacher/phi-1-GGUF/tree/2d9381278a8afd694482fdeb277261db3ebdd1fb)) ```sh ollama run hf.co/mradermacher/phi-1-GGUF:Q4_K_M ``` Other versions: Q8_0 (~1.5 GB) `ollama run hf.co/mradermacher/phi-1-GGUF:Q8_0` ### Other ways to run it 1. Run it as published (fp16, needs ~2.84 GB, from [huggingface.co/microsoft](https://huggingface.co/microsoft/phi-1/tree/d4c0adcb065e84e00ca814e35cba3012ea9841ab)) ```sh uv run --with torch --with 'transformers<5' python -c "from transformers import pipeline; print(pipeline('text-generation', model='microsoft/phi-1')('def fibonacci(n):', max_new_tokens=40)[0]['generated_text'])" ``` Model repository and documentation: [huggingface.co/microsoft](https://huggingface.co/microsoft/phi-1) [interactive version](https://whatmodel.sh/model/phi-1) · [JSON](https://whatmodel.sh/api?format=json&all=1)