Downloads · 30 days
20
22% of all-time downloads
Shresth12345/entity-extraction-smollm
entity-extraction-smollm is a text generation model from Shresth12345. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of HuggingFaceTB/SmolLM-360M for extracting structured entities from natural language calendar event descriptions.
Downloads · 30 days
20
22% of all-time downloads
All-time downloads
89
Public
Parameters
362M
1.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.4 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of HuggingFaceTB/SmolLM-360M for extracting structured entities from natural language calendar event descriptions.
This model extracts structured entities from natural language text describing calendar events. It outputs JSON with the following fields:
action: Type of event (e.g., "meeting", "lunch")date: Date in DD/MM/YYYY formattime: Time in HH:MM AM/PM formatattendees: Array of attendee names (or null)location: Event location (or null)duration: Duration description (or null)recurrence: Recurrence pattern (or null)notes: Additional notes (or null)from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load model and tokenizer
model_name = "Shresth12345/entity-extraction-smollm"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Example usage
text = "Meeting with John tomorrow at 2pm for 1 hour at the office"
prompt = f"Extract entities from: {text}"
# Tokenize and generate
inputs = tokenizer(prompt, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=150,
temperature=0.1,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
# Decode response
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
generated_text = response[len(prompt):].strip()
print(generated_text)
{
"action": "Meeting",
"date": "tomorrow",
"time": "2:00 PM",
"attendees": ["John"],
"location": "office",
"duration": "1 hour",
"recurrence": null,
"notes": null
}
The model demonstrates strong performance in:
This model was fine-tuned using:
If you use this model, please cite:
@misc{entity-extraction-smollm,
title={Entity Extraction Fine-tuned SmolLM-360M},
author={Shresth Mishra},
year={2025},
howpublished={\url{https://huggingface.co/Shresth12345/entity-extraction-smollm}}
}
For questions about this model, please open an issue in the repository or contact the author.