Upload README.md
Browse files123---license: mit---123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164---license: mitlanguage:- entags:- llm-evaluation- benchmarking- nlp- evaluation- accuracy- hallucination- reasoning- gpt- claude- gemini- mistral- llama- mmlu- truthfulqa- open-source- python- fastapi- streamlitlibrary_name: llm-evaluation-frameworkpipeline_tag: text-generation---# LLM Evaluation Framework<p align="center"><img src="https://img.shields.io/badge/python-3.10%2B-22c55e?style=flat-square&logo=python&logoColor=white"/><img src="https://img.shields.io/badge/License-MIT-eab308?style=flat-square"/><img src="https://img.shields.io/badge/FastAPI-0.115-14b8a6?style=flat-square&logo=fastapi"/><img src="https://img.shields.io/badge/Streamlit-1.40-ef4444?style=flat-square&logo=streamlit"/><img src="https://img.shields.io/badge/LiteLLM-1.52-8b5cf6?style=flat-square"/><img src="https://img.shields.io/github/stars/sohaibdevv/LLM-Evaluation-Framework?style=flat-square&color=eab308"/></p>> **Production-grade open-source LLM benchmarking.**> Evaluate GPT-4, Claude, Gemini, Mistral and Llama on 5 metrics โ side by side โ in one command.## What This IsThis is the **model card / hub page** for the LLM Evaluation Framework.The framework itself is a Python tool, not a neural network weight โ this page serves asthe HuggingFace hub entry point linking all resources together.| Resource | Link ||---|---|| GitHub | https://github.com/sohaibdevv/LLM-Evaluation-Framework || Live Demo | https://huggingface.co/spaces/sohaibdevv/llm-eval-demo || Dataset | https://huggingface.co/datasets/sohaibdevv/llm-eval-benchmark || Docs | https://sohaibdevv.github.io/LLM-Evaluation-Framework/ |## Quick Start```bashpip install llm-evaluation-frameworkexport OPENAI_API_KEY="sk-..."llm-eval run --model gpt-4o-mini --benchmark mmlu --samples 100```**Output:**```โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎโ Evaluation: gpt-4o-mini โโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโคโ Accuracy โ 78.00% โโ Avg Latency โ 432 ms โโ P95 Latency โ 1240 ms โโ Total Cost โ $0.0023 โโ Hallucination โ 2.40% โโ Reasoning Score โ 7.2 / 10 โโฐโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโฏ```## 5 Evaluation Metrics| Metric | Description | Output ||---|---|---|| **Accuracy** | 4-strategy cascade: exact โ normalized โ MC โ fuzzy | 0.0โ1.0 || **Latency** | p50, p75, p90, p95, p99 percentiles + SLA violation rate | ms || **Cost** | Real token counts ร pricing table for 15+ models | $/1K tokens || **Hallucination Rate** | Linguistic signal analysis (v1), NLI planned (v2) | 0.0โ1.0 || **Reasoning Quality** | Chain-of-thought depth scoring | 1โ10 |## Supported Models| Provider | Models ||---|---|| OpenAI | GPT-4o, GPT-4o-mini, o1, o1-mini, GPT-3.5-turbo || Anthropic | Claude 3.5 Sonnet, Claude 3.5 Haiku, Claude 3 Opus || Google | Gemini 1.5 Pro, Gemini 1.5 Flash, Gemini 2.0 Flash || Mistral | Mistral Large, Mistral Small || Meta | Llama 3 70B, Llama 3 8B (via Together AI) || Local | Ollama, vLLM, HuggingFace TGI |## Sample Benchmark Results (MMLU, 100 samples)| Model | Accuracy | Latency | Cost/1K | Hallucination | Reasoning ||---|---|---|---|---|---|| GPT-4o | 88.2% | 892ms | $0.0080 | 1.8% | 8.4/10 || Claude 3.5 Sonnet | 87.6% | 1240ms | $0.0090 | 2.1% | 8.6/10 || GPT-4o-mini | 78.4% | 432ms | $0.0003 | 3.2% | 7.2/10 || Gemini 1.5 Flash | 76.8% | 380ms | $0.0001 | 4.1% | 6.8/10 || Claude 3 Haiku | 74.2% | 410ms | $0.0010 | 4.8% | 6.5/10 |**Key finding:** GPT-4o-mini achieves 88% of GPT-4o's accuracy at 4% of the cost.## Features- **Async parallel evaluation** โ 10 models at once via `asyncio.Semaphore`- **Streamlit dashboard** โ radar charts, latency histograms, cost vs quality scatter- **FastAPI REST API** โ 12 endpoints with OpenAPI docs- **CLI tool** โ 7 subcommands with rich terminal output- **PDF report generator** โ professional layout via ReportLab- **SQLite persistence** โ zero-config, file-based storage- **Docker ready** โ multi-stage build, `docker-compose up`- **40+ tests, 95% coverage** โ pytest, no API keys needed## Architecture```CLI / FastAPI / Streamlit / PDF GeneratorโCore Evaluator (asyncio)โโโโโโโโโโโโโผโโโโโโโโโโโฌโโโโโโโโโโโMetrics Benchmarks Database LiteLLMaccuracy MMLU SQLite OpenAIlatency TruthfulQA Anthropiccost Custom CSV Googlehallucin. Mistralreasoning Together```## Install```bash# pippip install llm-evaluation-framework# With extraspip install "llm-evaluation-framework[dashboard,reports,dev]"# Dockerdocker-compose up -d```## LicenseMIT โ free for research and commercial use.## Citation```bibtex@software{sohaibdevv_llm_eval_2025,author = {sohaibdevv},title = {LLM Evaluation Framework},year = {2025},url = {https://github.com/sohaibdevv/LLM-Evaluation-Framework},license = {MIT}}```
README.md+161