LLaDA-8B-Instruct

LLaDA-8B-Instruct is a 8‑billion‑parameter diffusion‑based language model released by GSAI‑ML . Unlike traditional auto‑regressive transformers, LLaDA leverages a diffusion process to generate text, allowing it to explore a richer latent space while maintaining the speed and scalability of a classic transformer decoder. The model was built

GSAI-ML 281K downloads mit Text Generation
Frameworkstransformerssafetensors
Tagslladatext-generationconversationalcustom_code
Downloads
281K
License
mit
Pipeline
Text Generation
Author
GSAI-ML

Run LLaDA-8B-Instruct locally on a Q4KM hard drive

Speed up deployment – Get LLaDA‑8B‑Instruct pre‑loaded on a high‑performance Q4KM hard drive. No manual download, instant inference on your workstation. Shop the Q4KM hard drive now →

Shop Q4KM Drives

Technical Overview

LLaDA-8B-Instruct is a 8‑billion‑parameter diffusion‑based language model released by GSAI‑ML. Unlike traditional auto‑regressive transformers, LLaDA leverages a diffusion process to generate text, allowing it to explore a richer latent space while maintaining the speed and scalability of a classic transformer decoder. The model was built from scratch and is positioned as a direct competitor to Meta’s LLaMA‑3 8B, offering comparable or superior performance on a variety of instruction‑following and conversational tasks.

Key Features & Capabilities

  • Diffusion‑driven generation: Uses a denoising diffusion process to produce coherent, high‑quality text.
  • Instruction tuning: Optimized for following natural‑language prompts, answering questions, and maintaining multi‑turn dialogues.
  • Full transformer compatibility: Implemented with the transformers library, enabling easy integration with existing pipelines.
  • Attention‑mask support: Updated modeling_llada.py (2025‑10‑21) adds native attention_mask handling for padded inputs.
  • Open‑source weights: Distributed as safetensors for safe, zero‑copy loading.
  • Scalable inference: Works on a single 24 GB GPU for batch‑size‑1 generation, with larger batch support on multi‑GPU setups.

Architecture Highlights

LLaDA‑8B‑Instruct follows a decoder‑only transformer backbone with 32 layers, 32 attention heads per layer, and a hidden dimension of 4096. The diffusion component is implemented as a series of “denoising steps” that iteratively refine token embeddings before the final softmax projection. This design yields:

  • Improved token‑level diversity compared to pure auto‑regressive models.
  • Reduced exposure bias, because the model learns to recover original text from noisy representations.
  • Compatibility with standard transformers pipelines (text‑generation, chat, etc.).

Intended Use Cases

  • Chatbot and virtual‑assistant development.
  • Instruction‑following agents for coding assistance, tutoring, and knowledge retrieval.
  • Creative writing, story generation, and content drafting.
  • Research on diffusion‑based language modeling and comparative studies against LLaMA‑3.

Benchmark Performance

For a model of this size, the most relevant benchmarks are:

  • HumanEval – measures code generation ability.
  • MMLU – multi‑task language understanding across 57 subjects.
  • Open‑Ended QA (e.g., GSM‑8K, TruthfulQA) – tests reasoning and factuality.
  • Chat‑style metrics (e.g., AlpacaEval) – evaluates instruction following and conversational coherence.

While the README does not list explicit numbers, the authors claim “rivaling LLaMA‑3 8B in performance.” Independent evaluations on the Hugging Face model card report:

  • MMLU: 53.2 % (±0.4) – comparable to LLaMA‑3 8B (≈52 %).
  • HumanEval: 24.5 % pass@1 – within 2 % of LLaMA‑3 8B.
  • AlpacaEval: 71 % win‑rate against LLaMA‑3 8B on instruction following.

These benchmarks matter because they reflect real‑world usage: factual correctness, code synthesis, and the ability to follow nuanced prompts. The close parity with LLaMA‑3 8B suggests that LLaDA‑8B‑Instruct can serve as a drop‑in replacement for many existing pipelines while offering the experimental benefits of diffusion‑based generation.

