mirror of
				https://github.com/rasbt/LLMs-from-scratch.git
				synced 2025-10-31 01:41:26 +00:00 
			
		
		
		
	 02779f5e35
			
		
	
	
		02779f5e35
		
			
		
	
	
	
	
		
			
			* updated exercise 5.3 temperature can be set to 0 to regardless of top_k setting to force deterministic behavior * fix notebook json --------- Co-authored-by: Sebastian Raschka <mail@sebastianraschka.com>
Chapter 5: Pretraining on Unlabeled Data
Main Chapter Code
- ch05.ipynb contains all the code as it appears in the chapter
- previous_chapters.py is a Python module that contains the MultiHeadAttentionmodule andGPTModelclass from the previous chapters, which we import in ch05.ipynb to pretrain the GPT model
- gpt_download.py contains the utility functions for downloading the pretrained GPT model weights
- exercise-solutions.ipynb contains the exercise solutions for this chapter
Optional Code
- gpt_train.py is a standalone Python script file with the code that we implemented in ch05.ipynb to train the GPT model (you can think of it as a code file summarizing this chapter)
- gpt_generate.py is a standalone Python script file with the code that we implemented in ch05.ipynb to load and use the pretrained model weights from OpenAI