23 Models, One Weekend, Final Picks

Share

Local LLM Bench – Part 5 (Full‑Scale Evaluation, Scoring Harness & Agentic Tasks)

Approximately 4,000 words – an exhaustive recap of the most recent installment in the Local LLM Bench series.


Table of Contents

  1. Executive Summary
  2. Background: Why Local LLM Bench Matters
  3. Recap of Parts 1–4
  • 3.1 The Early Years (10 Models, 2 Prompts)
  • 3.2 Incremental Scaling & Findings
  • 3.3 Lessons That Shaped Part 5
  1. Part 5 Overview: Goals & Scope
  2. Model Expansion – From Ten to Twenty‑Three
  3. Prompt Engineering: Beyond the Basics
  4. The 13‑Point Scoring Harness
  5. Python Agentic Tasks: A New Frontier
  6. Data Collection & Evaluation Pipeline
  7. Results & Analysis
    • 10.1 Raw Performance Across Models
    • 10.2 Score Distribution & Correlations
    • 10.3 Agentic Task Performance
    • 10.4 Unexpected Findings (“Surprises per HO”)
  8. Discussion: What the Numbers Tell Us
  9. Limitations & Future Work
  10. Concluding Thoughts

Executive Summary

Part 5 of the Local LLM Bench series marks a watershed moment for local large‑language‑model (LLM) evaluation. The benchmark evolved from an initial proof‑of‑concept featuring ten open‑source models and only two prompts into a mature, multi‑layered assessment framework that now includes:

  • 23 state‑of‑the‑art local LLMs ranging from lightweight 1 B‑parameter architectures to heavyweight 65 B‑parameter systems.
  • A 13‑point scoring harness that evaluates models on a spectrum of dimensions—accuracy, fluency, safety, alignment, and reasoning quality—using both automated metrics and human judgements.
  • Three Python agentic tasks that test LLMs’ ability to write, debug, and optimize code autonomously—a critical capability for real‑world application developers.
  • A suite of surprise‑factor analyses (referred to as “Surprises per HO” in the paper) revealing how often models produce novel or unexpected outputs even when the task is highly deterministic.

The results illuminate clear performance trends: larger, more densely trained models consistently outperform smaller ones on complex reasoning and safety criteria, while certain mid‑sized models excel in code generation. The benchmark also uncovers systemic gaps—particularly around ethical alignment and long‑form consistency—that developers can target with fine‑tuning or post‑processing techniques.

In short, Part 5 provides the most comprehensive view yet of how local LLMs stack up against each other, furnishing a robust, repeatable platform for future research, product development, and policy discussions.


Background: Why Local LLM Bench Matters

The proliferation of open‑source LLMs has democratized access to powerful language models. However, with that freedom comes the responsibility to understand how these models perform in real‑world scenarios—particularly when deployed on a local machine without relying on external APIs.

Key drivers for a localized benchmark include:

| Driver | Description | |--------|-------------| | Data Sovereignty | Organizations need to keep sensitive data in-house. | | Latency & Availability | Edge deployments demand instant, offline inference. | | Customizability | Fine‑tuning on proprietary corpora requires precise evaluation tools. | | Regulatory Compliance | Certain jurisdictions require transparency about model behavior. |

Local LLM Bench addresses each driver by providing:

  • A publicly available dataset (downloadable in a single repo) with consistent prompt structures.
  • An automated scoring pipeline that can be run on any GPU or CPU environment.
  • A human‑in‑the‑loop review system for tasks where algorithmic metrics fall short.

Recap of Parts 1–4

3.1 The Early Years (10 Models, 2 Prompts)

Part 1 introduced the initial cohort:

| Model | Parameters | Base Tokenizer | |-------|------------|----------------| | GPT‑NeoX-1.3B | 1.3 B | SentencePiece | | Llama‑7B | 7 B | BPE | | Mistral‑7B | 7 B | SentencePiece |

Only two baseline prompts were used:

  1. Standard question answering (e.g., “What is the capital of France?”).
  2. Open‑ended storytelling (“Write a short story about…”).

The focus was on establishing a minimal viable product (MVP) for benchmarking local models.

3.2 Incremental Scaling & Findings

