Image-Text-to-Text
Transformers
Safetensors
premonition_diffusion_gemma
vllm
diffusion-gemma
multimodal
audio
video
custom_code
conversational
Instructions to use prem-research/Premonition-Exp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prem-research/Premonition-Exp with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prem-research/Premonition-Exp", trust_remote_code=True) 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 AutoModelForImageTextToText model = AutoModelForImageTextToText.from_pretrained("prem-research/Premonition-Exp", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prem-research/Premonition-Exp with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prem-research/Premonition-Exp" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prem-research/Premonition-Exp", "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/prem-research/Premonition-Exp
- SGLang
How to use prem-research/Premonition-Exp 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 "prem-research/Premonition-Exp" \ --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": "prem-research/Premonition-Exp", "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 "prem-research/Premonition-Exp" \ --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": "prem-research/Premonition-Exp", "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 prem-research/Premonition-Exp with Docker Model Runner:
docker model run hf.co/prem-research/Premonition-Exp
Download demo/verified_examples.json from prem-research/Premonition-Exp: direct link, hf CLI and curl.
- Browser
- Download file 17.5 kB
-
https://huggingface.co/prem-research/Premonition-Exp/resolve/main/demo/verified_examples.json
- Command line
-
hf download hf://prem-research/Premonition-Exp/demo/verified_examples.json
-
curl -L -o verified_examples.json https://huggingface.co/prem-research/Premonition-Exp/resolve/main/demo/verified_examples.json
17.5 kB
| [ | |
| { | |
| "id": "text-approve", | |
| "response": { | |
| "model": "Premonition-Exp", | |
| "answers": { | |
| "route": { | |
| "type": "choice", | |
| "choice": "approve", | |
| "probabilities": { | |
| "approve": 0.9910670369166049, | |
| "review": 0.008932963083395019 | |
| }, | |
| "confidence": 0.9910670369166049 | |
| } | |
| }, | |
| "usage": { | |
| "input_tokens": 155, | |
| "output_tokens": 8 | |
| }, | |
| "diagnostics": { | |
| "steps": 1, | |
| "stages": [ | |
| [ | |
| "route" | |
| ] | |
| ], | |
| "skipped": {}, | |
| "chunks": [ | |
| [ | |
| "route" | |
| ] | |
| ], | |
| "chunk_prompt": "own", | |
| "sequential": false, | |
| "conditioning": null, | |
| "thought": null, | |
| "samples": { | |
| "n": 1, | |
| "tops": [ | |
| { | |
| "route": [ | |
| "A", | |
| 0.9910670369166049, | |
| 0.22546874631548575 | |
| ] | |
| } | |
| ], | |
| "policy": { | |
| "mode": "fixed", | |
| "n": 1, | |
| "extended": null, | |
| "first_read_entropy": null | |
| } | |
| }, | |
| "timing": { | |
| "total_ms": 77.4528980255127, | |
| "reads": 1 | |
| }, | |
| "prompt_tokens": 155, | |
| "questions": { | |
| "route": { | |
| "pos": 6, | |
| "entropy": [ | |
| 0.22546874631548575 | |
| ], | |
| "label_mass": 0.7915016933579252, | |
| "argmax_is_label": true | |
| } | |
| }, | |
| "engine": "vllm" | |
| } | |
| }, | |
| "media_sha256": {} | |
| }, | |
| { | |
| "id": "text-review", | |
| "response": { | |
| "model": "Premonition-Exp", | |
| "answers": { | |
| "route": { | |
| "type": "choice", | |
| "choice": "review", | |
| "probabilities": { | |
| "approve": 0.00046817478355964465, | |
| "review": 0.9995318252164405 | |
| }, | |
| "confidence": 0.9995318252164405 | |
| } | |
| }, | |
| "usage": { | |
| "input_tokens": 155, | |
| "output_tokens": 8 | |
| }, | |
| "diagnostics": { | |
| "steps": 1, | |
| "stages": [ | |
| [ | |
| "route" | |
| ] | |
| ], | |
| "skipped": {}, | |
| "chunks": [ | |
| [ | |
| "route" | |
| ] | |
| ], | |
| "chunk_prompt": "own", | |
| "sequential": false, | |
| "conditioning": null, | |
| "thought": null, | |
| "samples": { | |
| "n": 1, | |
| "tops": [ | |
| { | |
| "route": [ | |
| "B", | |
| 0.9995318252164405, | |
| 0.3503123781691521 | |
| ] | |
| } | |
| ], | |
| "policy": { | |
| "mode": "fixed", | |
| "n": 1, | |
| "extended": null, | |
| "first_read_entropy": null | |
| } | |
| }, | |
| "timing": { | |
| "total_ms": 72.08681106567383, | |
| "reads": 1 | |
| }, | |
| "prompt_tokens": 155, | |
| "questions": { | |
| "route": { | |
| "pos": 6, | |
| "entropy": [ | |
| 0.3503123781691521 | |
| ], | |
| "label_mass": 0.49424244171436565, | |
| "argmax_is_label": true | |
| } | |
| }, | |
| "engine": "vllm" | |
| } | |
| }, | |
| "media_sha256": {} | |
| }, | |
| { | |
| "id": "image-overdue", | |
| "response": { | |
| "model": "Premonition-Exp", | |
| "answers": { | |
| "route": { | |
| "type": "choice", | |
| "choice": "collections", | |
| "probabilities": { | |
| "collections": 0.9999448922675935, | |
| "archive": 5.510773240655932e-05 | |
| }, | |
| "confidence": 0.9999448922675935 | |
| } | |
| }, | |
| "usage": { | |
| "input_tokens": 398, | |
| "output_tokens": 8 | |
| }, | |
| "diagnostics": { | |
| "steps": 1, | |
| "stages": [ | |
| [ | |
| "route" | |
| ] | |
| ], | |
| "skipped": {}, | |
| "chunks": [ | |
| [ | |
| "route" | |
| ] | |
| ], | |
| "chunk_prompt": "own", | |
| "sequential": false, | |
| "conditioning": null, | |
| "thought": null, | |
| "samples": { | |
| "n": 1, | |
| "tops": [ | |
| { | |
| "route": [ | |
| "A", | |
| 0.9999448922675935, | |
| 0.018687498247813555 | |
| ] | |
| } | |
| ], | |
| "policy": { | |
| "mode": "fixed", | |
| "n": 1, | |
| "extended": null, | |
| "first_read_entropy": null | |
| } | |
| }, | |
| "timing": { | |
| "total_ms": 89.13946151733398, | |
| "reads": 1 | |
| }, | |
| "prompt_tokens": 398, | |
| "questions": { | |
| "route": { | |
| "pos": 6, | |
| "entropy": [ | |
| 0.018687498247813555 | |
| ], | |
| "label_mass": 0.9817291889952214, | |
| "argmax_is_label": true | |
| } | |
| }, | |
| "engine": "vllm" | |
| } | |
| }, | |
| "media_sha256": { | |
| "invoice-overdue.png": "8e1231edc320143201b5bbf817164d62c0e04ec6a2d9d5da698de1600ed037c9" | |
| } | |
| }, | |
| { | |
| "id": "image-paid", | |
| "response": { | |
| "model": "Premonition-Exp", | |
| "answers": { | |
| "route": { | |
| "type": "choice", | |
| "choice": "archive", | |
| "probabilities": { | |
| "collections": 0.0007077885588127124, | |
| "archive": 0.9992922114411873 | |
| }, | |
| "confidence": 0.9992922114411873 | |
| } | |
| }, | |
| "usage": { | |
| "input_tokens": 398, | |
| "output_tokens": 8 | |
| }, | |
| "diagnostics": { | |
| "steps": 1, | |
| "stages": [ | |
| [ | |
| "route" | |
| ] | |
| ], | |
| "skipped": {}, | |
| "chunks": [ | |
| [ | |
| "route" | |
| ] | |
| ], | |
| "chunk_prompt": "own", | |
| "sequential": false, | |
| "conditioning": null, | |
| "thought": null, | |
| "samples": { | |
| "n": 1, | |
| "tops": [ | |
| { | |
| "route": [ | |
| "B", | |
| 0.9992922114411873, | |
| 0.021637589221259988 | |
| ] | |
| } | |
| ], | |
| "policy": { | |
| "mode": "fixed", | |
| "n": 1, | |
| "extended": null, | |
| "first_read_entropy": null | |
| } | |
| }, | |
| "timing": { | |
| "total_ms": 89.86663818359375, | |
| "reads": 1 | |
| }, | |
| "prompt_tokens": 398, | |
| "questions": { | |
| "route": { | |
| "pos": 6, | |
| "entropy": [ | |
| 0.021637589221259988 | |
| ], | |
| "label_mass": 0.9839812348301229, | |
| "argmax_is_label": true | |
| } | |
| }, | |
| "engine": "vllm" | |
| } | |
| }, | |
| "media_sha256": { | |
| "invoice-paid.png": "f8535fb0faa9bb1aacc02cc90087dc5a9fdf947d803ec13349f50d1407f00117" | |
| } | |
| }, | |
| { | |
| "id": "video-outbound", | |
| "response": { | |
| "model": "Premonition-Exp", | |
| "answers": { | |
| "zone": { | |
| "type": "choice", | |
| "choice": "dispatch", | |
| "probabilities": { | |
| "receiving": 0.0014369799208721926, | |
| "dispatch": 0.9985630200791279 | |
| }, | |
| "confidence": 0.9985630200791279 | |
| } | |
| }, | |
| "usage": { | |
| "input_tokens": 426, | |
| "output_tokens": 8 | |
| }, | |
| "diagnostics": { | |
| "steps": 1, | |
| "stages": [ | |
| [ | |
| "zone" | |
| ] | |
| ], | |
| "skipped": {}, | |
| "chunks": [ | |
| [ | |
| "zone" | |
| ] | |
| ], | |
| "chunk_prompt": "own", | |
| "sequential": false, | |
| "conditioning": null, | |
| "thought": null, | |
| "samples": { | |
| "n": 1, | |
| "tops": [ | |
| { | |
| "zone": [ | |
| "B", | |
| 0.9985630200791279, | |
| 0.018239857960741544 | |
| ] | |
| } | |
| ], | |
| "policy": { | |
| "mode": "fixed", | |
| "n": 1, | |
| "extended": null, | |
| "first_read_entropy": null | |
| } | |
| }, | |
| "timing": { | |
| "total_ms": 114.95280265808105, | |
| "reads": 1 | |
| }, | |
| "prompt_tokens": 426, | |
| "questions": { | |
| "zone": { | |
| "pos": 6, | |
| "entropy": [ | |
| 0.018239857960741544 | |
| ], | |
| "label_mass": 0.9924917702986976, | |
| "argmax_is_label": true | |
| } | |
| }, | |
| "engine": "vllm" | |
| } | |
| }, | |
| "media_sha256": { | |
| "warehouse-outbound.mp4": "5639e119a97dfe7922cbf70feb286b34c4ff3af41cdd308be324ea57fd28e3ad" | |
| } | |
| }, | |
| { | |
| "id": "video-inbound", | |
| "response": { | |
| "model": "Premonition-Exp", | |
| "answers": { | |
| "zone": { | |
| "type": "choice", | |
| "choice": "receiving", | |
| "probabilities": { | |
| "receiving": 0.9861777765992767, | |
| "dispatch": 0.013822223400723319 | |
| }, | |
| "confidence": 0.9861777765992767 | |
| } | |
| }, | |
| "usage": { | |
| "input_tokens": 426, | |
| "output_tokens": 8 | |
| }, | |
| "diagnostics": { | |
| "steps": 1, | |
| "stages": [ | |
| [ | |
| "zone" | |
| ] | |
| ], | |
| "skipped": {}, | |
| "chunks": [ | |
| [ | |
| "zone" | |
| ] | |
| ], | |
| "chunk_prompt": "own", | |
| "sequential": false, | |
| "conditioning": null, | |
| "thought": null, | |
| "samples": { | |
| "n": 1, | |
| "tops": [ | |
| { | |
| "zone": [ | |
| "A", | |
| 0.9861777765992767, | |
| 0.09175100071243225 | |
| ] | |
| } | |
| ], | |
| "policy": { | |
| "mode": "fixed", | |
| "n": 1, | |
| "extended": null, | |
| "first_read_entropy": null | |
| } | |
| }, | |
| "timing": { | |
| "total_ms": 111.72127723693848, | |
| "reads": 1 | |
| }, | |
| "prompt_tokens": 426, | |
| "questions": { | |
| "zone": { | |
| "pos": 6, | |
| "entropy": [ | |
| 0.09175100071243225 | |
| ], | |
| "label_mass": 0.9794433418869442, | |
| "argmax_is_label": true | |
| } | |
| }, | |
| "engine": "vllm" | |
| } | |
| }, | |
| "media_sha256": { | |
| "warehouse-inbound.mp4": "4165ce97d755b4d825261b2105836383c5b43b7c2d0cae217afe22a8a95ab8dd" | |
| } | |
| }, | |
| { | |
| "id": "audio-cancel", | |
| "response": { | |
| "model": "Premonition-Exp", | |
| "answers": { | |
| "intent": { | |
| "type": "choice", | |
| "choice": "cancel", | |
| "probabilities": { | |
| "cancel": 0.6727513333748982, | |
| "reschedule": 0.32724866662510177 | |
| }, | |
| "confidence": 0.6727513333748982 | |
| } | |
| }, | |
| "usage": { | |
| "input_tokens": 338, | |
| "output_tokens": 8 | |
| }, | |
| "diagnostics": { | |
| "steps": 1, | |
| "stages": [ | |
| [ | |
| "intent" | |
| ] | |
| ], | |
| "skipped": {}, | |
| "chunks": [ | |
| [ | |
| "intent" | |
| ] | |
| ], | |
| "chunk_prompt": "own", | |
| "sequential": false, | |
| "conditioning": null, | |
| "thought": null, | |
| "samples": { | |
| "n": 1, | |
| "tops": [ | |
| { | |
| "intent": [ | |
| "A", | |
| 0.6727513333748982, | |
| 0.7992342053622752 | |
| ] | |
| } | |
| ], | |
| "policy": { | |
| "mode": "fixed", | |
| "n": 1, | |
| "extended": null, | |
| "first_read_entropy": null | |
| } | |
| }, | |
| "timing": { | |
| "total_ms": 77.86035537719727, | |
| "reads": 1 | |
| }, | |
| "prompt_tokens": 338, | |
| "questions": { | |
| "intent": { | |
| "pos": 6, | |
| "entropy": [ | |
| 0.7992342053622752 | |
| ], | |
| "label_mass": 0.2186607508793505, | |
| "argmax_is_label": false | |
| } | |
| }, | |
| "engine": "vllm" | |
| } | |
| }, | |
| "media_sha256": { | |
| "voicemail-cancel.wav": "fab7ce75675e1a0ffc184a8019f06b839c0092b9b20db5c1bd1dec0d7508d642" | |
| } | |
| }, | |
| { | |
| "id": "audio-reschedule", | |
| "response": { | |
| "model": "Premonition-Exp", | |
| "answers": { | |
| "intent": { | |
| "type": "choice", | |
| "choice": "reschedule", | |
| "probabilities": { | |
| "cancel": 0.15278520619508018, | |
| "reschedule": 0.8472147938049198 | |
| }, | |
| "confidence": 0.8472147938049198 | |
| } | |
| }, | |
| "usage": { | |
| "input_tokens": 360, | |
| "output_tokens": 8 | |
| }, | |
| "diagnostics": { | |
| "steps": 1, | |
| "stages": [ | |
| [ | |
| "intent" | |
| ] | |
| ], | |
| "skipped": {}, | |
| "chunks": [ | |
| [ | |
| "intent" | |
| ] | |
| ], | |
| "chunk_prompt": "own", | |
| "sequential": false, | |
| "conditioning": null, | |
| "thought": null, | |
| "samples": { | |
| "n": 1, | |
| "tops": [ | |
| { | |
| "intent": [ | |
| "B", | |
| 0.8472147938049198, | |
| 0.5492811318797771 | |
| ] | |
| } | |
| ], | |
| "policy": { | |
| "mode": "fixed", | |
| "n": 1, | |
| "extended": null, | |
| "first_read_entropy": null | |
| } | |
| }, | |
| "timing": { | |
| "total_ms": 78.75180244445801, | |
| "reads": 1 | |
| }, | |
| "prompt_tokens": 360, | |
| "questions": { | |
| "intent": { | |
| "pos": 6, | |
| "entropy": [ | |
| 0.5492811318797771 | |
| ], | |
| "label_mass": 0.6983617435650877, | |
| "argmax_is_label": true | |
| } | |
| }, | |
| "engine": "vllm" | |
| } | |
| }, | |
| "media_sha256": { | |
| "voicemail-delay.wav": "78898a306a78294f50b3b3610236f2fc2ccc7b9c28acea9875741169954fe049" | |
| } | |
| }, | |
| { | |
| "id": "omni-review", | |
| "response": { | |
| "model": "Premonition-Exp", | |
| "answers": { | |
| "approval": { | |
| "type": "choice", | |
| "choice": "approve", | |
| "probabilities": { | |
| "approve": 0.9953319685179519, | |
| "review": 0.0046680314820480365 | |
| }, | |
| "confidence": 0.9953319685179519 | |
| }, | |
| "invoice": { | |
| "type": "choice", | |
| "choice": "collections", | |
| "probabilities": { | |
| "collections": 0.9971495456503229, | |
| "archive": 0.0028504543496770114 | |
| }, | |
| "confidence": 0.9971495456503229 | |
| }, | |
| "zone": { | |
| "type": "choice", | |
| "choice": "dispatch", | |
| "probabilities": { | |
| "receiving": 0.19490060281102095, | |
| "dispatch": 0.805099397188979 | |
| }, | |
| "confidence": 0.805099397188979 | |
| }, | |
| "intent": { | |
| "type": "choice", | |
| "choice": "reschedule", | |
| "probabilities": { | |
| "cancel": 0.3755498996652723, | |
| "reschedule": 0.6244501003347276 | |
| }, | |
| "confidence": 0.6244501003347276 | |
| } | |
| }, | |
| "usage": { | |
| "input_tokens": 1134, | |
| "output_tokens": 20 | |
| }, | |
| "diagnostics": { | |
| "steps": 1, | |
| "stages": [ | |
| [ | |
| "approval", | |
| "invoice", | |
| "zone", | |
| "intent" | |
| ] | |
| ], | |
| "skipped": {}, | |
| "chunks": [ | |
| [ | |
| "approval", | |
| "invoice", | |
| "zone", | |
| "intent" | |
| ] | |
| ], | |
| "chunk_prompt": "own", | |
| "sequential": false, | |
| "conditioning": null, | |
| "thought": null, | |
| "samples": { | |
| "n": 1, | |
| "tops": [ | |
| { | |
| "approval": [ | |
| "A", | |
| 0.9953319685179519, | |
| 0.056203365698291416 | |
| ], | |
| "invoice": [ | |
| "A", | |
| 0.9971495456503229, | |
| 0.08997901306103845 | |
| ], | |
| "zone": [ | |
| "B", | |
| 0.805099397188979, | |
| 0.6023052412218035 | |
| ], | |
| "intent": [ | |
| "B", | |
| 0.6244501003347276, | |
| 1.0215549466378853 | |
| ] | |
| } | |
| ], | |
| "policy": { | |
| "mode": "fixed", | |
| "n": 1, | |
| "extended": null, | |
| "first_read_entropy": null | |
| } | |
| }, | |
| "timing": { | |
| "total_ms": 123.79789352416992, | |
| "reads": 1 | |
| }, | |
| "prompt_tokens": 1134, | |
| "questions": { | |
| "approval": { | |
| "pos": 6, | |
| "entropy": [ | |
| 0.056203365698291416 | |
| ], | |
| "label_mass": 0.9722967553063068, | |
| "argmax_is_label": true | |
| }, | |
| "invoice": { | |
| "pos": 10, | |
| "entropy": [ | |
| 0.08997901306103845 | |
| ], | |
| "label_mass": 0.017219422229813045, | |
| "argmax_is_label": false | |
| }, | |
| "zone": { | |
| "pos": 14, | |
| "entropy": [ | |
| 0.6023052412218035 | |
| ], | |
| "label_mass": 0.5892389318965902, | |
| "argmax_is_label": true | |
| }, | |
| "intent": { | |
| "pos": 18, | |
| "entropy": [ | |
| 1.0215549466378853 | |
| ], | |
| "label_mass": 0.44480851457370074, | |
| "argmax_is_label": false | |
| } | |
| }, | |
| "engine": "vllm" | |
| } | |
| }, | |
| "media_sha256": { | |
| "invoice-overdue.png": "8e1231edc320143201b5bbf817164d62c0e04ec6a2d9d5da698de1600ed037c9", | |
| "warehouse-outbound.mp4": "5639e119a97dfe7922cbf70feb286b34c4ff3af41cdd308be324ea57fd28e3ad", | |
| "voicemail-delay.wav": "78898a306a78294f50b3b3610236f2fc2ccc7b9c28acea9875741169954fe049" | |
| } | |
| } | |
| ] | |