[whatmodel.sh](../../README.md) / Llama 3.1 8B (base) # Llama 3.1 8B (base) Meta · released 2024-07 · 8.03B params · llama3.1 **score 44.8** ±3.0 · #481 of 732 · from 4 benchmark results across 3 sources Score within the [LMArena (text)](https://whatmodel.sh/?set=lmarena-text&score=set) comparison set only. ## What it's good at ● marks Llama 3.1 8B (base) among every model on that task or test, worst to best.
test result vs the others in its run difficulty counts why Open Persian LLM Leaderboard v2 a… 48.5% ▂▄▂▃●▄▃▆▃▅▂▂ beats 25/81 medium · avg 57% 43% blunt · at its level Open PT-LLM Leaderboard average (… 65.4% ▃▁▁▁▁▁▁▁▂●▅▁ beats 116/276 medium · avg 72% 22% at its level · noisy EuroEval HellaSwag (English), tes… 46.0% ▃·▁▁▂▁●▅█▇▄▁ beats 23/100 medium · avg 67% 17% sharp · at its level · noisy EuroEval Life in the UK (English … 83.5% ▁▁▁▁▁▁▁▂▄●▄▃ beats 89/146 easy · avg 82% 14% at its level · noisy
source results share of the score Open Persian LLM Leaderboard v2 1 43% ▇▇▇▇▇ EuroEval leaderboards 2 31% ▇▇▇▇ Open Portuguese LLM Leaderboard 1 22% ▇▇▇ prior: pull toward the middle 4% ▇ weighted average = 44.8Licences: Open Persian LLM Leaderboard v2 ([Apache-2.0](../../licenses/hf-leaderboard-spaces-Apache-2.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 Llama 3.1 8B (base) (Q4_K_M, needs ~4.9 GB, from [huggingface.co/fedric95](https://huggingface.co/fedric95/Meta-Llama-3.1-8B-GGUF/tree/073d5a5f42341987d1226dfdcfbbcba240cab63f)) ```sh llama cli -hf fedric95/Meta-Llama-3.1-8B-GGUF:Q4_K_M ``` 3. Or start a local server and open the address it prints (http://localhost:9931) ```sh llama serve -hf fedric95/Meta-Llama-3.1-8B-GGUF:Q4_K_M ``` Other versions: Q8_0 (~8.5 GB) `llama cli -hf fedric95/Meta-Llama-3.1-8B-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 Llama 3.1 8B (base) (Q4_K_M, needs ~4.9 GB, from [huggingface.co/fedric95](https://huggingface.co/fedric95/Meta-Llama-3.1-8B-GGUF/tree/073d5a5f42341987d1226dfdcfbbcba240cab63f)) ```sh lms get https://huggingface.co/fedric95/Meta-Llama-3.1-8B-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 (~8.5 GB) `lms get https://huggingface.co/fedric95/Meta-Llama-3.1-8B-GGUF@Q8_0 -y` · 4bit (~4.5 GB, Mac only) `lms get https://huggingface.co/mlx-community/Meta-Llama-3.1-8B-4bit -y` · 8bit (~8.5 GB, Mac only) `lms get https://huggingface.co/mlx-community/Meta-Llama-3.1-8B-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 Llama 3.1 8B (base) (Q4_K_M, needs ~4.9 GB, from [huggingface.co/fedric95](https://huggingface.co/fedric95/Meta-Llama-3.1-8B-GGUF/tree/073d5a5f42341987d1226dfdcfbbcba240cab63f)) ```sh ollama run hf.co/fedric95/Meta-Llama-3.1-8B-GGUF:Q4_K_M ``` Other versions: Q8_0 (~8.5 GB) `ollama run hf.co/fedric95/Meta-Llama-3.1-8B-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 Llama 3.1 8B (base) (4bit, needs ~4.5 GB, Mac only, from [huggingface.co/mlx-community](https://huggingface.co/mlx-community/Meta-Llama-3.1-8B-4bit/tree/c95a5b8ed0cf27f85f2a25021eeedc5d2266ec8a)) ```sh mlx_lm.chat --model mlx-community/Meta-Llama-3.1-8B-4bit ``` 3. Or start an OpenAI-compatible server at http://localhost:8080/v1 ```sh mlx_lm.server --model mlx-community/Meta-Llama-3.1-8B-4bit ``` Other versions: 8bit (~8.5 GB, Mac only) `mlx_lm.chat --model mlx-community/Meta-Llama-3.1-8B-8bit` ### Other ways to run it 1. Run it as published (BF16, needs ~16.06 GB, from [huggingface.co/meta-llama](https://huggingface.co/meta-llama/Llama-3.1-8B/tree/d04e592bb4f6aa9cfee91e2e20afa771667e1d4b)) ```sh uv run --with torch --with 'transformers<5' --with accelerate python -c "from transformers import pipeline; print(pipeline('text-generation', model='meta-llama/Llama-3.1-8B', torch_dtype='auto', device_map='auto')('Once upon a time', max_new_tokens=40)[0]['generated_text'])" ``` Model repository and documentation: [huggingface.co/meta-llama](https://huggingface.co/meta-llama/Llama-3.1-8B) [interactive version](https://whatmodel.sh/model/llama-3-1-8b-base) · [JSON](https://whatmodel.sh/api?format=json&all=1)