Views
No views yet

distilgpt2 fine-tuned experts. This model utilizes a dynamic routing layer to evaluate all 8 experts simultaneously for every single token, functioning as a high-density reasoning node with an interpolated 256k context window.| Feature | Description |
|---|---|
| Architecture | Custom True Dense MoE (Modified GPT-2) |
| Base Model | DistilGPT2 |
| Number of Experts | 8 Distinct Fine-tuned MLPs |
| Total Parameters | ~0.8B |
| Context Window | 262,144 tokens (256k via Positional Embedding Interpolation) |
| Routing Mechanism | Learned Linear Projection (Softmax Gate applied dynamically to all experts) |
| Language | English |
| License | Apache 2.0 |
minute_moe_gui.py) engineered specifically for this architecture.pip install torch transformers PyQt6 markdown psutilpython minute_moe_gui.pyDenseMoEMLP routing layer class into the GPT-2 skeleton before loading the raw tensor weights.1import torch
2import torch.nn as nn
3from transformers import AutoConfig, AutoModelForCausalLM, GPT2Tokenizer
4from huggingface_hub import hf_hub_download
5from safetensors.torch import load_file
6
7class DenseMoEMLP(nn.Module):
8 def __init__(self, config, num_experts=8):
9 super().__init__()
10 self.num_experts = num_experts
11 self.router = nn.Linear(config.n_embd, self.num_experts, bias=False)
12 from transformers.models.gpt2.modeling_gpt2 import GPT2MLP
13 self.experts = nn.ModuleList([GPT2MLP(4 * config.n_embd, config) for _ in range(self.num_experts)])
14
15 def forward(self, hidden_states):
16 routing_weights = torch.nn.functional.softmax(self.router(hidden_states), dim=-1)
17 final_output = torch.zeros_like(hidden_states)
18 for i, expert in enumerate(self.experts):
19 final_output += routing_weights[..., i, None] * expert(hidden_states)
20 return final_output
21
22# 1. Setup Repo and Configuration
23repo_id = "GODsStrongestSoldier/Minute-MoE-TrueDense.NSFW-0.8B"
24config = AutoConfig.from_pretrained(repo_id)
25tokenizer = GPT2Tokenizer.from_pretrained(repo_id)
26if tokenizer.pad_token is None:
27 tokenizer.pad_token = tokenizer.eos_token
28
29# 2. Build base model, rip out standard MLPs, inject True Dense MoE layers
30model = AutoModelForCausalLM.from_config(config)
31for i in range(config.n_layer):
32 model.transformer.h[i].mlp = DenseMoEMLP(config, num_experts=8)
33
34# 3. Download and map the custom weights
35weights_path = hf_hub_download(repo_id=repo_id, filename="pytorch_model.bin")
36state_dict = torch.load(weights_path, map_location='cpu')
37
38model.load_state_dict(state_dict)
39
40# Push to appropriate hardware (Use 'cpu' if system RAM is needed for full 256k context)
41device = 'cuda' if torch.cuda.is_available() else 'cpu'
42model.to(torch.float16).to(device)
43model.eval()
44
45# Generate
46input_text = "Write a highly optimized function to calculate the Fibonacci sequence:"
47inputs = tokenizer(input_text, return_tensors="pt").to(device)
48with torch.no_grad():
49 outputs = model.generate(**inputs, max_length=200, do_sample=True, temperature=0.7)
50print(tokenizer.decode(outputs[0]))WithinUsAI/GOD_Coder_Complete_DataSetacheong08/nsfw_redditWithinUsAI/Opus4.7_thinking_max_distill_god_seed_25kWithinUsAI/gods_universe_codex_distill_god_seed_25kWithinUsAI/GeminiPro3.2_max_distill_god_seed_25kWithinUsAI/Grok4.4_heavy_max_distill_god_seed_25kWithinUsAI/GPT5.5_thinking_max_distill_god_seed_25KWithinUsAI/Supernatural_25kWithinUsAI/high_priest_supernatural_magic_FACT_BASED_1M
THE "Minute-MoE-TrueDense.NSFW-0.8B" Minute experts are
GODsStrongestSoldier/Distil-Qwen3.6-Minute.Codex.NSFW-0.1B
GODsStrongestSoldier/Distil-Deepseek.V4.Pro.Minute.Codex.NSFW-0.1B
GODsStrongestSoldier/Distil-GLM5.1-Minute.Codex.NSFW-0.1B
GODsStrongestSoldier/Distil-Opus4.7-Minute.Codex.NSFW-0.1B
GODsStrongestSoldier/Distil-Gemini3.2-Pro.Minute.Codex.NSFW-0.1B
GODsStrongestSoldier/Distil-Grok4.4-Minute.Codex.NSFW-0.1B
GODsStrongestSoldier/Distil-GPT5.5-Minute.Codex.NSFW-0.1B
GODsStrongestSoldier/distilgpt2-supernatural-occult-coder