Views
No views yet

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).max_denoising_steps=48).MiniCPM5-1B-Claude-Opus-Fable5-V2) evaluated trace quality by calculating target perplexity given the prompt and generated reasoning trace:grouped_mm_experts_forward by configuring use_gradient_checkpointing=True on FastModel.1import torch
2from unsloth import FastModel
3
4# Load Base Model and Adapter
5model, processor = FastModel.from_pretrained(
6 model_name="dataopsnick/diffusiongemma-26B-A4B-it-ByzantineSilk",
7 dtype=torch.bfloat16,
8 device_map={"": 0},
9)
10
11# Enable fast inference mode (re-enables KV cache for sampling)
12FastModel.for_inference(model)
13
14# Prepare Prompt
15messages = [{"role": "user", "content": "Explain the moral of the fable of the North Wind and the Sun."}]
16inputs = processor.apply_chat_template(
17 messages,
18 tokenize=True,
19 add_generation_prompt=True,
20 return_tensors="pt"
21).to("cuda")
22
23# Generate via Denoising
24generation_config = model.generation_config
25generation_config.max_denoising_steps = 48
26generation_config.max_new_tokens = model.config.canvas_length
27
28with torch.no_grad():
29 output = model.generate(input_ids=inputs, generation_config=generation_config)
30
31# Decode Output
32prompt_len = inputs.shape[1]
33gen_ids = output.sequences[0][prompt_len:]
34decoded_text = processor.tokenizer.decode(gen_ids.tolist(), skip_special_tokens=True)
35print(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