hs-date-1
an ultracompact model for finding dates in text
2 min readupdated
The hs-date-1 model is designed to find mentions of dates and time intervals in queries across 16 languages, including Russian ("last week", "since March"). It outputs a special semantic code that the timmytime library (a Python package) converts into precise dates, taking leap years and month lengths into account. The model is based on a byte-level encoder-decoder transformer (semantic parser) with only 4.8M parameters (the file weighs 9.7 MB) and runs directly on a CPU without PyTorch, a graphics card, or an internet connection. It is useful for developers of search engines, bots, and memory systems who need to quickly and accurately parse dates from user queries.
Key features
- 16 languages: support for English, Russian, Chinese, Spanish, German, Arabic, and other languages.
- High CPU speed: processing takes about 1 millisecond per query using only NumPy.
- Minimal file size: the model size is only 9.7 MB, and the weights are already built into the timmytime package.
- Accurate detection of missing dates: queries without time stamps are correctly recognized as empty.
What you can do
- Chatbot integration: set up fast date parsing in assistants to handle queries like "what did we discuss last week".
- Search results improvement: filter documents and messages by time intervals in local knowledge bases.
- User log analysis: automatically extract timeframes from text messages and user queries.
Example
from datetime import date
import timmytime
timmytime.parse("что я решил на прошлой неделе", anchor=date(2026, 11, 20))
Read more
DetailsBenchmarks: Exact accuracy for English is 98.7% (compared to 55.9% for dateparser), and for Russian, 95.4% (compared to 53.3%).
Hardware requirements: runs on a CPU, does not require a GPU or heavy deep learning libraries.
Limitations: processes only whole days (time of day is not considered), does not recognize religious calendars or personal events.
Training details: 4.8M parameters, architecture includes 2 convolutions, 6 encoder layers, and 1 decoder layer.








Comments