Instructions to use wenzani/Wendi-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wenzani/Wendi-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wenzani/Wendi-2B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("wenzani/Wendi-2B") model = AutoModelForMultimodalLM.from_pretrained("wenzani/Wendi-2B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use wenzani/Wendi-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wenzani/Wendi-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wenzani/Wendi-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/wenzani/Wendi-2B
- SGLang
How to use wenzani/Wendi-2B 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 "wenzani/Wendi-2B" \ --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": "wenzani/Wendi-2B", "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 "wenzani/Wendi-2B" \ --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": "wenzani/Wendi-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use wenzani/Wendi-2B with Docker Model Runner:
docker model run hf.co/wenzani/Wendi-2B
Wendi 2B
Fast, instruction-aware decisions from a compact 2B model.
Wendi is a System One decision model fine-tuned from Qwen3.5-2B. Given evidence, a decision criterion and a small set of alternatives, it selects an answer through a single next-token prediction.
Use cases include workflow routing, next-action selection, instruction-sensitive classification, evidence checks, tool-use analysis and email classification.
This repository contains the standalone merged BF16 checkpoint for wendi-2b.
Usage
Deploy with a recent SGLang or vLLM build supporting Qwen3.5. Install the engine for your GPU platform using its linked installation guide, then run one of the commands below from the downloaded model directory. Replace . with wenzani/Wendi-2B to load from Hugging Face instead.
SGLang
python -m sglang.launch_server \
--model-path . \
--served-model-name wendi-2b \
--dtype bfloat16 \
--tp-size 1 \
--host 127.0.0.1 \
--port 8000
vLLM
Installation guide · Qwen3.5 serving guide
vllm serve . \
--served-model-name wendi-2b \
--dtype bfloat16 \
--tensor-parallel-size 1 \
--language-model-only \
--host 127.0.0.1 \
--port 8000
Both expose an OpenAI-compatible API at http://127.0.0.1:8000/v1, with model name wendi-2b. For decision requests, set chat_template_kwargs to {"enable_thinking": false}, use uppercase option letters, and score the next token over the allowed alternatives. The configured context is 262,144 tokens; adjust SGLang's --context-length or vLLM's --max-model-len to fit your available memory.
Benchmarks
Internal held-out evaluations of Wendi 2B in BF16, using Transformers and restricted next-token option scoring on an AMD Radeon Pro W7900. All values below are accuracy; counts show correct answers out of evaluated examples. These measurements use the evaluation harness, not the serving engines above.
General decisions
| Category | Correct / examples | Accuracy |
|---|---|---|
| Banking intent | 131 / 160 | 81.88% |
| Contract evidence | 101 / 160 | 63.12% |
| Emotion classification | 122 / 160 | 76.25% |
| Multilingual intent | 123 / 180 | 68.33% |
| Numeric reasoning | 48 / 100 | 48.00% |
| Qualitative reasoning | 94 / 100 | 94.00% |
| State tracking | 93 / 100 | 93.00% |
| Temporal and numeric reasoning | 33 / 60 | 55.00% |
| Workflow rules | 70 / 100 | 70.00% |
| Overall | 815 / 1,120 | 72.77% |
Behavior analysis
| Category | Correct / examples | Accuracy |
|---|---|---|
| Event order | 57 / 60 | 95.00% |
| Latency checks | 57 / 60 | 95.00% |
| Token-count metadata | 53 / 60 | 88.33% |
| Tool-call detection | 79 / 102 | 77.45% |
| Tool-call counting | 74 / 99 | 74.75% |
| Exact user quotations | 73 / 99 | 73.74% |
| Overall | 393 / 480 | 81.88% |
Email classification
| Category | Correct / examples | Accuracy |
|---|---|---|
| Natural-email phishing | 135 / 160 | 84.38% |
| Synthetic phishing contrasts | 115 / 120 | 95.83% |
| Spam classification | 76 / 80 | 95.00% |
Instruction following
Two internal holdouts: the established suite has 120 examples per category; the additional scenario suite has 40 per category.
| Category | Established suite | Additional scenarios |
|---|---|---|
| Constraint selection | 66.67% | 77.50% |
| Evidence scope | 93.33% | 92.50% |
| Exception policies | 86.67% | 90.00% |
| Numeric policies | 62.50% | 57.50% |
| Rule precedence | 74.17% | 87.50% |
| Untrusted-content handling | 99.17% | 100.00% |
| Overall | 80.42% (579 / 720) | 84.17% (202 / 240) |
Training
Wendi was trained with supervised fine-tuning followed by hybrid GRPO, combining decision rewards, supervised loss and KL regularization. Language-only rank-16 LoRA adapters were merged into the BF16 checkpoint.
The final training stage used 4,000 examples over 1,000 optimizer updates:
| Component | Examples |
|---|---|
| General-decision replay | 1,600 |
| Behavior analysis | 800 |
| Email classification | 800 |
| Instruction following | 800 |
Data combines published datasets, synthetic tool-use conversations and original procedural tasks. Sources include:
- Behavior and email: ToolACE (Apache-2.0; published synthetic conversations) and Champa, Rabbi and Zibran's curated email collection (CC-BY-4.0).
- Intent and workflows: BANKING77, MASSIVE, CLINC and Mind2Web (CC-BY-4.0).
- Evidence and reasoning: ContractNLI and QuaRTz (CC-BY-4.0), plus GSM8K (MIT).
- Emotion and sentiment: GoEmotions (Apache-2.0) and TweetEval (CC-BY-3.0).
License
Apache-2.0. Wendi is a modified derivative of Qwen3.5-2B, incorporating supervised and hybrid-RL language-model updates. The upstream license is included in LICENSE. Training sources retain their original licenses and attribution.
- Downloads last month
- 168