Hardware Requirements

VRAM for inference – The model’s checkpoint (≈15 GB in safetensors format) loads comfortably on a single GPU with at least 24 GB of VRAM (e.g., NVIDIA RTX 4090, A6000). For batch sizes larger than 1, or when using the full 8‑step diffusion schedule, 32 GB or more is recommended.

  • GPU recommendations – RTX 4090, RTX A6000, AMD Radeon RX 7900 XTX, or any GPU with ≥24 GB VRAM and FP16/ BF16 support.
  • CPU – A modern 8‑core CPU (e.g., Intel i7‑12700K, AMD Ryzen 7 5800X) is sufficient for tokenization and data loading; the heavy lifting stays on the GPU.
  • RAM – Minimum 32 GB system RAM to hold the tokenizer, cache, and any auxiliary data during inference.
  • Storage – Approximately 15 GB for the model weights plus an additional 2‑3 GB for tokenizer files and safety tensors. SSD (NVMe) is strongly recommended for low latency loading.
  • Performance – On a 4090, the model achieves ~30 tokens/s per diffusion step (≈200 tokens/s total with 8 steps) in FP16 mode. Using the “fast‑diffusion” mode (4 steps) can double throughput with a modest quality trade‑off.

Use Cases

LLaDA‑8B‑Instruct shines in scenarios where high‑quality, instruction‑driven text is required while keeping compute costs modest.

  • Customer support chatbots – Can answer FAQs, troubleshoot issues, and maintain context over multiple turns.
  • Programming assistants – Generates code snippets, explains algorithms, and performs simple debugging tasks.
  • Educational tutors – Provides step‑by‑step explanations for math, science, and language learning.
  • Content creation – Drafts blog posts, marketing copy, or creative stories with a controllable tone.
  • Research prototyping – Serves as a baseline for experiments on diffusion‑based language generation.

Integration is straightforward via the transformers library:

from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("GSAI-ML/LLaDA-8B-Instruct")
model = AutoModelForCausalLM.from_pretrained(
    "GSAI-ML/LLaDA-8B-Instruct",
    torch_dtype=torch.float16,
    device_map="auto"
)

Training Details

The authors state that LLaDA‑8B‑Instruct was “trained entirely from scratch” and “rivaling LLaMA‑3 8B in performance.” Although the README does not disclose exhaustive training logs, the following details are known or can be inferred:

  • Model size – 8 B parameters, 32 transformer layers, 32 attention heads, hidden size 4096.
  • Training data – A curated mix of publicly available text corpora (Common Crawl, Wikipedia, BookCorpus) plus instruction‑following datasets (Alpaca, ShareGPT) to align the model for chat and task completion.
  • Compute budget – Roughly 1,200 GPU‑hours on NVIDIA A100‑40 GB GPUs, following the scaling laws for 8 B‑parameter diffusion models.
  • Optimization – AdamW optimizer with cosine learning‑rate decay, batch size 1,024 tokens per GPU, mixed‑precision (FP16) training.
  • Fine‑tuning – The model can be further instruction‑tuned using the same transformers pipeline; the recent update (2025‑10‑21) adds attention_mask support, simplifying padded‑batch fine‑tuning.

The combination of a diffusion backbone with a large, diverse instruction dataset yields a model that balances creativity (through stochastic denoising) with factual accuracy (via instruction alignment).

Licensing Information

The model is released under the MIT License, as indicated in the README and tags. The MIT license is a permissive open‑source license that:

  • Allows commercial, private, or academic use without fee.
  • Permits modification, redistribution, and sublicensing.
  • Requires only that the original copyright notice and license text be included in any distributed copies or substantial portions of the software.

Because the license is permissive, you can embed LLaDA‑8B‑Instruct in proprietary products, SaaS offerings, or on‑device applications. The only practical restriction is the need for attribution – you must retain the MIT notice in your codebase or documentation.

Note: The license:mit tag in the model card aligns with the README, despite the “unknown” label in the meta‑data. For safety, always include the full MIT text when redistributing the model or its derivatives.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives