# Tutoriales de la comunidad

Los tutoriales de la comunidad son creados por miembros activos de la comunidad de Hugging Face que desean compartir su conocimiento y experiencia con otros. Son una excelente manera de aprender sobre la biblioteca y sus funciones, y de comenzar con las clases y modalidades principales.

## Modelos de lenguaje

### Tutoriales

| Tarea | Clase | Descripción | Autor | Tutorial | Colab |
| --- | --- | --- | --- | --- | --- |
| Aprendizaje por refuerzo | [GRPOTrainer](/docs/trl/v1.19.0/es/grpo_trainer#trl.GRPOTrainer) | Entrenamiento en línea eficiente con GRPO y vLLM en TRL | [Sergio Paniego](https://huggingface.co/sergiopaniego) | [Enlace](https://huggingface.co/learn/cookbook/grpo_vllm_online_training) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/en/grpo_vllm_online_training.ipynb) |
| Aprendizaje por refuerzo | [GRPOTrainer](/docs/trl/v1.19.0/es/grpo_trainer#trl.GRPOTrainer) | Entrenamiento posterior de un LLM para razonamiento con GRPO en TRL | [Sergio Paniego](https://huggingface.co/sergiopaniego) | [Enlace](https://huggingface.co/learn/cookbook/fine_tuning_llm_grpo_trl) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/en/fine_tuning_llm_grpo_trl.ipynb) |
| Aprendizaje por refuerzo | [GRPOTrainer](/docs/trl/v1.19.0/es/grpo_trainer#trl.GRPOTrainer) | Mini-R1: Tutorial de RL para reproducir el «momento aha» de Deepseek R1 | [Philipp Schmid](https://huggingface.co/philschmid) | [Enlace](https://www.philschmid.de/mini-deepseek-r1) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/philschmid/deep-learning-pytorch-huggingface/blob/main/training/mini-deepseek-r1-aha-grpo.ipynb) |
| Aprendizaje por refuerzo | [GRPOTrainer](/docs/trl/v1.19.0/es/grpo_trainer#trl.GRPOTrainer) | RL en LLaMA 3.1-8B con GRPO y optimizaciones de Unsloth | [Andrea Manzoni](https://huggingface.co/AManzoni) | [Enlace](https://colab.research.google.com/github/amanzoni1/fine_tuning/blob/main/RL_LLama3_1_8B_GRPO.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/amanzoni1/fine_tuning/blob/main/RL_LLama3_1_8B_GRPO.ipynb) |
| Ajuste de instrucciones | [SFTTrainer](/docs/trl/v1.19.0/es/sft_trainer#trl.SFTTrainer) | Ajuste fino de los LLM de Google Gemma usando el formato ChatML con QLoRA | [Philipp Schmid](https://huggingface.co/philschmid) | [Enlace](https://www.philschmid.de/fine-tune-google-gemma) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/philschmid/deep-learning-pytorch-huggingface/blob/main/training/gemma-lora-example.ipynb) |
| Generación estructurada | [SFTTrainer](/docs/trl/v1.19.0/es/sft_trainer#trl.SFTTrainer) | Ajuste fino de Llama-2-7B para generar catálogos de productos en persa en JSON usando QLoRA y PEFT | [Mohammadreza Esmaeilian](https://huggingface.co/Mohammadreza) | [Enlace](https://huggingface.co/learn/cookbook/en/fine_tuning_llm_to_generate_persian_product_catalogs_in_json_format) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/en/fine_tuning_llm_to_generate_persian_product_catalogs_in_json_format.ipynb) |
| Optimización de preferencias | [DPOTrainer](/docs/trl/v1.19.0/es/bema_for_reference_model#trl.DPOTrainer) | Alinear Mistral-7b mediante Direct Preference Optimization para la alineación con las preferencias humanas | [Maxime Labonne](https://huggingface.co/mlabonne) | [Enlace](https://mlabonne.github.io/blog/posts/Fine_tune_Mistral_7b_with_DPO.html) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/mlabonne/llm-course/blob/main/Fine_tune_a_Mistral_7b_model_with_DPO.ipynb) |
| Optimización de preferencias | [experimental.orpo.ORPOTrainer](/docs/trl/v1.19.0/es/orpo_trainer#trl.experimental.orpo.ORPOTrainer) | Ajuste fino de Llama 3 con ORPO combinando ajuste de instrucciones y alineación de preferencias | [Maxime Labonne](https://huggingface.co/mlabonne) | [Enlace](https://mlabonne.github.io/blog/posts/2024-04-19_Fine_tune_Llama_3_with_ORPO.html) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1eHNWg9gnaXErdAa8_mcvjMupbSS6rDvi) |
| Ajuste de instrucciones | [SFTTrainer](/docs/trl/v1.19.0/es/sft_trainer#trl.SFTTrainer) | Cómo ajustar finamente LLMs abiertos en 2025 con Hugging Face | [Philipp Schmid](https://huggingface.co/philschmid) | [Enlace](https://www.philschmid.de/fine-tune-llms-in-2025) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/philschmid/deep-learning-pytorch-huggingface/blob/main/training/fine-tune-llms-in-2025.ipynb) |
| Razonamiento a nivel de paso | [GRPOTrainer](/docs/trl/v1.19.0/es/grpo_trainer#trl.GRPOTrainer) | Aprendizaje por refuerzo supervisado (SRL) para razonamiento paso a paso con vLLM | [Deepak Swaminathan](https://huggingface.co/s23deepak) | [Enlace](https://github.com/s23deepak/Supervised-Reinforcement-Learning) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/s23deepak/Supervised-Reinforcement-Learning/blob/main/notebooks/srl_grpo_tutorial.ipynb) |

### Videos

| Tarea | Título | Autor | Video |
| --- | --- | --- | --- |
| Ajuste de instrucciones | Ajuste fino de modelos de IA abiertos usando Hugging Face TRL | [Wietse Venema](https://huggingface.co/wietsevenema) | [](https://youtu.be/cnGyyM0vOes) |
| Ajuste de instrucciones | Cómo ajustar un smol-LM con Hugging Face, TRL y el conjunto de datos smoltalk | [Mayurji](https://huggingface.co/iammayur) | [](https://youtu.be/jKdXv3BiLu0) |

⚠️ Aviso de funciones obsoletas para "Cómo ajustar un smol-LM con Hugging Face, TRL y el conjunto de datos smoltalk" (haz clic para expandir)

> [!WARNING]
> El tutorial utiliza dos funciones obsoletas:
>
> - `SFTTrainer(..., tokenizer=tokenizer)`: Use `SFTTrainer(..., processing_class=tokenizer)` en su lugar, o simplemente omítalo (se inferirá a partir del modelo). - `setup_chat_format(model, tokenizer)`: Use `SFTConfig(..., chat_template_path="Qwen/Qwen3-0.6B")`, donde `chat_template_path` especifica el modelo cuya plantilla de chat desea copiar.

## Modelos de lenguaje visual

### Tutoriales

| Tarea | Clase | Descripción | Autor | Tutorial | Colab |
| --- | --- | --- | --- | --- | --- |
| QA visual | [SFTTrainer](/docs/trl/v1.19.0/es/sft_trainer#trl.SFTTrainer) | Ajuste fino de Qwen2-VL-7B para la respuesta a preguntas visuales en el conjunto de datos ChartQA | [Sergio Paniego](https://huggingface.co/sergiopaniego) | [Enlace](https://huggingface.co/learn/cookbook/fine_tuning_vlm_trl) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/en/fine_tuning_vlm_trl.ipynb) |
| QA visual | [SFTTrainer](/docs/trl/v1.19.0/es/sft_trainer#trl.SFTTrainer) | Ajuste fino de SmolVLM con TRL en una GPU de consumo | [Sergio Paniego](https://huggingface.co/sergiopaniego) | [Enlace](https://huggingface.co/learn/cookbook/fine_tuning_smol_vlm_sft_trl) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/en/fine_tuning_smol_vlm_sft_trl.ipynb) |
| Descripción SEO | [SFTTrainer](/docs/trl/v1.19.0/es/sft_trainer#trl.SFTTrainer) | Ajuste fino de Qwen2-VL-7B para generar descripciones aptas para SEO a partir de imágenes | [Philipp Schmid](https://huggingface.co/philschmid) | [Enlace](https://www.philschmid.de/fine-tune-multimodal-llms-with-trl) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/philschmid/deep-learning-pytorch-huggingface/blob/main/training/fine-tune-multimodal-llms-with-trl.ipynb) |
| QA visual | [DPOTrainer](/docs/trl/v1.19.0/es/bema_for_reference_model#trl.DPOTrainer) | PaliGemma 🤝 Direct Preference Optimization | [Merve Noyan](https://huggingface.co/merve) | [Enlace](https://github.com/merveenoyan/smol-vision/blob/main/PaliGemma_DPO.ipynb) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/merveenoyan/smol-vision/blob/main/PaliGemma_DPO.ipynb) |
| QA visual | [DPOTrainer](/docs/trl/v1.19.0/es/bema_for_reference_model#trl.DPOTrainer) | Ajuste fino de SmolVLM mediante optimización de preferencias directas (DPO) con TRL en una GPU de consumo | [Sergio Paniego](https://huggingface.co/sergiopaniego) | [Enlace](https://huggingface.co/learn/cookbook/fine_tuning_vlm_dpo_smolvlm_instruct) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/en/fine_tuning_vlm_dpo_smolvlm_instruct.ipynb) |
| Grounding de detección de objetos | [SFTTrainer](/docs/trl/v1.19.0/es/sft_trainer#trl.SFTTrainer) | Ajuste fino de un VLM para la localización de objetos mediante TRL | [Sergio Paniego](https://huggingface.co/sergiopaniego) | [Enlace](https://huggingface.co/learn/cookbook/fine_tuning_vlm_object_detection_grounding) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/en/fine_tuning_vlm_object_detection_grounding.ipynb) |
| QA visual | [DPOTrainer](/docs/trl/v1.19.0/es/bema_for_reference_model#trl.DPOTrainer) | Ajuste fino de un modelo de visión y lenguaje con TRL usando MPO | [Sergio Paniego](https://huggingface.co/sergiopaniego) | [Enlace](https://huggingface.co/learn/cookbook/fine_tuning_vlm_mpo) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/en/fine_tuning_vlm_mpo.ipynb) |
| Aprendizaje por refuerzo | [GRPOTrainer](/docs/trl/v1.19.0/es/grpo_trainer#trl.GRPOTrainer) | Entrenamiento posterior de un VLM para razonamiento con GRPO usando TRL | [Sergio Paniego](https://huggingface.co/sergiopaniego) | [Enlace](https://huggingface.co/learn/cookbook/fine_tuning_vlm_grpo_trl) | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/en/fine_tuning_vlm_grpo_trl.ipynb) |

## Modelos de lenguaje para el habla

### Tutoriales

| Tarea | Clase | Descripción | Autor | Tutorial |
| --- | --- | --- | --- | --- |
| Texto a voz | [GRPOTrainer](/docs/trl/v1.19.0/es/grpo_trainer#trl.GRPOTrainer) | Entrenamiento posterior de un modelo de lenguaje de voz con GRPO usando TRL | [Steven Zheng](https://huggingface.co/Steveeeeeeen) | [Enlace](https://huggingface.co/blog/Steveeeeeeen/llasa-grpo) |

## Contribuir

Si tienes un tutorial que te gustaría añadir a esta lista, abre un PR para agregarlo. Lo revisaremos y lo fusionaremos si es relevante para la comunidad.

