Commit 22b3fab
Pull latest from Upstream (#1)
* Add "What's next" section (rasbt#432)
* Add What's next section
* Delete appendix-D/01_main-chapter-code/appendix-D-Copy2.ipynb
* Delete ch03/01_main-chapter-code/ch03-Copy1.ipynb
* Delete appendix-D/01_main-chapter-code/appendix-D-Copy1.ipynb
* Update ch07.ipynb
* Update ch07.ipynb
* Add chapter names
* Add missing device transfer in gpt_generate.py (rasbt#436)
* Add utility to prevent double execution of certain cells (rasbt#437)
* Add flexible padding bonus experiment (rasbt#438)
* Add flexible padding bonus experiment
* fix links
* Fixed command for row 16 additional experiment (rasbt#439)
* fixed command for row 16 experiment
* Update README.md
---------
Co-authored-by: Sebastian Raschka <[email protected]>
* [minor] typo & comments (rasbt#441)
* typo & comment
- safe -> save
- commenting code: batch_size, seq_len = in_idx.shape
* comment
- adding # NEW for assert num_heads % num_kv_groups == 0
* update memory wording
---------
Co-authored-by: rasbt <[email protected]>
* fix misplaced parenthesis and update license (rasbt#466)
* Minor readability improvement in dataloader.ipynb (rasbt#461)
* Minor readability improvement in dataloader.ipynb
- The tokenizer and encoded_text variables at the root level are unused.
- The default params for create_dataloader_v1 are confusing, especially for the default batch_size 4, which happens to be the same as the max_length.
* readability improvements
---------
Co-authored-by: rasbt <[email protected]>
* typo fixed (rasbt#468)
* typo fixed
* only update plot
---------
Co-authored-by: rasbt <[email protected]>
* Add backup URL for gpt2 weights (rasbt#469)
* Add backup URL for gpt2 weights
* newline
* fix ch07 unit test (rasbt#470)
* adds no-grad context for reference model to DPO (rasbt#473)
* Auto download DPO dataset if not already available in path (rasbt#479)
* Auto download DPO dataset if not already available in path
* update tests to account for latest HF transformers release in unit tests
* pep 8
* fix reward margins plot label in dpo nb
* Print out embeddings for more illustrative learning (rasbt#481)
* print out embeddings for illustrative learning
* suggestion print embeddingcontents
---------
Co-authored-by: rasbt <[email protected]>
* Include mathematical breakdown for exercise solution 4.1 (rasbt#483)
* 04_optional-aws-sagemaker-notebook (rasbt#451)
* 04_optional-aws-sagemaker-notebook
* Update setup/04_optional-aws-sagemaker-notebook/cloudformation-template.yml
* Update README.md
---------
Co-authored-by: Sebastian Raschka <[email protected]>
* Implementingthe BPE Tokenizer from Scratch (rasbt#487)
* BPE: fixed typo (rasbt#492)
* fixed typo
* use rel path if exists
* mod gitignore and use existing vocab files
---------
Co-authored-by: rasbt <[email protected]>
* fix: preserve newline tokens in BPE encoder (rasbt#495)
* fix: preserve newline tokens in BPE encoder
* further fixes
* more fixes
---------
Co-authored-by: rasbt <[email protected]>
* add GPT2TokenizerFast to BPE comparison (rasbt#498)
* added HF BPE Fast
* update benchmarks
* add note about performance
* revert accidental changes
---------
Co-authored-by: rasbt <[email protected]>
* Bonus material: extending tokenizers (rasbt#496)
* Bonus material: extending tokenizers
* small wording update
* Test for PyTorch 2.6 release candidate (rasbt#500)
* Test for PyTorch 2.6 release candidate
* update
* update
* remove extra added file
* A few cosmetic updates (rasbt#504)
* Fix default argument in ex 7.2 (rasbt#506)
* Alternative weight loading via .safetensors (rasbt#507)
* Test PyTorch nightly releases (rasbt#509)
---------
Co-authored-by: Sebastian Raschka <[email protected]>
Co-authored-by: Daniel Kleine <[email protected]>
Co-authored-by: casinca <[email protected]>
Co-authored-by: Tao Qian <[email protected]>
Co-authored-by: QS <[email protected]>
Co-authored-by: Henry Shi <[email protected]>
Co-authored-by: rvaneijk <[email protected]>
Co-authored-by: Austin Welch <[email protected]>1 parent 1183fd7 commit 22b3fab
File tree
45 files changed
+4115
-451
lines changed- .github/workflows
- appendix-D/01_main-chapter-code
- appendix-E/01_main-chapter-code
- ch02
- 01_main-chapter-code
- 02_bonus_bytepair-encoder
- 05_bpe-from-scratch
- ch04/01_main-chapter-code
- ch05
- 01_main-chapter-code
- 02_alternative_weight_loading
- 07_gpt_to_llama
- tests
- 09_extending-tokenizers
- ch06
- 01_main-chapter-code
- 02_bonus_additional-experiments
- 03_bonus_imdb-classification
- ch07
- 01_main-chapter-code
- 04_preference-tuning-with-dpo
- setup/04_optional-aws-sagemaker-notebook
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
45 files changed
+4115
-451
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
104 | 112 | | |
105 | 113 | | |
106 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
108 | | - | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | | - | |
| 112 | + | |
112 | 113 | | |
113 | | - | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | | - | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
126 | | - | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
36 | 38 | | |
37 | | - | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | | - | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | | - | |
| 65 | + | |
67 | 66 | | |
68 | | - | |
69 | 67 | | |
70 | | - | |
71 | 68 | | |
72 | 69 | | |
73 | 70 | | |
74 | 71 | | |
75 | 72 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
83 | 98 | | |
84 | 99 | | |
85 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1788 | 1788 | | |
1789 | 1789 | | |
1790 | 1790 | | |
1791 | | - | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
1792 | 1795 | | |
1793 | 1796 | | |
1794 | 1797 | | |
| |||
1807 | 1810 | | |
1808 | 1811 | | |
1809 | 1812 | | |
1810 | | - | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
1811 | 1817 | | |
1812 | 1818 | | |
1813 | 1819 | | |
| |||
1826 | 1832 | | |
1827 | 1833 | | |
1828 | 1834 | | |
1829 | | - | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
1830 | 1839 | | |
1831 | 1840 | | |
1832 | 1841 | | |
| |||
1853 | 1862 | | |
1854 | 1863 | | |
1855 | 1864 | | |
1856 | | - | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
1857 | 1869 | | |
1858 | 1870 | | |
1859 | 1871 | | |
| |||
1888 | 1900 | | |
1889 | 1901 | | |
1890 | 1902 | | |
1891 | | - | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
1892 | 1906 | | |
1893 | 1907 | | |
1894 | 1908 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
| 106 | + | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 124 | | |
128 | 125 | | |
129 | 126 | | |
| |||
132 | 129 | | |
133 | 130 | | |
134 | 131 | | |
| 132 | + | |
135 | 133 | | |
136 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
137 | 140 | | |
138 | 141 | | |
139 | 142 | | |
| |||
189 | 192 | | |
190 | 193 | | |
191 | 194 | | |
192 | | - | |
| 195 | + | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
| |||
0 commit comments