Downloads · 30 days
12
31% of all-time downloads
DSTI/SmolLM2-accident-reporter-1.7B
SmolLM2-accident-reporter-1.7B is a text generation model from DSTI. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
SmolLM2-accident-reporter-1.7B is a LoRA fine-tuned variant of SmolLM2-1.7B-Instruct, trained for knowledge-distilled accident reporting. The model generates concise, neutral one-paragraph traffic accident/incident re…
Downloads · 30 days
12
31% of all-time downloads
All-time downloads
39
Public
Repo size
72.4 MB
Likes
2
Public
Click a slice to open those files.
.safetensors72.4 MB · 94%
From the Hugging Face model README
SmolLM2-accident-reporter-1.7B is a LoRA fine-tuned variant of SmolLM2-1.7B-Instruct, trained for knowledge-distilled accident reporting. The model generates concise, neutral one-paragraph traffic accident/incident reports from structured facts. Each output is designed to cover the key aspects of an event: What, When, Where, Who, How, Why, and Contingency Actions. This model is intended for tasks in structured event-to-text generation, summarization of incidents, and training student models with KD signals.
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
tokenizer = AutoTokenizer.from_pretrained("unsloth/SmolLM2-1.7B-Instruct",)
base_model = AutoModelForCausalLM.from_pretrained(
"unsloth/unsloth/SmolLM2-1.7B-Instruct",
device_map={"": 0}
)
model = PeftModel.from_pretrained(base_model,"DSTI/SmolLM2-accident-reporter-1.7B")
question ="""
What: Minor collision between Vehicle A (compact car) and Vehicle B (minivan) in parking lot
When: Occurrence: December 9, 2025, 13:00; Discovery: December 9, 2025, 13:01
Where: Shopping center parking lot, Lot B
Who: Ms. Karen Liu – compact car driver (Vehicle A), Mr. Thomas Barnes – minivan driver (Vehicle B)
How: Vehicle A misjudged turning space and touched Vehicle B
Why: Driver inattention during parking maneuver
ContingencyActions: Drivers exchanged info, no injuries reported, security cameras documented accident
"""
messages = [
{"role" : "user", "content" : question}
]
text = tokenizer.apply_chat_template(
messages,
tokenize = False,
add_generation_prompt = True,
)
from transformers import TextStreamer
_ = model.generate(
**tokenizer(text, return_tensors = "pt").to("cuda"),
max_new_tokens = 512,
streamer = TextStreamer(tokenizer, skip_prompt = True),
)
For pipeline:
from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
tokenizer = AutoTokenizer.from_pretrained("unsloth/SmolLM2-1.7B-Instruct")
base_model = AutoModelForCausalLM.from_pretrained("unsloth/SmolLM2-1.7B-Instruct")
model = PeftModel.from_pretrained(base_model, "DSTI/SmolLM2-accident-reporter-1.7B")
question ="""
What: Minor collision between Vehicle A (compact car) and Vehicle B (minivan) in parking lot
When: Occurrence: December 9, 2025, 13:00; Discovery: December 9, 2025, 13:01
Where: Shopping center parking lot, Lot B
Who: Ms. Karen Liu – compact car driver (Vehicle A), Mr. Thomas Barnes – minivan driver (Vehicle B)
How: Vehicle A misjudged turning space and touched Vehicle B
Why: Driver inattention during parking maneuver
ContingencyActions: Drivers exchanged info, no injuries reported, security cameras documented accident
"""
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
messages = [
{"role": "user", "content": question}
]
pipe(messages)
The model was fine-tuned on the Accident Reporting KD Dataset, which consists of:
Dataset size: ~6K samples.
Language: English.
If you use this model, please cite:
The source dataset: DSTI/traffic-accidents-reports-kd-smollm2-360M-7k
@misc{SmolLM2-accident-reporter-1.7B,
title = {Accident Reporting model (One-Paragraph)},
author = {Rustam Shiriyev},
year = {2025}
}