Instructions to use ModalityDance/I2S-Qwen3-8B-Confidence with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ModalityDance/I2S-Qwen3-8B-Confidence with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ModalityDance/I2S-Qwen3-8B-Confidence") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ModalityDance/I2S-Qwen3-8B-Confidence") model = AutoModelForCausalLM.from_pretrained("ModalityDance/I2S-Qwen3-8B-Confidence", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ModalityDance/I2S-Qwen3-8B-Confidence with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ModalityDance/I2S-Qwen3-8B-Confidence" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ModalityDance/I2S-Qwen3-8B-Confidence", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ModalityDance/I2S-Qwen3-8B-Confidence
- SGLang
How to use ModalityDance/I2S-Qwen3-8B-Confidence 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 "ModalityDance/I2S-Qwen3-8B-Confidence" \ --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": "ModalityDance/I2S-Qwen3-8B-Confidence", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ModalityDance/I2S-Qwen3-8B-Confidence" \ --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": "ModalityDance/I2S-Qwen3-8B-Confidence", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ModalityDance/I2S-Qwen3-8B-Confidence with Docker Model Runner:
docker model run hf.co/ModalityDance/I2S-Qwen3-8B-Confidence
I2S: Qwen3-8B Confidence
Overview
Intervention-to-Skill (I2S) turns large-model assistance into procedural skills that a small model can reuse across tasks. This repository provides the pretrained confidence model based on Qwen3-8B.
The model assesses a proposed environment action using the task, visible state, admissible actions, interaction history, and procedural guidance. Confidence is the normalized likelihood of CONFIDENT among the complete UNCERTAIN and CONFIDENT label sequences. This score guides when I2S requests large-model assistance.
I2S uses this model for confidence scoring while a separate actor generates actions. The model weights remain fixed during task streams.
Links
๐ Paper ยท ๐ค Hugging Face Paper ยท ๐ Project Page ยท ๐ป GitHub ยท ๐งช Usage Example ยท ๐ Evaluation ยท ModalityDance
Model Details
| Setting | Value |
|---|---|
| Base model | Qwen/Qwen3-8B |
| Checkpoint format | Transformers, sharded Safetensors |
| Precision | Float32 |
| Labels | UNCERTAIN, CONFIDENT |
The repository contains the complete model weights, tokenizer, and configuration. Load the checkpoint directly with Transformers or vLLM.
Usage
Install the I2S package and model dependencies in a Python environment with CUDA:
git clone https://github.com/ModalityDance/I2S.git
cd I2S
python -m pip install -e '.[training]'
Load the pretrained model and score a proposed action:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from i2s.confidence_scoring import encode_pair, label_log_likelihoods
model_id = "ModalityDance/I2S-Qwen3-8B-Confidence"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype=torch.float32, device_map="auto"
).eval()
messages = [{"role": "user", "content": (
"Task: Move the item to the designated location.\n"
"Observation: The item is held and the destination is accessible.\n"
"Admissible actions: Place the item at the destination.\n"
"Proposed action: Place the item at the destination."
)}]
prompt_ids, label_ids = encode_pair(tokenizer, messages)
with torch.inference_mode():
scores = label_log_likelihoods(model, tokenizer, prompt_ids, label_ids)
confidence = scores.softmax(0)[1].item()
print("Confidence:", confidence)
For task execution, follow the I2S Quick Start. Start the pretrained confidence model in the serving environment:
conda activate i2s-serving
python scripts/serve_models.py confidence
Training
The model is calibrated offline on interaction examples with labels derived from local execution feedback. Training and validation use disjoint task identities. The objective is class-weighted cross-entropy over the complete confidence-label likelihoods.
Training commands are in Confidence Calibration.
Citation
@misc{shi2026i2s,
title = {From Intervention to Skill: Evolving Small--Large Language Model Collaboration},
author = {Zhenning Shi and Ran Wei and Ning Song and Yongqi Li},
year = {2026},
url = {https://github.com/ModalityDance/I2S}
}
License
This model is released under the Apache 2.0 License, following Qwen3-8B. The I2S code is released under the MIT License.
- Downloads last month
- 36