RELAY (sg) adaptation of Fast-dLLM v2 1.5B (c40m60, step 200)

Released alongside the paper Learned Relay Representations for Forward-Thinking Discrete Diffusion Models. Reproduces the RELAY (sg) row of Table 2.

Quick start

from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "brozonoyer/relay-fastdllm-v2-c40m60-relay-sg-step200"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True)

config.json ships with use_relay=True and relay_layer=-1; the safetensors shard contains a model.relay_layer_norm.{weight,bias} tensor that the bundled modeling.py instantiates and consumes inside the 2-step relay forward (paper Algorithm 1).

Reproduce the Table 2 numbers with EvalPlus

From the public release of the training code (e.g. relay/fast-dllm-v2/v2/):

mkdir -p evalplus_results

# HumanEval+
python scripts/generate_evalplus_jsonl.py \
  --model_path brozonoyer/relay-fastdllm-v2-c40m60-relay-sg-step200 \
  --dataset humaneval --use_carry --threshold 0.85 \
  --output_jsonl evalplus_results/relay-sg_humaneval.jsonl
evalplus.evaluate --dataset humaneval --samples evalplus_results/relay-sg_humaneval.jsonl

# MBPP+
python scripts/generate_evalplus_jsonl.py \
  --model_path brozonoyer/relay-fastdllm-v2-c40m60-relay-sg-step200 \
  --dataset mbpp --use_carry --threshold 0.85 \
  --output_jsonl evalplus_results/relay-sg_mbpp.jsonl
evalplus.evaluate --dataset mbpp --samples evalplus_results/relay-sg_mbpp.jsonl

--use_carry enables the 2-step relay-state carry at inference; both checkpoints were trained with relay on, so it is required at eval to match the reported numbers.

Training

200 optimizer steps starting from Efficient-Large-Model/Fast_dLLM_v2_1.5B on the 60k OpenCodeInstruct + OpenMathInstruct-2 c40m60 mixture (24 000 code + 36 000 math rows). Effective batch size 32, learning rate 5e-6, BD block 32 / sub-block 8, threshold 0.85. The RELAY (sg) variant uses bptt_use_relay=1, bptt_stop_grad_h_s=1.

Full training command (from relay/fast-dllm-v2/v2/):

USE_RELAY=1 BPTT_STOP_GRAD_H_S=1 \
  sbatch train_scripts/finetune_opencode_openmath_bptt.sbatch

See the public release of the training code for the full pipeline.

Downloads last month
9
Safetensors
Model size
2B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for brozonoyer/relay-fastdllm-v2-c40m60-relay-sg-step200

Finetuned
(2)
this model