mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
* Fix MHAEinsum weight dimension bug when d_in != d_out (#857) Previously MHAEinsum initialized weight matrices with shape (d_out, d_in) and used inappropriate einsum notation, causing failures for non-square input-output dimensions. This commit corrects weight initialization to shape (d_in, d_out), updates einsum notation to 'bnd,do->bno', and adds three unit tests to verify parity across different d_in and d_out settings. All tests pass successfully. * use pytest * Update .gitignore --------- Co-authored-by: rasbt <mail@sebastianraschka.com>
This commit is contained in:
1
.github/workflows/basic-tests-linux-uv.yml
vendored
1
.github/workflows/basic-tests-linux-uv.yml
vendored
@@ -48,6 +48,7 @@ jobs:
|
||||
run: |
|
||||
source .venv/bin/activate
|
||||
pytest setup/02_installing-python-libraries/tests.py
|
||||
pytest ch03/02_bonus_efficient-multihead-attention/tests/test_mha_implementations.py
|
||||
pytest ch04/01_main-chapter-code/tests.py
|
||||
pytest ch04/03_kv-cache/tests.py
|
||||
pytest ch05/01_main-chapter-code/tests.py
|
||||
|
||||
Reference in New Issue
Block a user