rajtiwariee commited on
Commit
01eb821
·
verified ·
1 Parent(s): cb50faf

Upload fine-tuned model

Browse files
Files changed (1) hide show
  1. README.md +9 -13
README.md CHANGED
@@ -7,20 +7,19 @@ tags:
7
  - commit-message
8
  - qwen2
9
  - lora
10
- base_model: muellerzr/qwen-0.5-git-commit-message-generation
11
  datasets:
12
  - bigcode/commitpackft
13
  ---
14
 
15
  # Git Commit Message Generator
16
 
17
- Fine-tuned [Qwen-0.5B](https://huggingface.co/muellerzr/qwen-0.5-git-commit-message-generation) model for generating professional Git commit messages.
18
 
19
  ## Model Description
20
 
21
  This model was fine-tuned using LoRA (Low-Rank Adaptation) on the CommitPackFT dataset to generate concise, professional commit messages from git diffs.
22
 
23
- **Base Model**: `muellerzr/qwen-0.5-git-commit-message-generation`
24
  **Fine-tuning Method**: LoRA (r=16, alpha=32)
25
  **Training Data**: 55K filtered commits from CommitPackFT
26
  **Languages**: Python, JavaScript, TypeScript, Java, C++, Go, Rust, and more
@@ -68,28 +67,25 @@ inputs = tokenizer(prompt, return_tensors="pt")
68
  with torch.no_grad():
69
  outputs = model.generate(
70
  **inputs,
71
- max_new_tokens=100,
72
- temperature=0.7,
73
- do_sample=True,
74
- top_p=0.9,
75
  )
76
 
77
  message = tokenizer.decode(outputs[0], skip_special_tokens=True)
78
  print(message.split("Commit message:")[-1].strip())
79
- # Output: "Fix null check in login function"
80
  ```
81
 
82
  ### CLI Tool
83
 
84
- For easier usage, install the companion CLI tool:
85
 
86
  ```bash
87
- pip install commit-gen
88
  commit-gen generate --commit
89
  ```
90
 
91
- See the [GitHub repository](https://github.com/YOUR_USERNAME/GitCommitGenerator) for more details.
92
-
93
  ## Training Details
94
 
95
  ### Training Data
@@ -144,7 +140,7 @@ This model is intended to assist developers in writing commit messages, not repl
144
 
145
  ```bibtex
146
  @misc{git-commit-generator,
147
- author = {Your Name},
148
  title = {Git Commit Message Generator},
149
  year = {2024},
150
  publisher = {Hugging Face},
 
7
  - commit-message
8
  - qwen2
9
  - lora
 
10
  datasets:
11
  - bigcode/commitpackft
12
  ---
13
 
14
  # Git Commit Message Generator
15
 
16
+ Fine-tuned Qwen-0.5B model for generating professional Git commit messages from code diffs.
17
 
18
  ## Model Description
19
 
20
  This model was fine-tuned using LoRA (Low-Rank Adaptation) on the CommitPackFT dataset to generate concise, professional commit messages from git diffs.
21
 
22
+ **Base Model**: Qwen-0.5B
23
  **Fine-tuning Method**: LoRA (r=16, alpha=32)
24
  **Training Data**: 55K filtered commits from CommitPackFT
25
  **Languages**: Python, JavaScript, TypeScript, Java, C++, Go, Rust, and more
 
67
  with torch.no_grad():
68
  outputs = model.generate(
69
  **inputs,
70
+ max_new_tokens=30,
71
+ do_sample=False, # Deterministic
72
+ pad_token_id=tokenizer.eos_token_id,
 
73
  )
74
 
75
  message = tokenizer.decode(outputs[0], skip_special_tokens=True)
76
  print(message.split("Commit message:")[-1].strip())
77
+ # Output: "Check for user existence before accessing password"
78
  ```
79
 
80
  ### CLI Tool
81
 
82
+ For easier usage, install the companion CLI tool from the [GitHub repository](https://github.com/rajtiwariee/GitCommitGenerator):
83
 
84
  ```bash
85
+ pip install -e .
86
  commit-gen generate --commit
87
  ```
88
 
 
 
89
  ## Training Details
90
 
91
  ### Training Data
 
140
 
141
  ```bibtex
142
  @misc{git-commit-generator,
143
+ author = {Raj Tiwari},
144
  title = {Git Commit Message Generator},
145
  year = {2024},
146
  publisher = {Hugging Face},