Diffusion Language Models
Collection
5 items
•
Updated
A diffusion-style masked language model fine-tuned in code mode using a discrete denoising objective.
Intended for code completion, infilling, and refactoring tasks on Python-like code.
Example
from refinebert.diffusion_engine import MaskedDiffusionEngine
engine = MaskedDiffusionEngine("philipp-zettl/modernbert-diffusion-code")
prompt = "def fibonacci(n):"
output = engine.generate(prompt, num_new_tokens=20, steps=12, guidance_scale=3.0)
print(output)
Datasets are streamed from Hugging Face and mixed by mode.
| Dataset | Percentage | Purpose |
|---|---|---|
| bigcode/the-stack-dedup (python) | 100% | Python code |
Fallback: The Stack may fall back to CodeParrot depending on availability.
| Metric | Value |
|---|---|
| Training loss (latest) | 3.2864 |
| Training loss (mean) | 3.1062 |
| Training step | 150000 / 150000 |
Base model
answerdotai/ModernBERT-base