louijiec commited on
Commit
133c285
·
verified ·
1 Parent(s): 03a1048

Update model card with training details

Browse files
Files changed (1) hide show
  1. README.md +59 -36
README.md CHANGED
@@ -1,57 +1,80 @@
1
  ---
2
- library_name: peft
3
- license: gemma
4
- base_model: google/gemma-2b-it
5
  tags:
6
- - generated_from_trainer
 
 
 
 
 
 
 
7
  model-index:
8
- - name: veriforge-gemma-2b-it
9
- results: []
10
  ---
11
 
12
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
- should probably proofread and complete it, then remove this comment. -->
14
 
15
- # veriforge-gemma-2b-it
16
 
17
- This model is a fine-tuned version of [google/gemma-2b-it](https://huggingface.co/google/gemma-2b-it) on the None dataset.
18
 
19
- ## Model description
 
 
 
 
20
 
21
- More information needed
22
 
23
- ## Intended uses & limitations
 
24
 
25
- More information needed
 
 
26
 
27
- ## Training and evaluation data
 
 
 
 
28
 
29
- More information needed
30
 
31
- ## Training procedure
 
 
 
 
32
 
33
- ### Training hyperparameters
34
 
35
- The following hyperparameters were used during training:
36
- - learning_rate: 5e-05
37
- - train_batch_size: 2
38
- - eval_batch_size: 8
39
- - seed: 42
40
- - gradient_accumulation_steps: 4
41
- - total_train_batch_size: 8
42
- - optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
43
- - lr_scheduler_type: linear
44
- - num_epochs: 10
45
- - mixed_precision_training: Native AMP
46
 
47
- ### Training results
48
 
 
 
 
49
 
 
50
 
51
- ### Framework versions
 
 
52
 
53
- - PEFT 0.15.2
54
- - Transformers 4.52.4
55
- - Pytorch 2.6.0+cu124
56
- - Datasets 3.6.0
57
- - Tokenizers 0.21.1
 
1
  ---
2
+ license: apache-2.0
3
+ language: code
 
4
  tags:
5
+ - gemma
6
+ - qlora
7
+ - circuit-synthesis
8
+ - verilog
9
+ - llm
10
+ - electronic-design-automation
11
+ - peft
12
+ - google-colab
13
  model-index:
14
+ - name: veriforge-gemma-2b-it
15
+ results: []
16
  ---
17
 
18
+ # Veriforge-Gemma-2B-IT 🔧
 
19
 
20
+ **`veriforge-gemma-2b-it`** is a QLoRA-fine-tuned version of [`google/gemma-2b-it`](https://huggingface.co/google/gemma-2b-it) that specializes in prompt-based circuit synthesis for digital logic design, specifically in Verilog HDL.
21
 
22
+ ## 🚀 Model Description
23
 
24
+ - **Base Model**: [`google/gemma-2b-it`](https://huggingface.co/google/gemma-2b-it)
25
+ - **Fine-tuned By**: [louijiec](https://huggingface.co/louijiec)
26
+ - **Method**: QLoRA using PEFT and bitsandbytes
27
+ - **Data**: 500 simulated Verilog gate examples (AND, OR, NAND, etc.)
28
+ - **Platform**: Google Colab
29
 
30
+ ## 🧐 Example Usage
31
 
32
+ ```python
33
+ from transformers import AutoModelForCausalLM, AutoTokenizer
34
 
35
+ model_id = "louijiec/veriforge-gemma-2b-it"
36
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
37
+ model = AutoModelForCausalLM.from_pretrained(model_id)
38
 
39
+ prompt = "### Prompt:\nWrite Verilog code for a 3-input XOR gate.\n\n### Response:\n"
40
+ inputs = tokenizer(prompt, return_tensors="pt")
41
+ outputs = model.generate(**inputs, max_new_tokens=100)
42
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
43
+ ```
44
 
45
+ ## 🧪 Sample Output
46
 
47
+ ```verilog
48
+ module nand_3_input (output y, input a0, a1, a2);
49
+ assign y = ~(a0 & a1 & a2);
50
+ endmodule
51
+ ```
52
 
53
+ ## 📚 Training Details
54
 
55
+ - LoRA rank: 8
56
+ - Bits: 4-bit (QLoRA)
57
+ - Max tokens: 512
58
+ - Optimizer: AdamW, FP16
59
+ - Epochs: 10
60
+ - Batch Size: 2
61
+ - Gradient Accumulation: 4
62
+ - Logging Steps: 10
 
 
 
63
 
64
+ ## 📌 Citations
65
 
66
+ - Gemma by Google: https://huggingface.co/google/gemma-2b-it
67
+ - QLoRA: https://arxiv.org/abs/2305.14314
68
+ - PEFT: https://github.com/huggingface/peft
69
 
70
+ ## ⚠️ Limitations
71
 
72
+ - Trained only on simple gates
73
+ - No memory/state logic (flip-flops, FSMs, etc.)
74
+ - No formal verification or testbench evaluation
75
 
76
+ ## 💪 Future Work
77
+
78
+ - Add support for more circuit components (MUX, ALU)
79
+ - Formal testbench generation
80
+ - Build EDA pipeline integrations