Instructions to use choyiny/yev1-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use choyiny/yev1-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="choyiny/yev1-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("choyiny/yev1-4b") model = AutoModelForCausalLM.from_pretrained("choyiny/yev1-4b", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - PEFT
How to use choyiny/yev1-4b with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use choyiny/yev1-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "choyiny/yev1-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": "choyiny/yev1-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/choyiny/yev1-4b
- SGLang
How to use choyiny/yev1-4b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "choyiny/yev1-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "choyiny/yev1-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "choyiny/yev1-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "choyiny/yev1-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use choyiny/yev1-4b with Docker Model Runner:
docker model run hf.co/choyiny/yev1-4b
yev1-4b
An open System One decision model on Qwen/Qwen3.5-4B-Base (Apache-2.0). Give it a state, a question and 2–10
options; it returns a calibrated probability per option from one forward pass, read from the logits of the option
letters A–J. Merged bf16 weights are at the repo root; the LoRA adapter is in adapter/.
How to serve
vLLM (recommended). Start the engine, then put yev serve in front of it for
the prompt format, letter readout and calibration:
hf download choyiny/yev1-4b --local-dir yev1-4b
vllm serve ./yev1-4b --host 127.0.0.1 --port 8100 --served-model-name yev --dtype bfloat16 \
--max-model-len 16385 --enable-prefix-caching --generation-config vllm \
--logprobs-mode processed_logprobs --max-logprobs 26 --gpu-memory-utilization 0.85 --trust-remote-code
pip install torch 'yev[serve,train] @ git+https://github.com/xyspacedev/yev'
yev serve --backend vllm --model yev1-4b --calibration yev1-4b/calibration.json --model-name yev1-4b
SGLang: start the engine with
python -m sglang.launch_server --model-path ./yev1-4b --host 127.0.0.1 --port 8100 --dtype bfloat16 --context-length 16385 --mem-fraction-static 0.85 --trust-remote-code,
then run the same yev serve command with --backend sglang.
transformers: yev serve --model yev1-4b --calibration yev1-4b/calibration.json (no sidecar), or run
python inference_example.py for a self-contained script (--adapter loads the base + LoRA).
curl -s localhost:8000/v1/systemone -H 'content-type: application/json' -d '{
"state": "I was charged twice. Please help.",
"questions": {"billing": {"instructions": "Is this message about billing?", "type": "noul"}}}'
yev serve also exposes an OpenAI-compatible /v1/chat/completions.
Benchmarks
| Benchmark | yev0-4b | yev1-4b |
|---|---|---|
| DecideBench v1.0 test, with examples: accuracy / pair accuracy | 94.5 / 89.0 | 95.25 / 91.0 |
| DecideBench v1.0 test, zero-shot: accuracy / pair accuracy | 95.0 / 90.0 | 94.75 / 90.5 |
| DecideBench ECE, with examples / zero-shot | 0.060 / 0.062 | 0.042 / 0.037 |
| JevBench public (231), accuracy † | 78.4 | 82.7 |
| R-Judge (571), F1 † | 50.8 | 80.8 |
| DynaBench test (543), F1 † | 55.7 | 67.5 |
DecideBench test was never inspected or used for training or model selection. † Tuned-on: failure analysis of these test sets informed the training data, so they are not held-out scores.
Latency: transformers vs vLLM vs SGLang
One NVIDIA L40S 48 GB, bf16, vLLM 0.31.0, SGLang 0.5.21.
| transformers | vLLM | SGLang | |
|---|---|---|---|
| p50, 1 question, ~300-token state | 0.11 s | 0.04 s | 0.05 s |
| p50, 1 question, ~2k-token state | 0.26 s | 0.14 s | 0.12 s |
| p50, 1 question, ~8k-token state | 1.19 s | 0.47 s | 0.44 s |
| p50, 4 questions, ~2k-token state | 0.36 s | 0.17 s | 0.35 s |
| Throughput, 64 requests in flight | 6.2 req/s | 21.3 req/s | 19.8 req/s |
| Agreement with transformers (3,963 rows) | — | 99.72 % | 99.80 % |
Licence
Weights: Apache-2.0. Training-data credits are in NOTICE and ATTRIBUTION.json. Recipe after Together's
"How to train your own Jev".
- Downloads last month
- 437
Model tree for choyiny/yev1-4b
Base model
Qwen/Qwen3.5-4B-BaseEvaluation results
- Accuracy on DecideBench v1.0 test (400 items, with worked examples)test set self-reported95.250
- Pair accuracy on DecideBench v1.0 test (400 items, with worked examples)test set self-reported91.000
- ECE (15 bins) on DecideBench v1.0 test (400 items, with worked examples)test set self-reported0.042
- Brier score on DecideBench v1.0 test (400 items, with worked examples)test set self-reported0.078
- Accuracy on DecideBench v1.0 test (400 items, zero-shot)test set self-reported94.750
- Pair accuracy on DecideBench v1.0 test (400 items, zero-shot)test set self-reported90.500
- ECE (15 bins) on DecideBench v1.0 test (400 items, zero-shot)test set self-reported0.037
- Brier score on DecideBench v1.0 test (400 items, zero-shot)test set self-reported0.088