gcelikmasat-work commited on
Commit
4e141b3
·
verified ·
1 Parent(s): 5a6c72d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +181 -5
README.md CHANGED
@@ -1,5 +1,181 @@
1
- ---
2
- license: gemma
3
- tags:
4
- - llama-factory
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gemma
3
+ base_model: google/gemma-2-9b-it
4
+ datasets:
5
+ - gcelikmasat-work/BPMN-IT-Dataset
6
+ language:
7
+ - en
8
+ library_name: transformers
9
+ pipeline_tag: text-generation
10
+ tags:
11
+ - bpmn
12
+ - business-process-modeling
13
+ - process-modeling
14
+ - instruction-tuning
15
+ - lora
16
+ - peft
17
+ - dot
18
+ - graphviz
19
+ - llama-factory
20
+ - gemma2
21
+ model-index:
22
+ - name: Gemma2-9B-BPMG-IT
23
+ results:
24
+ - task:
25
+ type: text-generation
26
+ name: BPMN Model Generation from Text
27
+ dataset:
28
+ type: gcelikmasat-work/BPMN-IT-Dataset
29
+ name: BPMN-IT (stratified 180-instance benchmark across 15 business domains, seed split)
30
+ metrics:
31
+ - type: bleu
32
+ value: 82.98
33
+ name: BLEU
34
+ - type: rouge
35
+ value: 94.61
36
+ name: ROUGE-L
37
+ - type: meteor
38
+ value: 92.67
39
+ name: METEOR
40
+ - type: relative-graph-edit-distance
41
+ value: 97.78
42
+ name: R-GED Accuracy (%)
43
+ ---
44
+
45
+ # Gemma2-9B-BPMG-IT
46
+
47
+ Gemma2-9B-BPMG-IT is an instruction-tuned language model that converts natural-language business process descriptions into BPMN models rendered in [Graphviz DOT](https://graphviz.org/doc/info/lang.html). It is a LoRA adaptation of [`google/gemma-2-9b-it`](https://huggingface.co/google/gemma-2-9b-it), trained on a cleaned subset of the [MaD dataset](https://ieeexplore.ieee.org/abstract/document/10191898) for the paper:
48
+
49
+ > **Generating Business Process Models with Open Source Large Language Models using Instruction Tuning.**
50
+ > Gökberk Çelikmasat, Atay Özgövde, Fatma Başak Aydemir.
51
+ > *International Conference on Product-Focused Software Process Improvement (PROFES 2025)*, Springer LNCS, pp. 269–284.
52
+ > DOI: [10.1007/978-3-032-12089-2_17](https://doi.org/10.1007/978-3-032-12089-2_17)
53
+
54
+ This model is the subject of our PROFES 2025 conference paper, in which we introduced the instruction-tuning approach and evaluated it against open-weight and proprietary baselines on textual and structural metrics. It is also the **BPMG-IT** baseline in our subsequent journal paper:
55
+
56
+ > **InstruBPM: Instruction-Tuning Open-Weight Language Models for BPMN Model Generation.**
57
+ > Çelikmasat, Özgövde, Aydemir. *Software and Systems Modeling*, under review, 2026.
58
+ > arXiv: [2512.12063](https://arxiv.org/abs/2512.12063)
59
+
60
+ For new projects we recommend the successor model, [`gcelikmasat-work/Qwen3_4B_BPMN_IT`](https://huggingface.co/gcelikmasat-work/Qwen3_4B_BPMN_IT), which matches this model's accuracy with roughly **half** the parameter count (4B vs. 9B) and ships with quantized and merge-scale variants for deployment trade-offs.
61
+
62
+ ## Results
63
+
64
+ Evaluated on the 180-instance stratified benchmark used in the InstruBPM journal paper (Table 2), this model attains:
65
+
66
+ | Metric | Score |
67
+ | ------------- | -----: |
68
+ | BLEU | 82.98 |
69
+ | ROUGE-L | 94.61 |
70
+ | METEOR | 92.67 |
71
+ | R-GED Acc. | 97.78 |
72
+
73
+ These scores are very close to those of the newer 4B Qwen3 successor (which reaches 83.06 / 94.43 / 92.82 / 99.44 on the same benchmark), while requiring more than twice the memory and compute at inference time.
74
+
75
+ ## Intended use
76
+
77
+ Generate first-draft BPMN models from textual process descriptions to accelerate early-stage modeling. Intended as an assistant for business process modelers and analysts; human review remains recommended, particularly for gateway logic and activity labels.
78
+
79
+ ## Supported BPMN subset
80
+
81
+ The model generates BPMN process fragments in DOT notation covering: start events, end events, tasks (activities), sequence flows, and AND/XOR gateways (splits and joins). It does **not** generate pools, lanes, message flows, data objects, intermediate/boundary events, sub-processes, or annotations.
82
+
83
+ ## How to use
84
+
85
+ ```python
86
+ from transformers import AutoModelForCausalLM, AutoTokenizer
87
+ import torch
88
+
89
+ model_id = "gcelikmasat-work/gemma-2-9b-it-BPMN"
90
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
91
+ model = AutoModelForCausalLM.from_pretrained(
92
+ model_id, torch_dtype=torch.bfloat16, device_map="auto"
93
+ )
94
+
95
+ instruction = (
96
+ "You are an expert in BPMN modeling and DOT language. Your task is to "
97
+ "convert detailed textual descriptions of business processes into accurate "
98
+ "BPMN model codes written in DOT language. Label all nodes with their "
99
+ "activity names. Represent all connections between nodes without labeling "
100
+ "the connections. Represent each node and its connections accurately, "
101
+ "ensuring all decision points and flows are included and connected. "
102
+ "Now, generate BPMN business process model code in DOT language for the "
103
+ "following textual description of a business process: "
104
+ )
105
+
106
+ description = (
107
+ "The process begins when the customer submits an application. After submission, "
108
+ "the application is reviewed by the credit officer. If the application is approved, "
109
+ "the loan is disbursed. Otherwise, a rejection letter is sent. The process ends."
110
+ )
111
+
112
+ # Gemma 2 uses a single user turn without a separate system role
113
+ messages = [{"role": "user", "content": instruction + description}]
114
+ prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
115
+ inputs = tokenizer([prompt], return_tensors="pt").to(model.device)
116
+
117
+ with torch.no_grad():
118
+ out = model.generate(**inputs, max_new_tokens=2048, temperature=0.1, top_p=1.0, do_sample=True)
119
+
120
+ dot_code = tokenizer.decode(out[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True)
121
+ print(dot_code)
122
+ ```
123
+
124
+ ## Training
125
+
126
+ Trained with LLaMA-Factory using LoRA on Gemma-2 9B Instruct. Detailed hyperparameters are reported in the PROFES 2025 paper. Training data: 21.5k cleaned instruction–input–output triples from MaD, split 80/10/10 for train/validation/test. The full splits are available at [`gcelikmasat-work/BPMN-IT-Dataset`](https://huggingface.co/datasets/gcelikmasat-work/BPMN-IT-Dataset).
127
+
128
+ ## Limitations
129
+
130
+ - **Scope.** Control-flow slice of BPMN only (tasks, events, sequence flows, AND/XOR gateways). No pools, lanes, message flows, data objects, or sub-processes.
131
+ - **Language.** English only.
132
+ - **Parameter efficiency.** At 9B parameters, this model is roughly twice the size of the Qwen3-4B successor for comparable accuracy. For deployment-constrained settings, the 4B successor is preferred.
133
+ - **Semantic equivalence.** Structural similarity does not imply semantic equivalence, especially when input descriptions are ambiguous.
134
+
135
+ ## Citation
136
+
137
+ If you use this model, please cite the PROFES 2025 paper:
138
+
139
+ ```bibtex
140
+ @inproceedings{celikmasat2025bpmg,
141
+ title = {Generating Business Process Models with Open Source Large Language Models using Instruction Tuning},
142
+ author = {{\c{C}}elikmasat, G{\"o}kberk and {\"O}zg{\"o}vde, Atay and Aydemir, Fatma Ba{\c{s}}ak},
143
+ booktitle = {Product-Focused Software Process Improvement (PROFES 2025)},
144
+ series = {Lecture Notes in Computer Science},
145
+ pages = {269--284},
146
+ year = {2025},
147
+ publisher = {Springer},
148
+ doi = {10.1007/978-3-032-12089-2_17},
149
+ url = {https://doi.org/10.1007/978-3-032-12089-2_17}
150
+ }
151
+ ```
152
+
153
+ If you are comparing against this model as a baseline in a follow-up study, please also cite the journal extension:
154
+
155
+ ```bibtex
156
+ @article{celikmasat2026instrubpm,
157
+ title = {InstruBPM: Instruction-Tuning Open-Weight Language Models for BPMN Model Generation},
158
+ author = {{\c{C}}elikmasat, G{\"o}kberk and {\"O}zg{\"o}vde, Atay and Aydemir, Fatma Ba{\c{s}}ak},
159
+ journal = {Software and Systems Modeling},
160
+ year = {2026},
161
+ note = {Under review. arXiv:2512.12063},
162
+ url = {https://arxiv.org/abs/2512.12063}
163
+ }
164
+ ```
165
+
166
+ Please also cite the source dataset:
167
+
168
+ ```bibtex
169
+ @inproceedings{li2023mad,
170
+ title = {{MaD}: A Dataset for Interview-based {BPM} in Business Process Management},
171
+ author = {Li, Xiang and Ni, Lijuan and Li, Ran and Liu, Jiafei and Zhang, Ming},
172
+ booktitle = {2023 International Joint Conference on Neural Networks (IJCNN)},
173
+ pages = {1--8},
174
+ year = {2023},
175
+ publisher = {IEEE}
176
+ }
177
+ ```
178
+
179
+ ## License
180
+
181
+ Released under the [Gemma license](https://ai.google.dev/gemma/terms), inherited from the base model ([`google/gemma-2-9b-it`](https://huggingface.co/google/gemma-2-9b-it)). Use is subject to Google's Gemma Prohibited Use Policy. The training data is distributed separately under the terms of the MaD dataset.