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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# π EduMentor-Qwen3-4B-FP16
|
| 2 |
+
|
| 3 |
+
**EduMentor** is a fine-tuned Qwen3 4B based AI engineering mentor designed for real-time conversational learning, coding assistance, project guidance, and career mentoring.
|
| 4 |
+
|
| 5 |
+
Unlike a normal chatbot, EduMentor is optimized for **speech-to-speech AI systems**, where the model separates spoken responses from visual artifacts like code, diagrams, workflows, and roadmaps.
|
| 6 |
+
|
| 7 |
+
The goal is simple:
|
| 8 |
+
|
| 9 |
+
> An AI mentor that talks like a human teacher while still producing structured engineering resources.
|
| 10 |
+
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# β¨ Key Features
|
| 14 |
+
|
| 15 |
+
## π Speech-to-Speech Optimized Responses
|
| 16 |
+
|
| 17 |
+
EduMentor follows a structured response format:
|
| 18 |
+
|
| 19 |
+
```json
|
| 20 |
+
{
|
| 21 |
+
"speech": "Short natural explanation spoken through TTS",
|
| 22 |
+
"display": {
|
| 23 |
+
"type": "code | diagram | roadmap | notes",
|
| 24 |
+
"content": "Detailed visual artifact"
|
| 25 |
+
},
|
| 26 |
+
"follow_up": "Context-aware continuation question"
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
This allows integration with:
|
| 30 |
+
|
| 31 |
+
Voice assistants
|
| 32 |
+
Real-time AI tutors
|
| 33 |
+
Multimodal agents
|
| 34 |
+
Learning platforms
|
| 35 |
+
π§ Engineering Mentor Capabilities
|
| 36 |
+
|
| 37 |
+
EduMentor focuses on engineering education across multiple domains:
|
| 38 |
+
|
| 39 |
+
π» Computer Science
|
| 40 |
+
Programming concepts
|
| 41 |
+
Data structures and algorithms
|
| 42 |
+
Debugging help
|
| 43 |
+
System design
|
| 44 |
+
AI/ML concepts
|
| 45 |
+
Software engineering
|
| 46 |
+
π€ Artificial Intelligence
|
| 47 |
+
Machine learning
|
| 48 |
+
Deep learning
|
| 49 |
+
LLM concepts
|
| 50 |
+
Model deployment
|
| 51 |
+
RAG pipelines
|
| 52 |
+
β‘ Electronics / ECE
|
| 53 |
+
Digital electronics
|
| 54 |
+
MOSFETs
|
| 55 |
+
Circuits
|
| 56 |
+
Embedded basics
|
| 57 |
+
β Mechanical Engineering
|
| 58 |
+
Engines
|
| 59 |
+
Manufacturing processes
|
| 60 |
+
Core engineering concepts
|
| 61 |
+
π Civil Engineering
|
| 62 |
+
RCC concepts
|
| 63 |
+
Structural basics
|
| 64 |
+
Engineering fundamentals
|
| 65 |
+
π― Career Mentor Features
|
| 66 |
+
|
| 67 |
+
EduMentor can assist students with:
|
| 68 |
+
|
| 69 |
+
Placement preparation
|
| 70 |
+
Internship planning
|
| 71 |
+
Resume improvement
|
| 72 |
+
Project ideas
|
| 73 |
+
Learning roadmaps
|
| 74 |
+
Interview preparation
|
| 75 |
+
Skill development
|
| 76 |
+
π Model Architecture
|
| 77 |
+
|
| 78 |
+
Base:
|
| 79 |
+
|
| 80 |
+
Qwen3-4B-Instruct-2507
|
| 81 |
+
|
| 82 |
+
Fine-tuning:
|
| 83 |
+
|
| 84 |
+
Method: LoRA SFT
|
| 85 |
+
Rank: 32
|
| 86 |
+
Domain: Engineering mentoring + Voice interaction
|
| 87 |
+
|
| 88 |
+
Training focused on:
|
| 89 |
+
|
| 90 |
+
Natural mentor conversations
|
| 91 |
+
Engineering explanations
|
| 92 |
+
Code artifact separation
|
| 93 |
+
Emotional support
|
| 94 |
+
Career guidance
|
| 95 |
+
Multi-domain engineering knowledge
|
| 96 |
+
π¦ Available Versions
|
| 97 |
+
FP16
|
| 98 |
+
|
| 99 |
+
This repository contains the full merged FP16 checkpoint.
|
| 100 |
+
|
| 101 |
+
Recommended for:
|
| 102 |
+
|
| 103 |
+
Further fine-tuning
|
| 104 |
+
vLLM deployment
|
| 105 |
+
High quality inference
|
| 106 |
+
GGUF Quantized Versions
|
| 107 |
+
|
| 108 |
+
Optimized GGUF builds are available separately:
|
| 109 |
+
|
| 110 |
+
Q6_K β Higher quality inference
|
| 111 |
+
Q4_K_M β Local real-time voice deployment
|
| 112 |
+
|
| 113 |
+
Recommended stack:
|
| 114 |
+
|
| 115 |
+
EduMentor-Qwen3-GGUF
|
| 116 |
+
+
|
| 117 |
+
llama.cpp
|
| 118 |
+
+
|
| 119 |
+
GLM-4-Voice
|
| 120 |
+
π Usage
|
| 121 |
+
|
| 122 |
+
Install dependencies:
|
| 123 |
+
|
| 124 |
+
pip install transformers accelerate torch
|
| 125 |
+
|
| 126 |
+
Load model:
|
| 127 |
+
|
| 128 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 129 |
+
import torch
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
model_id = "PraneetNS/EduMentor-Qwen3-4B-FP16"
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
| 136 |
+
model_id
|
| 137 |
+
)
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 141 |
+
model_id,
|
| 142 |
+
torch_dtype=torch.float16,
|
| 143 |
+
device_map="auto"
|
| 144 |
+
)
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
messages = [
|
| 148 |
+
{
|
| 149 |
+
"role":"system",
|
| 150 |
+
"content":"You are EduMentor, an AI engineering mentor."
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"role":"user",
|
| 154 |
+
"content":"Explain recursion simply"
|
| 155 |
+
}
|
| 156 |
+
]
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
prompt = tokenizer.apply_chat_template(
|
| 160 |
+
messages,
|
| 161 |
+
tokenize=False,
|
| 162 |
+
add_generation_prompt=True
|
| 163 |
+
)
|
| 164 |
+
|
| 165 |
+
|
| 166 |
+
inputs = tokenizer(
|
| 167 |
+
prompt,
|
| 168 |
+
return_tensors="pt"
|
| 169 |
+
).to(model.device)
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
output=model.generate(
|
| 173 |
+
**inputs,
|
| 174 |
+
max_new_tokens=300
|
| 175 |
+
)
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
print(
|
| 179 |
+
tokenizer.decode(output[0])
|
| 180 |
+
)
|
| 181 |
+
π§ͺ Example Output
|
| 182 |
+
|
| 183 |
+
User:
|
| 184 |
+
|
| 185 |
+
Write binary search code in Python
|
| 186 |
+
|
| 187 |
+
EduMentor:
|
| 188 |
+
|
| 189 |
+
{
|
| 190 |
+
"speech":
|
| 191 |
+
"I created the implementation below. Let's understand the idea first.",
|
| 192 |
+
|
| 193 |
+
"display":
|
| 194 |
+
{
|
| 195 |
+
"type":"code",
|
| 196 |
+
"language":"python",
|
| 197 |
+
"content":"def binary_search(...)"
|
| 198 |
+
},
|
| 199 |
+
|
| 200 |
+
"follow_up":
|
| 201 |
+
"Would you like to understand the time complexity?"
|
| 202 |
+
}
|
| 203 |
+
π Intended Voice Pipeline
|
| 204 |
+
|
| 205 |
+
EduMentor was designed for:
|
| 206 |
+
|
| 207 |
+
User Speech
|
| 208 |
+
|
| 209 |
+
β
|
| 210 |
+
|
| 211 |
+
Speech Encoder
|
| 212 |
+
|
| 213 |
+
β
|
| 214 |
+
|
| 215 |
+
EduMentor Qwen3
|
| 216 |
+
|
| 217 |
+
β
|
| 218 |
+
|
| 219 |
+
JSON Router
|
| 220 |
+
|
| 221 |
+
β β
|
| 222 |
+
|
| 223 |
+
TTS Speech Display Renderer
|
| 224 |
+
|
| 225 |
+
This prevents:
|
| 226 |
+
|
| 227 |
+
β Reading code aloud
|
| 228 |
+
β Speaking large tables
|
| 229 |
+
β Narrating diagrams
|
| 230 |
+
|
| 231 |
+
while preserving natural conversations.
|
| 232 |
+
|
| 233 |
+
β οΈ Limitations
|
| 234 |
+
May require a strong system prompt for strict artifact routing.
|
| 235 |
+
Engineering answers should be verified for critical applications.
|
| 236 |
+
Not intended to replace certified professional advice.
|
| 237 |
+
π± Future Roadmap
|
| 238 |
+
|
| 239 |
+
Planned improvements:
|
| 240 |
+
|
| 241 |
+
Larger engineering datasets
|
| 242 |
+
Tool calling
|
| 243 |
+
RAG integration
|
| 244 |
+
Real-time project assistant
|
| 245 |
+
Personalized student memory
|
| 246 |
+
Multimodal tutoring
|
| 247 |
+
π¨βπ» Creator
|
| 248 |
+
|
| 249 |
+
Built as an experiment toward creating a personalized AI mentor for engineering students.
|
| 250 |
+
|
| 251 |
+
EduMentor aims to make high-quality technical guidance accessible through natural AI conversations.
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
Then commit it:
|
| 255 |
+
|
| 256 |
+
```python
|
| 257 |
+
from huggingface_hub import upload_file
|
| 258 |
+
|
| 259 |
+
|
| 260 |
+
upload_file(
|
| 261 |
+
path_or_fileobj="README.md",
|
| 262 |
+
path_in_repo="README.md",
|
| 263 |
+
repo_id="PraneetNS/EduMentor-Qwen3-4B-FP16",
|
| 264 |
+
repo_type="model",
|
| 265 |
+
commit_message="Add EduMentor model card"
|
| 266 |
+
)
|