Calendar Event Extractor - SmolLM-360M

This model is a fine-tuned version of HuggingFaceTB/SmolLM-360M specifically trained for calendar event entity extraction.

Model Description

The model extracts structured calendar information from natural language text, outputting JSON with the following schema:

  • action: Type of event (meeting, call, etc.)
  • date: Date in DD/MM/YYYY format
  • time: Time in 12-hour AM/PM format
  • attendees: List of participants
  • location: Event location
  • duration: Event duration
  • recurrence: Recurrence pattern
  • notes: Additional notes

Training Details

  • Base Model: SmolLM-360M (360M parameters)
  • Fine-tuning Method: LoRA (Low-Rank Adaptation)
  • Dataset: Calendar event extraction dataset (~2500 examples after augmentation)
  • Training Approach: Instruction-following with prompt masking

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel

# Load base model and tokenizer
base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM-360M")
tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/SmolLM-360M")

# Load LoRA adapters
model = PeftModel.from_pretrained(base_model, "waliaMuskaan011/calendar-event-extractor-smollm")

# Example usage
prompt = 'Extract calendar information from: "Meeting with John tomorrow at 2pm for 1 hour"\nCalendar JSON:'

inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=150, temperature=0.0)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)

Example

Input: "Quick meeting at the coworking space on 10th May 2025 starting at 11:00 am for 45 minutes"

Output:

{"action": "meeting", "date": "10/05/2025", "time": "11:00 AM", "attendees": null, "location": "coworking space", "duration": "45 minutes", "recurrence": null, "notes": null}

Performance

  • JSON Validity Rate: ~95%
  • Per-field F1 Score: ~87%
  • Exact Match Accuracy: ~73%

Training Pipeline

This model was trained using a comprehensive pipeline including:

  • Data augmentation with entity replacement and template-based generation
  • Faker-generated synthetic examples for diversity
  • LoRA fine-tuning with automatic CPU/GPU detection
  • Comprehensive evaluation metrics

For more details, see the training repository.

Downloads last month
2
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for waliaMuskaan011/calendar-event-extractor-smollm

Adapter
(3)
this model

Space using waliaMuskaan011/calendar-event-extractor-smollm 1