Moon-Beam 2 8B-A1B - an experimental language model with a looped MoE architecture
2 min read
The Moon-Beam 2 model is a research version of an 8-billion parameter language model based on the Mixture-of-Experts (MoE) architecture with support for a 131,072-token context. The main highlight of the new release is a double cyclic pass (loop) of the middle layers without weight duplication, giving each token more sequential reasoning stages. The model was created by developer tablinum to explore open routing and quantization mechanisms based on Ling-3.0-tiny. It will be useful for researchers and developers experimenting with deep reasoning architectures and custom startup scripts in transformers.
Key features
- Looped pass: layers 12 through 19 execute twice in a single generation step, increasing computation depth.
- Expert separation: unfrozen routing gates activate 44.8% more unique experts on the second pass.
- Long context: support for windows up to 131,072 tokens for working with large texts.
- Efficient training: the model was trained locally using the QLoRA method (low-precision efficient fine-tuning) and a reentry adapter.
What you can do
- Run locally: integrate the model into a text processing pipeline using the transformers library and the custom loopmb.py script.
- Explore routing: study the behavior of MoE gates and the DynamicCache during multi-pass computations.
- Test tasks: evaluate reasoning and logic accuracy on benchmarks like ARC-C and GSM8K.
Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, DynamicCache
from peft import LoraConfig, get_peft_model, set_peft_model_state_dict
from safetensors.torch import load_file
import loopmb
tok = AutoTokenizer.from_pretrained("tablinum/Moon-Beam-8B-A1B", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
"tablinum/Moon-Beam-8B-A1B", torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True
)
band, _ = loopmb.install(model, 12, 20, passes=2, reenter=True)Read more
Details• Benchmark accuracy: ARC-C (91.33%), MMLU (66.6%), and GSM8K (87.0%) in looped mode.
• Limitations: looping 8 out of 24 layers adds about 30-39% latency to the generation time per token.
• Training details: trained on 14.0M tokens using QLoRA and a KLD distillation teacher.
• License: MIT (inherited from the base model).










Comments