Update custom_generate/generate.py
Browse files
custom_generate/generate.py
CHANGED
|
@@ -109,6 +109,11 @@ def generate(model,
|
|
| 109 |
|
| 110 |
**kwargs
|
| 111 |
):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 112 |
"""Custom generate function for SepCache.
|
| 113 |
|
| 114 |
A cache as described in the [SepLLM paper - ICML 2025](https://arxiv.org/abs/2412.12094). In the training phase,
|
|
|
|
| 109 |
|
| 110 |
**kwargs
|
| 111 |
):
|
| 112 |
+
|
| 113 |
+
from ..functions_2_patch import _validate_model_kwargs, llama_atten_forward
|
| 114 |
+
from ..monkey_patching_utils import monkey_patching
|
| 115 |
+
from ..sep_cache_utils import SepCache
|
| 116 |
+
|
| 117 |
"""Custom generate function for SepCache.
|
| 118 |
|
| 119 |
A cache as described in the [SepLLM paper - ICML 2025](https://arxiv.org/abs/2412.12094). In the training phase,
|