--- 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 ---
Viper-9B Banner
# 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 (`...`) 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: {"name": "get_weather", "description": "Get current weather", "parameters": {"type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"]}} <|im_end|> <|im_start|>user Какая погода в Москве?<|im_end|> <|im_start|>assistant Москва <|im_end|> ```