Downloads · 30 days
3
1% of all-time downloads
SSneha2005/Eduagent_distilbert
Eduagent_distilbert is a machine learning model from SSneha2005. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This directory contains the fine-tuned DistilBERT model for predicting learner difficulty levels (beginner, intermediate, advanced) in AI/ML educational contexts.
Downloads · 30 days
3
1% of all-time downloads
All-time downloads
293
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
This directory contains the fine-tuned DistilBERT model for predicting learner difficulty levels (beginner, intermediate, advanced) in AI/ML educational contexts.
distilbert-base-uncased (6 layers, 66M parameters)config.json ← Model config (vocab size, hidden dims, etc.)
model.safetensors ← Model weights (safetensors format)
tokenizer_config.json ← Tokenizer config
special_tokens_map.json ← Special token mappings
vocab.txt ← Vocabulary
The model is loaded automatically by ml/classifier.py:
from ml.classifier import classify_difficulty
level, confidence = classify_difficulty("What is supervised learning?")
# Returns: ("beginner", [0.98, 0.01, 0.01])
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_id = "Sneha-260805/distilbert-eduagent-v2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
inputs = tokenizer("What is a neural network?", return_tensors="pt")
outputs = model(**inputs)
logits = outputs.logits
predicted_level = logits.argmax(dim=-1).item()
# 0 = beginner, 1 = intermediate, 2 = advanced
| Metric | Value |
|---|---|
| Accuracy | 97.92% |
| Precision (macro) | 0.979 |
| Recall (macro) | 0.979 |
| F1-score (macro) | 0.979 |
Predicted Beginner Intermediate Advanced
Actual
Beginner 79 1 0
Inter. 0 78 2
Advanced 0 3 77
| Method | Accuracy | Notes |
|---|---|---|
| Keyword heuristic | 62.1% | Rule-based fallback (hand-crafted difficulty keywords) |
| DistilBERT v2 | 97.92% | Fine-tuned model with full context understanding |
TrainerIf this model directory is absent, ml/classifier.py automatically falls back to a lightweight keyword heuristic classifier:
def fallback_classifier(text):
"""Keyword-based difficulty detection (62.1% accuracy)"""
text_lower = text.lower()
beginner_keywords = ["what is", "explain", "basics", "introduction", "simple"]
intermediate_keywords = ["how to", "implement", "optimize", "design pattern"]
advanced_keywords = ["edge case", "architectural", "performance tuning", "novel"]
# ... scoring logic ...
This ensures the app remains functional even if model weights are unavailable, though with significantly lower accuracy.
The classifier is called at the start of every tutor interaction:
classify_difficulty(question) returns (level, [logits])If you use this model in your research or project, please cite:
@misc{eduagent2024,
author = {Suravajjula, Sneha},
title = {EduAgent: Adaptive AI Tutor with Personalized Learning Loop},
year = {2024},
url = {https://github.com/Sneha-260805/EduAgent}
}
This model is released under the same license as the EduAgent project. See the root repository LICENSE for details.
Model weights are also published at:
Sneha-260805/distilbert-eduagent-v2
This allows direct loading via HuggingFace transformers without cloning the entire EduAgent repository.
For full system architecture, training details, and experimental results, see report.tex.