RUNLOCALAIv38
->Will it run?Best GPUCompareTroubleshootStartLearnPulseModelsHardwareToolsBench
Run check
RUNLOCALAI

Independently operated catalog for local-AI hardware and software. Hand-written verdicts. Source-cited claims. Reproducible commands when we have them.

OP·Eruo Fredoline
DIR
  • Models
  • Hardware
  • Tools
  • Benchmarks
TOOLS
  • Will it run?
  • Compare hardware
  • Cost vs cloud
  • Choose my GPU
  • Prompting kits
  • Quick answers
REF
  • All buyer guides
  • Learn local AI
  • Methodology
  • Glossary
  • Errors KB
  • Trust
EDITOR
  • About
  • Author
  • How we make money
  • Editorial policy
  • Contact
LEGAL
  • Privacy
  • Terms
  • Sitemap
MAIL · MONTHLY DIGEST
Get monthly local AI changes
Monthly recap. No spam.
DISCLOSURE

Some links on this site are affiliate links (Amazon Associates and other first-class retailers). When you buy through them, we earn a small commission at no extra cost to you. Affiliate links do not influence our verdicts — there are cards we rate highly that we don't have affiliate relationships with, and cards that sell well that we refuse to recommend. Read more →

© 2026 runlocalai.coIndependently operated
RUNLOCALAI · v38
  1. >
  2. Home
  3. /Learn
  4. /How-to
  5. /How to compare file sizes between different quantization formats
HOW-TO · INF

How to compare file sizes between different quantization formats

intermediate·10 min·By Eruo Fredoline
Target environment
Ubuntu 24.04 · Ollama 0.4.x
PREREQUISITES

Multiple quantized versions of the same model available in Ollama

What this does

Lists multiple model variants and extracts their sizes to create a human-readable comparison for informed quantization selection. The result is a side-by-side view showing exactly how much disk space each variant consumes.

Steps

  1. Filter model inventory for a specific base model. Isolates rows for each variant of the target model.

    ollama list | grep llama3
    

    Expected output: Rows such as llama3:q4_K_M, llama3:q5_K_M, llama3:q8_0, and llama3:latest.

  2. Extract variant names and sizes. Pipe through awk to display only the NAME and SIZE columns.

    ollama list | grep llama3 | awk '{print $1, $NF}'
    

    Expected output: Each variant name paired with its byte size.

  3. Calculate total disk consumed by all variants. Sums the sizes to evaluate storage impact.

    ollama list | grep llama3 | awk '{sum+=$NF} END {print "Total bytes:", sum}'
    

    Expected output: Aggregate byte count for all llama3 variants.

  • Record the local run evidence. Save the exact command, runtime or package version, model name if applicable, and observed output so the result can be reproduced later.

Verification

ollama list | grep llama3 | awk '{print $1, $NF}'
# Expected: list such as "llama3:q4_K_M 4.1G", "llama3:q5_K_M 5.2G", "llama3:q8_0 6.8G"

Common failures

  • grep no matches: Model name is incorrect; verify exact case with ollama list first.
  • column misalignment: The SIZE column index may vary by Ollama version; inspect raw table output to find the correct column.
  • no variants present: Pull additional quantization levels first with ollama pull <model>:<tag>.
  • suffix confusion: Byte suffixes may differ (G vs GB); compare within the same unit for accuracy.
  • whitespace issues: Ollama output may contain leading/trailing whitespace; use tr -s ' ' before parsing.

Related guides

  • How to pull a model with Q5_K_M quantization for detailed responses
  • How to choose the right quantization level based on your hardware
RELATED GUIDES
INF
How to pull a model with Q5_K_M quantization for detailed responses
INF
How to choose the right quantization level based on your hardware
← All how-to guidesCourses →