A modular framework for benchmarking Large Language Models (LLMs) on standardized code generation benchmarks.
The framework evaluates model-generated Python code using automated unit tests, computes evaluation metrics, categorizes common failure modes, generates JSON reports, and provides an interactive Streamlit dashboard for comparing models.
Try the interactive dashboard here:
The dashboard allows you to:
- 📊 Compare multiple LLMs across HumanEval and MBPP
- 📈 Visualize evaluation metrics and error distributions
- 🔍 Explore task-level evaluation results
- 🚀 Evaluate your own Groq-hosted model in real time
- 📊 Benchmark LLMs on multiple code generation datasets
- 🤖 Evaluate any Groq-hosted model
- ✅ Functional correctness evaluation using unit tests
- 📈 Automatic evaluation metrics
- Accuracy
- Passed / Failed tasks
- Syntax Error Rate
- Runtime Error Rate
- Average Execution Time
- 🔍 Error categorization
- Assertion Errors
- Name Errors
- Type Errors
- Syntax Errors
- 💾 Export evaluation reports as JSON
- 📊 Interactive Streamlit dashboard
- 🚀 Live model evaluation from the dashboard
Generated code may appear correct while still failing on hidden edge cases.
Instead of relying on manual inspection, this framework executes model-generated programs against standardized unit tests to objectively measure functional correctness.
This enables fair and reproducible comparison across different language models.
HumanEval is an OpenAI benchmark consisting of handwritten Python programming problems.
Each generated solution is evaluated using hidden unit tests, making it one of the most widely used benchmarks for measuring code generation capability.
MBPP contains natural language programming tasks covering practical Python programming concepts including:
- Strings
- Lists
- Mathematics
- Recursion
- Searching
- Sorting
Solutions are evaluated using public unit tests.
Prompt
│
▼
Groq Model
│
▼
Code Generation
│
▼
Code Extraction
│
▼
Python Executor
│
▼
Benchmark Unit Tests
│
▼
Evaluation Metrics
│
▼
JSON Report
│
▼
Interactive Dashboard
.
├── dashboard/
│ ├── app.py
│ └── dashboard_utils.py
│
├── results/
│ ├── humaneval/
│ └── mbpp/
│
├── src/
│ ├── benchmarks/
│ ├── evaluators/
│ ├── executors/
│ ├── metrics/
│ ├── models/
│ ├── reporters/
│ ├── utils/
│ └── main.py
│
├── requirements.txt
└── README.md
Currently tested using Groq-hosted models:
- Llama 3.3 70B Versatile
- GPT OSS 120B
The framework can evaluate any supported Groq model by providing the model name and API key through the Streamlit interface.
| Metric | Description |
|---|---|
| Accuracy | Percentage of tasks successfully solved |
| Passed | Number of tasks passing all unit tests |
| Failed | Number of failed tasks |
| Syntax Error Rate | Percentage of syntax failures |
| Runtime Error Rate | Percentage of execution failures |
| Average Execution Time | Average runtime per task |
The Streamlit dashboard provides:
- Benchmark comparison
- Model comparison
- Runtime analysis
- Error distribution
- Task explorer
- Live evaluation of user-provided Groq models
Users can benchmark their own Groq-hosted models directly from the dashboard.
Simply provide:
- Groq API Key
- Groq Model Name
- Benchmark
- Number of Tasks
The framework automatically:
- Runs evaluation
- Computes metrics
- Generates JSON reports
- Updates the benchmark dashboard
Clone the repository
git clone https://github.com/<username>/llm-code-evaluation-framework.git
cd llm-code-evaluation-frameworkInstall dependencies
pip install -r requirements.txtCreate a .env
GROQ_API_KEY=your_api_key_here
CLI
python src/main.pyDashboard
streamlit run dashboard/app.py| Model | HumanEval | MBPP |
|---|---|---|
| GPT OSS 120B | 92% | 69% |
| Llama 3.3 70B | 87% | 54% |
- Python
- Streamlit
- Plotly
- Hugging Face Datasets
- Groq API
- Support additional benchmarks (e.g., TACO)
- Hugging Face Inference support
- Ollama integration
- CSV export
- Pass@k evaluation
- Additional visualization and benchmarking metrics