EthanReid
commited on
Commit
·
92bdddf
1
Parent(s):
92d71f7
removed cache
Browse files
layers.py
CHANGED
|
@@ -31,8 +31,6 @@ class Linear(nn.Module):
|
|
| 31 |
out_features: int,
|
| 32 |
bias: bool = True,
|
| 33 |
dtype: torch.dtype = None,
|
| 34 |
-
operator_cache: OperatorCache = None,
|
| 35 |
-
cache_dir: str = None,
|
| 36 |
group_size: int = 128,
|
| 37 |
):
|
| 38 |
super().__init__()
|
|
@@ -51,8 +49,6 @@ class Linear(nn.Module):
|
|
| 51 |
out_dtype="float16",
|
| 52 |
fast_decoding=True,
|
| 53 |
enable_tuning=True,
|
| 54 |
-
operator_cache=operator_cache,
|
| 55 |
-
database_path=cache_dir,
|
| 56 |
group_size=group_size,
|
| 57 |
)
|
| 58 |
else:
|
|
|
|
| 31 |
out_features: int,
|
| 32 |
bias: bool = True,
|
| 33 |
dtype: torch.dtype = None,
|
|
|
|
|
|
|
| 34 |
group_size: int = 128,
|
| 35 |
):
|
| 36 |
super().__init__()
|
|
|
|
| 49 |
out_dtype="float16",
|
| 50 |
fast_decoding=True,
|
| 51 |
enable_tuning=True,
|
|
|
|
|
|
|
| 52 |
group_size=group_size,
|
| 53 |
)
|
| 54 |
else:
|
text.py
CHANGED
|
@@ -101,13 +101,9 @@ def build_text_model(
|
|
| 101 |
)
|
| 102 |
qkv_dim = int(config.dim * (1 + 2 * config.n_kv_heads / config.n_heads))
|
| 103 |
|
| 104 |
-
operator_cache = None
|
| 105 |
-
cache_dir = None
|
| 106 |
group_size = None
|
| 107 |
if linear_dtype == torch.int8:
|
| 108 |
|
| 109 |
-
operator_cache = OperatorCache()
|
| 110 |
-
cache_dir = "./cache"
|
| 111 |
group_size = config.group_size
|
| 112 |
|
| 113 |
def create_linear(in_features, out_features, dtype=linear_dtype):
|
|
@@ -116,8 +112,6 @@ def build_text_model(
|
|
| 116 |
in_features=in_features,
|
| 117 |
out_features=out_features,
|
| 118 |
dtype=dtype,
|
| 119 |
-
operator_cache=operator_cache,
|
| 120 |
-
cache_dir=cache_dir,
|
| 121 |
group_size=group_size,
|
| 122 |
)
|
| 123 |
|
|
|
|
| 101 |
)
|
| 102 |
qkv_dim = int(config.dim * (1 + 2 * config.n_kv_heads / config.n_heads))
|
| 103 |
|
|
|
|
|
|
|
| 104 |
group_size = None
|
| 105 |
if linear_dtype == torch.int8:
|
| 106 |
|
|
|
|
|
|
|
| 107 |
group_size = config.group_size
|
| 108 |
|
| 109 |
def create_linear(in_features, out_features, dtype=linear_dtype):
|
|
|
|
| 112 |
in_features=in_features,
|
| 113 |
out_features=out_features,
|
| 114 |
dtype=dtype,
|
|
|
|
|
|
|
| 115 |
group_size=group_size,
|
| 116 |
)
|
| 117 |
|