193 Commits

Author SHA1 Message Date
Matthew Hernandez
83c76891fc
Fix issue 724: unused args (#726)
* Fix issue 724: unused args

* Update 02_opt_multi_gpu_ddp.py
2025-07-08 06:37:39 -05:00
Sebastian Raschka
c4ec55edac
Support different Qwen3 sizes in pkg (#714) 2025-06-28 08:00:23 -05:00
Sebastian Raschka
8b3e4b24b0
Remove unused params for hparam script (#710) 2025-06-25 12:50:32 -05:00
Sebastian Raschka
190c66b3b0
Add Qwen3 1.7, 4B, 8B, and 32B support to from-scratch nb (#709) 2025-06-25 08:53:09 -05:00
Sebastian Raschka
3bdf18a599
Update Llama 3 table for consistency with Qwen3 2025-06-23 18:33:04 -05:00
Sebastian Raschka
81eda38d3b
Improve KV cache code for torch.compile (#705)
* Improve KV cache code for torch.compile

* cleanup

* cleanup
2025-06-23 18:08:49 -05:00
Sebastian Raschka
37b26c2e04
CPU compile performance for Qwen3 models (#704)
* Ch06 classifier function asserts

* Qwen3 cpu compilation perf
2025-06-23 11:06:10 -05:00
Sebastian Raschka
d37ddb668a
Fix code comment: embed_dim -> d_out (#698) 2025-06-22 16:36:39 -05:00
Sebastian Raschka
01be5a42e4
Use more recent sentencepiece tokenizer API (#696) 2025-06-22 13:52:30 -05:00
Sebastian Raschka
bcfdbd7008
Fix some wording issues in the notes (#695) 2025-06-22 13:46:16 -05:00
Sebastian Raschka
0a2e8c39c4
Qwen3 KV cache (#688) 2025-06-21 17:34:39 -05:00
Sebastian Raschka
3be0f3202a
Llama 3 KV Cache (#685)
* Llama 3 KV Cache

* skip expensive tests on Gh actions

* Update __init__.py
2025-06-21 10:55:20 -05:00
Sebastian Raschka
c008f95072
Fix formatting in Qwen3 nb (#680)
* Fix formatting in Qwen3 nb

* upd
2025-06-20 07:28:27 -05:00
Daniel Kleine
15fa6a84f6
fixed plot_losses (#677) 2025-06-19 18:55:43 -05:00
Sebastian Raschka
e719bd86ad
Qwen3 From Scratch (#678)
* Qwen3 From Scratch

* rev other file

* upd

* upd

* upd

* url fixes
2025-06-19 18:44:38 -05:00
casinca
58b8672452
removed old args in GQA class (#674) 2025-06-17 13:09:53 -05:00
Daniel Kleine
c2cfb47b1a
fixed gqa qkv code comments (#660) 2025-06-13 08:21:28 -05:00
Pratyush Subhadarshi
d56417c34c
Correcting the wrong reference (#649)
Co-authored-by: Sebastian Raschka <mail@sebastianraschka.com>
2025-06-12 16:35:51 -05:00
Sebastian Raschka
c4cde1c21b
Reduce Llama 3 RoPE memory requirements (#658)
* Llama3 from scratch improvements

* Fix Llama 3 expensive RoPE memory issue

* updates

* update package

* benchmark

* remove unused rescale_theta
2025-06-12 11:08:02 -05:00
Sebastian Raschka
47c036058d
Llama3 from scratch improvements (#621)
* Llama3 from scratch improvements

* restore
2025-04-16 18:08:26 -05:00
Henry Shi
02779f5e35
updated exercise 5.3 (#615)
* 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>
2025-04-13 13:06:57 -05:00
Sebastian Raschka
67e0680210
Disable mask saving as weight in Llama 3 model (#604)
* Disable mask saving as weight

* update pixi

* update pixi
2025-04-06 09:33:36 -05:00
Sebastian Raschka
f1434652f2
reformat nbs (#602) 2025-04-05 16:18:27 -05:00
Sebastian Raschka
d4c8d8f2c9
Fix Llama language typo in bonus materials (#597) 2025-04-02 21:41:36 -05:00
Sebastian Raschka
aedad7efc3
Add Llama 3.2 to pkg (#591)
* Add Llama 3.2 to pkg

* remove redundant attributes

* update tests

* updates

* updates

* updates

* fix link

* fix link
2025-03-31 18:59:47 -05:00
casinca
152a087a37
removing unused RoPE parameters (#590)
* removing unused RoPE parameters

* remove redundant context_length in GQA

---------

Co-authored-by: Sebastian Raschka <mail@sebastianraschka.com>
2025-03-31 17:10:39 -05:00
Sebastian Raschka
0f6894f41e
Memory optimized Llama (#588)
* Memory optimized Llama

* re-ad login
2025-03-30 15:18:12 -05:00
Sebastian Raschka
3f93d73d6d
Alt weight loading code via PyTorch (#585)
* Alt weight loading code via PyTorch

* commit additional files
2025-03-27 20:10:23 -05:00
Sebastian Raschka
2e143f17b8
Adjust comment to save compiled model (#583) 2025-03-27 10:43:45 -05:00
Sebastian Raschka
92f1313e00
Vocab padding clarification (#582)
* vocab padding clarification

* Update ch05/10_llm-training-speed/README.md
2025-03-26 13:19:55 -05:00
Sebastian Raschka
b7893457da
More explicit torchrun usage doc (#578) 2025-03-24 12:01:03 -05:00
Sebastian Raschka
feb1e9a83d
Add readme (#577) 2025-03-23 19:35:12 -05:00
Sebastian Raschka
c21bfe4a23
Add PyPI package (#576)
* Add PyPI package

* fixes

* fixes
2025-03-23 19:28:49 -05:00
Sebastian Raschka
7757c3d308
Speed comparison figure (#575) 2025-03-21 11:29:49 -05:00
Greg Gandenberger
c1611d4ea8
Fix minor printing issue and note inconsistency across platforms (#563)
* Fix printing issue and note inconsistency

* Rerun notebook
2025-03-14 15:12:09 -05:00
Sebastian Raschka
86b714a5e0
Specify UTF-8 encoding in the json load command explicitely (#557) 2025-03-05 11:46:21 -06:00
Sebastian Raschka
5fc78ff9fd
Add a note about "zsh: illegal hardware instruction python" error (#555) 2025-03-02 15:18:24 -06:00
Sebastian Raschka
f12b899d96
GitHub markdown updates (#545)
* GitHub markdown updates

* Apply suggestions from code review

* Apply suggestions from code review
2025-02-23 12:25:44 -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
Sebastian Raschka
074a6efb33
Update link to vocab size increase (#526)
* Update link to vocab size increase

* Update ch05/10_llm-training-speed/README.md

* Update ch05/10_llm-training-speed/README.md
2025-02-14 08:03:01 -06:00
Sebastian Raschka
908dd2f71e
PyTorch tips for better training performance (#525)
* PyTorch tips for better training performance

* formatting

* pep 8
2025-02-12 16:10:34 -06:00
Sebastian Raschka
a6cc574605
Upgrade to NumPy 2.0 (#520)
* Upgrade to NumPy 2.0

* bump pytorch

* bump pytorch

* bump pytorch

* bump pytorch

* bump pytorch

* update

* update packages
2025-02-09 06:21:58 -06:00
Sebastian Raschka
68e2efe1c9
Mention small discrepancy due to Dropout non-reproducibility in PyTorch (#519)
* Mention small discrepancy due to Dropout non-reproducibility in PyTorch

* bump pytorch version
2025-02-06 14:59:52 -06:00
Sebastian Raschka
25ea71e713
Alternative weight loading via .safetensors (#507) 2025-01-29 08:15:29 -06:00
Sebastian Raschka
a22d612be6
Bonus material: extending tokenizers (#496)
* Bonus material: extending tokenizers

* small wording update
2025-01-22 09:26:54 -06:00
Sebastian Raschka
4bfbcd069d
Auto download DPO dataset if not already available in path (#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
2025-01-12 12:27:28 -06:00
Sebastian Raschka
701090815e
Add backup URL for gpt2 weights (#469)
* Add backup URL for gpt2 weights

* newline
2025-01-05 11:28:09 -06:00
Sebastian Raschka
1b635f760e
fix misplaced parenthesis and update license (#466) 2025-01-04 11:14:08 -06:00
casinca
bb31de8999
[minor] typo & comments (#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 <mail@sebastianraschka.com>
2024-11-18 19:52:42 +09:00
Sebastian Raschka
f61c008c5d
Add missing device transfer in gpt_generate.py (#436) 2024-11-14 19:12:53 +09:00