Building makemore Part 2: MLP

Andrej Karpathy

Resumen

Este vídeo continúa la serie 'makemore' pasando de un modelo de bigramas simple a una arquitectura de Perceptrón Multicapa (MLP) más sofisticada. El instructor explica las limitaciones de los modelos de bigramas , específicamente cómo las ventanas de contexto hacen que el número de parámetros crezca exponencialmente, e introduce las incrustaciones (embeddings) como una forma de generalizar el conocimiento entre tokens similares. La lección cubre la implementación paso a paso del MLP en PyTorch, incluyendo la construcción del conjunto de datos, la tabla de búsqueda de incrustaciones, la capa oculta y el uso del descenso de gradiente estocástico por mini-lotes. Finalmente, demuestra cómo ajustar hiperparámetros, realizar un seguimiento del progreso del entrenamiento con divisiones de validación y generar nombres nuevos a partir del modelo entrenado.

Capítulos

  1. 0:00Introducción y limitación de bigramas
  2. 4:03Introducción al modelo MLP
  3. 10:05Arquitectura de la red neuronal
  4. 20:15Construcción y entrenamiento de la red
  5. 34:02Optimización del forward pass
  6. 55:05Implementación de Cross Entropy
  7. 1:10:15Mini-batch y tasa de aprendizaje

Temas tratados

  • Arquitectura MLP
  • Escalado de la ventana de contexto

+6 temas más (contenido completo al seguir el canal)

Extracto de la transcripción

hi everyone today we are continuing our implementation of makemore now in the last lecture we implemented the bigram language model and we implemented it both using counts and also using a super simple neural network that had a single linear layer now this is the jupyter notebook that we built out last lecture and we saw that the way we approached this is that we looked at only the single previous character and we predicted the distribution for the character that would go next in the sequence and we did that by taking counts and normalizing them into probabilities so that each row here sums to one now this is all well and good if you only have one character of previous context and this works and it's approachable the problem with this model of course is that the predictions from this model are not very good because you only take one character of context so the model didn't produce very n…