Downloads · 30 days
19
17% of all-time downloads
dataopsnick/diffusiongemma-26B-A4B-it-ByzantineSilk
diffusiongemma-26B-A4B-it-ByzantineSilk is a text generation model from dataopsnick. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
<p align="center" <img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20logo%20black%20text.png" width="30%" </p
Downloads · 30 days
19
17% of all-time downloads
All-time downloads
115
Public
Repo size
631 MB
Likes
2
Public
Click a slice to open those files.
.safetensors599 MB · 95%
From the Hugging Face model README
DiffusionGemma-26B-A4B ByzantineSilk is a specialized block-diffusion language model fine-tuned using a novel Two-Stage Masked-Diffusion SFT + GRPO (Group Relative Policy Optimization) alignment pipeline.
Built on top of the 26.6B total / 4B active parameter Mixture-of-Experts (MoE) block diffusion architecture (DiffusionGemmaForBlockDiffusion), this model was trained on a GLM 5.1 dataset to perform non-autoregressive parallel canvas generation guided by LLM-as-a-Judge perplexity rewards.
edwixx/diffusiongemma-26B-A4B-it-HERETIC-Uncensored (Uncensored DiffusionGemma-26B).Jackrong/GLM-5.1-Reasoning-1M-Cleaned.GnLOLot/MiniCPM5-1B-Claude-Opus-Fable5-V2-Thinking (Causal LM scoring target perplexity given diffusion reasoning traces).The model was first pre-trained using a masked-diffusion objective adapted for block diffusion canvas generation:
$$L_{\text{SFT}} = -\sum_{i \in \text{corrupted}} \log P_\theta(x_{0, i} \mid x_t, \text{prompt})$$
Following SFT pretraining, the model underwent Group Relative Policy Optimization (GRPO):
Sampling: For each prompt, $N=4$ diverse candidates were generated with 48 denoising steps (max_denoising_steps=48).
Perplexity Scoring: A auxiliary evaluator (MiniCPM5-1B-Claude-Opus-Fable5-V2) evaluated trace quality by calculating target perplexity given the prompt and generated reasoning trace:
$$\text{Reward}i = -\text{PPL}{\text{Evaluator}}(\text{Target} \mid \text{Prompt} + \text{Trace}_i)$$
Advantage Calculation: Standardized relative advantages were computed per candidate group:
$$A_i = \frac{R_i - \bar{R}}{\sigma_R + \epsilon}$$
Policy Gradient Step: Backpropagated advantages directly into teacher-forced canvas token log-probabilities to align non-autoregressive canvas generation toward higher-reasoning quality traces.
Fine-tuning a 26B-A4B MoE block-diffusion model alongside a secondary reward evaluator model required custom infrastructure fixes:
grouped_mm_experts_forward by configuring use_gradient_checkpointing=True on FastModel.import torch
from unsloth import FastModel
# Load Base Model and Adapter
model, processor = FastModel.from_pretrained(
model_name="dataopsnick/diffusiongemma-26B-A4B-it-ByzantineSilk",
dtype=torch.bfloat16,
device_map={"": 0},
)
# Enable fast inference mode (re-enables KV cache for sampling)
FastModel.for_inference(model)
# Prepare Prompt
messages = [{"role": "user", "content": "Explain the moral of the fable of the North Wind and the Sun."}]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt"
).to("cuda")
# Generate via Denoising
generation_config = model.generation_config
generation_config.max_denoising_steps = 48
generation_config.max_new_tokens = model.config.canvas_length
with torch.no_grad():
output = model.generate(input_ids=inputs, generation_config=generation_config)
# Decode Output
prompt_len = inputs.shape[1]
gen_ids = output.sequences[0][prompt_len:]
decoded_text = processor.tokenizer.decode(gen_ids.tolist(), skip_special_tokens=True)
print(decoded_text)
| Hyperparameter | Pretraining (Stage 1) | GRPO Alignment (Stage 2) |
|---|---|---|
| Learning Rate | 1e-4 | 1e-6 |
| Optimizer | AdamW $(\beta_1=0.9, \beta_2=0.95)$ | AdamW |
| Gradient Accumulation | 4 | 1 |
| Noise Threshold ($t_{lo}$) | 0.1 | N/A |
| Canvas Length | 256 | 256 |
| GRPO Group Size ($N$) | N/A | 4 |
| Denoise Steps | N/A | 48 |
| Precision | bfloat16 | bfloat16 |
adapter_model.safetensors: Trained LoRA adapter weights (r=64, alpha=128).adapter_config.json: PEFT configuration for target attention & MoE projections.chat_template.jinja: Jinja prompt formatting template for DiffusionGemma chat format.processor_config.json & tokenizer.json: Tokenizer configs tuned for canvas generation.FastModel block-diffusion acceleration utilities.DiffusionGemma architecture.LM-5.1-1000000x dataset.Jackrong/GLM5.1-Reasoning-1M-Cleaned dataset.diffusiongemma-26B-A4B-it pretrained modelHeretic: Fully automatic censorship removal for language modelsGnLOLot/MiniCPM5-1B-Claude-Opus-Fable5-V2-Thinking VRAM-efficient eval model for LLM-as-Judge Critic