Instructions to use leapshared/sciedu-router-kev4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use leapshared/sciedu-router-kev4b with PEFT:
from peft import PeftModel from transformers import AutoModel base_model = AutoModel.from_pretrained("Qwen/Qwen3.5-4B-Base") model = PeftModel.from_pretrained(base_model, "leapshared/sciedu-router-kev4b") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use leapshared/sciedu-router-kev4b 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 leapshared/sciedu-router-kev4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf leapshared/sciedu-router-kev4b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf leapshared/sciedu-router-kev4b:Q4_K_M # Run inference directly in the terminal: llama cli -hf leapshared/sciedu-router-kev4b: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 leapshared/sciedu-router-kev4b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf leapshared/sciedu-router-kev4b:Q4_K_M
Use Docker
docker model run hf.co/leapshared/sciedu-router-kev4b:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use leapshared/sciedu-router-kev4b with Ollama:
ollama run hf.co/leapshared/sciedu-router-kev4b:Q4_K_M
- Unsloth Desktop
- Pi
How to use leapshared/sciedu-router-kev4b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf leapshared/sciedu-router-kev4b: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": "leapshared/sciedu-router-kev4b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use leapshared/sciedu-router-kev4b with Docker Model Runner:
docker model run hf.co/leapshared/sciedu-router-kev4b:Q4_K_M
- Lemonade
How to use leapshared/sciedu-router-kev4b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull leapshared/sciedu-router-kev4b:Q4_K_M
Run and chat with the model
lemonade run user.sciedu-router-kev4b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use leapshared/sciedu-router-kev4b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf leapshared/sciedu-router-kev4b: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 leapshared/sciedu-router-kev4b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use leapshared/sciedu-router-kev4b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf leapshared/sciedu-router-kev4b: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 "leapshared/sciedu-router-kev4b: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"
sciedu-router-kev4b
ํ๊ตญ์ด ๊ต์ค ๋ก๋ด(OpenArm SciEdu)์ ๋ํ ๋ผ์ฐํฐ: ํ์ยท์ ์๋์ ํ๊ตญ์ด ๋ง ํ ๋ง๋์ ๋งฅ๋ฝ ๋ค์ฏ ์นธ์ ์ฝ์ด ์ดํ ๊ฐ๋ ๊ฐ์ด๋ฐ ํ๋๋ก ๊ฐ๋ฅธ๋ค
(๋ฉ์ถฐ pause ยท ๊ทธ๋ง stop ยท ๋ค์ proceed ยท ๋ค์ retry ยท ์คํ ์์ยท๋ฐ๊พธ๊ธฐ start_switch ยท ๋๋ญ์ ์ชฝ leaf_side ยท ์ ๋ฃ๊ธฐ hands ยท ์ง๋ฌธ question ยท ๋๋ต answer ยท ์ผ๋ฐ ๋ํ chitchat ยท ์ ์ ์์ unclear).
Kev-4B(Qwen3.5-4B-Base + LoRA + ํฌ์ธํฐ ๋จธ๋ฆฌ)์์ ์ด์ด์ ๋ฏธ์ธ์กฐ์ ํ๊ณ , ๊ฐ๋๋ง๋ค ํ๋ฅ (/v1/systemone์ choice)์ ๋ธ๋ค.
์ด ๋ผ์ฐํฐ๋ ๋ํ์ธต์ ๊ธฐ๋ณธ๊ฐ ๊บผ ๋ ์ด๋ค. ์๋ ํ์ฒ๋ผ ๋ง์ง๋ง ํ์ ์์ ์ํํ ํ๋ฆผ์ด 0์ด ์๋์ด์(ํต๊ณผ ๊ธฐ์ค: 0) ๋ก๋ด์ ์์ง์ด๋ ๊ธธ์ ๊ธฐ๋ณธ์ผ๋ก ๋ถ์ด์ง ์๋๋ค. ๋ถ์ด๋๋ผ๋ "์์ง์ ๋ ๋ฒ์งธ ํ"(๋ํ ๋ชจ๋ธ์ ๊ณํ๊ณผ ๋ผ์ฐํฐ๊ฐ ๋ ๋ค ์์ง์ ๊ฐ๋์ผ ๋๋ง ์์ง์ธ๋ค)์ "๋ฉ์ถค ๋น ๋ฅธ ๊ธธ"(๋ฑ๋ง ๋ชฉ๋ก๊ณผ OR)๋ก๋ง ์ฐ๊ณ , ์ ์๋ ํ๋ฉด ๋ฒํผ์ ๋ผ์ฐํฐ๋ฅผ ๊ฑฐ์น์ง ์๋๋ค. ์ค๊ณ์ ์์ ๊ท์น: ์ ์ฅ์
plan/dialogue-routing.md(5ยท6์ ), ์ธก์ :docs/measurements/routing-kev.md.
ํ ์ค ๊ฒฐ๊ณผ (2026-10-13, ์๋ฃ 414a698/849c15a, ์จ์ 0 ํ๋, GGUF Q4_K_M์ llama.cpp๋ก ๋์ ์ฐ ๊ฐ)
ํต๊ณผ ํ์ ์ ์๋์ง ์์ ์ค(tuned ๊ผฌ๋ฆฌํ ์๋ ์ค)์ ๋ ์กฐ๊ฐ์์ ์ฝ๋๋ค. ์ธ์ยท์จ๋ยท๋ฌธํฑ์ ๋ชจ๋ ๊ฒ์ฆ ์ธํธ๋ก๋ง ๊ณจ๋๊ณ ์ํ ์ค์ ๋ณด๊ณ ๊ณ ์น์ง ์์๋ค.
| ์กฐ๊ฐ | ์ค | ๋ง์(ํ์ฉ ๊ฐ๋ ํฌํจ) | ์๊ฒฉ ๋ง์ | ์ํํ ํ๋ฆผ(์ค) | ์ ๋ต ๋ฉ์ถค ์ค์์ ์ ๋ชซ | ์ ๋ต ๊ทธ๋ง ์ค์์ ์ ๋ชซ |
|---|---|---|---|---|---|---|
| (๊ฐ) ๋ง์ง๋ง ํ์ = ์๋๋ฆฌ์ค ์ฎ๊น + ๋ ๋ฆฝ ์ํ | 482 | 94.6% | 91.5% | 6(๊ฑฐ์ง ์์ง์ 6, ๊ทธ์ค 1์ค์ ๋์น ๋ฉ์ถค๋) | 0.979 | 1.0 |
| (๋) ์์ง์ ๋ฑ๋ง์ด ๋ ์ผ๋ฐ ๋ํ ํฌํจ ๋ง๋ถ์ | 508 | 96.3% | 2(๊ฑฐ์ง ์์ง์ 2) | 1.0 | 1.0 | |
| ์ง์ฐ(์์ฒญ 507ํ ํฐ, HTTP ํฌํจ, RTX 5090์ด ์กฐ์ฉํ ๋, ๋ถ๋ฌ ๋ณธ 1,099์ค) | ์ค์ 52.7 ms ยท p90 55.7 ms ยท p99 58.6 ms | ์ค๋ฅ 0 |
ํต๊ณผ ๊ธฐ์ค(์ํ 0, (๊ฐ) ๋ง์ 90%)์์ ๋ง์์ ๋์ง๋ง ์ํ 0์ ๋์ง ๋ชปํ๋ค. ๊ฒ์ฆ ์ธํธ๋ก ์ ํ ๋ฌธํฑ ๊ท์น {"halt_min": 0.15, "move_min": 0.7}(policy.json)์ ์น์ผ๋ฉด (๊ฐ) ๋ง์ 93.6%ยท์ํ 5์ค, (๋) 95.9%ยท์ํ 1์ค์ด๊ณ
์ง์ง ์์ง์ ๋ง์ ๋๋ฌป๊ธฐ๋ก ๋ง๋ ๋ชซ์ด (๊ฐ) 16.4% โ 21.9%๋ก ๋๋ค. ๊ทธ๋๋ 0์ด ์๋๋ค.
๊ฐ๋๋ณ(์ ๋ต ๊ฐ๋ ๊ธฐ์ค, ๋ง์ / ์ค ์, ๊ดํธ๋ ์ํํ ํ๋ฆผ ์ค):
| ๊ฐ๋ | (๊ฐ) 482์ค | (๋) 508์ค |
|---|---|---|
| pause | 46/47 (1) | 49/49 |
| stop | 28/28 | 26/26 |
| proceed | 59/68 | 58/61 |
| retry | 17/17 | 16/16 |
| start_switch | 16/16 | 19/21 |
| leaf_side | 21/27 | 19/21 |
| hands | 79/80 (1) | 17/17 |
| question | 42/44 (2) | 41/43 (1) |
| answer | 43/48 (1) | 52/55 |
| chitchat | 10/10 | 130/134 |
| unclear | 95/97 (1) | 62/65 (1) |
์ฐธ๊ณ (ํต๊ณผ ์กฐ๊ฑด ์๋): ๋ ๋ฆฝ ์ํ 123์ค ๋ง์ 97.6%ยท์ํ 2, ์๋๋ฆฌ์ค ์๋์ง ์์ 359์ค 93.6%ยท์ํ 4, tuned 109์ค 97.2%ยท์ํ 3, ๋ง๋ถ์ ์ ์ฒด 610์ค 96.4%ยท์ํ 5. ๊ฒ์ฆ 428์ค(ํ์ด์ฌ): ๋ง์ 94.4%. ์จ์์ ํ๋๋ผ ์ ์ซ์์ ํ๋ค๋ฆผ(์จ์ ์ฌ์ด)์ ๋ชจ๋ฅธ๋ค. ์ํ ์ค ์๊ฐ ์ ์ด ํ ์ค์ด 0.2~0.3%p๋ค. GGUF Q4_K_M์ ํ์ด์ฌ(bf16 ์ฒดํฌํฌ์ธํธ)๊ณผ ๊ฒ์ฆ 428์ค์์ ๊ฐ์ ๊ฐ๋ 425์ค(99.3%), ํ๋ฅ ์ฐจ์ด ์ต๋ 0.21์ด๋ค.
์ฐ๋ ๋ฒ
- ์๋ฒ: llama.cpp
server-cuda(๋น๋ 11371, ๊ฒฐ์ ๋ชจ๋ธ/v1/systemone)์ GGUF๋ฅผ ์ฌ๋ฆฐ๋ค.-b 1024 -ub 1024๊ฐ ํ์ํ๋ค(์์ฒญ ํ ๊ฑด์ด ์ค์ 507ยท์ต๋ 535 ํ ํฐ์ด๋ผ ๊ธฐ๋ณธ ubatch 512๋ฅผ ๋๋๋ค).
VRAM์ ์ฝ 4.7 GB(์๋ฒ ํ๋ก์ธ์ค ์ฆ๊ฐ๋ถ 4,663 MiB), GGUF 3.03 GB.ghcr.io/ggml-org/llama.cpp:server-cuda@sha256:f90b9de8baf5244c2c43f9594d7522424470f0d472323fe10405eceae714405b -m sciedu-router-kev4b-Q4_K_M.gguf --host 0.0.0.0 --port 8080 -ngl 99 -c 4096 --parallel 1 -b 1024 -ub 1024 - ์์ฒญ์
example_request.json๊ณผ ๊ธ์๊น์ง ๊ฐ์ ๊ผด์ด์ด์ผ ํ๋ค:state๋ ๋ฌธ์์ด ํ ์ค(์ฅ๋ฉด=โฆ | ์คํ=โฆ | ๋๋ญ์ ํ๋=โฆ | AI ์ ์=โฆ | ๋งํ ์ฌ๋=โฆ || <๋ง>), ์ง๋ฌธroute๋choice, ๋ณด๊ธฐ ์ด๋ฆ์ ์ดํ ๊ฐ๋ ํค์ ์ค๋ช ์ด๋ค. ํ์ต ๋ ์ด ๊ธ์ด๋ผ ๋ฐ๊พธ๋ฉด ์ด๊ธ๋๋ค. ๋ง๋๋ ์ฝ๋๋ ์ ์ฅ์์dialogue/routing/kev_format.py(request_body)๋ค.state๋ ๊ฐ์ฒด๊ฐ ์๋ ๋ฌธ์์ด๋ก ๋ณด๋ธ๋ค(๊ฐ์ฒด๋ Kev ํ์ด์ฌ๊ณผ llama.cpp๊ฐ ๋ค๋ฅด๊ฒ ์ฝ๋๋ค). - ์๋ต์
answers.route.choice์probabilities๋ฅผ ์ด๋ค. ํ๋ฅ ์ GGUF์ ๋ ์จ๋(3.03)๋ก ๋ง์ถฐ์ ธ ์๋ค. ๋ฌธํฑ ๊ท์น์policy.json: ๋ฉ์ถค+๊ทธ๋ง ํ๋ฅ ์ ํฉ์ดhalt_min์ด์์ด๋ฉด ๋ฉ์ถค ์ชฝ, ์์ง์ ๊ฐ๋์ ํ๋ฅ ์ดmove_min๋ฐ์ด๋ฉด ๋๋ฌป๊ธฐ(unclear). - ๋งฅ๋ฝ ์นธ ๋ค์ฏ: ์ฅ๋ฉด(์์ยท์์ ์ ยท์์ง์ด๋ ์คยท๋ค์ ์ง์ ๊ธฐ๋ค๋ฆผยท์ ์ง ๊ธฐ๋ค๋ฆผยท์ผ์์ ์ง), ์คํ(์ฐํํ์ยท๊ฒ์ ๊ธฐยท๋๋ญ์ยท์์), ๋๋ญ์ ํ๋(ํ์์ด ๋ถ๋ฅยท๊ธฐ์ค ๋งํ๊ธฐยท์์), AI ์ ์(์์ยท์๋์ค),
๋งํ ์ฌ๋(ํ์ยท์ ์๋).
AI ์ ์์ ์ฝ๋๊ฐ ์ ํ๋ค(๋ชจ๋ธ์ด AI์ ๋ง์ ์ฝ์ด ์ ํ์ง ์๋๋ค).
ํ์ต
- ์์:
jaredpalmer/kev-4b@6cfce5c2fa4b4bd64026336ab649c5ca78857d52(--init_from), ๊ธฐ์ Qwen/Qwen3.5-4B-Base@1001bb4d826a52d1f399e183466143f4da7b741b. Kev ์ปค๋ฐ2ecafc49fe1e8945cd600443e6c04c1cf0b3a78f, torch 2.8.0+cu128, transformers 5.17.0, peft 0.21.0. - ์ธ์: 3์ํญ, lr 1e-4, ๋ฐฐ์น 4 ร ๋์ 4, bf16, LoRA r16, ๊ธฐ์ธ๊ธฐ ์ฒดํฌํฌ์ธํธ, ์ฆ๊ฐ ๋ชจ๋ 0(
--p_none --p_none_distract --p_distract --p_none_pair; ๊ธฐ๋ณธ๊ฐ์ ์ฐธ ๊ฐ๋๋ฅผ ์ง์ฐ๊ณ none์ ์ ๋ต์ผ๋ก ์ผ๋ ๊ธฐ๋ก์ ๋ง๋ค์ด ์ดํ ๊ฐ๋ ๊ณ ์ ์ง๋ฌธ์ ๊นฌ๋ค), ์จ์ 0. 741 ์คํ , ์ฝ 42๋ถ(RTX 5090, ์ต๋ VRAM 10.1 GiB, ๋ค๋ฅธ GPU ์ผ๊ณผ ๊ฒน์ณค๋ค). - ํ์ต ์๋ฃ 3,947์ค(์ ์๋ 1,955 ยท ํ ํ๋ฆฟ 846 ยท LLM ํฉ์ฑ 1,108(๋ ๋ชจ๋ธ์ด ๋ฐ๋ก ๊ฐ๋๋ฅผ ๊ณจ๋ผ ๋ชจ๋ ๋ง์ ๊ฒ๋ง) ยท ์์ ์ดฌ์ ๊ธฐ๋ก์ ์ฌ๋ ๋ง์ ์ฌ๋์ด ๋ผ๋ฒจํ ์ค 38). ์ผ๋ฐ ๋ํ 31.8%. ๊ฒ์ฆ 428์ค๋ก ์จ๋(๋ ๋ก์ง์ ํ๊ท ๋ก๊ทธ์์ค ์ต์, 3.03)์ ๋ฌธํฑ์ ์ ํ๋ค. ์๋ฃ์ ๋ง๋๋ ๋๊ตฌ๋ ์ ์ฅ์์ ์๊ณ ์ด ๋ชจ๋ธ ์ ์ฅ์์๋ ์ฌ๋ฆฌ์ง ์์๋ค.
- ์ธ์ ๊ณ ๋ฅด๊ธฐ(๊ฒ์ฆ 282์ค ์๊ธฐ์ 1์ฐจ ํ๊ธฐ): 4B lr 1e-4ยท3์ํญ 94.3%, lr 5e-5 93.3%, 0.8B 91.8%. Kev ๋ฌธ์์ ์์๊ฐ(lr 2e-5, 2์ํญ)์ ๋ ํ์ต๋ผ 85%์๋ค. ์์ธํ ํ๋
docs/measurements/routing-kev.md.
ํ๊ณ
- ์ํ 0์ ๋์ง ๋ชปํ๋ค(์ ํ). ์ํํ ํ๋ฆผ 8์ค์ ์ ๋ต ๊ฐ๋ โ ์ฝ์ ๊ฐ๋๋ก ์ธ๋ฉด(๋ง์ง๋ง ํ์ ์ ํผ๋ํ ์ง๊ณ์ด๊ณ , ํ๋ฆฐ ์ค์ ๋ง์ ๋ณด์ง ์์๋ค):
(๊ฐ) 6์ค์
questionโproceed1 ยทquestionโretry1 ยทanswerโretry1 ยทpauseโretry1(๋์น ๋ฉ์ถค๋) ยทhandsโproceed1 ยทunclearโproceed1, (๋) 2์ค์questionโretry1 ยทunclearโleaf_side1์ด๋ค. ์ฝ์ ๊ฐ๋๋ณ๋ก ํฉ์น๋ฉดretry4 ยทproceed3 ยทleaf_side1์ด๋ค. ์ด ์ง๊ณ๋ก๋ ์ด๋ค ๋ง์ด ๊ทธ๋ ๊ฒ ์ฝํ๋์ง ์ ์ ์๋ค. - ํ์ต ๋ง์ด ์ค์ ์์ฑ๋ณด๋ค ์งง๊ณ ์ ์๋ ๋งํฌ๊ฐ ์ ๋ค. ๋ฐ์์ฐ๊ธฐ ์ค๋ฅ ๊ผด์ ํ๋ด ๋ธ ๊ฒ์ด๋ค.
- ์ํ ์ค์ ์ผ๋ถ๋ ํ์ต ๋ณด๊ฐ์ ๋ง๋ค ๋ ๋ณด์๋ค(tuned ๊ผฌ๋ฆฌํ). ํต๊ณผ ํ์ ์ ์๋์ง ์์ ์ค๋ก๋ง ์ฝ๋๋ค.
- ์จ์์ด ํ๋๋ค.
ํ์ผ
sciedu-router-kev4b-Q4_K_M.gguf(์๋น์ฉ) ยท adapter_model.safetensors ยท adapter_config.json ยท head.pt(ํฌ์ธํฐ ๋จธ๋ฆฌ + ์จ๋ 3.03; kev.serve --run์ด๋ GGUF ๋ณํ์ ์ด๋ค) ยท training_config.json ยท training_metrics.json ยท
policy.json ยท example_request.json ยท eval/(๊ฒ์ฆ ๋ณด์ , ํ์ด์ฌโGGUF ๊ฒฌ์ฃผ๊ธฐ, ํต๊ณผ ํ์ ์์ฝ).
- Downloads last month
- 121
4-bit
Model tree for leapshared/sciedu-router-kev4b
Base model
Qwen/Qwen3.5-4B-Base