Downloads · 30 days
102
22% of all-time downloads
trillionlabs/Trida-7B-Preview
Trida-7B-Preview is a text generation model from trillionlabs. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
🚀 Trida-7B-Preview: Block Diffusion Language Model
Downloads · 30 days
102
22% of all-time downloads
All-time downloads
472
Public
Parameters
7.5B
30.1 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors30.1 GB · 100%
From the Hugging Face model README
🚀 Trida-7B-Preview: Block Diffusion Language Model
We introduce Trida-7B-Preview, a high-performance 7-billion parameter language model representing the first publicly released Block Diffusion Language Model to originate from Korea.
Architecture: Block Diffusion Language Model
Base Model: Continually pre-trained from the highly efficient Tri-7B model.
Korean Language Leadership Trida-7B-Preview 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.
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.
We followed the methodology outlined in the Fast-dLLM-v2 approach (as seen in the model: Efficient-Large-Model/Fast_dLLM_v2_7B [https://huggingface.co/Efficient-Large-Model/Fast_dLLM_v2_7B]).
Continual Pre-training from Tri-7B: Trida-7B-Preview was continually pre-trained starting from our autoregressive model, trillionlabs/Tri-7B. This process was executed using a Block Diffusion training paradigm to transition the efficient base model into a highly capable generative model.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "trillionlabs/Trida-7B-Preview"
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 = "Hey Trida. Why don'y you try that?"
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)
# Fast-dLLM v2 style parallel decoding
gen_ids = model.generate(
inputs["input_ids"],
tokenizer=tokenizer,
max_new_tokens=2048,
small_block_size=8,
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.
We evaluated Trida-7B-Preview 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>| Benchmark | Language | Evaluation Setting | Metric |
|---|---|---|---|
| General Reasoning and Factuality | |||
| • xwinograd_en | English | 0-shot | accuracy |
| • xwinograd_jp | Japanese | 0-shot | accuracy |
| • KoBEST | Korean | 5-shot | accuracy |
| Knowledge and Reasoning | |||
| • KMMLU | Korean | 5-shot | accuracy |
| • MMLU | English | 5-shot | accuracy |
| • Global-MMLU-Lite-en | English | 5-shot | accuracy |
| • Global-MMLU-Lite-ko | English | 5-shot | accuracy |
| • Global-MMLU-Lite-ja | English | 5-shot | accuracy |
| Coding | |||
| • HumanEval | English | 0-shot | pass@1 |
| • MBPPPlus | English | 0-shot | pass@1 |
| Mathematical Reasoning | |||
| • GSM8k | English | 0-shot, CoT | exact-match |
| • KoGSM8k | Korean | 0-shot, CoT | exact-match |
| • MATH500 | English | 0-shot, CoT | exact-match |
| Instruction Following and Chat | |||
| • IFEval | English | 0-shot | strict-prompt |
| • koIFEval | Korean | 0-shot | strict-prompt |
| Benchmark | Tria-7B-Preview |
|---|---|
| KoBEST | 74.08 |
| KMMLU | 50.28 |
| MMLU | 67.23 |
| Global-MMLU-Lite-en | 73.5 |
| Global-MMLU-Lite-ko | 64.25 |
| xwinograd_en | 69.81 |
| xwinograd_jp | 64.75 |
| Benchmark | Tria-7B-Preview |
|---|---|
| HumanEval | 35.98 |
| MBPPPlus | 42.59 |
| Benchmark | Trida-7B-Preview |
|---|---|
| GSM8k | 50.42 |
| KoGSM8k | 51.18 |
| MATH500 | 24.4 |
| Benchmark | Trida-7B-Preview |
|---|---|
| IFEval | 63.31 |
| koIFEval | 68.6 |
This model is licensed under the Apache License 2.0.
For inquiries, please contact: [email protected]