Kev: Qwen3.5 기반의 경량 Jev 스타일 의사결정 모델 패밀리
Kev는 Qwen3.5를 기반으로 한 소형 의사결정 모델 패밀리로, Jev의 아키텍처 논문을 따르며 0.8B/4B/9B 크기로 제공됩니다. 사전 학습된 가중치를 쓰거나 직접 학습할 수 있고, TypeSafe System One과 호환되는 API로 CUDA와 Apple Silicon에서 로컬 실행이 가능합니다. 예/아니오(noul), 다중 선택(choice), 평점(score) 질문을 한 번의 요청에 입력 텍스트를 공유하면서 처리하며, 확률 기반 결과를 반환합니다.
Kev
직접 학습하고 실행할 수 있는 소형 Jev 스타일 의사결정 모델입니다. Kev는 Qwen3.5를 기반으로 하며 'Jev's Architecture Unmasked'에 설명된 아키텍처를 따르는 소형 의사결정 모델 패밀리입니다. 사전 학습된 가중치를 사용하거나 직접 학습할 수 있습니다. API는 TypeSafe의 System One과 호환되므로, TypeSafe의 Python SDK를 로컬 서버에 연결해 사용할 수 있습니다.
주요 특징
- 0.8B, 4B, 9B 모델과 학습 코드 및 평가 데이터 제공
- 예/아니오(noul), 다중 선택(choice), 평점(score) 질문을 같은 요청에서 처리. 질문들은 입력 텍스트를 공유하지만 서로의 내용은 볼 수 없음
- CUDA와 Apple Silicon에서 실행 가능. 4B와 9B 모델은 bf16 사용 시 32GB Mac에 들어감. Mac에서의 성능은 'Serving Performance' 참고
- 직접 입력을 시험해 보고 선택지 순서가 답변에 미치는 영향을 확인할 수 있는 웹 플레이그라운드 제공
빠른 시작
Python 3.12+와 uv가 필요합니다.
git clone https://github.com/jaredpalmer/kev.git && cd kev uv sync --extra serve KEV_DTYPE=bf16 uv run --extra serve python -m kev.serve --run jaredpalmer/kev-4b --port 8009
이렇게 하면 Kev-4B가 로컬에서 시작됩니다. 첫 실행 시 어댑터와 베이스 모델을 다운로드합니다. --run은 로컬 체크포인트 디렉토리나 jaredpalmer/kev-4b@qwen3 같은 Hub 리비전(이전 세대)도 받을 수 있습니다.
다른 터미널에서 티켓을 보내 봅니다:
curl -s localhost:8009/v1/systemone -H 'content-type: application/json' -d '{ "state": "Shoes arrived two weeks late and in the wrong size. Also I see two charges on my card.", "model": "kev-latest", "questions": { "department": {"type": "choice", "instructions": "Which team should handle this?", "criteria": {"returns": "Exchanges, refunds, wrong or damaged items", "shipping": "Delivery status, delays, lost packages", "billing": "Charges, invoices, payment problems"}}, "escalate": {"type": "noul", "instructions": "Does this need urgent human attention?"}, "frustration": {"type": "score", "instructions": "How frustrated is the customer?", "criteria": ["Calm", "Frustrated", "Very angry"]} } }'
Apple M5에서 bf16으로 실행 중인 Kev-4B의 응답 예시:
{ "model": "kev-latest", "answers": { "department": {"type": "choice", "choice": "returns", "confidence": 0.21, "probabilities": {"returns": 0.47, "shipping": 0.28, "billing": 0.25}}, "escalate": {"type": "noul", "noul": 0.93}, "frustration": {"type": "score", "score": 1.44, "confidence": 0.78, "legend": {"0": "Calm", "1": "Frustrated", "2": "Very angry"}, "probabilities": {"0": 0.00, "1": 0.56, "2": 0.44}} }, "usage": {"input_tokens": 101, "output_tokens": 161}, "latency_ms": 495 }
티켓에는 반품, 배송 지연, 결제 문제가 모두 언급되어 있으며, 부서 확률값이 그대로 반영되어 있습니다. 단일 라벨 대신 확률을 반환하는 것이 바로 이런 점에서 의미가 있습니다.
Python
TypeSafe SDK는 uv sync --extra serve에 포함되어 있습니다:
from typesafe_sdk import Choice, Noul, Score, TypeSafeClient
client = TypeSafeClient( api_key="local", base_url="http://127.0.0.1:8009", model="kev-latest", )
response = client.system_one( state="I was charged twice. Please fix this ASAP.", questions={ "billing": Noul(instructions="Is this ticket about billing?"), "tone": Choice(instructions="What is the customer's tone?", criteria={"calm": None, "frustrated": None, "angry": None}), "urgency": Score(instructions="How urgent is this ticket?", criteria=["can wait", "this week", "today"]), }, )
print(response.nouls["billing"].noul) print(response.choices["tone"].choice) print(response.scores["urgency"].score)
플레이그라운드
서버를 실행한 채로 다른 터미널을 엽니다. Node 20.9+가 필요합니다:
cd playground npm install npm run dev -- -p 3001
localhost:3001을 열고 프리셋을 로드한 뒤 텍스트와 질문을 수정합니다. ⌘↵로 실행합니다. "Packed vs separate"는 모든 질문을 한 번에 묻는 경우와 하나씩 묻는 경우를 비교합니다. "Permute"는 선택형 질문을 여섯 가지 선택지 순서로 실행합니다. 프리셋도 추가로 제공됩니다.