Instructions to use PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-RL 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-RL 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-RL") 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-RL") model = AutoModelForMultimodalLM.from_pretrained("PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-RL", 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-RL 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-RL" # 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-RL", "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-RL
- SGLang
How to use PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-RL 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-RL" \ --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-RL", "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-RL" \ --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-RL", "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-RL with Docker Model Runner:
docker model run hf.co/PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-RL
Model card: recipe inline, status, caveat
Browse files
README.md
CHANGED
|
@@ -11,12 +11,15 @@ tags:
|
|
| 11 |
# Qwen3.5-0.8B-Reverse-Text-RL
|
| 12 |
|
| 13 |
A short RL fine-tune of [`PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT`](https://huggingface.co/PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT) on the `reverse-text` environment with [prime-rl](https://github.com/PrimeIntellect-ai/prime-rl).
|
| 14 |
-
It is the frozen teacher / sampler
|
| 15 |
|
| 16 |
## Recipe
|
| 17 |
- Code: prime-rl commit [`21814b401`](https://github.com/PrimeIntellect-ai/prime-rl/commit/21814b401e29240e8ca4f161dafa0bba6d1425ba).
|
| 18 |
-
- Config:
|
| 19 |
|
| 20 |
## Numbers
|
| 21 |
- Train reward per step: 0.30, 0.30, 0.30, 0.32, 0.36, 0.33, 0.35, 0.34, 0.35, 0.35, 0.37, 0.40, 0.37, 0.36, 0.39, 0.38, 0.41, 0.43, 0.41, 0.42.
|
| 22 |
- `reverse-text` eval reward (256 prompts, temperature 1): step 0: 0.3086, step 5: 0.3543, step 10: 0.3967, step 15: 0.4027, step 20: 0.4077.
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
# Qwen3.5-0.8B-Reverse-Text-RL
|
| 12 |
|
| 13 |
A short RL fine-tune of [`PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT`](https://huggingface.co/PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT) on the `reverse-text` environment with [prime-rl](https://github.com/PrimeIntellect-ai/prime-rl).
|
| 14 |
+
It is meant as the frozen teacher / sampler for the prime-rl CI tests of on-policy distillation and RL-SFT once they move to Qwen3.5 (today they use `PrimeIntellect/Qwen3-0.6B-Reverse-Text-RL`). It is not meant for general use.
|
| 15 |
|
| 16 |
## Recipe
|
| 17 |
- Code: prime-rl commit [`21814b401`](https://github.com/PrimeIntellect-ai/prime-rl/commit/21814b401e29240e8ca4f161dafa0bba6d1425ba).
|
| 18 |
+
- Config: `examples/basic/reverse-text/rl.toml` at that commit with `model.name` = the SFT checkpoint and `orchestrator.renderer.name = "qwen3.5"`: 20 steps, 8 prompts x 16 rollouts (batch 128), 128 max tokens, lr 3e-6, 1 inference + 1 trainer H200, NCCL weight broadcast.
|
| 19 |
|
| 20 |
## Numbers
|
| 21 |
- Train reward per step: 0.30, 0.30, 0.30, 0.32, 0.36, 0.33, 0.35, 0.34, 0.35, 0.35, 0.37, 0.40, 0.37, 0.36, 0.39, 0.38, 0.41, 0.43, 0.41, 0.42.
|
| 22 |
- `reverse-text` eval reward (256 prompts, temperature 1): step 0: 0.3086, step 5: 0.3543, step 10: 0.3967, step 15: 0.4027, step 20: 0.4077.
|
| 23 |
+
|
| 24 |
+
## Caveat
|
| 25 |
+
On Qwen3.5-0.8B, prime-rl RL currently shows a much higher trainer/inference mismatch KL (0.01-0.1 per step) than on Qwen3-0.6B (about 0.002) with the same recipe, and learning stalls after about 20 steps. This is under investigation.
|