rasbt il y a 1 an
Parent
commit
4c2b503785

+ 2 - 1
ch07/01_main-chapter-code/README.md

@@ -30,6 +30,7 @@ Validation set length: 55
 Test set length: 110
 --------------------------------------------------
 Device: cpu
+--------------------------------------------------
 File already exists and is up-to-date: gpt2/355M/checkpoint
 File already exists and is up-to-date: gpt2/355M/encoder.json
 File already exists and is up-to-date: gpt2/355M/hparams.json
@@ -50,7 +51,7 @@ Training completed in 15.66 minutes.
 Plot saved as loss-plot-standalone.pdf
 --------------------------------------------------
 Generating responses
-100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 110/110 [06:57<00:00,  3.80s/it]
+100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 110/110 [06:57<00:00,  3.80s/it]
 Responses saved as instruction-data-with-response-standalone.json
 Model saved as gpt2-medium355M-sft-standalone.pth
 ```

+ 2 - 0
ch07/01_main-chapter-code/gpt_instruction_finetuning.py

@@ -185,6 +185,8 @@ def main():
     tokenizer = tiktoken.get_encoding("gpt2")
     device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
     print("Device:", device)
+    print(50*"-")
+
     customized_collate_fn = partial(custom_collate_fn, device=device, allowed_max_length=1024)
 
     num_workers = 0