mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
Add GPT-2 KV cache to pkg (#687)
This commit is contained in:
committed by
GitHub
parent
3be0f3202a
commit
fdc3e1b701
@@ -113,7 +113,22 @@ from llms_from_scratch.appendix_d import find_highest_gradient, train_model
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### GPT-2 KV cache variant (Bonus material)
|
||||
|
||||
```python
|
||||
from llms_from_scratch.kv_cache.gpt2 import GPTModel
|
||||
from llms_from_scratch.kv_cache.generate import generate_text_simple
|
||||
```
|
||||
|
||||
For more information about KV caching, please see the [KV cache README](../../ch04/03_kv-cache).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Llama 3 (Bonus material)
|
||||
|
||||
```python
|
||||
|
||||
Reference in New Issue
Block a user