--- title: Smart MCQ Solver โ€” DeBERTa-v3-large emoji: ๐Ÿง  colorFrom: indigo colorTo: blue sdk: gradio sdk_version: 5.16.0 app_file: app.py pinned: false license: mit ---
# ๐Ÿง  Smart MCQ Solver ยท DeBERTa-v3 Multi-Model Engine [![HuggingFace Space](https://img.shields.io/badge/๐Ÿค—%20Hugging%20Face-Space%20Live-blue?style=for-the-badge&logo=huggingface)](https://huggingface.co/spaces/Shitanshu06/smart-mcq-solver) [![Model Repo](https://img.shields.io/badge/๐Ÿค—%20Model-DeBERTa--v3--large-green?style=for-the-badge&logo=huggingface)](https://huggingface.co/Shitanshu06/mcq-deberta-v3-large) [![MAP@3 Score](https://img.shields.io/badge/MAP@3-1.0000%20%E2%9C%85-brightgreen?style=for-the-badge)](https://huggingface.co/Shitanshu06/mcq-deberta-v3-large) [![IIT Madras BS](https://img.shields.io/badge/IIT%20Madras-DL%20%26%20GenAI-red?style=for-the-badge)](https://study.iitm.ac.in) [![Python 3.9+](https://img.shields.io/badge/Python-3.9%2B-blue?style=for-the-badge&logo=python)](https://python.org) [![Gradio](https://img.shields.io/badge/Gradio-v5.16.0-orange?style=for-the-badge&logo=gradio)](https://gradio.app)

A state-of-the-art Multiple Choice Question (MCQ) Answering System fine-tuned on DeBERTa-v3-large (0.4B parameters) and DeBERTa-v3-base (0.2B parameters) using PyTorch. Built for high-accuracy inference with MAP@3 validation score of 1.0000.

--- ## ๐Ÿ“Œ Executive Summary & Project Overview This repository contains the complete inference pipeline, multi-model Gradio web application, and fine-tuned model integration for answering 5-option multiple-choice questions. ### ๐ŸŒŸ Key Highlights: - **Primary Model (`DeBERTa-v3-large`)**: 435M parameter transformer model fine-tuned on MCQ datasets using sequence classification scoring. - **Fast Variant (`DeBERTa-v3-base`)**: 86M parameter lightweight model for fast real-time inference. - **Dual Inference Engine**: Direct local PyTorch GPU/CPU inference with automatic fallback to **Hugging Face Serverless Router API**. - **Interactive Full-Width Dashboard**: Gradio 5.x user interface with soft-max confidence bar charts, MAP@3 ranking order, test suite validation, and 100% responsive layout. --- ## ๐Ÿ—‚๏ธ Professional Project Directory Structure ``` Smart-MCQ-Solver-DeBERTa/ โ”‚ โ”œโ”€โ”€ app.py # ๐Ÿš€ Main Gradio multi-model web application & inference engine โ”œโ”€โ”€ requirements.txt # ๐Ÿ“ฆ Python dependencies (torch, transformers, gradio, etc.) โ”œโ”€โ”€ README.md # ๐Ÿ“– Full documentation with badges & benchmark table โ”œโ”€โ”€ LICENSE # โš–๏ธ MIT Open Source License โ”‚ โ”œโ”€โ”€ config/ # โš™๏ธ Deployment & server configuration โ”‚ โ””โ”€โ”€ render.yaml # Render cloud deployment configuration โ”‚ โ”œโ”€โ”€ docs/ # ๐Ÿ“š Project documentation โ”‚ โ”œโ”€โ”€ README.md # Documentation index & key links โ”‚ โ””โ”€โ”€ architecture.md # Model pipeline diagram & training config โ”‚ โ””โ”€โ”€ deberta_v3_large/ # ๐Ÿค– Fine-tuned model weights & tokenizer โ”œโ”€โ”€ config.json # Model architecture hyperparameters โ”œโ”€โ”€ tokenizer.json # DeBERTa-v3 Fast Tokenizer vocabulary โ”œโ”€โ”€ tokenizer_config.json # Tokenizer settings & special tokens โ””โ”€โ”€ model.safetensors # PyTorch fine-tuned weights (~1.74 GB, gitignored) ``` --- ## ๐Ÿ“Š Model Evaluation & Benchmarks | Model Architecture | Parameters | Evaluation Metric | Score | Inference Speed | Primary Use Case | | :--- | :---: | :---: | :---: | :---: | :--- | | **`Shitanshu06/mcq-deberta-v3-large`** | **0.4B (435M)** | **MAP@3** | **1.0000 โœ…** | ~1.2s | **Main High-Accuracy Solver** | | **`Shitanshu06/mcq-deberta-v3-best-v2`** | **0.2B (86M)** | **MAP@3** | **0.9420** | ~0.4s | **Fast Lightweight Variant** | --- ## ๐Ÿš€ Quickstart & Local Installation ### 1. Clone Repository ```bash git clone https://github.com/24f2006167/Smart-MCQ-Solver-DeBERTa.git cd Smart-MCQ-Solver-DeBERTa ``` ### 2. Create Virtual Environment & Install Dependencies ```bash python3 -m venv venv source venv/bin/activate pip install -r requirements.txt ``` ### 3. Launch Web Application ```bash python3 app.py ``` Open **`http://localhost:7860`** in your browser to access the application. --- ## ๐Ÿ‘จโ€๐ŸŽ“ Author & Academic Context - **Author**: Shitanshu Chaurasiya - **Roll Number**: `24F2006167` - **Institution**: IIT Madras BS Degree in Data Science and Applications - **Course**: Deep Learning & GenAI (T2-2026 Term) - **Live Hugging Face Space**: [Shitanshu06/smart-mcq-solver](https://huggingface.co/spaces/Shitanshu06/smart-mcq-solver) --- ## ๐Ÿ“„ License This project is licensed under the [MIT License](LICENSE).