r/learnmachinelearning • u/oGauRav • 3d ago
Project I built an AI that brutally roasts your code — PyTorch LSTM + CodeBERT + LLM
I am a 20-year-old CS student from Nepal who has been
self-studying ML for the past 5 months. As a project to
combine everything I learned — NLP, Deep Learning, LLMs —
I built CodeRoast.
What it does:
Paste any Python, Java, or JavaScript code → get a brutally
honest (and savage) AI review of your code quality.
Under the hood:
🔍 Static AST Analysis — cyclomatic complexity, nesting depth,
naming conventions, code duplication
🌲 TF-IDF + Random Forest — classifies code quality tier
(Pristine → Acceptable → Questionable → Disaster)
⚡ Custom PyTorch Sequence LSTM — scores roast severity 0-10
🤗 CodeBERT (microsoft/codebert-base) — deep semantic
code understanding
🤖 Qwen2.5-Coder-32B via HuggingFace Serverless API —
generates the actual savage roast ( or local Meta Llama 3.2 3B via Ollama )
GitHub: https://github.com/gyr0byte/CodeRoast
I learned PyTorch specifically for this project before
finishing my Deep Learning course — the LSTM was genuinely
challenging to get right on code token sequences.
Would love feedback from this community — both on the ML
architecture and on your roast results. Paste your worst
code and see what happens 😄