Instructions to use hansQAQ/ModalSearcher-8B-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hansQAQ/ModalSearcher-8B-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hansQAQ/ModalSearcher-8B-SFT") 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("hansQAQ/ModalSearcher-8B-SFT") model = AutoModelForMultimodalLM.from_pretrained("hansQAQ/ModalSearcher-8B-SFT", 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 hansQAQ/ModalSearcher-8B-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hansQAQ/ModalSearcher-8B-SFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hansQAQ/ModalSearcher-8B-SFT", "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/hansQAQ/ModalSearcher-8B-SFT
- SGLang
How to use hansQAQ/ModalSearcher-8B-SFT 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 "hansQAQ/ModalSearcher-8B-SFT" \ --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": "hansQAQ/ModalSearcher-8B-SFT", "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 "hansQAQ/ModalSearcher-8B-SFT" \ --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": "hansQAQ/ModalSearcher-8B-SFT", "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 hansQAQ/ModalSearcher-8B-SFT with Docker Model Runner:
docker model run hf.co/hansQAQ/ModalSearcher-8B-SFT
ModalSearcher-8B-SFT
ModalSearcher: Weaving Visual Evidence into Autonomous Cross-Modal Deep Search
Code & Documentation | SFT + RL Model | Training Data | Benchmark | arXiv (placeholder)
ModalSearcher-8B-SFT is the supervised fine-tuned checkpoint of ModalSearcher, based on Qwen3-VL-8B-Instruct. It is trained for tool-assisted multimodal deep search: deciding what to search, which modality to use, and when to switch modalities while gathering visual and textual evidence for multi-hop questions.
This repository contains the SFT-only model weights, tokenizer, and processors. Use this checkpoint for inference or as the initialization for further reinforcement learning. For the SFT + RL version, see hansQAQ/ModalSearcher-8B.
Model details
| Field | Value |
|---|---|
| Base model | Qwen3-VL-8B-Instruct |
| Post-training | Supervised fine-tuning (SFT) |
| Architecture | Qwen3VLForConditionalGeneration |
| Weight format | Safetensors, BF16 |
| Intended use | Multimodal search, multi-hop question answering, and RL initialization |
Tools
The ModalSearcher inference runner executes the model's tool calls and feeds the resulting evidence back into the conversation.
| Tool | Purpose |
|---|---|
t2t_search |
Retrieve textual evidence and candidate webpages |
t2i_search |
Search for images from a text query |
i2i_search |
Reverse-image search, including cropped image regions |
read_url |
Read webpages and PDFs or inspect retrieved images |
For complete search trajectories, run these weights with the ModalSearcher inference runner, configured tool services, and the auxiliary model used for webpage evidence extraction.
Quick start
Clone the project:
git clone https://github.com/Hans-M-Yin/ModalSearcher.git
cd ModalSearcher
Complete the project's Setup, including the inference environment and tool services, then download the checkpoint:
hf download hansQAQ/ModalSearcher-8B-SFT --local-dir ./models/ModalSearcher-8B-SFT
Serve the SFT model with SGLang. Select the GPUs for this service with CUDA_VISIBLE_DEVICES:
nohup python -m sglang.launch_server \
--model-path ./models/ModalSearcher-8B-SFT \
--served-model-name ModalSearcher-8B-SFT \
--tp 2 --port 6657 --context-length 50000 \
> /tmp/sglang.log 2>&1 &
Set the agent endpoint in the project's .env:
export AGENT_BASE_URL="http://127.0.0.1:6657/v1"
export AGENT_MODEL_NAME="ModalSearcher-8B-SFT"
export AGENT_API_KEY="EMPTY"
Run inference and LLM-as-judge evaluation using the commands in the project's Evaluation section. The inference runner saves tool-use trajectories and final answers; the judge produces per-sample judgments and aggregate accuracy reports.
Training and evaluation resources
- ModalSearch-21K-Full: training data.
- ModalSearch-Bench: evaluation benchmark.
- SFT and RL training code: training frameworks and launch commands.
Limitations
Answers depend on the retrieved evidence and the availability of external tool services. The model can return incorrect or unsupported answers; verify factual claims against the cited sources.
The arXiv link above is a placeholder and will be replaced when the paper is available.
- Downloads last month
- -
Model tree for hansQAQ/ModalSearcher-8B-SFT
Base model
Qwen/Qwen3-VL-8B-Instruct