Instructions to use bencodez/Cipheron with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use bencodez/Cipheron 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 bencodez/Cipheron:Q4_K_M # Run inference directly in the terminal: llama cli -hf bencodez/Cipheron:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf bencodez/Cipheron:Q4_K_M # Run inference directly in the terminal: llama cli -hf bencodez/Cipheron:Q4_K_M
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 bencodez/Cipheron:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf bencodez/Cipheron:Q4_K_M
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 bencodez/Cipheron:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf bencodez/Cipheron:Q4_K_M
Use Docker
docker model run hf.co/bencodez/Cipheron:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use bencodez/Cipheron with Ollama:
ollama run hf.co/bencodez/Cipheron:Q4_K_M
- Unsloth Desktop
- Pi
How to use bencodez/Cipheron with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bencodez/Cipheron: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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "bencodez/Cipheron:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use bencodez/Cipheron with Docker Model Runner:
docker model run hf.co/bencodez/Cipheron:Q4_K_M
- Lemonade
How to use bencodez/Cipheron with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull bencodez/Cipheron:Q4_K_M
Run and chat with the model
lemonade run user.Cipheron-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use bencodez/Cipheron with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bencodez/Cipheron: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:8080/v1 hermes config set model.default bencodez/Cipheron:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use bencodez/Cipheron with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bencodez/Cipheron: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:8080/v1 \ --custom-model-id "bencodez/Cipheron: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"
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,25 +1,6 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
- code
|
| 5 |
-
- security
|
| 6 |
-
- secure-coding
|
| 7 |
-
language:
|
| 8 |
-
- en
|
| 9 |
-
pipeline_tag: text-generation
|
| 10 |
-
---
|
| 11 |
-
from pathlib import Path
|
| 12 |
-
|
| 13 |
-
readme = """---
|
| 14 |
-
license: apache-2.0
|
| 15 |
-
tags:
|
| 16 |
-
- code
|
| 17 |
-
- security
|
| 18 |
-
- secure-coding
|
| 19 |
-
language:
|
| 20 |
-
- en
|
| 21 |
-
pipeline_tag: text-generation
|
| 22 |
-
---
|
| 23 |
|
| 24 |
# Cipheron
|
| 25 |
|
|
@@ -31,8 +12,8 @@ It analyzes source code for common security vulnerabilities and attempts to expl
|
|
| 31 |
|
| 32 |
Cipheron performs particularly well on:
|
| 33 |
|
| 34 |
-
|
| 35 |
-
|
| 36 |
|
| 37 |
These vulnerability classes are strongly represented in its evaluation data.
|
| 38 |
|
|
@@ -42,12 +23,12 @@ Cipheron has limited reliability across many security vulnerability categories.
|
|
| 42 |
|
| 43 |
In testing, it struggled with:
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
|
| 52 |
For these cases, the model may produce changes that appear security-related but do not actually eliminate the underlying vulnerability.
|
| 53 |
|
|
@@ -61,10 +42,12 @@ Cipheron is best considered a lightweight, experimental tool for first-pass secu
|
|
| 61 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 62 |
import torch
|
| 63 |
|
| 64 |
-
|
|
|
|
|
|
|
| 65 |
|
| 66 |
model = AutoModelForCausalLM.from_pretrained(
|
| 67 |
-
|
| 68 |
torch_dtype=torch.bfloat16
|
| 69 |
)
|
| 70 |
|
|
@@ -84,24 +67,63 @@ messages = [
|
|
| 84 |
def get_user(username):
|
| 85 |
query = "SELECT * FROM users WHERE username = '" + username + "'"
|
| 86 |
return db.execute(query)"""
|
| 87 |
-
}
|
| 88 |
]
|
| 89 |
|
| 90 |
input_ids = tokenizer.apply_chat_template(
|
| 91 |
messages,
|
| 92 |
add_generation_prompt=True,
|
| 93 |
-
return_tensors="pt"
|
| 94 |
-
return_dict=False
|
| 95 |
)
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
)
|
| 101 |
|
| 102 |
-
print(
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\---
|
| 2 |
+
|
| 3 |
+
## license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
# Cipheron
|
| 6 |
|
|
|
|
| 12 |
|
| 13 |
Cipheron performs particularly well on:
|
| 14 |
|
| 15 |
+
* **SQL injection** — identifies unsafe query construction and recommends parameterized queries.
|
| 16 |
+
* **Command injection** — identifies unsafe shell command construction and recommends safer subprocess-based approaches.
|
| 17 |
|
| 18 |
These vulnerability classes are strongly represented in its evaluation data.
|
| 19 |
|
|
|
|
| 23 |
|
| 24 |
In testing, it struggled with:
|
| 25 |
|
| 26 |
+
* Path traversal
|
| 27 |
+
* Hardcoded secrets and API keys
|
| 28 |
+
* Weak password hashing
|
| 29 |
+
* Insecure deserialization
|
| 30 |
+
* Reflected XSS
|
| 31 |
+
* Complex multi-step security vulnerabilities
|
| 32 |
|
| 33 |
For these cases, the model may produce changes that appear security-related but do not actually eliminate the underlying vulnerability.
|
| 34 |
|
|
|
|
| 42 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 43 |
import torch
|
| 44 |
|
| 45 |
+
model_id = "bencodez/Cipheron"
|
| 46 |
+
|
| 47 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 48 |
|
| 49 |
model = AutoModelForCausalLM.from_pretrained(
|
| 50 |
+
model_id,
|
| 51 |
torch_dtype=torch.bfloat16
|
| 52 |
)
|
| 53 |
|
|
|
|
| 67 |
def get_user(username):
|
| 68 |
query = "SELECT * FROM users WHERE username = '" + username + "'"
|
| 69 |
return db.execute(query)"""
|
| 70 |
+
}
|
| 71 |
]
|
| 72 |
|
| 73 |
input_ids = tokenizer.apply_chat_template(
|
| 74 |
messages,
|
| 75 |
add_generation_prompt=True,
|
| 76 |
+
return_tensors="pt"
|
|
|
|
| 77 |
)
|
| 78 |
|
| 79 |
+
with torch.no_grad():
|
| 80 |
+
output = model.generate(
|
| 81 |
+
input_ids,
|
| 82 |
+
max_new_tokens=250
|
| 83 |
+
)
|
| 84 |
+
|
| 85 |
+
response = tokenizer.decode(
|
| 86 |
+
output[0][input_ids.shape[1]:],
|
| 87 |
+
skip_special_tokens=True
|
| 88 |
)
|
| 89 |
|
| 90 |
+
print(response)
|
| 91 |
+
```
|
| 92 |
+
|
| 93 |
+
## Local Inference
|
| 94 |
+
|
| 95 |
+
A quantized `Cipheron-Q8_0.gguf` version is available for lightweight local inference.
|
| 96 |
+
|
| 97 |
+
Cipheron can be used with compatible local inference runtimes for CPU and other supported devices.
|
| 98 |
+
|
| 99 |
+
## Intended Use
|
| 100 |
+
|
| 101 |
+
Cipheron is intended for:
|
| 102 |
+
|
| 103 |
+
* Secure-coding education
|
| 104 |
+
* Security experimentation
|
| 105 |
+
* Offline code analysis
|
| 106 |
+
* Vulnerability-detection research
|
| 107 |
+
* Lightweight local development workflows
|
| 108 |
+
|
| 109 |
+
## Model Information
|
| 110 |
+
|
| 111 |
+
| Property | Value |
|
| 112 |
+
| -------------- | ---------------------------------- |
|
| 113 |
+
| Model | Cipheron |
|
| 114 |
+
| Parameters | 0.5B |
|
| 115 |
+
| Architecture | Causal language model |
|
| 116 |
+
| Primary domain | Secure coding |
|
| 117 |
+
| Input | Source code and security questions |
|
| 118 |
+
| Output | Security analysis and safer code |
|
| 119 |
+
| License | Apache 2.0 |
|
| 120 |
+
|
| 121 |
+
## Disclaimer
|
| 122 |
+
|
| 123 |
+
Cipheron is an experimental security-oriented coding model.
|
| 124 |
+
|
| 125 |
+
Security output should always be independently verified before being used in production systems. A model-generated fix does not guarantee that a vulnerability has been completely eliminated.
|
| 126 |
+
|
| 127 |
+
## License
|
| 128 |
+
|
| 129 |
+
Apache 2.0
|