Instructions to use PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-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("PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT") model = AutoModelForMultimodalLM.from_pretrained("PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-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 PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-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": "PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-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/PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT
- SGLang
How to use PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-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 "PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-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": "PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-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 "PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-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": "PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-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 PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT with Docker Model Runner:
docker model run hf.co/PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT
|
Download README.md from PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT: direct link, hf CLI and curl.
- Browser
- Download file 1.65 kB
-
https://huggingface.co/PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT/resolve/main/README.md
- Command line
-
hf download hf://PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT/README.md
-
curl -L -o README.md https://huggingface.co/PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT/resolve/main/README.md
1.65 kB
metadata
license: apache-2.0
base_model:
- Qwen/Qwen3.5-0.8B
datasets:
- PrimeIntellect/Reverse-Text-SFT
library_name: transformers
tags:
- prime-rl
- ci
Qwen3.5-0.8B-Reverse-Text-SFT
A short SFT fine-tune of Qwen/Qwen3.5-0.8B on PrimeIntellect/Reverse-Text-SFT.
It is a small, deliberately under-trained starting point for reverse-text RL, made for the planned move of the prime-rl CI RL tests from PrimeIntellect/Qwen3-0.6B-Reverse-Text-SFT to Qwen3.5. It is not meant for general use.
Recipe
- Code: prime-rl commit
21814b401(branchci/qwen3_5-ci, contains the Qwen3.5 tiedlm_headfix #3863 and the CP fix #3864). - Config (
uv run sft @ sft.toml), 1 H200:
max_steps = 10
[model]
name = "Qwen/Qwen3.5-0.8B"
[data]
name = "PrimeIntellect/Reverse-Text-SFT"
seq_len = 4096
batch_size = 32
[optim]
lr = 2e-5
- Chat template: unchanged Qwen3.5 template, thinking off (the 0.8B default). Completions are rendered with the empty
<think>\n\n</think>\n\nprefix, the same as RL generation. - Weights include the (frozen, unchanged) vision tower, so the checkpoint loads as
Qwen3_5ForConditionalGenerationlike the base model.
Numbers
- SFT loss, steps 1-10: 4.98, 6.16, 5.59, 4.96, 4.53, 4.22, 3.96, 3.62, 3.27, 2.92.
reverse-texteval reward (LCS ratio, 256 prompts, temperature 1, 128 max tokens): 0.31 (base model: 0.03 on 32 prompts).