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

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

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.

Downloads last month
54
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for spanishrose/mentor-mistral-7b-pbl

Space using spanishrose/mentor-mistral-7b-pbl 1