33 Commits

Author SHA1 Message Date
Sebastian Raschka
d37ddb668a
Fix code comment: embed_dim -> d_out (#698) 2025-06-22 16:36:39 -05:00
Sebastian Raschka
96ca2fcb2f
Update mha plot (#560) 2025-03-06 20:29:04 -06:00
Sebastian Raschka
a08d7aaa84
Uv workflow improvements (#531)
* Uv workflow improvements

* Uv workflow improvements

* linter improvements

* pytproject.toml fixes

* pytproject.toml fixes

* pytproject.toml fixes

* pytproject.toml fixes

* pytproject.toml fixes

* pytproject.toml fixes

* windows fixes

* windows fixes

* windows fixes

* windows fixes

* windows fixes

* windows fixes

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix

* win32 fix
2025-02-16 13:16:51 -06:00
Daniel Kleine
5ff72c2850
fixed typos (#414)
* fixed typos

* fixed formatting

* Update ch03/02_bonus_efficient-multihead-attention/mha-implementations.ipynb

* del weights after load into model

---------

Co-authored-by: Sebastian Raschka <mail@sebastianraschka.com>
2024-10-24 18:23:53 -05:00
Daniel Kleine
ef4018181e
updates for PyTorch 2.5 (#408)
* updated Dockerfile

* updated MHA implementations for PT 2.5

* fixed typo

* update installation instruction

* Update setup/03_optional-docker-environment/.devcontainer/Dockerfile

---------

Co-authored-by: rasbt <mail@sebastianraschka.com>
2024-10-22 20:23:31 -05:00
Daniel Kleine
2ee3df622e
nbviewer links / typo (#346)
* fixed typo

* removed remaining nbviewer links

* Update mha-implementations.ipynb

---------

Co-authored-by: Sebastian Raschka <mail@sebastianraschka.com>
2024-09-07 07:27:28 +02:00
Sebastian Raschka
ad12c8da06
Einsum multi-head attention (#345)
* Einsum multi-head attention

* update diff
2024-09-05 18:24:33 +02:00
Daniel Kleine
c65928f7dc
added std error bars (#320)
* added std error bars

* fixed changes

* Update on A100

---------

Co-authored-by: Sebastian Raschka <mail@sebastianraschka.com>
2024-08-13 20:57:41 -05:00
Jeroen Van Goey
76e6910a1a
Small typo fix (#313)
* typo fix

* Update ch03/02_bonus_efficient-multihead-attention/mha-implementations.ipynb

* Update ch03/02_bonus_efficient-multihead-attention/mha-implementations.ipynb

* Update ch03/02_bonus_efficient-multihead-attention/mha-implementations.ipynb

---------

Co-authored-by: Sebastian Raschka <mail@sebastianraschka.com>
2024-08-12 07:54:12 -05:00
Sebastian Raschka
3f6652d87e
update attention benchmarks (#307) 2024-08-10 09:44:11 -05:00
Jeroen Van Goey
48bd72c890
fix typos, add codespell pre-commit hook (#264)
* fix typos, add codespell pre-commit hook

* Update .pre-commit-config.yaml

---------

Co-authored-by: Sebastian Raschka <mail@sebastianraschka.com>
2024-07-16 07:07:04 -05:00
rasbt
71831890a0
update mha dim 2024-05-27 07:46:29 -05:00
rasbt
050c8b7b73
update pr 2024-05-26 15:38:35 -05:00
rasbt
98d453b666
update formatting 2024-05-24 07:20:37 -05:00
Sebastian Raschka
4adb96d7ee
Make code more consistent and add projection layer (#131)
* Make code more consistent and add projection

* remove redundant buffer
2024-04-26 17:13:08 -05:00
Sebastian Raschka
2de60d1bfb
Rename variable to context_length to make it easier on readers (#106)
* rename to context length

* fix spacing
2024-04-04 07:27:41 -05:00
Sebastian Raschka
cf39abac04 Add and link bonus material (#84) 2024-03-23 07:27:43 -05:00
Sebastian Raschka
a2cd8436cb Ch05 supplementary code (#81) 2024-03-19 09:26:26 -05:00
rasbt
0d517e98b9 update 2024-03-13 08:37:54 -05:00
rasbt
569f6bc7f0 benchmark numbers 2024-03-13 07:12:10 -05:00
taihaozesong
f1fa9df15c Fix mha wrapper implementations in ch03 bonus 2024-03-13 18:02:26 +08:00
rasbt
321f3d33f9 add cuda warmup 2024-03-10 10:31:55 -05:00
rasbt
da33ce8054 remove redundant unsqueeze in mask 2024-03-09 17:42:31 -06:00
rasbt
6ba97adaee add PyTorch version 2024-03-09 17:42:30 -06:00
rasbt
5ca60321c4 add a100 numbers 2024-03-09 10:20:08 -06:00
rasbt
29ca41799a use need_weights=False 2024-03-09 10:09:17 -06:00
rasbt
5643c88db9 add pytorch mha 2024-03-08 09:30:55 -06:00
rasbt
404f48aa74 automatically run on gpu or cpu 2024-03-07 20:14:03 -06:00
rasbt
99a5e28def rename q,k,v for consistency with chapter 3 2024-03-07 06:30:40 -06:00
Rayed Bin Wahed
496079c61e Update mha-implementations.ipynb
Fix variable spelling in comments to keep consistent with code
2024-03-06 23:03:57 +08:00
rasbt
b6fe1a37b3 also add simple wrapper 2024-03-06 08:38:53 -06:00
rasbt
571377a2d6 update title 2024-03-06 08:34:04 -06:00
rasbt
87fcfd9245 mha variants 2024-03-06 08:30:32 -06:00