Part 2 expanded to 14 additional models, adding open‑source variants of GPT‑4o and Claude Mini. The study added a lightweight scoring harness that only measured accuracy via the Rouge metric on the answer prompt.

Key findings:

  • Models trained on larger corpora performed better on common knowledge but often hallucinated when asked about niche topics.
  • Fine‑tuned models showed less variance across prompts, hinting at the power of domain adaptation.

3.3 Lessons That Shaped Part 5

Through Parts 1–4, several pain points emerged:

| Issue | Impact | Mitigation in Part 5 | |-------|--------|---------------------| | Limited prompt variety | Poor generalizability | Added 5 new prompts (policy, reasoning, code) | | Single‑metric evaluation | Over‑simplified view of quality | Introduced multi‑dimensional harness | | No code generation test | Ignored a core application domain | Developed Python agentic tasks |

These lessons became the foundation for Part 5’s comprehensive overhaul.


Part 5 Overview: Goals & Scope

| Goal | Description | |------|-------------| | Scale Up | Increase model pool to 23; cover 1–65 B parameter range. | | Diversify Prompts | Introduce 6 prompts covering policy, logic, code, summarization, translation, and creative writing. | | Sophisticated Scoring | 13‑point harness assessing accuracy, fluency, safety, reasoning, coherence, etc. | | Agentic Evaluation | Three Python tasks that require planning, code generation, debugging, and optimization. | | Surprise Analysis | Quantify unexpected outputs across prompts (“Surprises per HO”). |


Model Expansion – From Ten to Twenty‑Three

The expanded suite now includes:

  1. Meta LLaMA-2 13B & 70B (open‑weight releases)
  2. Mistral-7B, Mixtral-8x7B
  3. Anthropic Claude v2 (small, medium)
  4. OpenAI GPT-NeoX 20B (publicly hosted locally)
  5. EleutherAI StableLM 1.3B/7B/13B
  6. OpenLLM OpenChat-7B, Vicuna‑7B
  7. Socratic‑8x7B – a chain‑of‑thought tuned model
  8. CodeLlama-34B – code‑focused variant
  9. Falcon-40B, StarCoder2‑15B

Each model was downloaded, quantized (FP16 or INT8), and tested on the same GPU infrastructure to ensure fairness.


Prompt Engineering: Beyond the Basics

Part 5’s prompt set is carefully curated to probe distinct capabilities:

| Prompt | Category | Purpose | |--------|----------|---------| | Q‑A (“What is the …?”) | Knowledge | Tests recall. | | Policy (“Is X permissible under Y law?”) | Alignment | Checks legal/ethical stance. | | Logic Puzzle (“If A = B and B = C, what is A?”) | Reasoning | Measures logical inference. | | Code Generation (“Implement a quick‑sort in Python”) | Code | Evaluates programming skill. | | Debugging (“The following code fails with… fix it.”) | Debug | Tests error handling. | | Summarization (long article excerpt) | Language | Checks condensation & coherence. | | Creative Writing (short story prompt) | Creativity | Assesses narrative flair. |

All prompts are embedded in a contextual template that includes system messages specifying the model’s role, style guidelines, and safety constraints.


The 13‑Point Scoring Harness

The harness blends automated metrics with human review across thirteen dimensions:

| Dimension | Metric(s) | Human Review | |-----------|-----------|--------------| | Accuracy | Rouge-L, BLEU | Yes (question prompts) | | Fluency | Perplexity (model‑based), Readability | No | | Coherence | Cohesion Score | No | | Safety / Alignment | OpenAI Moderation API, Custom Rule Set | Yes | | Reasoning Quality | CoT Consistency Score | Yes | | Creativity | Novelty Index | No | | Code Correctness | Unit Tests Pass Rate | Yes (Python tasks) | | Debugging Accuracy | Test Coverage, Bug Fix Success | Yes | | Consistency Across Prompts | Standard Deviation of Scores | No | | Response Time | Latency | No | | Resource Usage | GPU/CPU Load | No | | User Satisfaction (UX) | Post‑task Survey | Yes | | Fairness / Bias | Demographic Analysis | No |

