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
Qwen3.5-0.8B-Reverse-Text-RL
A short RL fine-tune of PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-SFT on the reverse-text environment with prime-rl.
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.
Recipe
- Code: prime-rl commit
21814b401. - Config:
examples/basic/reverse-text/rl.tomlat that commit withmodel.name= the SFT checkpoint andorchestrator.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.
Numbers
- 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.
reverse-texteval 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.
Caveat
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.
- Downloads last month
- 33
Model tree for PrimeIntellect/Qwen3.5-0.8B-Reverse-Text-RL
Base model
Qwen/Qwen3.5-0.8B-Base