Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
decision-model
system-one
calibrated-probabilities
typed-decisions
ainode
merged-lora
conversational
Eval Results (legacy)
Instructions to use frontier-infra/jebadiah-9b-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use frontier-infra/jebadiah-9b-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="frontier-infra/jebadiah-9b-v2") 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("frontier-infra/jebadiah-9b-v2") model = AutoModelForMultimodalLM.from_pretrained("frontier-infra/jebadiah-9b-v2", 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 frontier-infra/jebadiah-9b-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "frontier-infra/jebadiah-9b-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "frontier-infra/jebadiah-9b-v2", "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/frontier-infra/jebadiah-9b-v2
- SGLang
How to use frontier-infra/jebadiah-9b-v2 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 "frontier-infra/jebadiah-9b-v2" \ --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": "frontier-infra/jebadiah-9b-v2", "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 "frontier-infra/jebadiah-9b-v2" \ --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": "frontier-infra/jebadiah-9b-v2", "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 frontier-infra/jebadiah-9b-v2 with Docker Model Runner:
docker model run hf.co/frontier-infra/jebadiah-9b-v2
Download scripts/decide_standalone.py from frontier-infra/jebadiah-9b-v2: direct link, hf CLI and curl.
- Browser
- Download file 2.77 kB
-
https://huggingface.co/frontier-infra/jebadiah-9b-v2/resolve/9aec78d8208f97e85871b15a33615dc5eb27c5a3/scripts/decide_standalone.py
- Command line
-
hf download hf://frontier-infra/jebadiah-9b-v2@9aec78d8208f97e85871b15a33615dc5eb27c5a3/scripts/decide_standalone.py
-
curl -L -o decide_standalone.py https://huggingface.co/frontier-infra/jebadiah-9b-v2/resolve/9aec78d8208f97e85871b15a33615dc5eb27c5a3/scripts/decide_standalone.py
2.77 kB
| """Run Jebadiah standalone: render a request exactly as AINode's /v1/systemone does, read the label-token | |
| logits at the answer position (fp32), apply the model's per-type temperatures, print typed answers. | |
| python decide_standalone.py --model <this repository, a local dir or frontier-infra/jebadiah-9b-v2> --request req.json | |
| v2 ships merged bf16 weights, so there is no base or adapter to combine: the model directory carries the | |
| weights, the tokenizer, the chat template and temperatures.json. req.json is a /v1/systemone body: | |
| {"state": ..., "questions": {id: {"type", "instructions", "criteria"}}}. The three modules beside this file | |
| are the trainer's own copies of the renderer (ainode_prompt_verbatim.py is AINode's decide rendering copied | |
| verbatim at commit e5c08938) and the logit read, so the bytes match training. | |
| """ | |
| import argparse, json, os, sys | |
| sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | |
| import torch | |
| from jebadiah_model import load_tokenizer, load_base, read_temperatures, Scorer | |
| from jebadiah_prompt import answer_from_probs | |
| def main(): | |
| ap = argparse.ArgumentParser() | |
| ap.add_argument("--model", required=True, help="the merged model: a local directory or a Hub repo id") | |
| ap.add_argument("--revision", default=None, help="Hub revision, when --model is a repo id") | |
| ap.add_argument("--request", required=True, help="JSON file with state and questions") | |
| ap.add_argument("--device", default="cuda" if torch.cuda.is_available() else "cpu") | |
| ap.add_argument("--no-temperatures", action="store_true", help="raw probabilities, as the served route returns today") | |
| ap.add_argument("--attn", default="sdpa") | |
| a = ap.parse_args() | |
| req = json.load(open(a.request)) | |
| if a.device.startswith("mps"): | |
| # transformers 5.17's threaded weight loader intermittently segfaults moving tensors to MPS | |
| os.environ.setdefault("HF_DEACTIVATE_ASYNC_LOAD", "1") | |
| dtype = torch.bfloat16 if a.device.startswith(("cuda", "mps")) else torch.float32 | |
| model_dir = a.model | |
| if not os.path.isdir(model_dir): | |
| from huggingface_hub import snapshot_download | |
| model_dir = snapshot_download(a.model, revision=a.revision) | |
| tok = load_tokenizer(model_dir) | |
| model = load_base(model_dir, attn_implementation=a.attn, dtype=dtype, device=a.device) | |
| temps = {} if a.no_temperatures else read_temperatures(model_dir) | |
| scorer = Scorer(model, tok, temperatures=temps, device=a.device) | |
| res = scorer.score(req["state"], req["questions"]) | |
| out = {"temperatures_applied": temps, "answers": {}} | |
| for qid, (keys, probs) in res.items(): | |
| out["answers"][qid] = answer_from_probs(req["questions"][qid], keys, probs) | |
| print(json.dumps(out, indent=1)) | |
| if __name__ == "__main__": | |
| main() | |