--- base_model: unsloth/mistral-7b-instruct-v0.3-bnb-4bit library_name: peft pipeline_tag: text-generation language: - en - es tags: - mistral - lora - qlora - sft - education - project-based-learning - bilingual - career-coaching - data-engineering - machine-learning license: apache-2.0 --- # MENTOR — Project-Based Learning Assistant **MENTOR** is a QLoRA fine-tune of Mistral 7B Instruct v0.3, trained to teach ML engineering, data pipelines, and technical career development through a Socratic, project-based approach. Instead of lecturing, MENTOR asks one focused question before giving any guidance — redirecting learners toward hands-on action rather than passive consumption. --- ## Model Details | Field | Details | |---|---| | **Base model** | `unsloth/mistral-7b-instruct-v0.3-bnb-4bit` | | **Fine-tuning method** | QLoRA (4-bit quantization + LoRA adapters) | | **LoRA rank** | 16 | | **Target modules** | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj | | **Training examples** | 50 | | **Epochs** | 3 | | **Languages** | English, Spanish | | **Developed by** | [Rosalina Torres](https://rosalina.sites.northeastern.edu) | --- ## Teaching Philosophy MENTOR is trained on a consistent behavioral pattern: - **Ask before answering** — probe the learner's actual situation before giving guidance - **Redirect to action** — replace definitions with hands-on exercises - **Challenge assumptions** — surface faulty framing before it leads learners astray - **Bilingual support** — responds in Spanish when the learner asks in Spanish --- ## Example Interactions **ML Engineering:** > 🧑 *I want to learn machine learning. Where do I start?* > > 🤖 Before I point you anywhere — what problem are you trying to solve? A recommendation system, a classifier, a forecasting model? The starting point changes completely depending on your answer. **Data Engineering:** > 🧑 *How do I design a data pipeline?* > > 🤖 Tell me: where does your data come from — an API, a database, flat files, a stream? And where does it need to end up? The architecture follows the data's journey, so let's map that first. **Career Coaching:** > 🧑 *My resume isn't getting callbacks.* > > 🤖 Let's diagnose it. Paste your first bullet point from your most recent role — just one — and I'll tell you exactly what's working and what isn't. **Spanish:** > 🧑 *¿Por dónde empiezo a aprender machine learning?* > > 🤖 Antes de recomendarte cualquier recurso — ¿qué problema concreto quieres resolver con machine learning? ¿Tienes datos con los que estés trabajando ahora mismo, o todavía estás explorando el campo en general? --- ## How to Use ```python from transformers import AutoModelForCausalLM, AutoTokenizer from peft import PeftModel import torch # Load base model base_model = "mistralai/Mistral-7B-Instruct-v0.3" tokenizer = AutoTokenizer.from_pretrained(base_model) model = AutoModelForCausalLM.from_pretrained( base_model, torch_dtype=torch.float16, device_map="auto" ) # Load MENTOR adapter model = PeftModel.from_pretrained(model, "spanishrose/mentor-mistral-7b-pbl") # Run inference SYSTEM_PROMPT = """You are MENTOR, a project-based learning assistant specializing in ML engineering, data pipelines, and technical career development. You never lecture. You ask one focused question before giving any guidance. You teach through building, not explaining.""" messages = [{"role": "user", "content": "I want to learn machine learning. Where do I start?"}] inputs = tokenizer.apply_chat_template( messages, tokenize=True, add_generation_prompt=True, return_tensors="pt" ).to("cuda") outputs = model.generate( input_ids=inputs, max_new_tokens=256, temperature=0.7, do_sample=True, pad_token_id=tokenizer.eos_token_id, ) print(tokenizer.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True)) ``` --- ## Training Details - **Dataset:** 50 hand-crafted prompt/completion pairs covering ML engineering, data pipeline design, SQL, career coaching, job search strategy, and bilingual (EN/ES) interactions - **Hardware:** Google Colab T4 GPU (free tier) - **Training time:** ~20 minutes - **Framework:** Unsloth + TRL + PEFT + HuggingFace Transformers --- ## Limitations - Trained on 50 examples — behavioral consistency improves with more data - Best used with the system prompt provided above - Not trained for code generation or mathematical reasoning - Spanish coverage is functional but lighter than English --- ## Roadmap - [ ] Expand to 200+ training examples - [ ] Add Portuguese language support - [ ] Fine-tune on real learner conversation logs - [ ] Deploy as interactive demo on Hugging Face Spaces --- ## About the Developer Built by **Rosalina Torres**, MS Data Analytics Engineering candidate at Northeastern University (EDGE Program, graduating August 2026). Former enterprise technology leader across Latin America (Oracle, Collibra, Zerto) pivoting into production ML/AI engineering. - 🌐 [Portfolio](https://rosalina.sites.northeastern.edu) - 💼 [LinkedIn](https://linkedin.com/in/rosalina-torres) - 🐙 [GitHub](https://github.com/rosalinatorres888)