PlusBIntelligenceLab commited on
Commit
c0fbe17
·
verified ·
1 Parent(s): 8800113

Fixing window error

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -107,7 +107,7 @@ class GPT(nn.Module):
107
  self.config = config
108
  pat = config.window_pattern.upper()
109
  lw, sw = config.sequence_len, config.sequence_len // 2
110
- self.window_sizes = [((sw, 0) if c == 'S' else (lw, 0)) for i, c in enumerate((pat * 4)[:config.n_layer])]
111
  self.window_sizes[-1] = (lw, 0)
112
  pad = ((config.vocab_size + 63) // 64) * 64
113
  self.transformer = nn.ModuleDict({"wte": nn.Embedding(pad, config.n_embd), "h": nn.ModuleList([Block(config, i) for i in range(config.n_layer)])})
 
107
  self.config = config
108
  pat = config.window_pattern.upper()
109
  lw, sw = config.sequence_len, config.sequence_len // 2
110
+ self.window_sizes = [((sw, 0) if c == 'S' else (lw, 0)) for i, c in enumerate((pat * config.n_layer)[:config.n_layer])]
111
  self.window_sizes[-1] = (lw, 0)
112
  pad = ((config.vocab_size + 63) // 64) * 64
113
  self.transformer = nn.ModuleDict({"wte": nn.Embedding(pad, config.n_embd), "h": nn.ModuleList([Block(config, i) for i in range(config.n_layer)])})