Downloads · 30 days
16
5% of all-time downloads
brozonoyer/relay-fastdllm-v2-c40m60-relay-step200
relay-fastdllm-v2-c40m60-relay-step200 is a text generation model from brozonoyer. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Released alongside the paper Learned Relay Representations for Forward-Thinking Discrete Diffusion Models. Reproduces the RELAY row of Table 2.
Downloads · 30 days
16
5% of all-time downloads
All-time downloads
323
Public
Parameters
1.5B
6.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.1 GB · 99%
From the Hugging Face model README
Released alongside the paper Learned Relay Representations for Forward-Thinking Discrete Diffusion Models. Reproduces the RELAY row of Table 2.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "brozonoyer/relay-fastdllm-v2-c40m60-relay-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).
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-step200 \
--dataset humaneval --use_carry --threshold 0.85 \
--output_jsonl evalplus_results/relay_humaneval.jsonl
evalplus.evaluate --dataset humaneval --samples evalplus_results/relay_humaneval.jsonl
# MBPP+
python scripts/generate_evalplus_jsonl.py \
--model_path brozonoyer/relay-fastdllm-v2-c40m60-relay-step200 \
--dataset mbpp --use_carry --threshold 0.85 \
--output_jsonl evalplus_results/relay_mbpp.jsonl
evalplus.evaluate --dataset mbpp --samples evalplus_results/relay_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.
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
variant uses
bptt_use_relay=1, bptt_stop_grad_h_s=0.
Full training command (from relay/fast-dllm-v2/v2/):
USE_RELAY=1 BPTT_STOP_GRAD_H_S=0 \
sbatch train_scripts/finetune_opencode_openmath_bptt.sbatch
See the public release of the training code for the full pipeline.