Update README.md
Browse files
README.md
CHANGED
|
@@ -13,197 +13,82 @@ base_model:
|
|
| 13 |
pipeline_tag: text-generation
|
| 14 |
---
|
| 15 |
|
| 16 |
-
#
|
| 17 |
|
| 18 |
-
|
| 19 |
|
|
|
|
| 20 |
|
|
|
|
| 21 |
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
##
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
This
|
| 29 |
|
| 30 |
-
|
| 31 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 32 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 33 |
-
- **Model type:** [More Information Needed]
|
| 34 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 35 |
-
- **License:** [More Information Needed]
|
| 36 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
|
| 43 |
-
-
|
| 44 |
-
|
|
|
|
| 45 |
|
| 46 |
-
##
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
###
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
|
| 59 |
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
|
| 62 |
-
##
|
| 63 |
|
| 64 |
-
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 77 |
-
|
| 78 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 79 |
-
|
| 80 |
-
## How to Get Started with the Model
|
| 81 |
-
|
| 82 |
-
Use the code below to get started with the model.
|
| 83 |
-
|
| 84 |
-
[More Information Needed]
|
| 85 |
-
|
| 86 |
-
## Training Details
|
| 87 |
-
|
| 88 |
-
### Training Data
|
| 89 |
-
|
| 90 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 91 |
-
|
| 92 |
-
[More Information Needed]
|
| 93 |
-
|
| 94 |
-
### Training Procedure
|
| 95 |
-
|
| 96 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 97 |
-
|
| 98 |
-
#### Preprocessing [optional]
|
| 99 |
-
|
| 100 |
-
[More Information Needed]
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
#### Training Hyperparameters
|
| 104 |
-
|
| 105 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 106 |
-
|
| 107 |
-
#### Speeds, Sizes, Times [optional]
|
| 108 |
-
|
| 109 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 110 |
-
|
| 111 |
-
[More Information Needed]
|
| 112 |
-
|
| 113 |
-
## Evaluation
|
| 114 |
-
|
| 115 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 116 |
-
|
| 117 |
-
### Testing Data, Factors & Metrics
|
| 118 |
-
|
| 119 |
-
#### Testing Data
|
| 120 |
-
|
| 121 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 122 |
-
|
| 123 |
-
[More Information Needed]
|
| 124 |
-
|
| 125 |
-
#### Factors
|
| 126 |
-
|
| 127 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 128 |
-
|
| 129 |
-
[More Information Needed]
|
| 130 |
-
|
| 131 |
-
#### Metrics
|
| 132 |
-
|
| 133 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 134 |
-
|
| 135 |
-
[More Information Needed]
|
| 136 |
-
|
| 137 |
-
### Results
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
-
|
| 141 |
-
#### Summary
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
## Model Examination [optional]
|
| 146 |
-
|
| 147 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 148 |
-
|
| 149 |
-
[More Information Needed]
|
| 150 |
-
|
| 151 |
-
## Environmental Impact
|
| 152 |
-
|
| 153 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 154 |
-
|
| 155 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 156 |
-
|
| 157 |
-
- **Hardware Type:** [More Information Needed]
|
| 158 |
-
- **Hours used:** [More Information Needed]
|
| 159 |
-
- **Cloud Provider:** [More Information Needed]
|
| 160 |
-
- **Compute Region:** [More Information Needed]
|
| 161 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 162 |
-
|
| 163 |
-
## Technical Specifications [optional]
|
| 164 |
-
|
| 165 |
-
### Model Architecture and Objective
|
| 166 |
-
|
| 167 |
-
[More Information Needed]
|
| 168 |
-
|
| 169 |
-
### Compute Infrastructure
|
| 170 |
-
|
| 171 |
-
[More Information Needed]
|
| 172 |
-
|
| 173 |
-
#### Hardware
|
| 174 |
-
|
| 175 |
-
[More Information Needed]
|
| 176 |
-
|
| 177 |
-
#### Software
|
| 178 |
-
|
| 179 |
-
[More Information Needed]
|
| 180 |
-
|
| 181 |
-
## Citation [optional]
|
| 182 |
-
|
| 183 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 184 |
-
|
| 185 |
-
**BibTeX:**
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
-
|
| 189 |
-
**APA:**
|
| 190 |
-
|
| 191 |
-
[More Information Needed]
|
| 192 |
-
|
| 193 |
-
## Glossary [optional]
|
| 194 |
-
|
| 195 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 196 |
-
|
| 197 |
-
[More Information Needed]
|
| 198 |
-
|
| 199 |
-
## More Information [optional]
|
| 200 |
-
|
| 201 |
-
[More Information Needed]
|
| 202 |
-
|
| 203 |
-
## Model Card Authors [optional]
|
| 204 |
-
|
| 205 |
-
[More Information Needed]
|
| 206 |
-
|
| 207 |
-
## Model Card Contact
|
| 208 |
-
|
| 209 |
-
[More Information Needed]
|
|
|
|
| 13 |
pipeline_tag: text-generation
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# DiffutronLM-0.3B-Instruct
|
| 17 |
|
| 18 |
+
**Diffutron** is a parameter-efficient, Masked Diffusion Language Model (MDLM) specifically designed for the Turkish language. Unlike standard autoregressive models that generate text one token at a time, Diffutron generates text by iteratively refining sequences in parallel, allowing for simultaneous consideration of the entire sentence context.
|
| 19 |
|
| 20 |
+
Despite its compact size of 307 million parameters, `DiffutronLM-0.3B-Instruct` achieves highly competitive performance against much larger, multi-billion-parameter autoregressive baselines on Turkish NLP benchmarks.
|
| 21 |
|
| 22 |
+
## 📌 Model Details
|
| 23 |
|
| 24 |
+
* **Model Type:** Masked Diffusion Language Model (MDLM)
|
| 25 |
+
* **Base Architecture:** `jhu-clsp/mmBERT-base` (Multilingual Encoder)
|
| 26 |
+
* **Language:** Turkish
|
| 27 |
+
* **Parameter Count:** 307M (0.3B)
|
| 28 |
+
* **Context Length:** 256 tokens (Instruct), 512 tokens (Base)
|
| 29 |
+
* **Training Libraries:** `dllm`, PyTorch
|
| 30 |
|
| 31 |
+
## 🚀 Architecture & Approach
|
| 32 |
|
| 33 |
+
Diffutron departs from traditional next-token prediction. It treats text generation as a discrete diffusion process:
|
| 34 |
+
1. **Forward Process:** Clean text is gradually corrupted into a sequence of `<mask>` tokens.
|
| 35 |
+
2. **Reverse Process:** The model learns to denoise the sequence globally, attending to visible context bi-directionally to predict the original tokens.
|
| 36 |
|
| 37 |
+
This non-autoregressive paradigm compresses linguistic knowledge efficiently, allowing this 0.3B model to punch significantly above its weight class.
|
| 38 |
|
| 39 |
+
## 📚 Training Pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
+
The model was developed through a resource-efficient, multi-stage training pipeline:
|
| 42 |
|
| 43 |
+
### 1. Continual Pre-training (CPT)
|
| 44 |
+
To adapt the multilingual backbone to Turkish without catastrophic forgetting, we employed a high-rank LoRA strategy (r=256, α=256) targeting all linear modules (Attention and MLP).
|
| 45 |
+
* **Data:** ~2 million sequences sourced from Havadis (news), Temiz-OSCAR (web), and Turkish Wikipedia.
|
| 46 |
+
* **Result:** Perplexity on the Bilkent Turkish Writings Dataset dropped significantly from 3.42 (base) to 2.75.
|
| 47 |
|
| 48 |
+
### 2. Progressive Instruction-Tuning (SFT)
|
| 49 |
+
To unlock generative instruction-following capabilities, we utilized a two-stage supervised fine-tuning approach:
|
| 50 |
+
* **Stage 1 (General Adaptation):** Trained on `metunlp/LlamaTurk-Instruction-Set` for 20 epochs to establish fundamental instruction-following behaviors.
|
| 51 |
+
* **Stage 2 (Complex Specialization):** Trained on the nuanced `turkish-nlp-suite/InstrucTurca` dataset for 8 epochs with an increased batch size, enhancing the model's ability to handle intricate, domain-specific Turkish commands.
|
| 52 |
|
| 53 |
+
## 📊 Evaluation Results
|
| 54 |
|
| 55 |
+
The model was evaluated on a representative subset of the **CETVEL Benchmark Suite**. DiffutronLM-0.3B (2nd Stage) demonstrates remarkable parameter efficiency, outperforming models up to 7x its size (e.g., Kumru-2B and TURNA-1.1B) on average scores.
|
| 56 |
|
| 57 |
+
| Benchmark | Diffutron-1st (0.3B) | Diffutron-2nd (0.3B) | TURNA (1.1B) | Kumru (2B) | Kanarya (2B) | Llama-3.2 (3B) | Trendyol (7B) | Aya-101 (13B) |
|
| 58 |
+
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
| 59 |
+
| **Belebele_TR** | 22.22 | 27.00 | 22.56 | 29.00 | 28.11 | **55.78** | 36.22 | 22.89 |
|
| 60 |
+
| **EXAMS_TR** | 25.95 | 27.74 | 23.66 | **30.03** | **30.03** | 26.21 | 28.50 | 22.90 |
|
| 61 |
+
| **IronyTR** | 50.67 | **52.00** | 48.33 | 51.00 | 50.00 | 50.17 | 50.00 | **52.17** |
|
| 62 |
+
| **News_Cat** | 23.20 | 32.40 | 32.80 | 26.40 | 66.80 | 64.00 | **81.20** | 20.00 |
|
| 63 |
+
| **MNLI_TR** | 33.29 | 32.81 | 34.94 | **36.42** | 33.40 | 34.76 | 35.19 | 27.90 |
|
| 64 |
+
| **STS_TR** | 17.77 | **18.78** | 14.21 | 11.75 | 12.91 | 12.91 | 15.52 | 16.97 |
|
| 65 |
+
| **XCOPA_TR** | 53.80 | 52.00 | 55.80 | 54.00 | **64.20** | 54.60 | 61.00 | 59.60 |
|
| 66 |
+
| **Average** | 32.41 | **34.68** | 33.19 | 34.09 | 40.78 | 42.63 | **43.95** | 31.78 |
|
| 67 |
|
| 68 |
+
## 💻 Usage
|
| 69 |
|
| 70 |
+
Because Diffutron is a Masked Diffusion Language Model, it requires inference strategies distinct from standard causal generation. We recommend using the `dllm` library or custom generation loops tailored for discrete diffusion.
|
| 71 |
|
| 72 |
+
### Generation Parameters Used in Paper:
|
| 73 |
+
* **Longer Context:** Steps: 128, Temp: 0.1, Block Length: 32, Repetition Penalty: 1.2
|
| 74 |
+
* **Shorter Context:** Steps: 64, Remask: `low_conf`, Stochastic: `False`, CFG: 0.0
|
| 75 |
|
| 76 |
+
## ⚠️ Limitations
|
| 77 |
|
| 78 |
+
* **Multilingual Backbone:** Built upon a multilingual encoder rather than a native Turkish foundation model.
|
| 79 |
+
* **Context Window:** Restricted to a 256-token context window for generation, limiting its use in long-form summarization or document-level generation.
|
| 80 |
+
* **Data Nuances:** Instruction datasets rely heavily on translations or synthetic data, which may occasionally miss subtle cultural contexts.
|
| 81 |
|
| 82 |
+
## 📝 Citation
|
| 83 |
|
| 84 |
+
If you use Diffutron in your research, please cite our preprint:
|
| 85 |
|
| 86 |
+
```bibtex
|
| 87 |
+
@misc{diffutron2026,
|
| 88 |
+
author = {Kocabay, Şuayp Talha and Akkuş, Talha Rüzgar},
|
| 89 |
+
title = {Diffutron: A Masked Diffusion Language Model for Turkish Language},
|
| 90 |
+
year = {2026},
|
| 91 |
+
publisher = {Hugging Face},
|
| 92 |
+
howpublished = {\url{https://huggingface.co/collections/diffutron/diffutronlm}}
|
| 93 |
+
}
|
| 94 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|