Skip to main content

Model guide

Meta Llama 3.1 8B Instruct

Llama 3.1 8B is a text-only starting point for multilingual chat, summaries and rewriting. Choose it when an 8B assistant fits your machine and you want to compare a familiar Llama workflow with Qwen or Mistral. Its published long-context limit is not a promise that a laptop can load that much text.

8.03BText chat131,072 token contextView the model card →

At a glance

Parameters
8.03B
Accepts
Text
Returns
Text
Published context limit
131,072 tokens
Model format
safetensors · GGUF
Software and download hosts
Ollama. Follow the exact setup below; this list does not establish support for every format, input type or software version.
Suggested compression
Q4_K_M
Model-weight download
Q4_K_M weights · 4.92 GBbartowski (community conversion)Meta-Llama-3.1-8B-Instruct-Q4_K_M.gguf
Languages
English · German · French · Italian · Portuguese · Hindi · Spanish · Thai

Will it fit?

Meta Llama 3.1 8B Instruct · Q4_K_M download. Fit depends on your computer, the app you run it in and the conversation length you need.

Check on your computer

Best for

  • Turn a short order note into typed JSON. Check the number, date and missing tracking field before moving to longer notes.

Choose something else when

  • For image questions, choose a vision checkpoint. The original 3.1 8B Instruct takes text.

First setup

Check a representative task

Try extraction from a short supplied record before testing open-ended questions.

Use only this note. Return a JSON object with exactly these keys: item, quantity, due_date, tracking_number. Use a string for item, an integer for quantity, an ISO YYYY-MM-DD string for due_date, and null for a missing tracking_number. Do not add Markdown or commentary.
Note: Order R-17 contains three replacement keyboards. Delivery is due on 12 November 2026. No tracking number has been issued.

Check the result: Parse the result as JSON. It should contain exactly the four requested keys, with item="replacement keyboards" (equivalent wording is acceptable), quantity=3 as a number, due_date="2026-11-12", and tracking_number=null. Reject extra prose, a quoted quantity or a fabricated tracking number.

Correct JSON in this exercise does not establish API-level structured-output enforcement or native tool calling.

This creates a 4,096-token copy of llama3.1:8b named llama-3-1-8b-instruct-short-context. Save the following as a file named Modelfile in your working folder:

FROM llama3.1:8b
PARAMETER num_ctx 4096

Then run these commands from that folder:

ollama pull llama3.1:8b
ollama create llama-3-1-8b-instruct-short-context -f ./Modelfile
ollama run llama-3-1-8b-instruct-short-context

Run the task check. While the model is loaded, run ollama ps in another terminal and check CONTEXT and PROCESSOR.

The recorded Ollama package is Q4_K_M: 4.92 GB of model weights. Use Ollama 0.40.18 or a supporting newer release. A Hugging Face GGUF or MLX checkpoint is a separate representation; choose the matching source and runner in the memory calculator.

See Ollama context settings and the Modelfile instructions.

Other models for this task