[whatmodel.sh](../../README.md) / GPT-2 Medium (355M) # GPT-2 Medium (355M) OpenAI · released 2019-05 · 0.355B params · mit **score -5.4** ±1.3 · #730 of 732 · from 36 benchmark results across 9 sources Score within the [LMArena (text)](https://whatmodel.sh/?set=lmarena-text&score=set) comparison set only. ## What it's good at ● marks GPT-2 Medium (355M) among every model on that task or test, worst to best.
task vs the others rank counts tests math ●▁▃▅█▆▄█▄▂▁▁ #430 of 431* 0.3% 1
test result vs the others in its run difficulty counts why GSM8K 0.0% ●·▂█·······▂ beats 1/9 medium · avg 62% 0.3% sharp · too hard for it · noisy
test result vs the others in its run difficulty counts why OpenBookQA 18.6% ●▁▁▁▂▂▃█▃▁▃▁ beats 12/107 very hard · avg 26% 20% too hard for it · small run · several r… ARC Challenge 22.8% ●▁▁▂▁▄█▇▃▂▃▂ beats 4/140 very hard · avg 27% 18% sharp · too hard for it · several runs HellaSwag 32.2% ▁▁▁●▂▂▄▆█▇▄▂ beats 9/135 easy · avg 87% 13% several runs COPA 67.0% ▁·▁▁▁●▅█▆▂▁▁ beats 15/67 very easy · avg 97% 13% at its level · several runs Story Cloze Test 63.0% ▃▃●▂▅█▅▂▁··▂ beats 12/50 easy · avg 91% 10% blunt · several runs ARC Easy 49.4% ▁▃●▄▆█▅▃▁··▁ beats 12/100 very easy · avg 90% 9.3% blunt · at its level · several runs PROST physical reasoning (zero-sh… 26.8% █···██·●···█ beats 3/4 easy · avg 86% 4.8% too hard for it COPEN concept identification in c… 32.0% ▃···▃●·▃·▃·█ beats 2/7 easy · avg 81% 3.5% too hard for it Social IQA 41.4% ▁·▁●█▄▅▁▂▃▇▁ beats 12/59 medium · avg 71% 2.2% blunt PIQA 67.6% ▁▁▁●▂▃▅█▅▃▁▁ beats 15/123 easy · avg 89% 1.9% blunt · at its level BoolQ 56.6% ▁····▁●█▆▅▆▄ beats 4/103 easy · avg 91% 1.6% noisy COPEN conceptual similarity judgm… 10.5% ▄···█···●█·▄ beats 4/7 hard · avg 22% 0.5% blunt · too hard for it SVAMP 0.0% ●·▆▂▄▂▂····▂ beats 1/12 easy · avg 70% 0.4% sharp · too hard for it StrategyQA 0.1% ●········▁▃▁ beats 1/9 hard · avg 62% 0.3% too hard for it · noisy CommonsenseQA 0.0% ●····▁·····▁ beats 1/9 easy · avg 75% 0.3% sharp · too hard for it · several runs Open PT-LLM Leaderboard average (… 29.1% ●▁▁▁▁▁▁▁▂█▅▁ beats 24/276 medium · avg 72% 0.2% too hard for it · noisy EuroEval Life in the UK (English … 25.9% ▁●▁▁▁▁▁▂▄█▄▃ beats 2/146 easy · avg 82% 0.2% too hard for it · noisy EuroEval HellaSwag (English), tes… 24.9% ●·▁▁▂▁▂▅█▇▄▁ beats 3/100 medium · avg 67% 0.0% sharp · too hard for it · noisy COPEN conceptual property judgmen… 47.2% ●·······▁··▁ beats 5/7 very hard · avg 52% 0.0% blunt · too hard for it · noisy AQuA-RAT 3.9% ●·····▁·▁··▁ beats 1/9 medium · avg 53% 0.0% sharp · too hard for it · noisy
source results share of the score Coherence boosting: When your pretraine… 9 35% ▇▇▇▇ Surface Form Competition 7 25% ▇▇▇ CASE: Commonsense-Augmented Score with … 6 24% ▇▇▇ RankGen: Improving Text Generation with… 2 5% ▇ PROST 1 5% ▇ COPEN 3 4% ▇ Large Language Models Are Reasoning Tea… 5 1% ▇ EuroEval leaderboards 2 0% ▇ Open Portuguese LLM Leaderboard 1 0% ▇ prior: pull toward the middle 1% ▇ weighted average = -5.4Licences: Coherence boosting: When your pretrained language model is not paying enough attention ([CC BY 4.0](../../licenses/acl-2022-acl-long-565-CC-BY-4-0.txt)) · Surface Form Competition ([CC BY 4.0](../../licenses/acl-2021-emnlp-main-564-CC-BY-4.0.txt)) · CASE: Commonsense-Augmented Score with an Expanded Answer Space ([CC BY 4.0](../../licenses/acl-2023-findings-emnlp-180-CC-BY-4-0.txt)) · RankGen: Improving Text Generation with Large Ranking Models ([CC BY 4.0](../../licenses/acl-2022-emnlp-main-15-CC-BY-4-0.txt)) · PROST ([CC BY 4.0](../../licenses/_cc-by-4.0-legalcode.txt)) · COPEN ([CC BY 4.0](../../licenses/copen-emnlp2022-zero-shot-CC-BY-4.0.txt)) · Large Language Models Are Reasoning Teachers ([CC BY 4.0](../../licenses/acl-2023-acl-long-830-CC-BY-4-0.txt)) · EuroEval leaderboards ([MIT](https://github.com/EuroEval/leaderboards/blob/1a77f1d2f8ba1ba05ab73287fb090d76bf41b2e0/LICENSE)) · Open Portuguese LLM Leaderboard ([Apache-2.0](../../licenses/hf-leaderboard-spaces-Apache-2.0.txt)) ## 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 GPT-2 Medium (355M) (Q4_K_M, needs ~0.3 GB, from [huggingface.co/mradermacher](https://huggingface.co/mradermacher/gpt2-medium-GGUF/tree/3b9897d67a84e967fbcc8d7de3db4c797e386740)) ```sh llama cli -hf mradermacher/gpt2-medium-GGUF:Q4_K_M ``` 3. Or start a local server and open the address it prints (http://localhost:9931) ```sh llama serve -hf mradermacher/gpt2-medium-GGUF:Q4_K_M ``` Other versions: Q8_0 (~0.4 GB) `llama cli -hf mradermacher/gpt2-medium-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 GPT-2 Medium (355M) (Q4_K_M, needs ~0.3 GB, from [huggingface.co/mradermacher](https://huggingface.co/mradermacher/gpt2-medium-GGUF/tree/3b9897d67a84e967fbcc8d7de3db4c797e386740)) ```sh lms get https://huggingface.co/mradermacher/gpt2-medium-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 (~0.4 GB) `lms get https://huggingface.co/mradermacher/gpt2-medium-GGUF@Q8_0 -y` · 8bit (~0.4 GB, Mac only) `lms get https://huggingface.co/viktor2698/gpt2-medium-mlx-8Bit -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 GPT-2 Medium (355M) (Q4_K_M, needs ~0.3 GB, from [huggingface.co/mradermacher](https://huggingface.co/mradermacher/gpt2-medium-GGUF/tree/3b9897d67a84e967fbcc8d7de3db4c797e386740)) ```sh ollama run hf.co/mradermacher/gpt2-medium-GGUF:Q4_K_M ``` Other versions: Q8_0 (~0.4 GB) `ollama run hf.co/mradermacher/gpt2-medium-GGUF:Q8_0` ### MLX (Mac) 1. Install MLX (Mac). Apple silicon Macs only, text only. ```sh # with uv uv tool install mlx-lm # or pip install mlx-lm ``` 2. Run GPT-2 Medium (355M) (8bit, needs ~0.4 GB, Mac only, from [huggingface.co/viktor2698](https://huggingface.co/viktor2698/gpt2-medium-mlx-8Bit/tree/8bb3814b1fcfa9d04b3d051102b19d44b3e5064f)) ```sh mlx_lm.chat --model viktor2698/gpt2-medium-mlx-8Bit ``` 3. Or start an OpenAI-compatible server at http://localhost:8080/v1 ```sh mlx_lm.server --model viktor2698/gpt2-medium-mlx-8Bit ``` ### Other ways to run it 1. Run it as published (fp32, needs ~1.52 GB, from [huggingface.co/openai-community](https://huggingface.co/openai-community/gpt2-medium/tree/6dcaa7a952f72f9298047fd5137cd6e4f05f41da)) ```sh 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'])" ``` Model repository and documentation: [huggingface.co/openai-community](https://huggingface.co/openai-community/gpt2-medium) [interactive version](https://whatmodel.sh/model/gpt-2-medium) · [JSON](https://whatmodel.sh/api?format=json&all=1)