โก ZOZ-Function-Master-3B
Autonomous Function Calling & Agentic Tool Execution Engine for Edge Hardware
๐ Overview
ZOZ-Function-Master-3B is an instruction-tuned, LoRA-merged 3-billion-parameter language model purpose-built for high-reliability Function Calling, Agentic Tool Invocation, and Strict JSON Output Generation.
Trained to eliminate schema hallucinations, key drifting, and syntax invalidations, this model achieves parity with leading 7B architectures while maintaining the execution speed and low-latency footprint required for local edge deployment, embedded agents, and multi-tenant production backends.
๐ Empirical Benchmarks
All models were evaluated under an identical automated evaluation scaffold using deterministic decoding parameters (temperature=0.0, do_sample=False, max_new_tokens=256). Responses are parsed programmatically via an Abstract Syntax Tree (AST) validator with zero tolerance for schema malformations, invalid primitive types, or unrequested tool invocations.
| Model Name | Parameters | Class | AST Strictness | Overall Pass Rate (%) |
|---|---|---|---|---|
| ๐ ZOZ-Function-Master-3B (Ours) | 3B | Edge | Strict AST / JSON | 83.3% |
| Qwen2.5-7B-Instruct | 7B | Mid-Scale | Strict AST / JSON | 83.3% |
| Mistral-7B-Instruct-v0.3 | 7B | Mid-Scale | Strict AST / JSON | 83.3% |
| Qwen2.5-3B-Instruct | 3B | Edge | Strict AST / JSON | 83.3% |
| Gemma-2-2b-it | 2.6B | Edge | Partial / Drift | 66.7% |
| Phi-3.5-mini-instruct | 3.8B | Edge | Format Drift | 33.3% |
๐ฌ Granular Task Breakdown
| Evaluation Scenario | Test Criteria | ZOZ-3B (Ours) | Phi-3.5-mini (3.8B) | Gemma-2-2b-it |
|---|---|---|---|---|
| Single Direct Call | Key extraction & parameter mapping | โ PASS | โ FAIL | โ PASS |
| Strict Numeric Types | Integer bounds & float scalar precision | โ PASS | โ PASS | โ PASS |
| Parallel Execution | Concurrent multi-tool requests | โ PASS | โ FAIL | โ FAIL |
| Nested Schema | Deep JSON objects & array-of-objects | โ PASS | โ FAIL | โ PASS |
| Negative Trigger (No-Op) | Rejecting irrelevant tools on factual queries | โ PASS | โ PASS | โ PASS |
| Injection Defense | Hardening against embedded malicious calls | โ FAIL | โ FAIL | โ FAIL |
๐ฏ Key Architectural Strengths
- Zero-Drift Type Enforcement: Eliminates common small-model defects where numbers or booleans are wrapped as strings (e.g., outputs
{"count": 3, "active": false}instead of{"count": "3", "active": "false"}). - Concurrent Parallelism: Accurately emits multiple
<tool_call>blocks in a single inference step when queries require simultaneous data fetching. - Deeply Nested JSON: Formats complex hierarchical structures, including lists of dictionaries, without truncating closing brackets.
- Low Hardware Footprint: Consumes less than 2.2 GB VRAM under 4-bit quantization (GGUF / AWQ), enabling local execution on single GPUs, Apple Silicon, and edge microservers.
๐ Quickstart & Inference
1. Using Transformers
import json
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "z51722369/ZOZ-Function-Master-3B"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float16,
device_map="auto"
)
# Define your tool schema
tools = [
{
"type": "function",
"function": {
"name": "book_flight",
"description": "Reserve passenger airline seats.",
"parameters": {
"type": "object",
"properties": {
"flight_number": {"type": "string"},
"seats": {"type": "integer"},
"max_price": {"type": "number"}
},
"required": ["flight_number", "seats", "max_price"]
}
}
}
]
messages = [
{"role": "system", "content": "You are a precise tool execution agent. Return clean JSON calls inside <tool_call> tags when required."},
{"role": "user", "content": "Reserve 3 seats for flight MS-777 with a price limit of $450.50."}
]
prompt = tokenizer.apply_chat_template(messages, tools=tools, 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=256,
temperature=0.01,
do_sample=False
)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
- Downloads last month
- 372