โšก ZOZ-Function-Master-3B

Autonomous Function Calling & Agentic Tool Execution Engine for Edge Hardware

Hugging Face License Base Model 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.

Official Multi-Model Benchmark Showdown


๐Ÿ“Š 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
Safetensors
Model size
3B params
Tensor type
F16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for z51722369/ZOZ-Function-Master-3B

Base model

Qwen/Qwen2.5-3B
Finetuned
(1574)
this model
Quantizations
2 models