Run this model with HF Jobs

Run wingchiuloong/DCore-DFlare-Qwen3-4B-Budget8 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/wingchiuloong/DCore-DFlare-Qwen3-4B-Budget8. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/wingchiuloong/DCore-DFlare-Qwen3-4B-Budget8 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/wingchiuloong/DCore-DFlare-Qwen3-4B-Budget8. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/wingchiuloong/DCore-DFlare-Qwen3-4B-Budget8. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

DCore-DFlare-Qwen3-4B-Budget8

Draft model for speculative decoding with Qwen/Qwen3-4B as the target model, trained with a draft budget of 8 tokens per block.

DFlare is the draft architecture of DCore, trained without D-Pace (architecture ablation). It is a DFlash variant with two structural changes:

  1. Cross-attention uses separate k/v projections for the context (target hidden states) and for the draft tokens.
  2. Multi-layer target hidden states are fused with a learnable layer_fusion_weights[D, T] matrix instead of a single Linear(T*H -> H).

This is a draft model: it is conditioned on hidden states of the target model and is not meant to be used as a standalone language model.

Paper: arXiv:2610.24993

Model Details

Item Value
Target model Qwen/Qwen3-4B (36 layers)
Draft architecture DFlareDraftModel
Draft layers 5
Hidden size / heads / KV heads 2560 / 32 / 8
Block size 8
Target layers used as context features 1, 5, 9, 13, 17, 21, 25, 29, 33
Vocabulary 151936 (Qwen3 tokenizer)
Precision bfloat16

Files

  • config.json
  • dflare.py
  • dflash.py
  • model.safetensors
  • registry.py

Usage

from transformers import AutoModel

draft = AutoModel.from_pretrained(
    "wingchiuloong/DCore-DFlare-Qwen3-4B-Budget8",
    trust_remote_code=True,
    dtype="bfloat16",
)

The draft model must be paired with Qwen/Qwen3-4B as the target model in a speculative decoding framework that supports DFlash-style block drafting.

Collection

Part of the DCore collection by ERNIE Research.

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

Model tree for wingchiuloong/DCore-DFlare-Qwen3-4B-Budget8

Finetuned
Qwen/Qwen3-4B
Finetuned
(1,379)
this model

Collection including wingchiuloong/DCore-DFlare-Qwen3-4B-Budget8

Paper for wingchiuloong/DCore-DFlare-Qwen3-4B-Budget8