Instructions to use Lalakai/Hunter-2-4B 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 Lalakai/Hunter-2-4B 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 Lalakai/Hunter-2-4B:Q5_K_M # Run inference directly in the terminal: llama cli -hf Lalakai/Hunter-2-4B:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Lalakai/Hunter-2-4B:Q5_K_M # Run inference directly in the terminal: llama cli -hf Lalakai/Hunter-2-4B:Q5_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 Lalakai/Hunter-2-4B:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf Lalakai/Hunter-2-4B:Q5_K_M
Use Docker
docker model run hf.co/Lalakai/Hunter-2-4B:Q5_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use Lalakai/Hunter-2-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lalakai/Hunter-2-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lalakai/Hunter-2-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Lalakai/Hunter-2-4B:Q5_K_M
- Ollama
How to use Lalakai/Hunter-2-4B with Ollama:
ollama run hf.co/Lalakai/Hunter-2-4B:Q5_K_M
- Unsloth Desktop
- Pi
How to use Lalakai/Hunter-2-4B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Lalakai/Hunter-2-4B:Q5_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": "Lalakai/Hunter-2-4B:Q5_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Lalakai/Hunter-2-4B with Docker Model Runner:
docker model run hf.co/Lalakai/Hunter-2-4B:Q5_K_M
- Lemonade
How to use Lalakai/Hunter-2-4B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Lalakai/Hunter-2-4B:Q5_K_M
Run and chat with the model
lemonade run user.Hunter-2-4B-Q5_K_M
List all available models
lemonade list
- Hermes Agent
How to use Lalakai/Hunter-2-4B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Lalakai/Hunter-2-4B:Q5_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 Lalakai/Hunter-2-4B:Q5_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Lalakai/Hunter-2-4B with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Lalakai/Hunter-2-4B:Q5_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 "Lalakai/Hunter-2-4B:Q5_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"
Hunter 2 4B
Hunter 2 4B is a 4-billion-parameter conversational reasoning model from Lalakai Labs, built for local inference on consumer hardware. It works through multi-step findings inside <think>...</think> traces before giving its final answer, and is tuned for defensive security analysis, vulnerability triage, and agentic coding.
Hunter 2 4B is built on Spark-X2.5-4B from XHToken.
Weights are distributed in GGUF format for llama.cpp and Ollama. GGUF stores tensors only and does not use pickled code.
Highlights
- 4B parameters, optimized for defensive security, code review, and agentic coding
- Visible reasoning in
<think>traces for multi-step findings - Q5_K_M runs in about 3.4 GB of working memory at an 8K context, and the model was built for 8 GB laptops
- Apache-2.0 license
Model details
| Developer | Lalakai Labs |
| Model type | Causal language model (conversational), GGUF |
| Parameters | 4B |
| Context | 4,096 tokens |
| Language | English |
| Version | v2.0 |
| License | Apache-2.0 |
Training data
Hunter 2 4B was trained on approximately 100 million curated tokens, split between defensive-security scenarios and agentic-coding trajectories.
| Category | Share | Focus |
|---|---|---|
| Defensive security | 67% | Vulnerability remediation, cybersecurity evaluation, NIST guidance, cyber reasoning |
| Agentic coding | 33% | Agentic coding trajectories and general coding work |
Security data drew on vulnerability-remediation pairs, cybersecurity evaluation sets, NIST training material, and cyber-reasoning traces. Coding data came from agentic-coding trajectories. Roughly a quarter of the mix is clean-code grounding, so the model is trained to confirm benign code as safe and explain why rather than assume every audit finds a flaw.
Training method
Parameter-efficient QLoRA fine-tuning (rank 32, alpha 64) on layers 8–35, with the first eight layers, embeddings, and language-model head frozen. Training ran for 763 steps in BF16 at a batch of 2 with 16-step gradient accumulation, a cosine learning rate of 1e-4, and 5% warmup. It finished at a training loss of 0.729 (low 0.675) with no loss-spike breaker trips.
The weights were then quantized to Q5_K_M and Q8_0 with llama.cpp.
Files
| File | Size | Description |
|---|---|---|
hunter2-Q5_K_M.gguf |
~2.98 GB | 5-bit quantized weights. Recommended for most users. |
hunter2-Q8_0.gguf |
~4.38 GB | 8-bit quantized weights. The high-fidelity reference build, with minimal quantization loss. |
Quick start
llama.cpp
Run inference from the CLI:
llama-cli -m hunter2-Q5_K_M.gguf --temp 0.2 -p "Audit this function for command injection flaws."
To serve over HTTP:
llama-server -m hunter2-Q5_K_M.gguf --port 8080 -c 4096
Python (llama-cpp-python)
from llama_cpp import Llama
llm = Llama(
model_path="hunter2-Q5_K_M.gguf",
n_ctx=4096,
verbose=False,
)
print(llm("Audit this function for command injection flaws.", max_tokens=256)["choices"][0]["text"])
Ollama
Create a Modelfile. The GGUF carries its own chat template, so only the runtime parameters and system prompt need to be set:
FROM ./hunter2-Q5_K_M.gguf
PARAMETER temperature 0.2
PARAMETER top_p 0.90
PARAMETER top_k 40
PARAMETER repeat_penalty 1.1
SYSTEM """You are Hunter 2, an autonomous security analysis agent developed by Lalakai Labs. Confirm safe code as safe and state why; deliberate only on genuinely multi-step findings."""
ollama create hunter2 -f Modelfile
ollama run hunter2
Hugging Face CLI
hf download Lalakai/Hunter-2-4B hunter2-Q5_K_M.gguf
Choosing a file
- Local security review on a typical laptop:
Q5_K_M - Highest output quality, if you have the memory:
Q8_0
Intended use
- Defensive security analysis, vulnerability triage, and remediation guidance
- Secure-code review and multi-step code reasoning
- Agentic coding on local hardware
- Security-oriented reasoning, with human oversight
Evaluation
No formal benchmark results have been published for this model yet. They will be added to this card when available.
Limitations
- A 4B model will not match frontier-scale models on the hardest reasoning tasks or on niche knowledge. Use the Q8_0 weights when quality matters most.
- The model was trained on 4,096-token sequences. Chunk long files and long alert histories. The Spark-X2.5 base supports a much longer native window, but quality beyond the trained length is not guaranteed.
- Like all language models, Hunter 2 4B can produce hallucinations, reflect biases in its training data, and generate unsafe content when prompted adversarially. Review outputs for your use case and apply your own safety filtering in production.
- It is trained to confirm clean code as safe, so a "no findings" answer is not proof that code is secure. Treat its output as one input to a review, not the review itself.
Responsible use
Use this model under human supervision and within applicable law and your organization's policies. Do not use it to target systems you are not authorized to test, and do not use it to generate weaponized exploits or turnkey attack infrastructure.
License
Released under the Apache License, Version 2.0.
Contact
Built by Lalakai Labs.
Acknowledgements
Hunter 2 4B is a fine-tune of Spark-X2.5-4B (Apache-2.0). We thank the XHToken team for the base model.
- Downloads last month
- 64
5-bit
8-bit