Instructions to use HaoranLiu/SFT-4B-LiteOS with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HaoranLiu/SFT-4B-LiteOS with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="HaoranLiu/SFT-4B-LiteOS") 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("HaoranLiu/SFT-4B-LiteOS") model = AutoModelForMultimodalLM.from_pretrained("HaoranLiu/SFT-4B-LiteOS", 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 HaoranLiu/SFT-4B-LiteOS with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HaoranLiu/SFT-4B-LiteOS" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HaoranLiu/SFT-4B-LiteOS", "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/HaoranLiu/SFT-4B-LiteOS
- SGLang
How to use HaoranLiu/SFT-4B-LiteOS 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 "HaoranLiu/SFT-4B-LiteOS" \ --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": "HaoranLiu/SFT-4B-LiteOS", "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 "HaoranLiu/SFT-4B-LiteOS" \ --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": "HaoranLiu/SFT-4B-LiteOS", "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 HaoranLiu/SFT-4B-LiteOS with Docker Model Runner:
docker model run hf.co/HaoranLiu/SFT-4B-LiteOS
SFT-4B-LiteOS
Qwen/Qwen3-VL-4B-Instruct supervised-finetuned on Lite.OSWorld desktop
computer-use trajectories, trained with cua-lite.
The model takes a screenshot plus a task instruction and emits one Action: line
followed by <tool_call> blocks against a computer_use tool
(click / type / key / scroll / wait / terminate). It is trained with a 4-image
sliding history window at 1000x1000 screen resolution.
License is inherited from the base model; see Qwen/Qwen3-VL-4B-Instruct.
Training data
Exported from cua-lite/Lite.OSWorld
(desktop/use/train, the perturb + synth cohorts).
| Source trajectories | 2423 |
| Filter | not exclude_reason and episode_return > 0.5 |
| Kept | 1967 trajectories |
| Teacher | gpt-5.5 |
| Render config | scripts/configs/qwen3_vl/default/lite.osworld.yaml (4-image history, max_steps: 30) |
Training
Megatron backend via slime v0.3.0, 4x H100 80GB.
| Epochs | 3 (1475 rollouts, batch 4) |
| LR | 5e-6 cosine to 1e-6, warmup fraction 0.1 |
| Parallelism | TP=2, PP=1, CP=1, EP=1 -> DP=2 |
| Weight decay | 0.1 (Adam, betas 0.9/0.95) |
| Loss | sft_loss, per-token |
| Checkpoint | iter_1472 (final) |
Evaluation
lite.osworld eval split, greedy (temperature=0), max_steps: 30, concurrency 16.
The split holds 369 tasks; 37 carry an exclude_reason and are filtered out, leaving
332 evaluated tasks (all valid, group_size=1).
| Metric | Value |
|---|---|
Success rate (episode_return >= 1.0) |
104/332 = 31.3% |
| Mean episode return | 0.3231 |
Scores are near-binary: 224 zeros, 104 ones, and only 4 partial (0.536, 0.819, 0.903, 0.998).
| Domain | Success | Rate |
|---|---|---|
| thunderbird | 10/14 | 71.4% |
| vs_code | 11/18 | 61.1% |
| os | 10/19 | 52.6% |
| vlc | 7/15 | 46.7% |
| gimp | 7/16 | 43.8% |
| libreoffice_writer | 9/22 | 40.9% |
| chrome | 16/43 | 37.2% |
| libreoffice_impress | 16/47 | 34.0% |
| libreoffice_calc | 10/46 | 21.7% |
| multi_apps | 8/92 | 8.7% |
multi_apps is the largest bucket (28% of the eval set) and the weakest; excluding
it the remaining domains average 40.0%. No base-model baseline was run, so these
are absolute numbers rather than a measured delta.
Usage
from transformers import AutoProcessor, AutoModelForImageTextToText
model_id = "HaoranLiu/SFT-4B-LiteOS"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(model_id, device_map="auto")
Serving with SGLang:
python -m sglang.launch_server --model-path HaoranLiu/SFT-4B-LiteOS --port 30000
- Downloads last month
- 10