windsornguyen commited on
Commit
cd75a33
·
verified ·
1 Parent(s): 793c0c2

Upload FlashSTU

Browse files
config.json CHANGED
@@ -1,18 +1,30 @@
1
  {
2
  "architectures": [
3
- "Transformer"
4
  ],
 
 
 
 
5
  "bias": false,
6
- "bsz": 8,
7
  "dropout": 0.0,
8
- "mlp_scale": 4,
9
- "model_type": "llama",
10
- "n_embd": 768,
11
- "n_heads": 12,
12
- "n_layers": 12,
13
- "seq_len": 4096,
 
 
 
14
  "softcap": 50.0,
15
  "torch_dtype": "bfloat16",
16
  "transformers_version": "4.44.0",
17
- "vocab_size": 200064
 
 
 
 
 
18
  }
 
1
  {
2
  "architectures": [
3
+ "FlashSTU"
4
  ],
5
+ "auto_map": {
6
+ "AutoConfig": "config.FlashSTUConfig",
7
+ "AutoModel": "model.FlashSTU"
8
+ },
9
  "bias": false,
10
+ "bsz": 1,
11
  "dropout": 0.0,
12
+ "hidden_act": "swish",
13
+ "hidden_size": 1536,
14
+ "intermediate_size": 18432,
15
+ "model_type": "FlashSTU",
16
+ "n_embd": 1536,
17
+ "n_heads": 8,
18
+ "n_layers": 26,
19
+ "num_eigh": 24,
20
+ "seq_len": 8192,
21
  "softcap": 50.0,
22
  "torch_dtype": "bfloat16",
23
  "transformers_version": "4.44.0",
24
+ "use_approx": true,
25
+ "use_attn": true,
26
+ "use_flash_fft": true,
27
+ "use_hankel_L": false,
28
+ "vocab_size": 200064,
29
+ "window_size": 1024
30
  }
config.py CHANGED
@@ -8,10 +8,10 @@ class FlashSTUConfig(PretrainedConfig):
8
 
