/ Модель

Характеристики

Контекст
8 192 токена
Параметры
7,6 млрд
Размер весов
16,5 ГБ
Лицензия
MIT
Архитектура
llama · dense
Библиотека
transformers
Опубликована
15 янв 2026

Stable-DiffCoder-8B-Base

Генерация текстаТекст → текст5 профессий

Базовая диффузионная языковая модель ByteDance на 7,6 млрд параметров для генерации, дополнения и заполнения пропусков в коде.

379скачиваний за 30 дней21лайквеса обновлены25 мар 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Stable-DiffCoder-8B-Base — базовая модель для генерации кода, разработанная ByteDance на архитектуре Seed-Coder. Это языковая модель с диффузионным обучением по блокам, представленная в формате safetensors и рассчитанная на запуск через Transformers. По карточке, при обучении использовано 1,3 трлн токенов кода из GitHub и веб-источников; размер модели — 7,6 млрд параметров, длина контекста — 8192 токена.

Модель предназначена для генерации и дополнения кода, включая заполнение пропусков между заданными префиксом и суффиксом (Fill-in-the-Middle), а также для рассуждений о коде. Обучение с диффузионным предсказанием в произвольном порядке ориентировано на структурированные задачи редактирования; авторы также отмечают преимущества для языков программирования с малым объёмом обучающих данных. В README сообщается о результатах на тестах генерации кода, дополнения и рассуждений, но они не гарантируют качества в конкретном проекте.

Это предварительно обученная базовая модель, а не версия, настроенная на выполнение пользовательских инструкций; для такого сценария авторы отдельно предлагают Stable-DiffCoder-8B-Instruct. Лицензия репозитория — MIT. Модель может выдавать ошибочный или небезопасный код, поэтому результат нужно проверять перед использованием.

Сценарии применения

  • генерация кода по текстовому описанию
  • автодополнение фрагмента кода
  • заполнение пропущенного участка между префиксом и суффиксом
  • редактирование структурированных фрагментов программы
  • рассуждения по задачам программирования

Ограничения

Это базовая предварительно обученная модель, не настроенная на следование пользовательским инструкциям. Сгенерированный код может содержать ошибки и требует проверки.

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Stable-DiffCoder-8B-Base

Introduction

We are thrilled to introduce Stable-DiffCoder, which is a strong code diffusion large language model. Built directly on the Seed-Coder architecture, data, and training pipeline, it introduces a block diffusion continual pretraining (CPT) stage with a tailored warmup and block-wise clipped noise schedule.

Under identical architecture and data settings, we systematically analyze and design an efficient diffusion training pipeline that is not only stable but also potentially lifts the model’s performance ceiling. With this recipe, Stable-DiffCoder demonstrates overall performance improvements compared to its autoregressive (AR) counterpart across a broad set of code benchmarks, while any-order modeling improves structured code handling for editing and reasoning, and diffusion-based corruption aids learning for low-resource programming languages.

Notably, with only CPT followed by supervised fine-tuning, Stable-DiffCoder further surpasses many strong ∼8B AR and diffusion-based code models. These results demonstrate that diffusion-based training can improve code modeling quality beyond what AR training alone can achieve, even under tightly controlled data and architecture constraints.

This repo contains the Stable-DiffCoder-8B-Base model, which has the following features:

  • Type: Mask Diffusion Language Models
  • Training Stage: Pretraining
  • Data Source: GitHub data, code-related web data
  • Training Tokens: 1.3 trillion
  • Supports: Code completion, code infilling (Fill-in-the-Middle)
  • Context Length: 8192

Model Downloads

Model NameLengthDownloadNotes
👉 Stable-DiffCoder-8B-Base8K🤗 ModelPretrained on our model-centric code data.
Stable-DiffCoder-8B-Instruct8K🤗 ModelInstruction-tuned for alignment with user intent.

Requirements

Current (v5.3.0) transformers is available for inference:

pip install transformers~=5.3.0

