Downloads · 30 days
11
31% of all-time downloads
FLustc/multimdm-toy-reproduction
multimdm-toy-reproduction is a fill-mask model from FLustc. Use it when you need the model to fill a missing word. It is set up for pytorch. The card lists the license as mit.
This repository contains a minimal, low-resource reproduction of the core multi-mask forward corruption and clean-token reconstruction idea from “Multi-Mask Diffusion Language Models for Few-Step Generation.”
Downloads · 30 days
11
31% of all-time downloads
All-time downloads
35
Public
Repo size
4.2 MB
Likes
0
Public
Click a slice to open those files.
.pt4.2 MB · 94%
From the Hugging Face model README
This repository contains a minimal, low-resource reproduction of the core multi-mask forward corruption and clean-token reconstruction idea from “Multi-Mask Diffusion Language Models for Few-Step Generation.”
This repository is a minimal/toy reproduction of the core MultiMDM mechanism. It does not reproduce the full-scale experiments or reported paper numbers.
mask_start + ((clean_id - clean_start) % num_masks)alpha(t) = beta(t) = 1 - tThe auxiliary mask-class objective is an engineering approximation for the paper's intra-mask identification term, not an exact implementation of the full closed-form ELBO.
The sampler is a simplified approximate denoising procedure and is not the exact posterior sampler or distilled few-step sampler from the paper.
python -m venv .venv
Windows:
.venv\Scripts\activate
Linux/macOS:
source .venv/bin/activate
pip install -r requirements.txt
python train.py
Low-resource smoke test:
python train.py --device cpu --d-model 64 --num-layers 2 \
--batch-size 8 --seq-len 32 --max-steps 300
The trainer automatically reduces batch size, model width, sequence length, and finally falls back to CPU after a CUDA out-of-memory error.
python generate.py --checkpoint outputs/model.pt \
--text "multi mask diffusion preserves information" --time 0.7
python generate.py --checkpoint outputs/model.pt \
--mode sample --steps 8 --length 32
python evaluate.py --checkpoint outputs/model.pt
Authenticate without putting the token in source control:
hf auth login
python upload_to_hf.py --repo-id YOUR_USERNAME/multimdm-toy-reproduction
Educational and pipeline-verification purposes only.
This checkpoint is trained on a tiny corpus for pipeline verification. It should not be treated as a competitive language model.