calendar-agent (AWQ W4A16)

A fine-tuned Phi-4-mini-instruct model trained to act as a calendar scheduling assistant. This is the AWQ W4A16 quantized version (~2.7GB), optimized for efficient inference.

It parses natural language requests and returns structured JSON tool calls.

What it does

Given a natural language request and context (owner vs visitor, current datetime, timezone), the model returns one of:

  • tool_call — fires create_event, modify_event, delete_event, or check_availability
  • clarification — asks for missing required fields (one field at a time)
  • unsupported — rejects requests outside calendar scope

Output is always raw JSON. No markdown, no explanation.

Quick start

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = "humanailabs/calendar-agent"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")

messages = [
    {"role": "system", "content": "<system prompt here>"},
    {"role": "user", "content": "[Context]\nis_owner: true\ncurrent_datetime: 2026-06-25T09:00:00-07:00\nuser_timezone: America/Los_Angeles\n\n[User Request]\nSchedule a team sync tomorrow at 3pm for 30 minutes."}
]

inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to(model.device)
output = model.generate(inputs, max_new_tokens=128)
print(tokenizer.decode(output[0][inputs.shape[1]:], skip_special_tokens=True))
# {"type": "tool_call", "action": "create_event", "parameters": {"title": "Team sync", "start_time": "2026-06-26T15:00:00-07:00", "duration_minutes": 30}}

Quantization details

  • Scheme: W4A16 (4-bit weights, 16-bit activations)
  • Group size: 128
  • Tool: llmcompressor
  • Calibration: 512 examples
  • Targets: all Linear layers except lm_head

Training details

  • Base model: Phi-4-mini-instruct
  • Method: QLoRA (r=16, alpha=32) → merged to float16 → AWQ quantized
  • Training data: ~3700 calendar agent examples (owner/visitor scenarios, single-turn and multi-turn)
  • Framework: Unsloth + TRL SFTTrainer
  • Loss masking: Assistant responses only

Framework versions

  • TRL: 0.24.0
  • Transformers: 5.10.1
  • PyTorch: 2.11.0
  • Unsloth: latest
Downloads last month
-
Safetensors
Model size
4B params
Tensor type
I64
·
I32
·
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for humanailabs/calendar-agent

Quantized
(4)
this model