Instructions to use 43rt/claude-code-local-classifier 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 43rt/claude-code-local-classifier 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 43rt/claude-code-local-classifier:Q4_K_M # Run inference directly in the terminal: llama cli -hf 43rt/claude-code-local-classifier:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf 43rt/claude-code-local-classifier:Q4_K_M # Run inference directly in the terminal: llama cli -hf 43rt/claude-code-local-classifier: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 43rt/claude-code-local-classifier:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf 43rt/claude-code-local-classifier:Q4_K_M
Use Docker
docker model run hf.co/43rt/claude-code-local-classifier:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use 43rt/claude-code-local-classifier with Ollama:
ollama run hf.co/43rt/claude-code-local-classifier:Q4_K_M
- Unsloth Desktop
- Pi
How to use 43rt/claude-code-local-classifier with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf 43rt/claude-code-local-classifier: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": "43rt/claude-code-local-classifier:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use 43rt/claude-code-local-classifier with Docker Model Runner:
docker model run hf.co/43rt/claude-code-local-classifier:Q4_K_M
- Lemonade
How to use 43rt/claude-code-local-classifier with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull 43rt/claude-code-local-classifier:Q4_K_M
Run and chat with the model
lemonade run user.claude-code-local-classifier-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use 43rt/claude-code-local-classifier with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf 43rt/claude-code-local-classifier: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 43rt/claude-code-local-classifier:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use 43rt/claude-code-local-classifier with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf 43rt/claude-code-local-classifier: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 "43rt/claude-code-local-classifier: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"
claude-code-local-classifier (Qwen3.5-4B LoRA)
ๅพฎ่ฐ Qwen3.5-4B ๅ Claude Code ็ๆฌๅฐๅฎๅ จๅ็ฑปๅจ๏ผprompt injection ๅจๅ ต๏ผใๆฐๆฎไธๅบๅใ้ๅผๆฆ็ๅฏ่ฐใๆฌๅฐ GPU/CPU ๆจ็ใ298 ๆก holdout๏ผdeny_recall 0.866 / false_block 0.005 / auc 0.945ใ
ๅบๅบงไธ่ฎญ็ป
- ๆ่ทฏๆฅๆบ๏ผๅบไบ Jev๏ผTypeSafe AI ็ๅฟซ้ๆจ็ๆจกๅ๏ผโโไธ็ๆๆๆฌใๅชๅ็ปๆๅๅณ็ญ๏ผ่ฟๅ
true/falseไบๅ็ฑปๆฆ็ใๆฌๆจกๅๆฒฟๆญคๆ่ทฏ๏ผ็บฏๅ็ฑปใไธ็ๆ็็ฑใ - ๅบๅบง๏ผ
Qwen/Qwen3.5-4B๏ผๅคๆจกๆ็๏ผ่ฎญ็ปๆถ็จget_text_config()ๅฅ่ง่ง็ผ็ ๅจ๏ผๅชๅ่ฏญ่จ้จๅ๏ผ - LoRA๏ผr=32๏ผ7 ็ฎๆ ๆจกๅ๏ผq/k/v/o + mlp gate/up/down๏ผ๏ผadapter ~181M
- ๆนๆณ๏ผRLCD ๅ็ฑปโโๆจกๅๅญฆ
yes(deny)/no(allow) ๅ token ๆฆ็๏ผไธ็ๆ reason - ่ฎญ็ปๆฐๆฎ๏ผๅๆ RLCD case + ็ๅฎ Claude Code ไผ่ฏ holdout๏ผ298 ๆก๏ผใๅๅงไผ่ฏๆฐๆฎๅซ้็ง๏ผไธๅจๆฌไปๅบๅๅธ๏ผไป
ๆไพ 6 ๆกๅๆๆ ทๆฌๆผ็คบๆ ผๅผ๏ผ่ง GitHub ไปๅบ
datasets/samples.jsonl๏ผ - prompt ๆ ผๅผ๏ผchatml ไธๆฎต๏ผpolicy_summary +
<transcript>+action + ่ฃๅณๆไปค๏ผ๏ผ่ฎญ็ป/ๆจ็/้ชๆถๅไธ็ๆบprompt_assembly.py
ๆจ็็จๆณ
ๆจกๅไธ่ฏป็ๆๆๆฌ๏ผQwen3.5 thinking ๅพช็ฏไผ่พๅบ IMD๏ผ๏ผ่ๆฏ่ตฐ llama-server /completion ่ฏป yes/no logprob ๆฆ็๏ผ
# 1. ่ตท llama-server๏ผGGUF ็๏ผ
llama-server -m qwen35-clf-v2-q4_k_m.gguf --host 127.0.0.1 --port 11943 \
-c 16384 --parallel 1 -ngl 999 -ctk q8_0 -ctv q8_0
# 2. /completion ่ฏปๆฆ็๏ผprompt ็ฑ prompt_assembly.build_prompt ็ๆ๏ผ
curl 127.0.0.1:11943/completion -H 'Content-Type: application/json' -d '{
"prompt": "<|im_start|>system\n{policy_summary}<|im_end|>\n<|im_start|>user\n<transcript>\n{\"user\":\"...\"}\n{\"Bash\":{...}}\n</transcript>\n\n{่ฃๅณๆไปค}<|im_end|>\n<|im_start|>assistant\n",
"n_predict": 1, "n_probs": 60, "temperature": 0, "cache_prompt": true
}'
# ๅๅบ completion_probabilities[0].top_logprobs ๅ yes/no logprob
# p_yes = ฯ((lp_yes - lp_no) / T)๏ผT=1.0448๏ผoutput/adapter/temperature.json๏ผ
# block ๅคๅฎ๏ผp_yes >= 0.5 => deny
ๅฎๆด็คบไพ่ๆฌ่ง GitHub ไปๅบ eval/verify_local.pyใeval/eval_holdout_full.pyใ
ๆๆ ๏ผ298 holdout๏ผ
| ๆๆ | ๆฌๅฐ v2 (RTX 4050 GPU) | ๆๅกๅจ็บฏ CPU | transformers ่ฎญ็ป็ฏๅข |
|---|---|---|---|
| deny_recall@0.5 | 0.866 | 0.866 | 0.884 |
| false_block@0.5 | 0.005 | 0.005 | 0.005 |
| auc | 0.945 | โ | 0.979 |
| sep | 0.799 | 0.726 | 0.819 |
| latency | 1.8s/ๆก | p50 33ms | โ |
ๆไปถ
adapter/โ LoRA adapter๏ผ~181M๏ผ๏ผๆๅฐQwen/Qwen3.5-4Bๅบๅบงqwen35-clf-v2-q4_k_m.ggufโ GGUF Q4_K_M๏ผ~2.6G๏ผ๏ผllama-server ็ดๆฅ่ทtemperature.jsonโ ๆ กๅๆธฉๅบฆ T=1.0448
ๅ ณ้ฎๅ๏ผๅคๅปๅฟ ่ฏป๏ผ
- convert GGUF **ไธ่ฆๅธฆ
--no-nextn**๏ผไผ็ณป็ปๆงๅ็ผฉ logits๏ผdeny p_yes 0.85โ0.47๏ผใๆฌ GGUF ๆฏ v2๏ผไธๅธฆใ - ่ฎญ็ป็จ
policy_summary.txt๏ผ15K ็ฒพ็ฎๆ่ฆ๏ผไฝ system๏ผไธ่ฆ็จ่ฏทๆฑไฝ็ๅฎๆด rules๏ผ139K๏ผไธ่ฎญ็ปไธๅๆ๏ผใ - thinking ๅพช็ฏ็ป่ฟๆนๅผ = ่ฏป
/completion็ yes/no logprob๏ผไธ่ฏป็ๆๆๆฌใ
่ฏฆ่ง GitHub ไปๅบ docs/pitfalls.mdใ
ๅ ่ดฃ
- ๆฌๆจกๅๆฏ prompt injection ่พ ๅฉๅจๅ ต๏ผไธๆฟไปฃๅฎๆดๅฎๅ จๅฎกๆฅใ
- ๅๅง่ฎญ็ป/่ฏๆตๆฐๆฎๅซ็ๅฎไผ่ฏ๏ผไธๅจๆฌไปๅบๅๅธ๏ผไป ๆไพๅๆๆ ทๆฌๆผ็คบๆ ผๅผใ
- policy_summary ๆฏ้็จ AI ๅฎๅ จ่งๅๆ่ฆ๏ผๅฎๆด rules ไธ้ๆจกๅๅๅธใ
็ธๅ ณ
- GitHub ไปๅบ๏ผ่ฎญ็ป็ฎก็บฟ + ้จ็ฝฒ + eval + router ๆดๅ๏ผ๏ผ้พๆฅๅพ ๅกซ
- ๆๆฏๅๅฎข๏ผๅจๆบ + ่ฟ็จ + ่ธฉๅๅค็๏ผ๏ผ้พๆฅๅพ ๅกซ
- HuggingFace ๆฌไปๅบ๏ผhttps://huggingface.co/nathaniel-min/claude-code-local-classifier
- Downloads last month
- 55
4-bit