whatmodel.sh / GPT-2 Medium (355M)
GPT-2 Medium (355M)
↗ share
+ contribute
GPT-2 Medium (355M) is an open-weights language model from OpenAI, released May 2019. Its published size is 0.355B parameters and a 1k-token context window. Licence: mit.
Catalogue identity notes
OpenAI's released GPT-2 checkpoint as hosted at openai-community/gpt2-medium (formerly the root-namespace 'gpt2-medium' repo). Base (pretrained) model; parameter count as corrected in openai/gpt-2 README.
$ how it compares
The LLMs ranked either side of GPT-2 Medium (355M), out of 828 with a score, then more from OpenAI.
| # | model | score | where | ||
|---|---|---|---|---|---|
| 824 | 3±2 | local | |||
| 825 | 1±2 | local | |||
| 826 | -1±2 | local | |||
| 827 | -7±2 | local | |||
| 828 | -9±3 | local | |||
| more from OpenAI | |||||
| 1 | 87±1 | api $20.00/M | |||
| 3 | 85±1 | api $4.00/M | |||
| 7 | 83±1 | api $4.00/M | |||
$ what it's good at
other tests14 not in a task · 98% of its score
| test | result | vs the others in its run | counts |
|---|---|---|---|
| OpenBookQA | 18.6% ✎ | █▁▁▁▄▃▃▇▂▁▄▂ beats 7/65 | 18% |
| ARC Challenge | 22.8% ✎ | ▆▁▁▂▂▅▇█▄▃▃▂ beats 1/97 | 16% |
| HellaSwag | 32.2% ✎ | ▁▃▁▁▂▂▃▇█▆▅▃ beats 1/85 | 14% |
| PROST physical reasoning (zero-shot, 10-concept macro average) | 26.8% ✎ | █···██·█···█ beats 3/4 | 13% |
| CommonsenseQA | 30.9% ✎ | █·····█·█··█ beats 1/3 | 10% |
| ARC Easy | 49.4% ✎ | ▁▂▃▃▃▅▇█▇▆▄▆ beats 8/65 | 10% |
| COPA | 67.0% ✎ | ▄·▄·█··▆▂··▂ beats 5/12 | 8.4% |
| Story Cloze Test | 63.0% ✎ | █····█···█·█ beats 1/3 | 6.8% |
6 more tests
| test | result | vs the others in its run | counts |
|---|---|---|---|
| COPEN concept identification in context (zero-shot, full prompt) | 32.0% ✎ | ▃···▃▃·▃·▃·█ beats 2/7 | 1.3% |
| EuroEval Life in the UK (English knowledge MC), test split, 5-shot, accuracy | 25.9% ✎ | ▁▃▁▁▁▁▁▂▄█▄▃ beats 2/146 | 0.8% |
| Open PT-LLM Leaderboard average (9 Portuguese tasks) | 29.1% ✎ | ▃▁▁▁▁▁▁▁▂█▅▁ beats 24/276 | 0.8% |
| EuroEval HellaSwag (English), test split, 5-shot generative MC, accuracy | 24.9% ✎ | ▃·▁▁▂▁▂▅█▇▄▁ beats 3/100 | 0.2% |
| COPEN conceptual similarity judgment (zero-shot, full prompt) | 10.5% ✎ | ▄···█···██·▄ beats 4/7 | 0.1% |
| COPEN conceptual property judgment (zero-shot, full prompt) | 47.2% ✎ | █·······▁··▁ beats 5/7 | 0.0% |
$ 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 GPT-2 Medium (355M) · needs ~0.3 GB · from huggingface.co/mradermacherchat in the terminal
llama cli -hf mradermacher/gpt2-medium-GGUF:Q4_K_M - Or start a local server and open the address it prints (http://localhost:9931)
llama serve -hf mradermacher/gpt2-medium-GGUF:Q4_K_M
LM Studio
version
- Install LM Studio · Open the app once before using the lms command.
- Run GPT-2 Medium (355M) · needs ~0.3 GB · from huggingface.co/mradermacher
- Or download it in the terminal
lms get https://huggingface.co/mradermacher/gpt2-medium-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 GPT-2 Medium (355M) · needs ~0.3 GB · from huggingface.co/mradermacherchat in the terminal
ollama run hf.co/mradermacher/gpt2-medium-GGUF:Q4_K_M
MLX (Mac)
- Install MLX (Mac) · Apple silicon Macs only, text only.with uv
uv tool install mlx-lmorpip install mlx-lm - Run GPT-2 Medium (355M) · needs ~0.4 GB, Mac only · from huggingface.co/viktor2698chat in the terminal
mlx_lm.chat --model viktor2698/gpt2-medium-mlx-8Bit - Or start an OpenAI-compatible server at http://localhost:8080/v1
mlx_lm.server --model viktor2698/gpt2-medium-mlx-8Bit
Other ways to run it
- Run it as published · needs ~1.52 GB · from huggingface.co/openai-community
uv run --with torch --with 'transformers<5' python -c "from transformers import pipeline; print(pipeline('text-generation', model='openai-community/gpt2-medium')('Once upon a time', max_new_tokens=40)[0]['generated_text'])"
Weights and documentation: huggingface.co/openai-community ↗
$ how the score was worked out · Surface Form Competition (Hol… 82%, PROST (Aroca-Ouellette et al.… 13%, COPEN — EMNLP 2022 original z… 1% and 2 more
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 |
|---|---|---|
| 7 | 82% | |
| 1 | 13% | |
| 3 | 1% | |
| 2 | 1% | |
| 1 | 1% | |
| prior · pull toward the middle | 2% | |
| weighted average | = -1.5 |
$ 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