Instructions to use fengraoyaoshi/HMH-1.0-Cyber-R-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fengraoyaoshi/HMH-1.0-Cyber-R-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fengraoyaoshi/HMH-1.0-Cyber-R-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("fengraoyaoshi/HMH-1.0-Cyber-R-7B") model = AutoModelForCausalLM.from_pretrained("fengraoyaoshi/HMH-1.0-Cyber-R-7B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use fengraoyaoshi/HMH-1.0-Cyber-R-7B 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 fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M # Run inference directly in the terminal: llama cli -hf fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M # Run inference directly in the terminal: llama cli -hf fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
Use Docker
docker model run hf.co/fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use fengraoyaoshi/HMH-1.0-Cyber-R-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fengraoyaoshi/HMH-1.0-Cyber-R-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fengraoyaoshi/HMH-1.0-Cyber-R-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
- SGLang
How to use fengraoyaoshi/HMH-1.0-Cyber-R-7B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "fengraoyaoshi/HMH-1.0-Cyber-R-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fengraoyaoshi/HMH-1.0-Cyber-R-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "fengraoyaoshi/HMH-1.0-Cyber-R-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fengraoyaoshi/HMH-1.0-Cyber-R-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use fengraoyaoshi/HMH-1.0-Cyber-R-7B with Ollama:
ollama run hf.co/fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
- Unsloth Desktop
- Pi
How to use fengraoyaoshi/HMH-1.0-Cyber-R-7B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use fengraoyaoshi/HMH-1.0-Cyber-R-7B with Docker Model Runner:
docker model run hf.co/fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
- Lemonade
How to use fengraoyaoshi/HMH-1.0-Cyber-R-7B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
Run and chat with the model
lemonade run user.HMH-1.0-Cyber-R-7B-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use fengraoyaoshi/HMH-1.0-Cyber-R-7B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
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:9931/v1 hermes config set model.default fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use fengraoyaoshi/HMH-1.0-Cyber-R-7B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M
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:9931/v1 \ --custom-model-id "fengraoyaoshi/HMH-1.0-Cyber-R-7B:Q4_K_M" \ --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"
HMH-1.0-Cyber-R-7B
HMH-1.0-Cyber-R-7B is an experimental cybersecurity language model built on Qwen2.5-Coder-7B. It was trained with 4-bit QLoRA on cybersecurity instruction data distilled/generated by DeepSeek.
Performance is mediocre. This model is provided for entertainment, learning, and research only. It does not guarantee the accuracy of CVEs, versions, patches, or exploitation details. Do not use it for unauthorized attacks or production security decisions.
Model provenance
- Base model:
Qwen/Qwen2.5-Coder-7B(Apache-2.0) - Method: 4-bit NF4 QLoRA, LoRA r=32 / alpha=64, bf16 compute
- Teacher / data generation: DeepSeek-distilled cybersecurity SFT data
- Training corpus: recent NVD vulnerabilities, historical CVSS 9.0+ entries, GitHub Security Advisories, CISA KEV, Exploit-DB, EPSS, plus CWE and CVSS v3.1 knowledge data
- Scale: ~23k intelligence records; ~20k SFT samples (19.4k train / 0.6k validation)
- Identity:
HMH-1.0-Cyber-R-7B, injected throughSYSTEM_PROMPT.txt
What it is (and is not)
The model is intended for:
- Vulnerability briefs, CVE impact and remediation-priority analysis
- CVSS v3.1 vectors/scoring and CWE classification
- Draft Sigma detection rules
- Authorized red-team / penetration-test validation ideas and remediation advice
It is not a general security product and has not received full safety alignment. Open-domain CVE answers can hallucinate. For concrete versions or patches, put structured NVD/GHSA intelligence in the prompt and verify against the vendor advisory.
Evaluation (for reference only)
| Benchmark | Score |
|---|---|
| CS-Eval, full 4,369 questions (official platform) | 70.75 / 100 |
| CyberMetric-500 | 74.20% (371/500) |
| Internal four-part scorecard (CVSS/CWE/lab/Sigma) | 54.9 / 100 |
These are knowledge/template-style evaluations, not evidence of real penetration or engineering ability. The results are mediocre; entertainment use only.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "fengraoyaoshi/HMH-1.0-Cyber-R-7B"
tok = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype="bfloat16", device_map="auto", trust_remote_code=True
)
# Chinese prompt: SYSTEM_PROMPT.txt
# English prompt: SYSTEM_PROMPT_EN.txt
system = open("SYSTEM_PROMPT.txt", encoding="utf-8").read().strip()
messages = [
{"role": "system", "content": system},
{"role": "user", "content": "Explain the root cause and remediation of CWE-79."},
]
text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
out = model.generate(**tok(text, return_tensors="pt").to(model.device), max_new_tokens=512)
print(tok.decode(out[0][len(tok(text)["input_ids"]):], skip_special_tokens=True))
Recommended generation settings: max_new_tokens=512โ800, temperature=0.2, top_p=0.9, repetition_penalty=1.05, eos_token_id=[151643, 151645].
GGUF (Q4_K_M)
A 4-bit GGUF quantization is provided for local inference:
- File:
HMH-1.0-Cyber-R-7B-Q4_K_M.gguf - Size: 4.36 GB
- SHA256:
2c582d131dc2cd229dfaa006b9b70b1cb18d77a7e42c5d1ab0b799d8126bd4ec
llama-cli -m HMH-1.0-Cyber-R-7B-Q4_K_M.gguf \
-sysf SYSTEM_PROMPT_EN.txt -st \
-p "Explain the root cause and remediation of CWE-79." \
-n 512 -c 4096 -ngl 99
The Q4_K_M file is a convenience artifact; the unquantized safetensors above are the reference weights. Quantized outputs may differ slightly from bf16.
Known limitations
- Weak stopping behavior: the model may continue with templates/disclaimers after a correct answer, or repeat tokens such as
firepower. Limitmax_new_tokensand truncatefirepower,๏ผไปฅไธ, andFRINGEMENTin post-processing. - Open-domain CVE hallucination: provide structured intelligence before asking for analysis.
- CVSS/CWE still need review: the model can miscalculate or misclassify; it does not replace a calculator or human review.
- No full safety alignment: use only for authorized security research, defense, and education; unauthorized attacks are prohibited.
- 4-bit training/inference differs slightly from full precision.
License
The base Qwen2.5-Coder-7B is Apache-2.0. Training data comes from public vulnerability sources; follow each source's license. Model outputs are not a security guarantee.
Disclaimer
This is a personal research/entertainment project provided "as is", without warranties of any kind. The user assumes all risks and liability for any use or misuse.
- Downloads last month
- 61