init
This commit is contained in:
37
commit-msg-ernie/Modelfile
Normal file
37
commit-msg-ernie/Modelfile
Normal file
@@ -0,0 +1,37 @@
|
||||
# Modelfile for ERNIE-4.5-0.3B commit message generator
|
||||
FROM hf.co/enacimie/ERNIE-4.5-0.3B-Base-PT-Q4_K_M-GGUF:Q4_K_M
|
||||
|
||||
# Context window optimized for ERNIE 4.5 (supports up to 131K tokens)
|
||||
PARAMETER num_ctx 4096
|
||||
PARAMETER temperature 0.4
|
||||
PARAMETER top_p 0.9
|
||||
|
||||
# ERNIE-specific chat template using User/Assistant format
|
||||
TEMPLATE """{{- if .System }}{{ .System }}
|
||||
|
||||
{{ end }}{{- range $i, $_ := .Messages }}
|
||||
{{- $last := eq (len (slice $.Messages $i)) 1 }}
|
||||
{{- if eq .Role "user" }}User: {{ .Content }}
|
||||
{{ if $last }}Assistant: {{ end }}
|
||||
{{- else if eq .Role "assistant" }}Assistant: {{ .Content }}
|
||||
{{ if not $last }}
|
||||
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
{{- end }}"""
|
||||
|
||||
# System prompt optimized for ERNIE's capabilities
|
||||
SYSTEM """
|
||||
You are a git commit message assistant that generates Conventional Commits from git diffs.
|
||||
|
||||
Guidelines:
|
||||
- Output ONLY the commit message, nothing else
|
||||
- Use format: <type>(<scope>): <description>
|
||||
- Types: feat, fix, docs, chore, refactor, perf, test, build, ci, style
|
||||
- Keep description ≤ 50 characters, imperative mood
|
||||
- Add body with 72-char line wrapping if needed for complex changes
|
||||
- Include "BREAKING CHANGE: <reason>" footer when applicable
|
||||
- Infer appropriate type from the changes shown
|
||||
- Focus on intent and impact, not implementation details
|
||||
- Return empty string for empty diffs
|
||||
"""
|
Reference in New Issue
Block a user