Scoring is performed in two stages:

  1. Automated Pass – Fast, reproducible metrics that filter out obviously incorrect responses.
  2. Human Annotation – Curators review a stratified sample to fine‑tune the scoring rubric and capture nuances like style or subtle safety violations.

Each dimension receives a weighted score (sum to 100 pts). The final model ranking is based on the aggregate score, but stakeholders can also examine per‑dimension breakdowns for targeted improvements.


Python Agentic Tasks: A New Frontier

Three real‑world Python tasks were added:

| Task | Description | Success Criteria | |------|-------------|------------------| | Task 1 – Sorter | Implement a generic quick‑sort that can handle lists of any comparable type. | Correctness on 100 random test cases; runtime < 0.5 s per list. | | Task 2 – Web Scraper | Write a script to fetch the latest headlines from a news site, parse them, and output JSON. | Successful API calls, no errors, correct JSON schema. | | Task 3 – Data Transformer | Build a pipeline that reads CSV, filters rows based on multiple criteria, aggregates data, and writes an Excel file. | Completes all steps, passes unit tests. |

These tasks are agentic because the model must plan, generate code, execute (via sandboxed environment), and iterate to fix errors—mirroring how developers interact with LLMs in practice.


Data Collection & Evaluation Pipeline

1. Dataset Generation

  • Prompt Templates stored in JSONL format.
  • For each prompt‑model pair, we generate 100 unique instances (e.g., varying questions).
  • All raw outputs are logged with timestamps and GPU metrics.

2. Automated Scoring Engine

  • Implemented in Python (benchmark_engine/) using HuggingFace datasets, transformers, and custom scripts.
  • Metrics run concurrently via multiprocessing; results cached for re‑analysis.

3. Human Review Interface

  • Web UI built on Flask + React.
  • Curators receive a random sample of 10 % of outputs per model per prompt.
  • Reviewers rate each dimension on a Likert scale and add comments.

4. Aggregation & Visualization

  • Data pipeline ends in Pandas DataFrames that feed into an interactive dashboard (Plotly Dash).
  • Graphs include heatmaps of per‑model, per‑prompt scores; box plots for latency distribution; Pareto charts for safety violations.

The entire process is fully reproducible; all code and data are open source on the Local LLM Bench GitHub repo.


Results & Analysis

10.1 Raw Performance Across Models

| Model | Avg Score (out of 100) | Accuracy % | Safety Violations | |-------|------------------------|------------|-------------------| | LLaMA‑2 70B | 92.4 | 94.1 | 0.8% | | Mistral‑7B | 86.6 | 88.3 | 1.5% | | Claude‑Medium | 84.9 | 87.0 | 2.3% | | StableLM‑13B | 80.7 | 83.4 | 1.8% | | CodeLlama‑34B | 79.2 | 82.6 | 1.2% | | OpenChat‑7B | 76.5 | 78.9 | 3.0% |

Key takeaways:

  • The largest models (70 B) dominate across all metrics but at the cost of higher compute overhead.
  • Models specifically tuned for code (CodeLlama‑34B) slightly underperform on general QA but excel in agentic tasks.

10.2 Score Distribution & Correlations

A Pearson correlation matrix reveals:

| Metric | Accuracy | Safety | CoT Quality | Code Correctness | |--------|----------|--------|-------------|-----------------| | Accuracy | 1.00 | -0.27 | 0.31 | 0.12 | | Safety | -0.27 | 1.00 | -0.15 | -0.08 | | CoT | 0.31 | -0.15 | 1.00 | 0.04 | | Code | 0.12 | -0.08 | 0.04 | 1.00 |

  • Accuracy and safety are negatively correlated, hinting at a trade‑off between knowledge depth and alignment safeguards.
  • CoT (chain‑of‑thought) quality shows moderate correlation with accuracy, but only for models explicitly fine‑tuned on reasoning datasets.

10.3 Agentic Task Performance

| Model | Sorter Success | Scraper Success | Transformer Success | |-------|----------------|-----------------|---------------------| | LLaMA‑2 70B | 97/100 | 94/100 | 95/100 | | Mistral‑7B | 89/100 | 87/100 | 85/100 | | Claude‑Medium | 81/100 | 79/100 | 78/100 | | CodeLlama‑34B | 94/100 | 91/100 | 90/100 |

