Image-Text-to-Text
Transformers
Safetensors
English
mllama
text-generation-inference
unsloth
conversational
Instructions to use Portx/do_extractor_20251403_multi_task_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Portx/do_extractor_20251403_multi_task_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Portx/do_extractor_20251403_multi_task_model") 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("Portx/do_extractor_20251403_multi_task_model") model = AutoModelForMultimodalLM.from_pretrained("Portx/do_extractor_20251403_multi_task_model", 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 Portx/do_extractor_20251403_multi_task_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Portx/do_extractor_20251403_multi_task_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Portx/do_extractor_20251403_multi_task_model", "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/Portx/do_extractor_20251403_multi_task_model
- SGLang
How to use Portx/do_extractor_20251403_multi_task_model 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 "Portx/do_extractor_20251403_multi_task_model" \ --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": "Portx/do_extractor_20251403_multi_task_model", "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 "Portx/do_extractor_20251403_multi_task_model" \ --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": "Portx/do_extractor_20251403_multi_task_model", "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" } } ] } ] }' - Unsloth Desktop
- Docker Model Runner
How to use Portx/do_extractor_20251403_multi_task_model with Docker Model Runner:
docker model run hf.co/Portx/do_extractor_20251403_multi_task_model
Download config.json from Portx/do_extractor_20251403_multi_task_model: direct link, hf CLI and curl.
- Browser
- Download file 935 Bytes
-
https://huggingface.co/Portx/do_extractor_20251403_multi_task_model/resolve/main/config.json
- Command line
-
hf download hf://Portx/do_extractor_20251403_multi_task_model/config.json
-
curl -L -o config.json https://huggingface.co/Portx/do_extractor_20251403_multi_task_model/resolve/main/config.json
935 Bytes
| { | |
| "_name_or_path": "unsloth/llama-3.2-11b-vision-instruct-unsloth-bnb-4bit", | |
| "architectures": [ | |
| "MllamaForConditionalGeneration" | |
| ], | |
| "image_token_index": 128256, | |
| "model_type": "mllama", | |
| "pad_token_id": 128004, | |
| "text_config": { | |
| "eos_token_id": [ | |
| 128001, | |
| 128008, | |
| 128009 | |
| ], | |
| "model_type": "mllama_text_model", | |
| "rope_scaling": { | |
| "factor": 8.0, | |
| "high_freq_factor": 4.0, | |
| "low_freq_factor": 1.0, | |
| "original_max_position_embeddings": 8192, | |
| "rope_type": "llama3" | |
| }, | |
| "torch_dtype": "bfloat16" | |
| }, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.48.3", | |
| "unsloth_fixed": true, | |
| "unsloth_version": "2025.3.14", | |
| "vision_config": { | |
| "image_size": 560, | |
| "model_type": "mllama_vision_model", | |
| "torch_dtype": "bfloat16" | |
| } | |
| } |