Update custom_generate/generate.py
Browse files
custom_generate/generate.py
CHANGED
|
@@ -7,9 +7,13 @@ from transformers import Cache, GenerationConfig
|
|
| 7 |
import torch.nn as nn
|
| 8 |
from transformers.modeling_utils import PreTrainedModel
|
| 9 |
|
| 10 |
-
|
| 11 |
-
from
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
UNSUPPORTED_GENERATION_ARGS = [
|
|
|
|
| 7 |
import torch.nn as nn
|
| 8 |
from transformers.modeling_utils import PreTrainedModel
|
| 9 |
|
| 10 |
+
|
| 11 |
+
from .. import functions_2_patch, monkey_patching_utils, sep_cache_utils
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
from functions_2_patch import _validate_model_kwargs, llama_atten_forward
|
| 15 |
+
from monkey_patching_utils import monkey_patching
|
| 16 |
+
from sep_cache_utils import SepCache
|
| 17 |
|
| 18 |
|
| 19 |
UNSUPPORTED_GENERATION_ARGS = [
|