mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2025-11-24 14:08:34 +00:00
parent
f3fadd6c0a
commit
f051a5fe6b
@ -104,7 +104,7 @@ def reset_cache(self):
|
|||||||
|
|
||||||
### 4. Propagating `use_cache` in the full model
|
### 4. Propagating `use_cache` in the full model
|
||||||
|
|
||||||
With the changes to the `MultiHeadAttention` class in plass, we now modify the `GPTModel` class. First, we add a position tracking for the token indices to the instructor:
|
With the changes to the `MultiHeadAttention` class in place, we now modify the `GPTModel` class. First, we add a position tracking for the token indices to the instructor:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
self.current_pos = 0
|
self.current_pos = 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user