Instructions to use likithyadavv/codementor-v2-fullstack with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use likithyadavv/codementor-v2-fullstack with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B-Instruct") model = PeftModel.from_pretrained(base_model, "likithyadavv/codementor-v2-fullstack") - Notebooks
- Google Colab
- Kaggle
CodeMentor V2 β Full-Stack (codementor-v2-fullstack)
A QLoRA-fine-tuned LoRA adapter that extends CodeMentor, a Socratic programming tutor, from 4 foundational languages to 17 full-stack technologies.
This adapter is Phase 2 of a two-phase continued fine-tuning pipeline. It is not trained from scratch β it loads the Phase 1 checkpoint (likithyadavv/codementor-7b) as its base and attaches a new, larger LoRA adapter on top.
Model Tree
Qwen/Qwen2.5-7B
βββ Qwen/Qwen2.5-Coder-7B
βββ Qwen/Qwen2.5-Coder-7B-Instruct
βββ likithyadavv/codementor-7b (Phase 1: 4 languages)
βββ likithyadavv/codementor-v2-fullstack (Phase 2: 17 technologies β this adapter)
What This Model Does
CodeMentor is designed to teach, not just answer. Given a student's code snippet and a question, it:
- Identifies the language or technology
- Acknowledges what the student got right
- Explains the problem conceptually β without handing over the corrected solution
- Closes with a guiding question that pushes the student to reason through the fix themselves
Technologies Covered
Phase 1 (retained via dataset replay): Python, Java, C, C++
Phase 2 (new in this adapter): HTML/CSS, JavaScript, TypeScript, React, Next.js, Node.js, Express, FastAPI, Django, Spring Boot, SQL, MongoDB, Docker, Git, REST APIs
Training Details
| Phase 1 (base model) | Phase 2 (this adapter) | |
|---|---|---|
| Base | Qwen2.5-Coder-7B-Instruct | codementor-7b |
| Dataset size | 505 | 8,000 (6,415 new + 1,585 replayed) |
| LoRA rank (r) | 16 | 32 |
| LoRA alpha | 32 | 64 |
| Target modules | q, k, v, o | q, k, v, o, gate, up, down |
| Trainable params | ~40M (0.5%) | ~80M (1.05%) |
| Quantization | 4-bit NF4 | 4-bit NF4 + double quantization |
| Epochs | 4 | 1 |
| Final training loss | 0.370 | ~0.24 |
| Adapter size | ~40 MB | ~120 MB |
| Hardware | 2Γ NVIDIA T4 (Kaggle) | 2Γ NVIDIA T4 (Kaggle) |
| Training time | ~91.5 min | ~30 hours |
Why load Phase 1 as the base instead of raw Qwen? The Phase 1 checkpoint already encodes Socratic tutoring behavior for 4 languages, so Phase 2 only needs to learn new technology-specific vocabulary and error patterns β not the tutoring format itself. This warm start is reflected in training loss falling below 1.0 within 50 steps, despite Phase 2 having 16Γ more training examples than Phase 1.
Dataset replay: 1,585 Phase 1 examples (~19.8% of the Phase 2 training mix) were included to prevent catastrophic forgetting of the original 4 languages. Post-training evaluation confirmed 100% retention on all Phase 1 language test cases.
Evaluation
Manual evaluation across all 17 technologies, one representative test prompt each, against 5 pass/fail criteria (technology identification, correct error diagnosis, Socratic closing question, no direct solution given, Phase 1 retention):
- Overall: 97.2% (70/72 checks passed)
- Technology identification: 100% (17/17)
- Socratic closing question present: 100% (17/17)
- Phase 1 language retention: 100% (4/4)
This is a manual smoke-test evaluation, not a held-out benchmark β see Limitations below.
Usage
from transformers import AutoModelForCausalLM, BitsAndBytesConfig, AutoTokenizer
from peft import PeftModel
import torch
bnb = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type='nf4',
bnb_4bit_compute_dtype=torch.bfloat16,
)
base = AutoModelForCausalLM.from_pretrained(
'likithyadavv/codementor-7b',
quantization_config=bnb,
device_map='auto',
)
model = PeftModel.from_pretrained(base, 'likithyadavv/codementor-v2-fullstack')
tokenizer = AutoTokenizer.from_pretrained('likithyadavv/codementor-v2-fullstack')
Prompt format:
### System:
You are CodeMentor, a patient programming tutor for Python, Java, C, C++, HTML, CSS,
JavaScript, TypeScript, React, Next.js, Node.js, Express, FastAPI, Django, Spring Boot,
SQL, MongoDB, Git, REST APIs, and Docker. Always identify the language or technology
first. Acknowledge what is correct, then guide with hints and questions -- never give
away the full solution.
### Instruction:
{instruction}
### Input:
{code_snippet}
### Response:
Limitations
- Evaluated manually on one prompt per technology β no automated benchmark (BLEU/ROUGE/BERTScore) or held-out test set yet
- Single-turn only β no conversation memory across exchanges
- Training data was authored against a fixed schema and quality-reviewed, but at hand-crafted scale (8,000 examples), which limits further growth without a more scalable data pipeline
Citation
If you use this model, please cite:
CodeMentor LLM: A QLoRA Fine-Tuned Socratic Programming Tutor
Mohammad Yusha G.N., Likith Yadav, Suhas R, Dhananjay M. Hiremath
(Guide: Prof. Sanjivani D. Tipe)
Dept. of Artificial Intelligence & Machine Learning, MVJ College of Engineering, Bengaluru
SYNERGY 2026 β IC-SIIT, MS Ramaiah University of Applied Sciences
Acknowledgements
Built using the Hugging Face ecosystem β Transformers, PEFT, TRL, BitsAndBytes, and Datasets. Compute provided via Kaggle's free-tier GPU program.
- Downloads last month
- 18
Model tree for likithyadavv/codementor-v2-fullstack
Base model
Qwen/Qwen2.5-7B