Qwen3.5-9B-Guard
reliable function calling for agents
2 min read
This model is a specialized fine-tune of the base large language model Qwen/Qwen3.5-9B, featuring 9.6B parameters and trained for precise and safe function calling (tool calling). It can analyze a list of available tools and return a correct JSON list of calls, as well as correctly refrain from calling (returning an empty list []) if no function fits the user request. The model also retains basic conversation and greeting skills. This new release is useful for developers of AI agents, chatbots, and automation systems where avoiding hallucinations when working with external APIs is critical.
Key features
- Precise tool calling: outputs correct function calls in JSON format with arguments.
- Protection against false positives: trained to return empty lists if no suitable function is available.
- Conversational skills: supports regular dialogue and greetings alongside function calling.
- Mixed dataset: trained on 10,755 examples, including positive cases and negative examples to reduce errors.
What you can do
- AI agent integration: connect the model as the core for processing user commands and calling external services.
- Chatbot development: set up a bot that can safely switch between answering general questions and performing actions.
- Running via vLLM: deploy a local OpenAI-compatible server for fast query processing in production.
Example
import json
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "Rumiii/Qwen3.5-9B-Guard"
tok = AutoTokenizer.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(MODEL_ID, dtype=torch.bfloat16, device_map="auto")
Read more
DetailsBase model: Qwen/Qwen3.5-9B (9.65B parameters)
Library: transformers / vLLM
Datasets: MadeAgents/xlam-irrelevance-7.5k, Salesforce/xlam-function-calling-60k
Features: training was conducted with thinking disabled (enable_thinking=False)
License: Apache-2.0










Comments