Update modeling_super_linear.py
Browse files463 unmodified lines46446546646746846946746847146947047147222 unmodified lines495496497500501498499500505506507508509510511501502503463 unmodified lines else: out, self.moe_loss = self.moe(x)
print(F"auto_regressive: {self.auto_regressive}") print(F"max_horizon: {self.max_horizon}") print(F"self.inf_pred_len: {self.inf_pred_len}")
if self.auto_regressive and self.max_horizon < self.inf_pred_len: print("bitch") #print("bitch") outputs = [out] ar_x = torch.cat([x, out], dim=1)[:, -self.seq_len:] for i in range(0, self.inf_pred_len, self.max_horizon):22 unmodified lines
# the backbone keeps its own Config dataclass, so build one on‑the‑fly: #print("SuperLinearForCausalLM") #print(config) backbone_cfg = type("Cfg", (), config.to_dict())() self.args = backbone_cfg self.backbone = superLinear(backbone_cfg)
# optional final projection: map backbone output to discrete bins # (delete if your model already returns logits over a vocabulary) '''self.vocab_size = getattr(config, "vocab_size", None) if self.vocab_size is not None: self.lm_head = nn.Linear(backbone_cfg.pred_len, self.vocab_size)'''
self.post_init()
# ------------------------------------------------------------------modeling_super_linear.py+2-13