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
Model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model:
|
| 4 |
+
- Qwen/Qwen3.5-0.8B
|
| 5 |
+
datasets:
|
| 6 |
+
- PrimeIntellect/Reverse-Text-SFT
|
| 7 |
+
library_name: transformers
|
| 8 |
+
tags:
|
| 9 |
+
- prime-rl
|
| 10 |
+
- ci
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Qwen3.5-0.8B-Reverse-Text-SFT
|
| 14 |
+
|
| 15 |
+
A short SFT fine-tune of [`Qwen/Qwen3.5-0.8B`](https://huggingface.co/Qwen/Qwen3.5-0.8B) on [`PrimeIntellect/Reverse-Text-SFT`](https://huggingface.co/datasets/PrimeIntellect/Reverse-Text-SFT).
|
| 16 |
+
It is a small, deliberately under-trained starting point for the `reverse-text` RL example and the CI integration tests in [prime-rl](https://github.com/PrimeIntellect-ai/prime-rl). It replaces `PrimeIntellect/Qwen3-0.6B-Reverse-Text-SFT`. It is not meant for general use.
|
| 17 |
+
|
| 18 |
+
## Recipe
|
| 19 |
+
- Code: prime-rl commit [`21814b401`](https://github.com/PrimeIntellect-ai/prime-rl/commit/21814b401e29240e8ca4f161dafa0bba6d1425ba) (branch `ci/qwen3_5-ci`, contains the Qwen3.5 tied `lm_head` fix #3863 and the CP fix #3864).
|
| 20 |
+
- Config: [`examples/basic/reverse-text/sft.toml`](https://github.com/PrimeIntellect-ai/prime-rl/blob/21814b401e29240e8ca4f161dafa0bba6d1425ba/examples/basic/reverse-text/sft.toml): 10 steps, batch size 32, seq_len 4096 (packed), AdamW lr 2e-5 constant, 1 H200.
|
| 21 |
+
- Chat template: unchanged Qwen3.5 template, thinking off (the 0.8B default). Completions are rendered with the empty `<think>\n\n</think>\n\n` prefix, the same as RL generation.
|
| 22 |
+
- Weights include the (frozen, unchanged) vision tower, so the checkpoint loads as `Qwen3_5ForConditionalGeneration` like the base model.
|
| 23 |
+
|
| 24 |
+
## Numbers
|
| 25 |
+
- 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.
|
| 26 |
+
- `reverse-text` eval reward (LCS ratio, 256 prompts, temperature 1, 128 max tokens): **0.31** (base model: 0.03 on 32 prompts).
|