trillionlabs/Trida-7B
Trida-7B
Introduction
π Trida-7B: Block Diffusion Language Model
We introduce Trida-7B, a high-performance 7-billion parameter language model representing the first publicly released Block Diffusion Language Model to originate from Korea.
Model Overview
Architecture: Block Diffusion Language Model
Base Model: Continually pre-trained from Tri-7B model.
Korean Language Leadership Trida-7B sets a new benchmark for generative models in the region. To our knowledge, it is the:
- First Block Diffusion Language Model to be openly released in Korea.
- First Block Diffusion Language Model trained with Step-wise autoregressive attention.
- Best-performing diffusion language model in Korean among similar model sizes.
This model is a significant step forward for the Korean LLM community, demonstrating the effectiveness of the Block Diffusion paradigm for complex, multilingual tasks.
Key Highlights
- Block Diffusion Architecture: Trida-7B leverages the Block Diffusion architecture, combining the strengths of parallelized diffusion generation with autoregressive dependencies for improved efficiency, control, and flexible-length sequence generation.
- Step-wise Autoregressive Attention An attention mechanism that enables single-pass training and efficient RL by fixing attention masks during the unmasking process. Also improves inference efficiency by enabling kv-caching within the current block.
- Multilingual Leadership: Specially optimized for Korean, English, and Japanese, offering robust performance across all three languages.
- Korean First: To our knowledge, Trida-7B-Preview is the first Block Diffusion Language Model to be openly released in Korea.
- Best-in-Class Korean Performance: It is the best-performing diffusion language model in Korean among models of similar size, setting a new benchmark for generative models in the region.
Model Specifications
Trida-7B
- Type: Block Diffusion Language Model
- Training Stage: Pre-training & Post-training
- Architecture: Transformer Decoder with RoPE, SwiGLU, RMSNorm
- Number of Parameters: 7.76B
- Number of Layers: 32
- Number of Attention Heads: 32
- Context Length: 8,192
- Vocab Size: 128,256
π Training and Methodology
Continual Pre-training from Tri-7B: Rather than training from scratch, Trida-7B was developed through Continual Pre-training from our state-of-the-art autoregressive model, trillionlabs/Tri-7B.
- Knowledge Transfer: To prevent catastrophic forgetting during the transition from AR to Diffusion, we employed blocksize warmup.
Step-wise Autoregressive Attention for Efficient RL & Inference One of the most significant innovations in Trida-7B is the Step-wise Autoregressive Attention mechanism. This design solves the primary bottleneck of Diffusion models: the need for $T$ sequential forward passes during generation and Reinforcement Learning (RL).
- Mechanism: During the rollout process, we fix the attention mask for each token at the exact moment it is "unmasked." This creates a structured, causal-like dependency within a single sequence.
- Single-pass Training: By aligning the denoising steps into a step-wise autoregressive structure, we enable the model to calculate gradients for all denoising steps in a single forward/backward pass.
- Impact: This reduces the computational overhead of RL and iterative inference by up to $1/T$, allowing Trida-7B to achieve training and inference speeds much faster than traditional Autoregressive models while maintaining the diverse generative capabilities of Diffusion.
π Quickstart
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "trillionlabs/Trida-7B"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto",
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
prompt = "Explain the Korean concept of 'Sonnim' (guest) and compare it to Japanese 'Omotenashi' in English."
messages = [
{"role": "system", "content": "You are Trida, created by TrillionLabs. You are a helpful assistant."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
# Block Step-wise Autoregressive Generation
gen_ids = model.generate(
inputs["input_ids"],
tokenizer=tokenizer,
max_new_tokens=4096,
threshold=0.9,
)
response = tokenizer.decode(
gen_ids[0][inputs["input_ids"].shape[1]:],
skip_special_tokens=True
)
print(response)You can also checkout our repo (https://github.com/trillion-labs/Fast-dLLM-Trida) for evaluation and demo.
Our full technical blog post is coming soonβstay tuned!
Evaluation
We evaluated Trida-7B across a comprehensive suite of benchmarks assessing general reasoning, knowledge recall, coding abilities, mathematical reasoning, and instruction-following capabilities.
<details> <summary> Full evaluation settings </summary>
</details>
Benchmark Results
General Reasoning and Factuality
Coding
Mathematical Reasoning
Instruction Following
Korean Performance Vs Other Diffusion LLMs
Limitations
- Language Support: The model is optimized for English, Korean, and Japanese. Usage with other languages may result in degraded performance.
- Knowledge Cutoff: The model's information is limited to data available up to Febuary, 2025.
License
This model is licensed under the Apache License 2.0.
Contact
For inquiries, please contact: info@trillionlabs.co