9
  def __init__(
10
  self,
11
- bsz: int = 4,
12
- n_embd: int = 2304,
13
- n_heads: int = 9,
14
- n_layers: int = 7,
15
  seq_len: int = 8192,
16
  window_size: int = 1024,
17
  vocab_size: int = 200064,
@@ -22,6 +22,7 @@ class FlashSTUConfig(PretrainedConfig):
22
  use_hankel_L: bool = False,
23
  use_flash_fft: bool = True,
24
  use_approx: bool = True,
 
25
  softcap: float = 50.0,
26
  torch_dtype: torch.dtype = torch.bfloat16,
27
  **kwargs,
@@ -34,12 +35,15 @@ class FlashSTUConfig(PretrainedConfig):
34
  self.seq_len = seq_len
35
  self.window_size = window_size
36
  self.vocab_size = vocab_size
37
- self.mlp_scale = mlp_scale
 
 
38
  self.bias = bias
39
  self.dropout = dropout
40
  self.num_eigh = num_eigh
41
  self.use_hankel_L = use_hankel_L
42
  self.use_flash_fft = use_flash_fft
43
  self.use_approx = use_approx
 
44
  self.softcap = softcap
45
  self.torch_dtype = torch_dtype
 
8
 
9
  def __init__(
10
  self,
11
+ bsz: int = 1,
12
+ n_embd: int = 1536,
13
+ n_heads: int = 8,
14
+ n_layers: int = 26,
15
  seq_len: int = 8192,
16
  window_size: int = 1024,
17
  vocab_size: int = 200064,
 
22
  use_hankel_L: bool = False,
23
  use_flash_fft: bool = True,
24
  use_approx: bool = True,
25
+ use_attn: bool = True,
26
  softcap: float = 50.0,
27
  torch_dtype: torch.dtype = torch.bfloat16,
28
  **kwargs,
 
35
  self.seq_len = seq_len
36
  self.window_size = window_size
37
  self.vocab_size = vocab_size
38
+ self.hidden_size = n_embd
39
+ self.intermediate_size = n_embd * mlp_scale
40
+ self.hidden_act = "swish"
41
  self.bias = bias
42
  self.dropout = dropout
43
  self.num_eigh = num_eigh
44
  self.use_hankel_L = use_hankel_L
45
  self.use_flash_fft = use_flash_fft
46
  self.use_approx = use_approx
47
+ self.use_attn = use_attn
48
  self.softcap = softcap
49
  self.torch_dtype = torch_dtype
model.py CHANGED
@@ -1,16 +1,15 @@
1
  import torch
2
  import torch.nn as nn
3
- import torch.nn.functional as F
4
 
5
  from transformers import PreTrainedModel
6
 
7
  from stu import STU
8
- from modules import Attention
9
- from utils import get_spectral_filters, nearest_power_of_two
10
  from flash_stu.config import FlashSTUConfig
11
 
12
  try:
13
- from flash_attn.modules.mlp import GatedMlp as MLP
14
  triton_mlp = True
15
  except ImportError as e:
16
  print(f"Unable to import Triton-based MLP: {e}. Falling back to vanilla SwiGLU MLP instead.")
@@ -18,95 +17,99 @@ except ImportError as e:
18
  triton_mlp = False
19
 
20
  try:
21
- from flash_attn.ops.triton.layer_norm import RMSNorm
 
22
  except ImportError as e:
23
  print(f"Unable to import Triton-based RMSNorm: {e}. Falling back to PyTorch implementation.")
24
  from torch.nn import RMSNorm
 
25
 
26
- try:
27
- from flash_attn.losses.cross_entropy import CrossEntropyLoss
28
- except ImportError as e:
29
- print(f"Unable to import Triton-based cross entropy loss: {e}. Falling back to PyTorch implementation.")
30
- from torch.nn import CrossEntropyLoss
31
-
32
- class Block(nn.Module):
33
- def __init__(self, config, phi, n) -> None:
34
- super(Block, self).__init__()
35
- # For more complex %-split arrangements, see https://arxiv.org/pdf/2406.07887
36
- self.rn_1 = RMSNorm(config.n_embd, dtype=config.torch_dtype)
37
  self.stu = STU(config, phi, n)
38
- self.rn_2 = RMSNorm(config.n_embd, dtype=config.torch_dtype)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  self.attn = Attention(config)
40
- self.rn_3 = RMSNorm(config.n_embd, dtype=config.torch_dtype)
41
- self.mlp = MLP(
42
- config.n_embd,
43
- config.n_embd * config.mlp_scale,
44
- activation=F.silu, # Use SwiGLU
45
- bias1=config.bias,
46
- bias2=config.bias,
47
- dtype=config.torch_dtype,
48
- ) if triton_mlp else MLP(config, dtype=config.torch_dtype)
49
- self.rn_4 = RMSNorm(config.n_embd, dtype=config.torch_dtype)
50
 
51
  def forward(self, x: torch.Tensor) -> torch.Tensor:
52
- x = x + self.stu(self.rn_1(x))
53
- x = x + self.mlp(self.rn_2(x))
54
- x = x + self.attn(self.rn_3(x))
55
- x = x + self.mlp(self.rn_4(x))
56
  return x
57
 
58
  class FlashSTU(PreTrainedModel):
59
  config_class = FlashSTUConfig
60
 
61
- def __init__(self, config) -> None:
62
  super(FlashSTU, self).__init__(config)
63
- self.config = config
64
  self.n_layers = config.n_layers
65
- self.n_embd = config.n_embd
66
- self.mlp_scale = config.mlp_scale
67
- self.seq_len = config.seq_len
68
- self.n = nearest_power_of_two(self.seq_len * 2 - 1, round_up=True)
69
- self.vocab_size = config.vocab_size
70
- self.K = config.num_eigh
71
- self.use_hankel_L = config.use_hankel_L
72
- self.phi = get_spectral_filters(self.seq_len, self.K, self.use_hankel_L)
73
  self.use_approx = config.use_approx
74
- self.dropout = config.dropout
75
- self.bias = config.bias
76
- self.loss_fn = CrossEntropyLoss()
77
-
78
- self.flash_stu = nn.ModuleDict(
79
- dict(
80
- tok_emb=nn.Embedding(self.vocab_size, self.n_embd, dtype=config.torch_dtype),
81
- dropout=nn.Dropout(self.dropout),
82
- hidden=nn.ModuleList(
83
- [
84
- Block(self.config, self.phi, self.n)
85
- for _ in range(self.n_layers)
86
- ]
87
- ),
88
- rn_f=RMSNorm(config.n_embd, dtype=config.torch_dtype)
89
- )
90
- )
91
- self.lm_head = nn.Linear(self.n_embd, self.vocab_size, bias=self.bias, dtype=config.torch_dtype)
92
-
93
- self.std = (self.n_embd) ** -0.5
94
  self.apply(self._init_weights)
95
  print("Model Parameter Count: %.2fM\n" % (self._get_num_params() / 1e6,))
96
 
97
  def forward(self, x: torch.Tensor) -> torch.tensor:
98
- tok_emb = self.flash_stu.tok_emb(x)
99
- x = self.flash_stu.dropout(tok_emb)
100
 
101
- for block in self.flash_stu.hidden:
102
- x = block(x)
103
- x = self.flash_stu.rn_f(x)
104
 
 
105
  y_hat = self.lm_head(x)
 
106
  return y_hat
107
 
108
  def _get_num_params(self):
109
  n_params = sum(p.numel() for p in self.parameters())
 
 
 
 
110
  return n_params
111
 
112
  def _init_weights(self, module):
@@ -125,3 +128,10 @@ class FlashSTU(PreTrainedModel):
125
  else:
126
  torch.nn.init.xavier_normal_(module.M_phi_plus)
127
  torch.nn.init.xavier_normal_(module.M_phi_minus)
 
 
 
 
 
 
 
 
1
  import torch
2
  import torch.nn as nn
 
3
 
4
  from transformers import PreTrainedModel
5
 
6
  from stu import STU
7
+ from modules_stu import Attention
8
+ from utils import nearest_power_of_two
9
  from flash_stu.config import FlashSTUConfig
10
 
11
  try:
12
+ from liger_kernel.transformers.swiglu import LigerSwiGLUMLP as TritonMLP
13
  triton_mlp = True
14
  except ImportError as e:
15
  print(f"Unable to import Triton-based MLP: {e}. Falling back to vanilla SwiGLU MLP instead.")
 
17
  triton_mlp = False
18
 
19
  try:
20
+ from liger_kernel.transformers.rms_norm import LigerRMSNorm as TritonNorm
21
+ triton_norm = True
22
  except ImportError as e:
23
  print(f"Unable to import Triton-based RMSNorm: {e}. Falling back to PyTorch implementation.")
24
  from torch.nn import RMSNorm
25
+ triton_norm = False
26
 
27
+ class STULayer(nn.Module):
28
+ def __init__(self, config, phi, n):
29
+ super(STULayer, self).__init__()
30
+ self.stu_norm = TritonNorm(config.n_embd) if triton_norm else RMSNorm(config.n_embd, dtype=config.torch_dtype)
 
 
 
 
 
 
 
31
  self.stu = STU(config, phi, n)
32
+ self.mlp_norm = TritonNorm(config.n_embd) if triton_norm else RMSNorm(config.n_embd, dtype=config.torch_dtype)
33
+ self.mlp = TritonMLP(config) if triton_mlp else MLP(config, dtype=config.torch_dtype)
34
+
35
+ # TODO: Write Issue in Liger-Kernel repo to support user-defined dtype for MLP
36
+ self.stu_norm = self.stu_norm.to(dtype=config.torch_dtype)
37
+ self.mlp = self.mlp.to(dtype=config.torch_dtype)
38
+ self.mlp_norm = self.mlp_norm.to(dtype=config.torch_dtype)
39
+
40
+ def forward(self, x: torch.Tensor) -> torch.Tensor:
41
+ x = x + self.stu(self.stu_norm(x))
42
+ x = x + self.mlp(self.mlp_norm(x))
43
+ return x
44
+
45
+ class AttentionLayer(nn.Module):
46
+ def __init__(self, config) -> None:
47
+ super(AttentionLayer, self).__init__()
48
+ self.attn_norm = TritonNorm(config.n_embd) if triton_norm else RMSNorm(config.n_embd, dtype=config.torch_dtype)
49
  self.attn = Attention(config)
50
+ self.mlp_norm = TritonNorm(config.n_embd) if triton_norm else RMSNorm(config.n_embd, dtype=config.torch_dtype)
51
+ self.mlp = TritonMLP(config) if triton_mlp else MLP(config, dtype=config.torch_dtype)
52
+
53
+ # TODO: Write Issue in Liger-Kernel repo to support user-defined dtype for MLP
54
+ self.attn_norm = self.attn_norm.to(dtype=config.torch_dtype)
55
+ self.mlp = self.mlp.to(dtype=config.torch_dtype)
56
+ self.mlp_norm = self.mlp_norm.to(dtype=config.torch_dtype)
 
 
 
57
 
58
  def forward(self, x: torch.Tensor) -> torch.Tensor:
59
+ x = x + self.attn(self.attn_norm(x))
60
+ x = x + self.mlp(self.mlp_norm(x))
 
 
61
  return x
62
 
63
  class FlashSTU(PreTrainedModel):
64
  config_class = FlashSTUConfig
65
 
66
+ def __init__(self, config, phi) -> None:
67
  super(FlashSTU, self).__init__(config)
 
68
  self.n_layers = config.n_layers
69
+ self.n = nearest_power_of_two(config.seq_len * 2 - 1, round_up=True)
70
+ self.phi = phi
 
 
 
 
 
 
71
  self.use_approx = config.use_approx
72
+
73
+ # TODO: Add support for Liger-Kernel Embedding once no longer experimental
74
+ self.tok_emb = nn.Embedding(config.vocab_size, config.n_embd, dtype=config.torch_dtype)
75
+ self.dropout = nn.Dropout(config.dropout)
76
+
77
+ self.layers = nn.ModuleList()
78
+ for layer_idx in range(self.n_layers):
79
+ # For more complex %-split arrangements, see https://arxiv.org/pdf/2406.07887
80
+ if layer_idx % 2 == 0:
81
+ self.layers.append(STULayer(config, self.phi, self.n))
82
+ else:
83
+ self.layers.append(AttentionLayer(config) if config.use_attn else STULayer(config, self.phi, self.n))
84
+
85
+ self.norm = TritonNorm(config.n_embd) if triton_norm else RMSNorm(config.n_embd, dtype=config.torch_dtype)
86
+ # TODO: Write Issue in Liger-Kernel repo to support user-defined dtype for RMS Norm
87
+ self.norm = self.norm.to(dtype=config.torch_dtype)
88
+ self.lm_head = nn.Linear(config.n_embd, config.vocab_size, bias=config.bias, dtype=config.torch_dtype)
89
+ self.tok_emb.weight = self.lm_head.weight
90
+
91
+ self.std = (config.n_embd) ** -0.5
92
  self.apply(self._init_weights)
93
  print("Model Parameter Count: %.2fM\n" % (self._get_num_params() / 1e6,))
94
 
95
  def forward(self, x: torch.Tensor) -> torch.tensor:
96
+ tok_emb = self.tok_emb(x)
97
+ x = self.dropout(tok_emb)
98
 
99
+ for layer in self.layers:
100
+ x = layer(x)
 
101
 
102
+ x = self.norm(x)
103
  y_hat = self.lm_head(x)
104
+
105
  return y_hat
106
 
107
  def _get_num_params(self):
108
  n_params = sum(p.numel() for p in self.parameters())
109
+ if hasattr(self, "pos_emb") and self.pos_emb is not None:
110
+ n_params -= self.pos_emb.weight.numel()
111
+ if self.tok_emb.weight is not self.lm_head.weight:
112
+ n_params -= self.tok_emb.weight.numel()
113
  return n_params
114
 
115
  def _init_weights(self, module):
 
128
  else:
129
  torch.nn.init.xavier_normal_(module.M_phi_plus)
130
  torch.nn.init.xavier_normal_(module.M_phi_minus)
131
+ elif isinstance(module, Attention):
132
+ torch.nn.init.xavier_normal_(module.c_attn.weight)
133
+ torch.nn.init.xavier_normal_(module.c_proj.weight)
134
+ if module.c_attn.bias is not None:
135
+ torch.nn.init.zeros_(module.c_attn.bias)
136
+ if module.c_proj.bias is not None:
137
+ torch.nn.init.zeros_(module.c_proj.bias)
pytorch_model-00001-of-00002.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa79518498d1be3c786f3b9c85e1254573b0202d4510491213509f8c9dd6e466
3
+ size 4982442909
pytorch_model-00002-of-00002.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:995329e769de961be2233233b8544984c2de522c6b2112643d73cabb4503bb69
3
+ size 358626608
pytorch_model.bin.index.json ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 5340972032
4
+ },
5
+ "weight_map": {
6
+ "layers.0.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
7
+ "layers.0.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
8
+ "layers.0.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
9
+ "layers.0.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
10
+ "layers.0.stu.M_filters": "pytorch_model-00001-of-00002.bin",
11
+ "layers.0.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
12
+ "layers.0.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
13
+ "layers.0.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
14
+ "layers.0.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
15
+ "layers.0.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
16
+ "layers.0.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
17
+ "layers.0.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
18
+ "layers.0.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
19
+ "layers.0.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
20
+ "layers.0.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
21
+ "layers.1.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
22
+ "layers.1.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
23
+ "layers.1.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
24
+ "layers.1.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
25
+ "layers.1.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
26
+ "layers.1.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
27
+ "layers.1.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
28
+ "layers.10.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
29
+ "layers.10.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
30
+ "layers.10.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
31
+ "layers.10.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
32
+ "layers.10.stu.M_filters": "pytorch_model-00001-of-00002.bin",
33
+ "layers.10.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
34
+ "layers.10.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
35
+ "layers.10.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
36
+ "layers.10.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
37
+ "layers.10.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
38
+ "layers.10.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
39
+ "layers.10.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
40
+ "layers.10.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
41
+ "layers.10.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
42
+ "layers.10.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
43
+ "layers.11.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
44
+ "layers.11.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
45
+ "layers.11.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
46
+ "layers.11.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
47
+ "layers.11.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
48
+ "layers.11.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
49
+ "layers.11.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
50
+ "layers.12.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
51
+ "layers.12.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
52
+ "layers.12.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
53
+ "layers.12.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
54
+ "layers.12.stu.M_filters": "pytorch_model-00001-of-00002.bin",
55
+ "layers.12.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
56
+ "layers.12.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
57
+ "layers.12.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
58
+ "layers.12.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
59
+ "layers.12.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
60
+ "layers.12.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
61
+ "layers.12.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
62
+ "layers.12.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
63
+ "layers.12.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
64
+ "layers.12.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
65
+ "layers.13.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
66
+ "layers.13.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
67
+ "layers.13.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
68
+ "layers.13.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
69
+ "layers.13.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
70
+ "layers.13.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
71
+ "layers.13.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
72
+ "layers.14.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
73
+ "layers.14.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
74
+ "layers.14.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
75
+ "layers.14.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
76
+ "layers.14.stu.M_filters": "pytorch_model-00001-of-00002.bin",
77
+ "layers.14.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
78
+ "layers.14.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
79
+ "layers.14.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
80
+ "layers.14.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
81
+ "layers.14.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
82
+ "layers.14.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
83
+ "layers.14.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
84
+ "layers.14.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
85
+ "layers.14.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
86
+ "layers.14.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
87
+ "layers.15.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
88
+ "layers.15.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
89
+ "layers.15.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
90
+ "layers.15.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
91
+ "layers.15.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
92
+ "layers.15.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
93
+ "layers.15.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
94
+ "layers.16.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
95
+ "layers.16.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
96
+ "layers.16.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
97
+ "layers.16.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
98
+ "layers.16.stu.M_filters": "pytorch_model-00001-of-00002.bin",
99
+ "layers.16.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
100
+ "layers.16.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
101
+ "layers.16.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
102
+ "layers.16.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
103
+ "layers.16.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
104
+ "layers.16.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
105
+ "layers.16.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
106
+ "layers.16.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
107
+ "layers.16.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
108
+ "layers.16.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
109
+ "layers.17.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
110
+ "layers.17.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
111
+ "layers.17.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
112
+ "layers.17.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
113
+ "layers.17.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
114
+ "layers.17.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
115
+ "layers.17.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
116
+ "layers.18.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
117
+ "layers.18.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
118
+ "layers.18.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
119
+ "layers.18.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
120
+ "layers.18.stu.M_filters": "pytorch_model-00001-of-00002.bin",
121
+ "layers.18.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
122
+ "layers.18.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
123
+ "layers.18.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
124
+ "layers.18.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
125
+ "layers.18.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
126
+ "layers.18.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
127
+ "layers.18.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
128
+ "layers.18.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
129
+ "layers.18.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
130
+ "layers.18.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
131
+ "layers.19.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
132
+ "layers.19.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
133
+ "layers.19.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
134
+ "layers.19.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
135
+ "layers.19.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
136
+ "layers.19.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
137
+ "layers.19.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
138
+ "layers.2.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
139
+ "layers.2.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
140
+ "layers.2.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
141
+ "layers.2.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
142
+ "layers.2.stu.M_filters": "pytorch_model-00001-of-00002.bin",
143
+ "layers.2.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
144
+ "layers.2.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
145
+ "layers.2.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
146
+ "layers.2.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
147
+ "layers.2.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
148
+ "layers.2.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
149
+ "layers.2.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
150
+ "layers.2.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
151
+ "layers.2.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
152
+ "layers.2.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
153
+ "layers.20.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
154
+ "layers.20.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
155
+ "layers.20.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
156
+ "layers.20.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
157
+ "layers.20.stu.M_filters": "pytorch_model-00001-of-00002.bin",
158
+ "layers.20.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
159
+ "layers.20.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
160
+ "layers.20.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
161
+ "layers.20.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
162
+ "layers.20.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
163
+ "layers.20.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
164
+ "layers.20.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
165
+ "layers.20.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
166
+ "layers.20.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
167
+ "layers.20.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
168
+ "layers.21.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
169
+ "layers.21.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
170
+ "layers.21.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
171
+ "layers.21.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
172
+ "layers.21.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
173
+ "layers.21.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
174
+ "layers.21.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
175
+ "layers.22.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
176
+ "layers.22.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
177
+ "layers.22.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
178
+ "layers.22.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
179
+ "layers.22.stu.M_filters": "pytorch_model-00001-of-00002.bin",
180
+ "layers.22.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
181
+ "layers.22.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
182
+ "layers.22.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
183
+ "layers.22.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
184
+ "layers.22.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
185
+ "layers.22.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
186
+ "layers.22.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
187
+ "layers.22.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
188
+ "layers.22.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
189
+ "layers.22.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
190
+ "layers.23.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
191
+ "layers.23.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
192
+ "layers.23.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
193
+ "layers.23.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
194
+ "layers.23.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
195
+ "layers.23.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
196
+ "layers.23.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
197
+ "layers.24.mlp.down_proj.weight": "pytorch_model-00002-of-00002.bin",
198
+ "layers.24.mlp.gate_proj.weight": "pytorch_model-00002-of-00002.bin",
199
+ "layers.24.mlp.up_proj.weight": "pytorch_model-00002-of-00002.bin",
200
+ "layers.24.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
201
+ "layers.24.stu.M_filters": "pytorch_model-00001-of-00002.bin",
202
+ "layers.24.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
203
+ "layers.24.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
204
+ "layers.24.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
205
+ "layers.24.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
206
+ "layers.24.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
207
+ "layers.24.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
208
+ "layers.24.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
209
+ "layers.24.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
210
+ "layers.24.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
211
+ "layers.24.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
212
+ "layers.25.attn.c_attn.weight": "pytorch_model-00002-of-00002.bin",
213
+ "layers.25.attn.c_proj.weight": "pytorch_model-00002-of-00002.bin",
214
+ "layers.25.attn_norm.weight": "pytorch_model-00002-of-00002.bin",
215
+ "layers.25.mlp.down_proj.weight": "pytorch_model-00002-of-00002.bin",
216
+ "layers.25.mlp.gate_proj.weight": "pytorch_model-00002-of-00002.bin",
217
+ "layers.25.mlp.up_proj.weight": "pytorch_model-00002-of-00002.bin",
218
+ "layers.25.mlp_norm.weight": "pytorch_model-00002-of-00002.bin",
219
+ "layers.3.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
220
+ "layers.3.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
221
+ "layers.3.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
222
+ "layers.3.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
223
+ "layers.3.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
224
+ "layers.3.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
225
+ "layers.3.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
226
+ "layers.4.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
227
+ "layers.4.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
228
+ "layers.4.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
229
+ "layers.4.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
230
+ "layers.4.stu.M_filters": "pytorch_model-00001-of-00002.bin",
231
+ "layers.4.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
232
+ "layers.4.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
233
+ "layers.4.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
234
+ "layers.4.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
235
+ "layers.4.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
236
+ "layers.4.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
237
+ "layers.4.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
238
+ "layers.4.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
239
+ "layers.4.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
240
+ "layers.4.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
241
+ "layers.5.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
242
+ "layers.5.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
243
+ "layers.5.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
244
+ "layers.5.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
245
+ "layers.5.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
246
+ "layers.5.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
247
+ "layers.5.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
248
+ "layers.6.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
249
+ "layers.6.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
250
+ "layers.6.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
251
+ "layers.6.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
252
+ "layers.6.stu.M_filters": "pytorch_model-00001-of-00002.bin",
253
+ "layers.6.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
254
+ "layers.6.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
255
+ "layers.6.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
256
+ "layers.6.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
257
+ "layers.6.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
258
+ "layers.6.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
259
+ "layers.6.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
260
+ "layers.6.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
261
+ "layers.6.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
262
+ "layers.6.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
263
+ "layers.7.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
264
+ "layers.7.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
265
+ "layers.7.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
266
+ "layers.7.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
267
+ "layers.7.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
268
+ "layers.7.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
269
+ "layers.7.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
270
+ "layers.8.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
271
+ "layers.8.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
272
+ "layers.8.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
273
+ "layers.8.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
274
+ "layers.8.stu.M_filters": "pytorch_model-00001-of-00002.bin",
275
+ "layers.8.stu.M_inputs": "pytorch_model-00001-of-00002.bin",
276
+ "layers.8.stu.flash_fft.f_16_fft": "pytorch_model-00001-of-00002.bin",
277
+ "layers.8.stu.flash_fft.f_16_ifft": "pytorch_model-00001-of-00002.bin",
278
+ "layers.8.stu.flash_fft.f_32_fft": "pytorch_model-00001-of-00002.bin",
279
+ "layers.8.stu.flash_fft.f_32_ifft": "pytorch_model-00001-of-00002.bin",
280
+ "layers.8.stu.flash_fft.twiddle_factors_fft_16_1K": "pytorch_model-00001-of-00002.bin",
281
+ "layers.8.stu.flash_fft.twiddle_factors_fft_32_32": "pytorch_model-00001-of-00002.bin",
282
+ "layers.8.stu.flash_fft.twiddle_factors_ifft_16_1K": "pytorch_model-00001-of-00002.bin",
283
+ "layers.8.stu.flash_fft.twiddle_factors_ifft_32_32": "pytorch_model-00001-of-00002.bin",
284
+ "layers.8.stu_norm.weight": "pytorch_model-00001-of-00002.bin",
285
+ "layers.9.attn.c_attn.weight": "pytorch_model-00001-of-00002.bin",
286
+ "layers.9.attn.c_proj.weight": "pytorch_model-00001-of-00002.bin",
287
+ "layers.9.attn_norm.weight": "pytorch_model-00001-of-00002.bin",
288
+ "layers.9.mlp.down_proj.weight": "pytorch_model-00001-of-00002.bin",
289
+ "layers.9.mlp.gate_proj.weight": "pytorch_model-00001-of-00002.bin",
290
+ "layers.9.mlp.up_proj.weight": "pytorch_model-00001-of-00002.bin",
291
+ "layers.9.mlp_norm.weight": "pytorch_model-00001-of-00002.bin",
292
+ "lm_head.weight": "pytorch_model-00001-of-00002.bin",
293
+ "norm.weight": "pytorch_model-00002-of-00002.bin",
294
+ "tok_emb.weight": "pytorch_model-00001-of-00002.bin"
295
+ }
296
+ }