Model reference · open weights

SDLM-D4

LLMs OpenGVLab Text gen 2 builds Open weights 74 dl/mo

SDLM-D4 is an open-weight language model from OpenGVLab. SDLM-3B-D4 (BF16) weighs 6.8 GB; the smallest configuration that runs it is RTX 3060 12 GB.

  • SDLM-D4 is a 3.4B parameter text-generation model developed by OpenGVLab that utilizes a sequential diffusion architecture for faster decoding.
  • It supports a context length of 32,768 tokens and is trained for English.
  • The model is released under the Apache 2.0 license.

Summary of the OpenGVLab/SDLM-3B-D4 model card, 2026-10-01

What it is

Released byOpenGVLab
Released2025-09-29
Parameters3.4B
VRAM6.8 GB for the weights

What it runs on

Memory and cards for SDLM-3B-D4 (BF16)

6.8 GBweights, file size
37 MBcache per 1K tokens
709 MBruntime overhead, at least
32,768 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB133all 32K11.6 GB
RTX 4060 Ti 16 GB266all 32K15.4 GB
RTX 3090 24 GB5213all 32K23.4 GB
RTX 4090 24 GB5213all 32K23.4 GB
RTX 5090 32 GB7719all 32K31.0 GB
L40S 48 GB12030all 32K44.0 GB
A100 80 GB23458all 32K78.2 GB
H100 80 GB21954all 32K78.1 GB
RTX PRO 6000 Blackwell 96 GB27167all 32K93.8 GB
DGX Spark (GB10) 128 GB unified31679all 32K107 GB
H200 141 GB418104all 32K138 GB
B200 180 GB543135all 32K176 GB
Memory needed at each load
Requests at once8K tokens each32K tokens each
17.8 GB8.7 GB
59.0 GB13.5 GB
89.9 GB17.2 GB
1612.3 GB26.8 GB
3217.2 GB46.2 GB
6426.8 GB84.8 GB

One card, with vLLM's small-card settings.

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
SDLM-3B-D4 (above) ↗ 3.4BBF16 6.8 GBRTX 3060 12 GB
SDLM-32B-D4 ↗ 32.8BBF16 65.5 GBH100 80 GB

From the model card

What OpenGVLab says about SDLM-D4

Read the model card

This model repository contains the SDLM-3B-D4 model, as presented in the paper Sequential Diffusion Language Models.

[📂 GitHub] [📜 Tech Report] [🚀 Project Page] [🤗 HuggingFace]

Introduction

We propose a Sequential Diffusion Language Model (SDLM), to cheaply stimulate the parallel prediction capabilities of diffusion models. Specifically, SDLM reduces distribution shift by limiting the prediction range to a fixed block length and enforces decoding order through the longest prefix decoding method, thereby significantly improving prediction efficiency while ensuring generation quality. Our method can be viewed as a further generalization of the autoregressive (AR) paradigm. Therefore, it is possible to use pre-trained AR weights and quickly migrate to the diffusion framework with only minimal instruction fine-tuning.

SDLM Family

In the following table, we provide an overview of the SDLM series.

Model NameBase Model 🤗HF Link 🤗
SDLM-3B-D4Qwen2.5-3Bhttps://huggingface.co/OpenGVLab/SDLM-3B-D4
SDLM-3B-D8Qwen2.5-3Bhttps://huggingface.co/OpenGVLab/SDLM-3B-D8
SDLM-32B-D4Qwen2.5-32Bhttps://huggingface.co/OpenGVLab/SDLM-32B-D4

Model Architecture

We propose a sequential blockwise masked prediction method that reduces error accumulation in diffusion-based generation. Our method leverages the observation that predictions for tokens at lower positional indices typically benefit from more reliable contextual information, resulting in lower deviation and improved accuracy.

  • (a) Training pipeline. Reordered input enables structured mask with causal prefix (top-left), visible cross-block prefix (bottom-left), and intra-block bidirectional attention (bottom-right).
  • (b) Sampling Pipeline. Confidence-based dynamic block decoding with KV cache reuse. At each step, a block of B tokens is predicted with B-1 padding masks. The longest high-confidence prefix is selected as dynamic output. Cached KV states enable efficient decoding.

Performance

Long-Form Benchmarks

SDLM delivers strong performance with significantly faster decoding speed. It operates approximately 2x faster than comparable autoregressive models while matching their accuracy, and achieves up to 5x speedup over other diffusion language models, as evidenced by results on the MATH-500 benchmark.

General Mutiple-Choice Benchmarks

Block Size & Self-Speculative Decoding

Trade-off Between Performance and Speed

Trade-off between performance and speed under different confidence thresholds τ for SDLM-3B (B=4) and SDLM-3B (B=8). By adjusting τ, a controllable trade-off between speed and performance can be achieved. SpeedUp denotes the average number of tokens output per forward pass.

Inference

  1. Install Dependencies

    Key package versions:

    transformers==4.37.2
    torch>=2.5.0
    
  2. Download the model generation script sdlm_inference.py to your working directory.

  3. We provide an example code to run SDLM-3B-D4 using transformers.

    import torch
    from transformers import AutoModelForCausalLM, AutoTokenizer
    from sdlm_inference import SDLM_generate
    
    if __name__ == "__main__":
        ckpt_hf = 'OpenGVLab/SDLM-3B-D4'
    
        model = AutoModelForCausalLM.from_pretrained(
            ckpt_hf,
            attn_implementation="eager",
            trust_remote_code=True
        ).to(dtype=torch.float16)
        tokenizer = AutoTokenizer.from_pretrained(ckpt_hf)
    
        prompt = 'Write a Fibonacci function in Python.'
        messages = [
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": prompt}
        ]
        text = tokenizer.apply_chat_template(
            messages,
            tokenize=False,
            add_generation_prompt=True
        )
    
        model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
    
        response, history = SDLM_generate(
            model,
            tokenizer,
            model_inputs,
            max_gen_len = 1024,
            temperature = 0,
            threshold = 0.5,
            n_future_tokens = 4,
            alg = 'prob_conf', #  prob_conf | entropy_conf | self_speculative
            save_history = True,
            use_cache = True
        )
    
        print('response: ', response[0])
    
        print('=======histroy')
        for item in history:
            print('cur total token ', item[1])
            print(item[0][0])
            print('--------')
    

Citation

If you find this project useful in your research, please consider citing:

@article{liu2025sdlm,
  title={Sequential Diffusion Language Models},
  author={Liu, Yangzhou and Cao, Yue and Li, Hao and Luo, Gen and Chen, Zhe and Wang, Weiyun and Liang, Xiaobo and Qi, Biqing and Wu, Lijun and Tian, Changyao and Zhang, Yanting and Li, Yuqiang and Lu, Tong and Qiao, Yu and Dai, Jifeng and Wang, Wenhai},
  journal={arXiv preprint arXiv:2509.24007},
  year={2025}
}

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms