Text Generation
Transformers
Safetensors
GGUF
English
qwen3_5
image-text-to-text
decision-model
typed-decisions
calibration
calibrated-probabilities
classification
tool-selection
agent-routing
decision-index
jevbench
jev-compatible
systemone
wald
wald-q4b
qwen3.5
4b
vllm
reasoning
llama.cpp
conversational
Eval Results (legacy)
Instructions to use org2ai/Wald-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use org2ai/Wald-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="org2ai/Wald-4B") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("org2ai/Wald-4B") model = AutoModelForMultimodalLM.from_pretrained("org2ai/Wald-4B", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use org2ai/Wald-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "org2ai/Wald-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": "org2ai/Wald-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/org2ai/Wald-4B
- SGLang
How to use org2ai/Wald-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 "org2ai/Wald-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": "org2ai/Wald-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 "org2ai/Wald-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": "org2ai/Wald-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use org2ai/Wald-4B with Docker Model Runner:
docker model run hf.co/org2ai/Wald-4B
org2ai
Wald-Q4B v2 (04701-c22 + Qwen3.5-4B vision tower): main = v2; v1.x at tags v1.2 / v1.2-main / v1.1 / v1.0
ef7481d |
Download docs/api.md from org2ai/Wald-4B: direct link, hf CLI and curl.
- Browser
- Download file 4.4 kB
-
https://huggingface.co/org2ai/Wald-4B/resolve/main/docs/api.md
- Command line
-
hf download hf://org2ai/Wald-4B/docs/api.md
-
curl -L -o api.md https://huggingface.co/org2ai/Wald-4B/resolve/main/docs/api.md
4.4 kB
| # Wald-Q4B v2 decision API | |
| `wald-serve-native` (in `server/`, started by `./run.sh`) exposes one decision endpoint, `POST /v1/systemone`. Request shapes follow TypeSafe's `/v1/systemone` format, so clients written for Jev can point at a self-hosted Wald server. Wald is independent and is not affiliated with TypeSafe AI. The server does not check API keys; put it behind your own gateway. | |
| ## Endpoints | |
| | Method and path | Purpose | | |
| |---|---| | |
| | `POST /v1/systemone` (also `POST /`) | Answer one or more typed questions about a state | | |
| | `GET /health` | Checkpoint, weights sha256, default effort / policy, thought budget, prompt format, context limit, calibration sha256 | | |
| | `GET /v1/models` | The served model name (`04701-c22`) | | |
| ## Request | |
| | Field | Type | Meaning | | |
| |---|---|---| | |
| | `state` | string, object, array or null | What the decision is about: a message, a conversation, a document, an agent trace. Objects and arrays are flattened to text with their field names kept. | | |
| | `questions` | object, at least one entry | Question id → question, all about the same `state`. | | |
| | `effort` | string, optional | `none` (one pass), `auto` or `medium` (Auto 0.7, the default), `always` or `high` (Always 512). Other values (`low`, `high-k2` …) are v1.x efforts and return HTTP 400. | | |
| | `prompt_format` | string, optional | `repeat_state_plain` (default: the state is written twice) or `plain`. | | |
| | `images` | array of data URIs, optional | Images for the state (also accepted inside `state` as message content parts `{"type": "image_url", "image_url": {"url": "data:..."}}`); up to 16; zero-shot. | | |
| | `model` | string, optional | Ignored; accepted for client compatibility. | | |
| Only `state`, `questions` and the images reach the model. Each question has a `type`, optional `instructions` and `criteria`: | |
| | `type` | `criteria` | Answer fields | | |
| |---|---|---| | |
| | `choice` | Object of options: key → description (description may be null) | `choice` (most probable key), `probabilities` (key → probability), `confidence` | | |
| | `noul` | Optional object with `true` and/or `false` descriptions | `noul` (probability of yes), `probabilities` (`true` / `false`), `confidence` | | |
| | `score` | Array of ordered levels | `score` (expected level index), `probabilities` (level index → probability), `confidence` | | |
| Every answer also carries `type`, `mode` (`A` one pass, `B` after a native thought, `K`/`T` grouped readout for more than 26 options) and `probabilities_t1` (the same distribution before the calibration table). `confidence` is the largest calibrated probability. The response has `model`, `answers` and `usage` (`input_tokens`, `output_tokens`; output tokens are thought tokens). The thought text itself is not returned. | |
| Prompts longer than the context limit (131,072 tokens) are rejected with HTTP 422, never truncated. A malformed request or an unknown effort / prompt format returns HTTP 400; a backend failure returns 502. | |
| ## Example: route a tool call | |
| ```sh | |
| curl http://localhost:8000/v1/systemone -H 'Content-Type: application/json' -d '{ | |
| "state": "User: book me a table for two at 7pm tomorrow near the office", | |
| "effort": "auto", | |
| "questions": { | |
| "tool": {"type": "choice", "instructions": "Which tool should the agent call next?", | |
| "criteria": {"restaurant_search": "Search restaurants", "calendar_create": "Create a calendar event", | |
| "ask_user": "Ask the user a clarifying question"}}, | |
| "enough_info": {"type": "noul", "instructions": "Is the request specific enough to act on without asking?"} | |
| } | |
| }' | |
| ``` | |
| Response shape (values illustrative): | |
| ```json | |
| {"model": "04701-c22", | |
| "answers": { | |
| "tool": {"type": "choice", "mode": "A", "choice": "restaurant_search", | |
| "probabilities": {"restaurant_search": 0.81, "calendar_create": 0.05, "ask_user": 0.14}, | |
| "probabilities_t1": {"restaurant_search": 0.93, "calendar_create": 0.01, "ask_user": 0.06}, "confidence": 0.81}, | |
| "enough_info": {"type": "noul", "mode": "B", "noul": 0.64, "probabilities": {"true": 0.64, "false": 0.36}, | |
| "probabilities_t1": {"true": 0.71, "false": 0.29}, "confidence": 0.64}}, | |
| "usage": {"input_tokens": 1450, "output_tokens": 212}} | |
| ``` | |
| Act on a decision when its probability clears a threshold you set on your own validation data; otherwise escalate or ask. The model picks options; it does not write tool arguments. | |