whatmodel.sh / Phi-1 (1.3B)
Phi-1 (1.3B)
↗ share
+ contribute
Phi-1 (1.3B) is an open-weights language model from Microsoft, released September 2023. Its published size is 1.42B parameters and a 2k-token context window. Licence: mit.
Catalogue identity notes
Phi-1 1.3B Python code model (Gunasekar et al. 2023), base model.
$ how it compares
The LLMs ranked either side of Phi-1 (1.3B), out of 828 with a score, then more from Microsoft.
| # | model | score | where | ||
|---|---|---|---|---|---|
| 790 | 21±1 | local | |||
| 791 | 21±2 | local | |||
| 792 | 21±4 | local | |||
| 793 | 21±3 | local | |||
| 794 | 20±2 | local | |||
| more from Microsoft | |||||
| 252 | 59±1 | local | |||
| 261 | 58±1 | api $0.22/M +local | |||
| 365 | 53±1 | api $0.087/M +local | |||
$ what it's good at
coding▁▁▃▃▆██▇▆▄▃▁ #448 of 458 * · 76% of its score · 4 tests
Beats Molmo 7B-D (0924), DeepSeek R1 Distill Qwen 1.5B, Qwen3 0.6B here, though they rank higher overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| CRUXEval-O | 21.7% ✎ | ▃·▂▃▁█▁▂···▁ beats 0/22 | 40% |
| CRUXEval-I | 13.1% ✎ | ▃··▁▅▂█▇▁··▁ beats 0/22 | 37% |
| HumanEval lab | 50.6% ✎ | ▁▁▁▁▁▃▅▅█▃▂▁ beats 81/190 | — |
| MBPP lab | 55.5% ✎ | ▁▁▁▄▅█▄▅▃▁▂▁ beats 44/81 | — |
other tests1 not in a task · 16% of its score
| test | result | vs the others in its run | counts |
|---|---|---|---|
| Open PT-LLM Leaderboard average (9 Portuguese tasks) | 27.5% ✎ | ▃▁▁▁▁▁▁▁▂█▅▁ beats 35/276 | 16% |
$ where to run it
llama.cpp · recommended
version
- Install llama.cpp · Homebrew and winget installs name the commands llama-cli and llama-server instead.macOS / Linux
curl -LsSf https://llama.app/install.sh | shWindowsirm https://llama.app/install.ps1 | iex - Run Phi-1 (1.3B) · needs ~0.9 GB · from huggingface.co/mradermacherchat in the terminal
llama cli -hf mradermacher/phi-1-GGUF:Q4_K_M - Or start a local server and open the address it prints (http://localhost:9931)
llama serve -hf mradermacher/phi-1-GGUF:Q4_K_M
LM Studio
version
- Install LM Studio · Open the app once before using the lms command.
- Run Phi-1 (1.3B) · needs ~0.9 GB · from huggingface.co/mradermacher
- Or download it in the terminal
lms get https://huggingface.co/mradermacher/phi-1-GGUF@Q4_K_M -y - Then run lms ls to see its name, and lms chat followed by that name
Ollama
version
- Install Ollama
download it (macOS / Windows) ↗
Linuxcurl -fsSL https://ollama.com/install.sh | sh - Run Phi-1 (1.3B) · needs ~0.9 GB · from huggingface.co/mradermacherchat in the terminal
ollama run hf.co/mradermacher/phi-1-GGUF:Q4_K_M
Other ways to run it
- Run it as published · needs ~2.84 GB · from huggingface.co/microsoft (official)
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'])"
Official weights and documentation: huggingface.co/microsoft ↗
$ how the score was worked out · CRUXEval published evaluation… 76%, Open Portuguese LLM Leaderboa… 16%
Each result implies a score on its own, after adjusting for how hard its test is and who ran it. The 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's added up by who ran the tests. How it works
| source | results | share of the score |
|---|---|---|
| 2 | 76% | |
| 1 | 16% | |
| prior · pull toward the middle | 8% | |
| weighted average | = 20.7 |
not counted (2)
| Textbooks Are All You Need — authors' own runs | HumanEval [correct] | 50.6% | fewer than three models have this test yet, or this source ran it for this model alone |
| Textbooks Are All You Need — authors' own runs | MBPP [correct] | 55.5% | fewer than three models have this test yet, or this source ran it for this model alone |
$ improve this page
Use a short GitHub form or edit the data through a pull request. Every number needs a source; here's which ones we can use.
data updated · sources and licences · json