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
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- llm-evaluation
|
| 7 |
+
- benchmarking
|
| 8 |
+
- nlp
|
| 9 |
+
- evaluation
|
| 10 |
+
- accuracy
|
| 11 |
+
- hallucination
|
| 12 |
+
- reasoning
|
| 13 |
+
- gpt
|
| 14 |
+
- claude
|
| 15 |
+
- gemini
|
| 16 |
+
- mistral
|
| 17 |
+
- llama
|
| 18 |
+
- mmlu
|
| 19 |
+
- truthfulqa
|
| 20 |
+
- open-source
|
| 21 |
+
- python
|
| 22 |
+
- fastapi
|
| 23 |
+
- streamlit
|
| 24 |
+
library_name: llm-evaluation-framework
|
| 25 |
+
pipeline_tag: text-generation
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
# LLM Evaluation Framework
|
| 29 |
+
|
| 30 |
+
<p align="center">
|
| 31 |
+
<img src="https://img.shields.io/badge/python-3.10%2B-22c55e?style=flat-square&logo=python&logoColor=white"/>
|
| 32 |
+
<img src="https://img.shields.io/badge/License-MIT-eab308?style=flat-square"/>
|
| 33 |
+
<img src="https://img.shields.io/badge/FastAPI-0.115-14b8a6?style=flat-square&logo=fastapi"/>
|
| 34 |
+
<img src="https://img.shields.io/badge/Streamlit-1.40-ef4444?style=flat-square&logo=streamlit"/>
|
| 35 |
+
<img src="https://img.shields.io/badge/LiteLLM-1.52-8b5cf6?style=flat-square"/>
|
| 36 |
+
<img src="https://img.shields.io/github/stars/vignesh2027/LLM-Evaluation-Framework?style=flat-square&color=eab308"/>
|
| 37 |
+
</p>
|
| 38 |
+
|
| 39 |
+
> **Production-grade open-source LLM benchmarking.**
|
| 40 |
+
> Evaluate GPT-4, Claude, Gemini, Mistral and Llama on 5 metrics โ side by side โ in one command.
|
| 41 |
+
|
| 42 |
+
## What This Is
|
| 43 |
+
|
| 44 |
+
This is the **model card / hub page** for the LLM Evaluation Framework.
|
| 45 |
+
The framework itself is a Python tool, not a neural network weight โ this page serves as
|
| 46 |
+
the HuggingFace hub entry point linking all resources together.
|
| 47 |
+
|
| 48 |
+
| Resource | Link |
|
| 49 |
+
|---|---|
|
| 50 |
+
| GitHub | https://github.com/vignesh2027/LLM-Evaluation-Framework |
|
| 51 |
+
| Live Demo | https://huggingface.co/spaces/vigneshwar234/llm-eval-demo |
|
| 52 |
+
| Dataset | https://huggingface.co/datasets/vigneshwar234/llm-eval-benchmark |
|
| 53 |
+
| Docs | https://vignesh2027.github.io/LLM-Evaluation-Framework/ |
|
| 54 |
+
|
| 55 |
+
## Quick Start
|
| 56 |
+
|
| 57 |
+
```bash
|
| 58 |
+
pip install llm-evaluation-framework
|
| 59 |
+
export OPENAI_API_KEY="sk-..."
|
| 60 |
+
llm-eval run --model gpt-4o-mini --benchmark mmlu --samples 100
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
**Output:**
|
| 64 |
+
```
|
| 65 |
+
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
|
| 66 |
+
โ Evaluation: gpt-4o-mini โ
|
| 67 |
+
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโค
|
| 68 |
+
โ Accuracy โ 78.00% โ
|
| 69 |
+
โ Avg Latency โ 432 ms โ
|
| 70 |
+
โ P95 Latency โ 1240 ms โ
|
| 71 |
+
โ Total Cost โ $0.0023 โ
|
| 72 |
+
โ Hallucination โ 2.40% โ
|
| 73 |
+
โ Reasoning Score โ 7.2 / 10 โ
|
| 74 |
+
โฐโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโฏ
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
## 5 Evaluation Metrics
|
| 78 |
+
|
| 79 |
+
| Metric | Description | Output |
|
| 80 |
+
|---|---|---|
|
| 81 |
+
| **Accuracy** | 4-strategy cascade: exact โ normalized โ MC โ fuzzy | 0.0โ1.0 |
|
| 82 |
+
| **Latency** | p50, p75, p90, p95, p99 percentiles + SLA violation rate | ms |
|
| 83 |
+
| **Cost** | Real token counts ร pricing table for 15+ models | $/1K tokens |
|
| 84 |
+
| **Hallucination Rate** | Linguistic signal analysis (v1), NLI planned (v2) | 0.0โ1.0 |
|
| 85 |
+
| **Reasoning Quality** | Chain-of-thought depth scoring | 1โ10 |
|
| 86 |
+
|
| 87 |
+
## Supported Models
|
| 88 |
+
|
| 89 |
+
| Provider | Models |
|
| 90 |
+
|---|---|
|
| 91 |
+
| OpenAI | GPT-4o, GPT-4o-mini, o1, o1-mini, GPT-3.5-turbo |
|
| 92 |
+
| Anthropic | Claude 3.5 Sonnet, Claude 3.5 Haiku, Claude 3 Opus |
|
| 93 |
+
| Google | Gemini 1.5 Pro, Gemini 1.5 Flash, Gemini 2.0 Flash |
|
| 94 |
+
| Mistral | Mistral Large, Mistral Small |
|
| 95 |
+
| Meta | Llama 3 70B, Llama 3 8B (via Together AI) |
|
| 96 |
+
| Local | Ollama, vLLM, HuggingFace TGI |
|
| 97 |
+
|
| 98 |
+
## Sample Benchmark Results (MMLU, 100 samples)
|
| 99 |
+
|
| 100 |
+
| Model | Accuracy | Latency | Cost/1K | Hallucination | Reasoning |
|
| 101 |
+
|---|---|---|---|---|---|
|
| 102 |
+
| GPT-4o | 88.2% | 892ms | $0.0080 | 1.8% | 8.4/10 |
|
| 103 |
+
| Claude 3.5 Sonnet | 87.6% | 1240ms | $0.0090 | 2.1% | 8.6/10 |
|
| 104 |
+
| GPT-4o-mini | 78.4% | 432ms | $0.0003 | 3.2% | 7.2/10 |
|
| 105 |
+
| Gemini 1.5 Flash | 76.8% | 380ms | $0.0001 | 4.1% | 6.8/10 |
|
| 106 |
+
| Claude 3 Haiku | 74.2% | 410ms | $0.0010 | 4.8% | 6.5/10 |
|
| 107 |
+
|
| 108 |
+
**Key finding:** GPT-4o-mini achieves 88% of GPT-4o's accuracy at 4% of the cost.
|
| 109 |
+
|
| 110 |
+
## Features
|
| 111 |
+
|
| 112 |
+
- **Async parallel evaluation** โ 10 models at once via `asyncio.Semaphore`
|
| 113 |
+
- **Streamlit dashboard** โ radar charts, latency histograms, cost vs quality scatter
|
| 114 |
+
- **FastAPI REST API** โ 12 endpoints with OpenAPI docs
|
| 115 |
+
- **CLI tool** โ 7 subcommands with rich terminal output
|
| 116 |
+
- **PDF report generator** โ professional layout via ReportLab
|
| 117 |
+
- **SQLite persistence** โ zero-config, file-based storage
|
| 118 |
+
- **Docker ready** โ multi-stage build, `docker-compose up`
|
| 119 |
+
- **40+ tests, 95% coverage** โ pytest, no API keys needed
|
| 120 |
+
|
| 121 |
+
## Architecture
|
| 122 |
+
|
| 123 |
+
```
|
| 124 |
+
CLI / FastAPI / Streamlit / PDF Generator
|
| 125 |
+
โ
|
| 126 |
+
Core Evaluator (asyncio)
|
| 127 |
+
โ
|
| 128 |
+
โโโโโโโโโโโโผโโโโโโโโโโโฌโโโโโโโโโโโ
|
| 129 |
+
Metrics Benchmarks Database LiteLLM
|
| 130 |
+
accuracy MMLU SQLite OpenAI
|
| 131 |
+
latency TruthfulQA Anthropic
|
| 132 |
+
cost Custom CSV Google
|
| 133 |
+
hallucin. Mistral
|
| 134 |
+
reasoning Together
|
| 135 |
+
```
|
| 136 |
+
|
| 137 |
+
## Install
|
| 138 |
+
|
| 139 |
+
```bash
|
| 140 |
+
# pip
|
| 141 |
+
pip install llm-evaluation-framework
|
| 142 |
+
|
| 143 |
+
# With extras
|
| 144 |
+
pip install "llm-evaluation-framework[dashboard,reports,dev]"
|
| 145 |
+
|
| 146 |
+
# Docker
|
| 147 |
+
docker-compose up -d
|
| 148 |
+
```
|
| 149 |
+
|
| 150 |
+
## License
|
| 151 |
+
|
| 152 |
+
MIT โ free for research and commercial use.
|
| 153 |
+
|
| 154 |
+
## Citation
|
| 155 |
+
|
| 156 |
+
```bibtex
|
| 157 |
+
@software{vigneshwar234_llm_eval_2025,
|
| 158 |
+
author = {Vigneshwar S},
|
| 159 |
+
title = {LLM Evaluation Framework},
|
| 160 |
+
year = {2025},
|
| 161 |
+
url = {https://github.com/vignesh2027/LLM-Evaluation-Framework},
|
| 162 |
+
license = {MIT}
|
| 163 |
+
}
|
| 164 |
+
```
|