Observations:

  • Code-focused models (CodeLlama) outperform general LLMs on all tasks, despite lower overall benchmark scores.
  • The Scraper task exposes a higher failure rate across all models due to API changes and anti‑scraping measures not anticipated in the training data.

10.4 Unexpected Findings (“Surprises per HO”)

The term “HO” refers to “Human‑oriented”—i.e., prompts where human judgment is essential (e.g., policy or creativity). The analysis counts how often a model produces an unexpected output that diverges from the expected range.

| Model | Surprise Rate (%) | Dominant Surprises | |-------|-------------------|--------------------| | LLaMA‑2 70B | 3.1 | Minor hallucinations in policy prompts | | Mistral‑7B | 4.6 | Over‑creative narratives for non‑creative prompts | | Claude‑Medium | 5.8 | Safe completion avoidance (too generic) | | CodeLlama‑34B | 2.9 | Rare code misinterpretations |

Surprise rates are relatively low, but even a small percentage can have significant real‑world impact, especially in regulated industries.


Discussion: What the Numbers Tell Us

1. Scale vs. Efficiency

Large models deliver higher raw scores but also consume significantly more memory and inference time. For edge deployment (e.g., on an RTX 3090 or even a CPU-only workstation), a 7‑B model such as Mistral or StableLM offers the best balance between performance and resource use.

2. Alignment vs. Accuracy Trade‑Off

The negative correlation between accuracy and safety underscores a policy dilemma. Models that push for knowledge coverage often do so at the expense of safe content filtering—particularly noticeable in policy prompts where legal correctness is paramount. Fine‑tuning on aligned datasets (e.g., open‑source OpenAI Moderation API-filtered corpora) can mitigate this trade‑off.

3. Code Generation vs. General Language

CodeLlama’s strong agentic performance indicates that architecture and training data specialized for code drastically improve program synthesis, even if they lag in natural language reasoning. Developers building AI assistants should consider ensemble approaches—e.g., a LLaMA‑based conversational core paired with CodeLlama for code tasks.

4. Prompt Diversity Matters

The breadth of prompts reveals that no single model dominates across all domains. This highlights the need for prompt engineering and possibly adaptive prompting strategies that select the best-suited model on-the-fly.


Limitations & Future Work

| Limitation | Impact | Proposed Remedy | |------------|--------|-----------------| | Limited Prompt Set | May bias results toward specific tasks. | Expand to 20+ prompts covering domains like mathematics, multi‑lingual translation, and policy sub‑fields. | | Hardware Bottleneck | Inference speed limited by GPU availability. | Optimize with model quantization (INT8) and flash attention. | | Human Review Bias | Curator subjectivity could skew scores. | Use a larger panel of reviewers and blind scoring protocols. | | Static Benchmarking | Models evolve; benchmark may become outdated quickly. | Adopt continuous integration pipeline that auto‑runs tests on new model releases. | | Safety Evaluation Scope | Only covers a narrow set of policy prompts. | Incorporate broader real‑world compliance checks (e.g., HIPAA, GDPR). |

Future iterations will also explore multi‑modal extensions (image & text) and multilingual coverage, aligning with the growing trend of cross‑model generality.


Concluding Thoughts

Part 5 of Local LLM Bench delivers a holistic, actionable view into how local large‑language‑models perform when pushed to their limits. By expanding the model set, diversifying prompts, and introducing an agentic code generation suite, the benchmark has become an indispensable tool for:

  • Researchers seeking reproducible performance metrics.
  • Product teams designing LLM‑powered services.
  • Policy makers monitoring alignment and safety risks.

The 13‑point scoring harness offers both depth (granular dimensions) and breadth (multi‑modal tasks), ensuring that no aspect of model behavior is left unchecked. And while the results reveal clear winners, they also remind us that there is no one‑size‑fits‑all solution—deployment decisions must weigh accuracy, safety, efficiency, and domain‑specific needs.

In an era where LLMs are increasingly embedded into everyday tools—from coding assistants to customer support chatbots—the Local LLM Bench Part 5 provides the transparency and rigor that stakeholders now demand. The next chapter? Continuous improvement of the benchmark itself, ensuring it stays ahead of model innovation while maintaining accessibility for all.


Read more