Sebastian Raschka 222f7b16f8 update gpt-2 paper url 1 年之前
..
README.md 283397aaf2 add main and optional sections 1 年之前
ch04.ipynb 222f7b16f8 update gpt-2 paper url 1 年之前
exercise-solutions.ipynb 08040f024c Test code in pytorch 2.4 (#285) 1 年之前
gpt.py bbb2a0c3d5 fixed num_workers (#229) 1 年之前
previous_chapters.py bbb2a0c3d5 fixed num_workers (#229) 1 年之前
tests.py a2cd8436cb Ch05 supplementary code (#81) 1 年之前

README.md

Chapter 4: Implementing a GPT Model from Scratch To Generate Text

Main Chapter Code

  • ch04.ipynb contains all the code as it appears in the chapter
  • previous_chapters.py is a Python module that contains the MultiHeadAttention module from the previous chapter, which we import in ch04.ipynb to create the GPT model

Optional Code

  • gpt.py is a standalone Python script file with the code that we implemented thus far, including the GPT model we coded in this chapter