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
wald-serve 0.2.2: native video input (videos / video_url; video_route native32 default, frames16); decode once per request; card, API, runbook, evaluation/v2.1/video.json; MANIFEST updated. Weights unchanged.
d17e09a verified Download server/tests/stubengine.py from org2ai/Wald-4B: direct link, hf CLI and curl.
- Browser
- Download file 3.6 kB
-
https://huggingface.co/org2ai/Wald-4B/resolve/main/server/tests/stubengine.py
- Command line
-
hf download hf://org2ai/Wald-4B/server/tests/stubengine.py
-
curl -L -o stubengine.py https://huggingface.co/org2ai/Wald-4B/resolve/main/server/tests/stubengine.py
3.6 kB
| """A stub for the vLLM calls of the frozen native-v2 reader, for tests without a model or a GPU. | |
| `install(monkeypatch, lp=...)` replaces the reader's `Client.post` (eval.systemone_vllm.Client) with an in-process | |
| function: | |
| * /tokenize: one token per character (prompt text, or the JSON of the chat messages + "<think>\\n" when thinking); | |
| * /detokenize: the inverse (used by the image route); | |
| * /v1/completions and /v1/chat/completions with max_tokens 1: the logprob of every requested letter token id is | |
| `lp(prompt_ids, token_id, rank)` (rank = position in `logprob_token_ids`, i.e. option index); | |
| * generation (thought): a fixed short text and 3 completion tokens. | |
| `hashed_lp` is a deterministic, prompt-dependent logprob (fixture recording); `fixed_lp(values)` returns the same | |
| per-option logprobs for every question (API tests with known log-probabilities). | |
| """ | |
| import hashlib | |
| import json | |
| from wald_serve.native import NativeV2 | |
| def hashed_lp(prompt, tid, rank): | |
| h = hashlib.sha256(json.dumps([list(prompt[-64:]), len(prompt), tid]).encode()).digest() | |
| return -(int.from_bytes(h[:4], 'big') % 4000) / 1000.0 | |
| def fixed_lp(values): | |
| def lp(prompt, tid, rank): | |
| return float(values[rank % len(values)]) | |
| return lp | |
| def install(monkeypatch, lp=hashed_lp, engine=None, calls=None): | |
| """-> (engine, calls). `engine` defaults to a NativeV2 on the repository's temperature table.""" | |
| import eval.systemone_vllm as sov | |
| calls = [] if calls is None else calls | |
| def text_of(body): | |
| text = body.get('prompt') | |
| if text is None: | |
| text = json.dumps(body['messages'], sort_keys=True, ensure_ascii=False) | |
| if body.get('chat_template_kwargs', {}).get('enable_thinking'): | |
| text += '<think>\n' | |
| return text | |
| def post(self, path, body, retries=1): | |
| calls.append((path, json.loads(json.dumps(body)))) | |
| if path == '/tokenize': | |
| text = text_of(body) | |
| if len(text) > 20000: | |
| raise sov.Capacity('maximum context length') | |
| return {'tokens': [ord(c) for c in text]} | |
| if path == '/detokenize': | |
| return {'prompt': ''.join(chr(t) for t in body['tokens'])} | |
| if path == '/v1/chat/completions': | |
| prompt = [ord(c) for c in json.dumps(body['messages'], sort_keys=True)] | |
| if body['max_tokens'] == 1: | |
| top = [{'token': f'token_id:{t}', 'logprob': lp(prompt, t, i)} for i, t in enumerate(body['logprob_token_ids'])] | |
| return {'choices': [{'index': 0, 'message': {'content': 'A'}, 'finish_reason': 'length', | |
| 'logprobs': {'content': [{'token': top[0]['token'], 'logprob': top[0]['logprob'], | |
| 'top_logprobs': top}]}}]} | |
| return {'choices': [{'index': 0, 'message': {'content': 'stub reasoning'}, 'finish_reason': 'stop', | |
| 'stop_reason': '</think>'}], 'usage': {'completion_tokens': 3}} | |
| if body['max_tokens'] == 1: | |
| top = {f'token_id:{t}': lp(body['prompt'], t, i) for i, t in enumerate(body['logprob_token_ids'])} | |
| return {'choices': [{'logprobs': {'top_logprobs': [top]}}]} | |
| return {'choices': [{'text': 'stub reasoning', 'finish_reason': 'stop', 'stop_reason': '</think>'}], | |
| 'usage': {'completion_tokens': 3}} | |
| monkeypatch.setattr(sov.Client, 'post', post) | |
| return engine, calls | |
| def make_engine(temperature, cls=NativeV2, **kw): | |
| return cls('http://unused', temperature, **kw) | |