Text Generation
MLX
Safetensors
English
qwen2
cryptography
security
ctf
offensive-security
qlora
qwen-coder
conversational
Instructions to use bytesbrains/hunter-crypto-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use bytesbrains/hunter-crypto-7b with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("bytesbrains/hunter-crypto-7b") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use bytesbrains/hunter-crypto-7b with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "bytesbrains/hunter-crypto-7b"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "bytesbrains/hunter-crypto-7b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use bytesbrains/hunter-crypto-7b with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "bytesbrains/hunter-crypto-7b"
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 "bytesbrains/hunter-crypto-7b" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- MLX LM
How to use bytesbrains/hunter-crypto-7b with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "bytesbrains/hunter-crypto-7b"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "bytesbrains/hunter-crypto-7b" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bytesbrains/hunter-crypto-7b", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use bytesbrains/hunter-crypto-7b with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "bytesbrains/hunter-crypto-7b"
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 bytesbrains/hunter-crypto-7b
Run Hermes
hermes
File size: 4,364 Bytes
b70b87a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | ---
license: apache-2.0
license_link: https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct/blob/main/LICENSE
base_model: Qwen/Qwen2.5-Coder-7B-Instruct
language:
- en
library_name: mlx
pipeline_tag: text-generation
tags:
- cryptography
- security
- ctf
- offensive-security
- mlx
- qlora
- qwen-coder
---
# hunter-crypto-7b
**A local cryptography-attack specialist for authorized security work, by [Naderu](https://naderu.com) β a BytesBrains Pte. Ltd. venture.**
`hunter-crypto` is a compact, specialised model for the **cryptography corner** of penetration
testing and CTF work: given a challenge β a cipher, a weak-parameter RSA key, an oracle β it
identifies the weakness and produces a **runnable attack script** (PyCryptodome / SageMath) that
recovers the plaintext or flag. It runs **fully offline on Apple Silicon**, so engagement data never
leaves the box. It is the first model of the **Hunter** family.
- **Fine-tuned from:** [`Qwen/Qwen2.5-Coder-7B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct) (Apache-2.0)
- **Method:** QLoRA (r=8, scale=20) on a 4-bit MLX quant, assistant-tokens-only, 1000 iters, MLX on Apple Silicon
- **This artifact:** merged **bf16** weights (adapter fused into the base, de-quantized)
- **Full provenance, recipe, and eval harness:** [github.com/nandal/naderu](https://github.com/nandal/naderu) β `models/hunter-crypto/`
## Intended use
A **local specialist** behind an **authorized** pentest / CTF workflow, handling the cryptography
corner offline: recovering plaintext/flags from **cryptographically weak or misconfigured**
constructions during authorized testing, CTF competition, and security education.
> **Authorized use only.** This model is for authorized penetration testing, defensive security, and
> CTF/education. It is **not** for attacking systems you do not have explicit permission to test. It
> targets weak/misconfigured crypto for assessment; it is not a tool for defeating properly-deployed
> modern cryptography, and does not claim to.
**Out of scope:** general chat, factual Q&A, non-crypto exploitation, and any use requiring
guaranteed correctness. Its output is a *candidate* attack to be run and verified, not an authority.
## The task contract
Given a challenge (description + material: ciphertext, public parameters, an oracle interface,
source), the model returns (1) a short identification of the weakness, and (2) a single runnable
script that, when executed against the provided material, prints the recovered plaintext/flag.
## Evaluation
Graded by end-to-end execution β the model's script must run and print the known secret (no partial
credit) β over a frozen held-out set verified disjoint from training. Base = the 4-bit Qwen2.5-Coder
base with no adapter; trained = this model.
| Tier | Metric | Gate | Base | **Trained** |
|------|--------|------|------|-------------|
| In-distribution (48, six trained categories) | solve_rate | β₯0.95 β **PASS** | 0.333 | **1.000** |
| In-distribution (48) | valid_script_rate | β₯0.95 β **PASS** | 0.333 | **1.000** |
| Independent-method (36, different generator) | solve_rate | reported | 0.250 | **0.972** |
| OOD-hard (24, untrained RSA attacks) | solve_rate | non-gating | 0.000 | 0.125 |
Trained categories (all maxed on the in-distribution tier): `xor1`, `xorK`, `caesar`, `affine`,
`base_chain`, `rsa_low_e`. The independent-method result (0.972 on a set built by a *different*
generator with varied encodings/labels/parameters) is the signal that the model learned the attacks,
not just the training generator's surface templates. Full breakdown:
[`models/hunter-crypto/benchmarks.md`](https://github.com/nandal/naderu/blob/main/models/hunter-crypto/benchmarks.md).
## Limitations, risks & safety
- **Small, narrow model.** It proposes attacks for *weak* crypto; it is not a cryptanalysis engine
and will be wrong on hard or out-of-distribution problems (see OOD tier). Always run and verify.
- **No guarantee of correctness or safety of generated code β run generated scripts in a sandbox.**
- **Dual-use.** Crypto-attack capability is inherently dual-use; scope is authorized assessment of
weak/misconfigured crypto, shipped as one corner of a human-consent-gated workflow.
## License
Apache-2.0, inheriting `Qwen/Qwen2.5-Coder-7B-Instruct`'s upstream terms.
|