👥 Equipo - Grupo 1

Integrante
Chipana Wariste, Ronald Humberto
Mamani Huanca, Noemi Marisol
Mamani Mena, Luz Alizon
Oyardo Acuña, Roni Edwin
Ordoñez Marca, Marco Vladimir
Quino Jiménez, Víctor Daniel
Soto Palli, Ever Alcides

🎓 Contexto Académico

Maestría en IA y Data Science para la Transformación de Negocios

  • Postgrado de Informática
  • Módulo: Modelamiento de Datos II
  • Docente: Anvi Alex Eponon

🧠 Qwen2.5-0.5B-Instruct Fine-Tuned | Teacher Model

License: MIT Model

Teacher Model for Knowledge Distillation Pipeline

Grupo 1 | Modelamiento de Datos II


📋 Descripción

Este repositorio contiene el Teacher Model del pipeline de Knowledge Distillation desarrollado por el Grupo 1. El modelo Qwen2.5-0.5B-Instruct fue fine-tuned con LoRA sobre un dataset personalizado de parafraseo para entrenar posteriormente un modelo Student (SmolLM2-135M).

Pipeline de Destilación

Este Modelo (Teacher)
     Qwen2.5-0.5B
         ↓
   Conocimiento
         ↓
   Student Model
   SmolLM2-135M

🎯 Especificaciones Técnicas

Modelo Base

  • Nombre: Qwen/Qwen2.5-0.5B-Instruct
  • Arquitectura: Decoder-only Transformer (Causal LM)
  • Parámetros: 500M

Dataset

  • Nombre: umsa-v1/dataset_parafraseado_grupo1
  • Splits: train, validation
  • Formato: Conversacional compatible con apply_chat_template()

Método de Entrenamiento

  • ✅ Supervised Fine-Tuning (SFT)
  • ✅ PEFT con LoRA
  • ✅ TRL Modern API (SFTTrainer + SFTConfig)
  • ✅ Cuantización 4-bit opcional (BitsAndBytes)

🔬 Configuración LoRA

Parámetro Valor
r 16
lora_alpha 32
lora_dropout 0.05
bias none
task_type CAUSAL_LM

Target Modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj


🏋️ Hiperparámetros de Entrenamiento

Parámetro Valor
Epochs 3
Batch Size 4
Gradient Accumulation 4
Effective Batch Size 16
Learning Rate 2e-4
Scheduler Cosine
Max Sequence Length 256
Weight Decay 0.01
Warmup Ratio 0.03

🚀 Uso Rápido

Instalación

pip install torch transformers datasets peft trl accelerate bitsandbytes

Inferencia Básica

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

# Cargar modelo y adaptadores
base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
model = PeftModel.from_pretrained(base_model, "path/to/this/model")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")

# Generar respuesta
messages = [{"role": "user", "content": "¿Qué es el RGPD?"}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
outputs = model.generate(inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0]))

Fusionar Adaptadores

# Para inferencia más rápida
model = model.merge_and_unload()

📝 Citation

@misc{qwen25_teacher_grupo1_2024,
  title={Qwen2.5-0.5B Fine-Tuned: Teacher Model for Legal Knowledge Distillation},
  author={Grupo 1 - Modelamiento de Datos II},
  year={2024},
  publisher={HuggingFace}
}

📚 Referencias


Grupo 1 | Modelamiento de Datos II

🧠 Teacher Model • Knowledge Distillation • RGPD

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for umsa-v1/maestro_Qwen2.5_0.5B_grupo1

Adapter
(710)
this model

Dataset used to train umsa-v1/maestro_Qwen2.5_0.5B_grupo1