Instructions to use seniruk/qwen2.5coder-0.5B_commit_msg with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use seniruk/qwen2.5coder-0.5B_commit_msg with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="seniruk/qwen2.5coder-0.5B_commit_msg", filename="qwen0.5-finetuned.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use seniruk/qwen2.5coder-0.5B_commit_msg with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf seniruk/qwen2.5coder-0.5B_commit_msg # Run inference directly in the terminal: llama cli -hf seniruk/qwen2.5coder-0.5B_commit_msg
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf seniruk/qwen2.5coder-0.5B_commit_msg # Run inference directly in the terminal: llama cli -hf seniruk/qwen2.5coder-0.5B_commit_msg
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf seniruk/qwen2.5coder-0.5B_commit_msg # Run inference directly in the terminal: ./llama-cli -hf seniruk/qwen2.5coder-0.5B_commit_msg
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf seniruk/qwen2.5coder-0.5B_commit_msg # Run inference directly in the terminal: ./build/bin/llama-cli -hf seniruk/qwen2.5coder-0.5B_commit_msg
Use Docker
docker model run hf.co/seniruk/qwen2.5coder-0.5B_commit_msg
- LM Studio
- Jan
- vLLM
How to use seniruk/qwen2.5coder-0.5B_commit_msg with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "seniruk/qwen2.5coder-0.5B_commit_msg" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "seniruk/qwen2.5coder-0.5B_commit_msg", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/seniruk/qwen2.5coder-0.5B_commit_msg
- Ollama
How to use seniruk/qwen2.5coder-0.5B_commit_msg with Ollama:
ollama run hf.co/seniruk/qwen2.5coder-0.5B_commit_msg
- Unsloth Studio
How to use seniruk/qwen2.5coder-0.5B_commit_msg with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for seniruk/qwen2.5coder-0.5B_commit_msg to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for seniruk/qwen2.5coder-0.5B_commit_msg to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for seniruk/qwen2.5coder-0.5B_commit_msg to start chatting
- Pi
How to use seniruk/qwen2.5coder-0.5B_commit_msg with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf seniruk/qwen2.5coder-0.5B_commit_msg
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "seniruk/qwen2.5coder-0.5B_commit_msg" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use seniruk/qwen2.5coder-0.5B_commit_msg with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf seniruk/qwen2.5coder-0.5B_commit_msg
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default seniruk/qwen2.5coder-0.5B_commit_msg
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use seniruk/qwen2.5coder-0.5B_commit_msg with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf seniruk/qwen2.5coder-0.5B_commit_msg
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "seniruk/qwen2.5coder-0.5B_commit_msg" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use seniruk/qwen2.5coder-0.5B_commit_msg with Docker Model Runner:
docker model run hf.co/seniruk/qwen2.5coder-0.5B_commit_msg
- Lemonade
How to use seniruk/qwen2.5coder-0.5B_commit_msg with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull seniruk/qwen2.5coder-0.5B_commit_msg
Run and chat with the model
lemonade run user.qwen2.5coder-0.5B_commit_msg-{{QUANT_TAG}}List all available models
lemonade list
Delete app.py
Browse files
app.py
DELETED
|
@@ -1,76 +0,0 @@
|
|
| 1 |
-
import subprocess
|
| 2 |
-
import gradio as gr
|
| 3 |
-
|
| 4 |
-
# Paths
|
| 5 |
-
BINARY_PATH = "./bin/llama-cli" # prebuilt binary from zip
|
| 6 |
-
MODEL_PATH = "./qwen0.5-finetuned.gguf"
|
| 7 |
-
|
| 8 |
-
# Commit message prompt template
|
| 9 |
-
commit_prompt = """Generate a meaningful commit message explaining all the changes in the provided Git diff.
|
| 10 |
-
|
| 11 |
-
### Git Diff:
|
| 12 |
-
{}
|
| 13 |
-
|
| 14 |
-
### Commit Message:
|
| 15 |
-
"""
|
| 16 |
-
|
| 17 |
-
# Example git diff prefilled in Gradio
|
| 18 |
-
git_diff_example = """
|
| 19 |
-
diff --git a/index.html b/index.html
|
| 20 |
-
index 89abcde..f123456 100644
|
| 21 |
-
--- a/index.html
|
| 22 |
-
+++ b/index.html
|
| 23 |
-
@@ -5,16 +5,6 @@ <body>
|
| 24 |
-
<h1>Welcome to My Page</h1>
|
| 25 |
-
|
| 26 |
-
- <table border="1">
|
| 27 |
-
- <tr>
|
| 28 |
-
- <th>Name</th>
|
| 29 |
-
- <th>Age</th>
|
| 30 |
-
- </tr>
|
| 31 |
-
- <tr>
|
| 32 |
-
- <td>John Doe</td>
|
| 33 |
-
- <td>30</td>
|
| 34 |
-
- </tr>
|
| 35 |
-
- </table>
|
| 36 |
-
|
| 37 |
-
+ <p>This is a newly added paragraph replacing the table.</p>
|
| 38 |
-
</body>
|
| 39 |
-
</html>
|
| 40 |
-
"""
|
| 41 |
-
|
| 42 |
-
def generate_commit(git_diff: str, max_tokens: int = 64) -> str:
|
| 43 |
-
"""Generate a commit message using the llama-cli binary."""
|
| 44 |
-
|
| 45 |
-
if not git_diff.strip():
|
| 46 |
-
return "Please provide a git diff to summarize."
|
| 47 |
-
|
| 48 |
-
prompt_text = commit_prompt.format(git_diff)
|
| 49 |
-
|
| 50 |
-
cmd = [
|
| 51 |
-
BINARY_PATH,
|
| 52 |
-
"-m", MODEL_PATH,
|
| 53 |
-
"-p", prompt_text,
|
| 54 |
-
"-n", str(max_tokens)
|
| 55 |
-
]
|
| 56 |
-
|
| 57 |
-
try:
|
| 58 |
-
# Run the binary and capture output
|
| 59 |
-
result = subprocess.run(cmd, capture_output=True, text=True, check=True)
|
| 60 |
-
return result.stdout.strip()
|
| 61 |
-
except subprocess.CalledProcessError as e:
|
| 62 |
-
return f"Error running binary: {e}\n{e.stderr}"
|
| 63 |
-
|
| 64 |
-
if __name__ == "__main__":
|
| 65 |
-
demo = gr.Interface(
|
| 66 |
-
fn=generate_commit,
|
| 67 |
-
inputs=[
|
| 68 |
-
gr.Textbox(lines=30, label="Git Diff", value=git_diff_example),
|
| 69 |
-
gr.Slider(1, 2048, value=64, step=1, label="max_tokens")
|
| 70 |
-
],
|
| 71 |
-
outputs=gr.Textbox(label="Commit Message", lines=8),
|
| 72 |
-
title="Commit Message Generator",
|
| 73 |
-
description="Paste a git diff and generate a concise commit message using the GGUF model via llama-cli binary.",
|
| 74 |
-
allow_flagging="never"
|
| 75 |
-
)
|
| 76 |
-
demo.launch(share=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|