Image-Text-to-Text
Transformers
Safetensors
Russian
English
qwen3_5_text
text-generation
qwen3.5
qwen
rrchat
viper
reasoning
math
code
agent
tool-use
function-calling
russian
unsloth
conversational
Instructions to use rrchat/Viper-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rrchat/Viper-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="rrchat/Viper-9B") 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 AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rrchat/Viper-9B") model = AutoModelForCausalLM.from_pretrained("rrchat/Viper-9B", 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 = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rrchat/Viper-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rrchat/Viper-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rrchat/Viper-9B", "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/rrchat/Viper-9B
- SGLang
How to use rrchat/Viper-9B 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 "rrchat/Viper-9B" \ --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": "rrchat/Viper-9B", "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 "rrchat/Viper-9B" \ --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": "rrchat/Viper-9B", "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" } } ] } ] }' - Unsloth Desktop
- Docker Model Runner
How to use rrchat/Viper-9B with Docker Model Runner:
docker model run hf.co/rrchat/Viper-9B
|
Download README.md from rrchat/Viper-9B: direct link, hf CLI and curl.
- Browser
- Download file 5.7 kB
-
https://huggingface.co/rrchat/Viper-9B/resolve/main/README.md
- Command line
-
hf download hf://rrchat/Viper-9B/README.md
-
curl -L -o README.md https://huggingface.co/rrchat/Viper-9B/resolve/main/README.md
5.7 kB
| base_model: Qwen/Qwen3.5-9B | |
| library_name: transformers | |
| pipeline_tag: image-text-to-text | |
| tags: | |
| - qwen3.5 | |
| - qwen | |
| - rrchat | |
| - viper | |
| - reasoning | |
| - math | |
| - code | |
| - agent | |
| - tool-use | |
| - function-calling | |
| - russian | |
| - unsloth | |
| license: other | |
| language: | |
| - ru | |
| - en | |
| datasets: | |
| - open-r1/OpenR1-Math-220k | |
| - nvidia/Nemotron-SFT-Agentic-v2 | |
| - Vikhrmodels/GrandMaster-PRO-MAX | |
| - nvidia/OpenMathInstruct-2 | |
| - nvidia/OpenCodeInstruct | |
| - m-a-p/CodeFeedback-Filtered-Instruction | |
| <div align="center"> | |
| <img src="viperbanner.png" alt="Viper-9B Banner" width="100%" style="border-radius: 10px; margin-bottom: 20px;"> | |
| </div> | |
| # Viper-9B | |
| **rrchat/Viper-9B** is the flagship agentic, coding, and reasoning language model of the **RR-Gen1** lineup developed by **rrchat** ([huggingface.co/rrchat](https://huggingface.co/rrchat)), fine-tuned on top of **Qwen3.5-9B**. | |
| Viper-9B is engineered for autonomous tool orchestration, structured function calling, advanced code synthesis, competitive programming, and robust bilingual Russian–English instruction following. | |
| Looking for quantized GGUF weights for llama.cpp / LM Studio / Ollama? | |
| 👉 **[`rrchat/Viper-9B-GGUF`](https://huggingface.co/rrchat/Viper-9B-GGUF)** | |
| --- | |
| ## 🌟 Key Highlights & Capabilities | |
| * **Flagship RR-Gen1 Model:** The leading 9B parameter model of the RR-Gen1 family, optimized for high-complexity agentic workflows, competitive programming, and bilingual problem solving. | |
| * **Autonomous Tool Use & Function Calling:** Native support for structured XML function execution (`<tool_call>...<tool_response>`) preserving near-perfect formatting and AST execution accuracy (57.0% BFCL AST match, 99.0% valid call rate). | |
| * **Enhanced Competitive Coding:** Exceptional leap in algorithmic problem solving on **LiveCodeBench v6** (**33.0%** vs Base 19.0%, with **+18.2%** on Easy and **+14.7%** on Medium problems). | |
| * **Python Function Synthesis:** Achieves **84.7%** on **MBPP+** (+1.4% gain over base model). | |
| * **Bilingual Russian–English Math:** Delivers **44.4%** on Russian mathematical reasoning (**MGSM ru**), outperforming the base foundation model (+2.4%). | |
| * **General Knowledge Retention:** Retains broad academic, STEM, and humanities knowledge with **74.0%** accuracy on **MMLU-Redux**. | |
| * **Calibrated Honesty & R-Tuning:** Trained with R-Tuning to reduce confident hallucinations on unknown topics while maintaining high factuality. | |
| --- | |
| ## 🧪 Benchmark Highlights (vs. Base Model) | |
| All benchmarks were evaluated locally on an identical test harness under strictly identical conditions: | |
| | Benchmark | Mode / Harness | Base (`Qwen3.5-9B`) | Viper-9B | Delta vs. Base | Domain / Capability | | |
| | :--- | :---: | :---: | :---: | :---: | :--- | | |
| | **LiveCodeBench v6** | **Deterministic Pass@1** | 19.0% | **33.0%** | **+14.0%** | Competitive programming & algorithmic tasks | | |
| | ↳ *LCB v6 Easy* | Deterministic Pass@1 | 42.4% | **60.6%** | **+18.2%** | Standard algorithmic challenges | | |
| | ↳ *LCB v6 Medium* | Deterministic Pass@1 | 14.7% | **29.4%** | **+14.7%** | Complex dynamic programming & data structures | | |
| | ↳ *LCB v6 Hard* | Deterministic Pass@1 | 0.0% | **9.1%** | **+9.1%** | Advanced competitive problem solving | | |
| | **MBPP+ (seed 42)** | **EvalPlus Pass@1** | 83.3% | **84.7%** | **+1.4%** | Python function synthesis & unit tests | | |
| | **MGSM ru (Math)** | **Numeric Match** | 42.0% | **44.4%** | **+2.4%** | Russian multi-step mathematical reasoning | | |
| | **MMLU-Redux** | **Choice Accuracy** | 73.7% | **74.0%** | **+0.3%** | Broad multidisciplinary STEM & humanities | | |
| | **BFCL v4 (Tool Use)** | **AST Function Match** | 58.0% | **57.0%** | **Parity (~57%)** | Berkeley Function Calling / Agentic Tool Calls | | |
| | **IFEval (Instruction)** | **Strict Compliance** | 56.6% | **54.7%** | **Parity (~55%)** | Complex constraint & prompt compliance | | |
| > [!NOTE] | |
| > **Disclaimer on Evaluations:** | |
| > All benchmarks presented above were conducted **manually and independently** on local test suites under controlled, strictly identical conditions (greedy non-thinking mode, max_tokens 1024, llama-server with jinja chat formatting). The results reflect real-world local execution performance and may differ from theoretical, thinking-mode, or officially reported figures published on the official base model card. | |
| --- | |
| ## 💻 Quickstart (Transformers / Python) | |
| ```python | |
| import torch | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model_id = "rrchat/Viper-9B" | |
| tokenizer = AutoTokenizer.from_pretrained(model_id) | |
| model = AutoModelForCausalLM.from_pretrained( | |
| model_id, | |
| torch_dtype=torch.bfloat16, | |
| device_map="auto" | |
| ) | |
| messages = [ | |
| {"role": "user", "content": "Привет! Расскажи о себе и помоги решить задачу."} | |
| ] | |
| prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True) | |
| inputs = tokenizer(prompt, return_tensors="pt").to(model.device) | |
| with torch.no_grad(): | |
| outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7, top_p=0.8) | |
| print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)) | |
| ``` | |
| --- | |
| ## 🛠️ Tool Calling Format | |
| Viper-9B utilizes structured ChatML syntax for function calling: | |
| ```xml | |
| <|im_start|>system | |
| # Tools | |
| You have access to the following functions: | |
| <tools> | |
| {"name": "get_weather", "description": "Get current weather", "parameters": {"type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"]}} | |
| </tools> | |
| <|im_end|> | |
| <|im_start|>user | |
| Какая погода в Москве?<|im_end|> | |
| <|im_start|>assistant | |
| <tool_call> | |
| <function=get_weather> | |
| <parameter=location> | |
| Москва | |
| </parameter> | |
| </function> | |
| </tool_call><|im_end|> | |
| ``` |