Downloads · 30 days
39
45% of all-time downloads
faizack/kronos-small-custom
kronos-small-custom is a machine learning model from faizack. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Custom Hugging Face model repo for deploying the Kronos-small time-series forecasting model as an Inference Endpoint.
Downloads · 30 days
39
45% of all-time downloads
All-time downloads
87
Public
Parameters
24.7M
99 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors99 MB · 100%
From the Hugging Face model README
faizack/kronos-small-customCustom Hugging Face model repo for deploying the Kronos-small time-series forecasting model as an Inference Endpoint.
This folder is structured so you can zip it or git init it and push directly to Hugging Face under your account faizack.
You will need the following files in the root of the Hugging Face repo:
config.json – copied or downloaded from NeoQuasar/Kronos-smallmodel.safetensors – weights from NeoQuasar/Kronos-smallmodel.py – Kronos model definition (from the official GitHub repo)tokenizer.py – Kronos tokenizer implementationpredictor.py – KronosPredictor wrapperinference.py – entrypoint used by Hugging Face Inference Endpoints (already provided here)requirements.txt – Python dependencies (already provided here)This folder currently includes:
README.md (this file)inference.pyrequirements.txt.env.example.gitattributes (Git LFS for safetensors).gitignoreYou still need to add:
config.jsonmodel.safetensorsmodel.pytokenizer.pypredictor.pyFrom this folder:
cd kronos-small-custom
# (optional) initialize git
git init
git lfs install
# Log in to Hugging Face
huggingface-cli login
# Create the remote repo under your account
huggingface-cli repo create faizack/kronos-small-custom --type model
# Add HF remote
git remote add origin https://huggingface.co/faizack/kronos-small-custom
Now copy in the Kronos implementation and weights:
model.pytokenizer.pypredictor.pyNeoQuasar/Kronos-small on Hugging Face, download:
config.jsonmodel.safetensorsThen commit and push:
git add .
git commit -m "Initial Kronos-small custom deployment"
git push -u origin main
inference.py exposes a predict(request) function that Hugging Face Inference Endpoints will call.
Expected JSON body:
{
"inputs": {
"df": [
{"open": 1.0, "high": 1.1, "low": 0.9, "close": 1.05},
{"open": 1.05, "high": 1.12, "low": 1.0, "close": 1.08}
],
"x_timestamp": ["2024-01-01T00:00:00Z", "2024-01-01T01:00:00Z"],
"y_timestamp": ["2024-01-01T02:00:00Z", "2024-01-01T03:00:00Z"],
"pred_len": 2,
"T": 1.0,
"top_p": 0.9,
"sample_count": 1
}
}
Response structure:
{
"predictions": [
{
"open": ...,
"high": ...,
"low": ...,
"close": ...
},
{
"open": ...,
"high": ...,
"low": ...,
"close": ...
}
]
}
You can adapt this contract as needed, as long as predict returns JSON-serializable data.