MrObiKenobi commited on
Commit
07fa1ff
·
verified ·
1 Parent(s): 1b3531b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +53 -12
README.md CHANGED
@@ -1,36 +1,75 @@
1
  ---
2
  base_model: google/gemma-3-270m-it
3
  library_name: transformers
4
- model_name: checkpoint_models
5
  tags:
6
  - generated_from_trainer
7
  - sft
8
  - trl
9
  licence: license
 
 
 
 
 
 
10
  ---
11
 
12
- # Model Card for checkpoint_models
13
 
14
- This model is a fine-tuned version of [google/gemma-3-270m-it](https://huggingface.co/google/gemma-3-270m-it).
15
- It has been trained using [TRL](https://github.com/huggingface/trl).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  ## Quick start
18
 
19
  ```python
20
- from transformers import pipeline
21
 
22
- question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
23
- generator = pipeline("text-generation", model="None", device="cuda")
24
- output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
25
- print(output["generated_text"])
 
 
 
 
 
 
 
 
 
 
 
26
  ```
27
 
28
  ## Training procedure
29
 
30
-
31
 
 
32
 
33
- This model was trained with SFT.
34
 
35
  ### Framework versions
36
 
@@ -40,9 +79,11 @@ This model was trained with SFT.
40
  - Datasets: 4.0.0
41
  - Tokenizers: 0.22.2
42
 
43
- ## Citations
44
 
 
45
 
 
46
 
47
  Cite TRL as:
48
 
 
1
  ---
2
  base_model: google/gemma-3-270m-it
3
  library_name: transformers
4
+ model_name: mermaid-gemma-3-270m-it
5
  tags:
6
  - generated_from_trainer
7
  - sft
8
  - trl
9
  licence: license
10
+ license: mit
11
+ datasets:
12
+ - Celiadraw/text-to-mermaid
13
+ - ibm-research/MermaidSeqBench
14
+ language:
15
+ - en
16
  ---
17
 
18
+ # Model Card for `mermaid-gemma-3-270m-it`
19
 
20
+ This model is a fine-tuned variant of [google/gemma-3-270m-it](https://huggingface.co/google/gemma-3-270m-it), specifically trained to transform natural-language descriptions into structured Mermaid diagram code.
21
+
22
+ ## Example Input/Output
23
+
24
+ **Input**:
25
+ ```
26
+ Design a sequence diagram for a video conferencing application, illustrating
27
+ interactions between users, scheduling system, video call establishment,
28
+ audio transmission, and chat messaging.
29
+ ```
30
+
31
+ **Output**:
32
+ ```mermaid
33
+ sequenceDiagram
34
+ participant User1
35
+ participant User2
36
+ participant SchedulingSystem as Scheduling System
37
+ participant VideoCall as Video Call
38
+ User1 ->> SchedulingSystem: Schedule Meeting
39
+ SchedulingSystem ->> User2: Meeting Invitation
40
+ User1 ->> VideoCall: Start Call
41
+ VideoCall ->> User2: Receive Call
42
+ ```
43
 
44
  ## Quick start
45
 
46
  ```python
47
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
48
 
49
+ model = AutoModelForCausalLM.from_pretrained(
50
+ "MrObiKenobi/mermaid-gemma-3-270m-it",
51
+ device_map="auto",
52
+ dtype="auto"
53
+ )
54
+ tokenizer = AutoTokenizer.from_pretrained("MrObiKenobi/mermaid-gemma-3-270m-it")
55
+
56
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
57
+
58
+ prompt = "Design a sequence diagram for a login system with user, frontend, and backend."
59
+ messages = [{"role": "user", "content": prompt}]
60
+ formatted = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
61
+
62
+ output = pipe(formatted, max_new_tokens=256)
63
+ print(output[0]["generated_text"][len(formatted):])
64
  ```
65
 
66
  ## Training procedure
67
 
68
+ This model was trained using supervised fine-tuning (SFT) on the dataset [Celiadraw/text-to-mermaid](https://huggingface.co/datasets/Celiadraw/text-to-mermaid), using only 1,000 samples.
69
 
70
+ This work is intended as an academic exercise; however, we are confident that training on the full dataset would lead to significantly improved performance.
71
 
72
+ Please refer to the accompanying notebook for detailed fine-tuning procedures and configuration.
73
 
74
  ### Framework versions
75
 
 
79
  - Datasets: 4.0.0
80
  - Tokenizers: 0.22.2
81
 
82
+ ## Credits
83
 
84
+ Based on tutorial by Daniel Bourke: [Small LLM Fine-tuning Tutorial](https://www.youtube.com/watch?v=2hoNAr-id-E)
85
 
86
+ ## Citations
87
 
88
  Cite TRL as:
89