Instructions to use schneewolflabs/B4-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use schneewolflabs/B4-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="schneewolflabs/B4-9B") 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("schneewolflabs/B4-9B") model = AutoModelForMultimodalLM.from_pretrained("schneewolflabs/B4-9B", 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 schneewolflabs/B4-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "schneewolflabs/B4-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "schneewolflabs/B4-9B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/schneewolflabs/B4-9B
- SGLang
How to use schneewolflabs/B4-9B 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 "schneewolflabs/B4-9B" \ --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": "schneewolflabs/B4-9B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "schneewolflabs/B4-9B" \ --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": "schneewolflabs/B4-9B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use schneewolflabs/B4-9B with Docker Model Runner:
docker model run hf.co/schneewolflabs/B4-9B
Schneewolf Labs B4-9B
B2-9B taught to check before it answers, with thinking off.
Behind egirl's OpenAI-compatible API the model has web_search,
web_research and calculate. With thinking on, B2-9B already uses them well. With thinking off, the fast mode
a chat product wants, it mostly answered from memory: stale facts about who holds a role, old version numbers,
and mental math it got wrong. B4 makes the thinking-on choice in the thinking-off mode, averaging 2.5 s per answer instead of 5.7 s with thinking low.
B2-9B
+ ORPO Nachschlagen: 165 first-turn pairs on egirl's own API context, thinking off, 2 epochs
63 current-info questions chosen: web_search / web_research rejected: answer from memory
36 arithmetic and dates chosen: calculate rejected: mental math
16 look-up-then-compute chosen: search first rejected: answer from memory
50 controls chosen: direct answer rejected: an unneeded web_search
The chosen turns are B2-9B's own thinking-on first moves (thinking stripped), kept only when the whole run's answer was right. Rejected turns are its thinking-off answers. Pairs cut at the first assistant turn, so the model learns the decision, not a new voice. The data is public: schneewolflabs/Nachschlagen.
The 50 controls (trivia, coding, rewriting text the user supplied, historical facts) keep the trigger on staleness and arithmetic rather than "any question".
Numbers
Held-out sets share no question with training; the second one uses indirect phrasing ("is it worth upgrading to the latest Python?", "what's 18% tip on $47.80 split three ways?") and traps such as past-dated questions and data the user already supplied. Thinking off, egirl, Q8_0 + bf16 adapter.
| B2-9B | B4-9B | |
|---|---|---|
| held-out (41): right first move | 19/41 | 41/41 |
| current-info questions searched | 2/10 | 10/10 |
| arithmetic sent to the calculator | 1/10 | 10/10 |
| easy questions answered directly | 10/10 | 10/10 (9/10 in two of three reruns) |
| harder set (37): right first move | 20/37 | 36/37 |
| user-supplied numbers: calculated, not searched | 0/4 | 4/4 |
| keyed answers correct (32) | 21/32 | 32/32 |
| average time per answer | 0.8 s | 2.5 s (thinking low: 5.7 s) |
| ARC / ARC-Easy / TruthfulQA | 60.5 / 84.6 / 36.5 | 61.9 / 84.2 / 36.8 |
With thinking low it still scores 41/41.
Known residuals
- It sometimes searches facts it knows: about one easy question in ten across reruns ("how many continents?"), and "who was Intel's CEO in 2015" because it looks like a current-role question. The answers stay right; it costs a few seconds.
- It can't search what it is sure it knows. It says Brazil won the 1998 World Cup about half the time, as B2-9B does.
Notes
- Built for egirl, used through its OpenAI API with server-side tools. Other harnesses weren't a goal and weren't tested.
- Date math (
days_between,add_days,weekday,today()insidecalculate) needs an egirl with the calculate date functions (PR #194); 12 training calls use them. - Trained with Merlina, ORPO β 0.1, LoRA r16/α32 on all attention and MLP projections, lr 2e-5 cosine, batch 8, on a DGX Spark (GB10). Stronger runs (lr 5e-5, 3 epochs, r32) scored the same, so the lightest shipped.
- The adapter was baked into the weights with Kessel. The
mtp.*and vision tensors are byte-identical to B2-9B.
No GGUF is published. Convert with llama.cpp's convert_hf_to_gguf.py; B2-9B's mmproj works.
- Downloads last month
- 17
Model tree for schneewolflabs/B4-9B
Base model
hemlang/Hemlock-Qwen3.5-9B