Downloads · 30 days
13
7% of all-time downloads
bobchenyx/Qwen3-30B-A3B-Instruct-2507-MoBE
Qwen3-30B-A3B-Instruct-2507-MoBE is a text generation model from bobchenyx. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
<h1 align="center" MoBE: Mixture-of-Basis-Experts for Compressing <br MoE-based LLMs </h1
Downloads · 30 days
13
7% of all-time downloads
All-time downloads
193
Public
Parameters
23.3B
46.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors46.6 GB · 100%
From the Hugging Face model README
This repository contains the model checkpoints for MoBE (Mixture-of-Basis-Experts), a novel model compression technique for MoE-based LLMs.
For more usage instructions and details, please check the GitHub repository: https://github.com/inclusionAI/MoBE
Specific implementation for Qwen3 can be found here: https://github.com/Bobchenyx/MoBE/tree/Qwen3
MoBE (Mixture-of-Basis-Experts) is a novel model compression technique designed for MoE LLMs developed by the AGI Center, Ant Group Research. It achieves efficient parameter reduction by factorizing each expert's weight matrix as:
$$ \mathbf{W} = \mathbf{A}\mathbf{B}, \quad \text{where} \quad \mathbf{B} = \sum_{i=1}^m \alpha_i B_i $$
The factorization is learned by minimizing the reconstruction error between the original and compressed weight matrices.
MoBE significantly outperforms prior compression methods with minimal accuracy degradation:
from transformers import AutoTokenizer
from models.modeling_deepseek_v3_mobe import DeepseekV3MoBEForCausalLM
from models.modeling_qwen3_mobe import Qwen3MoBEForCausalLM
from models.modeling_kimi_k2_mobe import KimiK2MoBEForCausalLM
import torch
model_name = "Bobchenyx/Qwen3-235B-A22B-2507-MoBE" # Replace with your local path or repo name
offload_folder = "./offload_dir"
tokenizer = AutoTokenizer.from_pretrained(model_name)
tokenizer.pad_token = tokenizer.eos_token
max_memory = {i: "120GiB" for i in range(8)}
max_memory["cpu"] = "1200GiB"
if 'Qwen' in model_name:
model = Qwen3MoBEForCausalLM.from_pretrained(
model_name,
device_map="auto",
offload_folder=offload_folder,
offload_state_dict=True,
torch_dtype=torch.bfloat16,
max_memory=max_memory
)
elif 'DeepSeek' in model_name:
model = DeepseekV3MoBEForCausalLM.from_pretrained(
model_name,
device_map="auto",
offload_folder=offload_folder,
offload_state_dict=True,
torch_dtype=torch.bfloat16,
max_memory=max_memory
)
else:
model = KimiK2MoBEForCausalLM.from_pretrained(
model_name,
device_map="auto",
offload_folder=offload_folder,
offload_state_dict=True,
torch_dtype=torch.bfloat16,
max_memory=max_memory
)
input_text = "Artificial intelligence is"
inputs = tokenizer(input_text, return_tensors="pt").to("cuda" if torch.cuda.is_available() else "cpu")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=128,
do_sample=True,
temperature=0.7,
pad_token_id=tokenizer.eos_token_id
)
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print("Generated text:")
print(generated_text)
If you find MoBE useful in your research or application, please consider citing our work:
@misc{chen2025mobemixtureofbasisexpertscompressingmoebased,
title={MoBE: Mixture-of-Basis-Experts for Compressing MoE-based LLMs},
author={Xiaodong Chen and Mingming Ha and Zhenzhong Lan and Jing Zhang and Jianguo Li},
year={2025},
eprint={2508.05257},
archivePrefix={arXiv},
}