Explanation of Inference Parameters

  • steps: Number of steps for diffusion generation
  • gen_length: Maximum length of the generated output
  • block_length: Length of the diffusion block, with a default value of 4
  • temperature: Temperature for generation, with a default value of 0.0
  • remasking: Remasking strategy, optional values are 'low_confidence' or 'random', default value is 'low_confidence' (for principle, refer to LLADA)
  • tokenizer: Tokenizer used for text encoding and decoding
  • shift: Whether to shift the output to the right by one position (similar to AutoRegressive/AR), default value is False
  • threshold: Threshold for decoding (range: 0-1.0), default value is None; a smaller value results in faster decoding speed (for principle, refer to Fast-DLLM)
  • eos_id: ID of the end-of-sequence token, default value is tokenizer.eos_token_id

Quickstart

Here is a simple example demonstrating how to load the model and generate code.

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

device = 'cuda'
model = AutoModelForCausalLM.from_pretrained('Stable_DiffCoder-8B-Base', trust_remote_code=True, torch_dtype=torch.bfloat16).to(device).eval()
tokenizer = AutoTokenizer.from_pretrained('Stable_DiffCoder-8B-Base', trust_remote_code=True)

prompt = 'Write a quick sort algorithm.'
input_ids = tokenizer(prompt)['input_ids']
input_ids = torch.tensor(input_ids).to(device).unsqueeze(0)

out = model.generate(input_ids, steps=128, gen_length=128, block_length=4, temperature=0., remasking='low_confidence', tokenizer=tokenizer, shift=False, threshold=None, eos_id=tokenizer.eos_token_id)
print(tokenizer.decode(out[0][input_ids.shape[1]:], skip_special_tokens=True))

Fill-in-the-Middle (FIM) Example

Stable-DiffCoder-8B-Base natively supports Fill-in-the-Middle (FIM) tasks, where the model is given a prefix and a suffix and asked to predict the missing middle content. This allows for code infilling scenarios such as completing a function body or inserting missing logic between two pieces of code.

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

device = 'cuda'
model = AutoModelForCausalLM.from_pretrained('ByteDance-Seed/Stable-DiffCoder-8B-Base', trust_remote_code=True, torch_dtype=torch.bfloat16).to(device).eval()
tokenizer = AutoTokenizer.from_pretrained('ByteDance-Seed/Stable-DiffCoder-8B-Base', trust_remote_code=True)

prefix = "def add_numbers(a, b):\n    "
suffix = "\n    return result"

# Combine prefix and suffix following the FIM format
prompt = '<[fim-suffix]>' + suffix + '<[fim-prefix]>' + prefix + '<[fim-middle]>'
input_ids = tokenizer(prompt)['input_ids']
input_ids = torch.tensor(input_ids).to(device).unsqueeze(0)

out = model.generate(input_ids, steps=64, gen_length=64, block_length=4, temperature=0., remasking='low_confidence', tokenizer=tokenizer, shift=False, threshold=None, eos_id=tokenizer.eos_token_id)
print(tokenizer.decode(out[0][input_ids.shape[1]:], skip_special_tokens=True))

Evaluation

Stable-DiffCoder-8B-Base has been evaluated on code generation, code completion, and code reasoning benchmarks, achieving state-of-the-art performance among ~8B open-source models.

DeepSeek-Coder-6.7B-BaseOpenCoder-8B-BaseQwen2.5-Coder-7BSeed-Coder-8B-BaseStable-DiffCoder-8B-Base
HumanEval47.666.572.077.479.3
MBPP70.279.979.482.083.6
MultiPL-E44.761.058.867.671.2
CRUXEval-O41.043.956.054.860.0

For detailed benchmark performance, please refer to our 📑 Technical Report.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Citation

If you find our work helpful, feel free to give us a cite.

@misc{fan2026stablediffcoderpushingfrontiercode,
      title={Stable-DiffCoder: Pushing the Frontier of Code Diffusion Large Language Model}, 
      author={Chenghao Fan and Wen Heng and Bo Li and Sichen Liu and Yuxuan Song and Jing Su and Xiaoye Qu and Kai Shen and Wei Wei},
      year={2026},
      eprint={2601.15892},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2601.15892}, 
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
StableDiffcoderForCausalLM
Ревизия весов
9a79dfa

0 моделей