Thank you for your interest in contributing! This document explains how to get started and what to keep in mind.
time-lm is intentionally a single HTML file with no build step. Before adding a dependency or splitting into multiple files, ask: does this meaningfully improve the user experience or the developer experience, or does it add complexity without benefit?
git clone https://github.com/your-username/time-lm.git
cd time-lm
# Option A — open directly
open index.html
# Option B — local server (recommended to avoid CORS)
python -m http.server 8080
# then open http://localhost:8080No npm install. No build command. Edit index.html, reload the browser.
Open an issue and include:
- Browser name and version
- Steps to reproduce
- What you expected vs. what happened
- Console errors (F12 → Console tab)
- If data-related: a minimal anonymised CSV that reproduces the issue
Open an issue describing the use case before writing code. For larger changes, discussing the approach first avoids wasted effort.
- Fork the repo and create a branch:
git checkout -b feat/my-feature - Make your changes in
index.html(or add new files if genuinely needed) - Test in at least Chrome and Firefox
- Open a PR with a clear description of what changed and why
The most impactful contribution is adding a new foundation model. Requirements:
- The model must be available as an ONNX file loadable by
onnxruntime-web(WASM EP) or loadable viaTransformers.js. - The model file must be publicly accessible (Hugging Face Hub is preferred).
- Add an entry to
MODEL_CATALOGwithid,label,color,sizeHint,engine,author,year,desc. - Implement a
forecast<ModelName>(history, horizon)function that returns{ p50, p10?, p90?, status, meta }. - Register the forecaster in
FORECASTERSand the core function inRMSE_CORES. - Test with all three demo datasets.
- No TypeScript, no bundler — plain ES2022+ JavaScript inside a
<script type="module">. - Follow the existing naming convention (
camelCasefor functions and variables). - Do not add comments that restate what the code does. Comments should explain why, not what.
- Keep CSS inside the
<style>block; use Tailwind utilities for layout. - Prefer
async/awaitover.then()chains. - Always call
await yieldToMain()inside long inference loops to keep the UI thread responsive.
This project follows Conventional Commits:
feat: add Lag-Llama model support
fix: correct Chronos-2 quantile index mapping
perf: reduce TimesFM context padding overhead
docs: update browser compatibility table
refactor: extract normalizeSeries into shared utility
By contributing, you agree that your contributions will be licensed under the MIT License.