← All projects
Project record2 mentions
Originally shared on Hacker News

T1DMAI

A custom 31,253-parameter encoder-only transformer pretrained on ~19,200 CGM-years of synthetic data (1 million simulated type 1 diabetics at 7 days each) and fine-tuned to the submitter's own CGM data with LoRA. It predicts blood sugar 2 hours into the future, can infill missing traces, and perform backcasts.

Last shared
01 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. T1DMAI

    A custom 31,253-parameter encoder-only transformer pretrained on ~19,200 CGM-years of synthetic data (1 million simulated type 1 diabetics at 7 days each) and fine-tuned to the submitter's own CGM data with LoRA. It predicts blood sugar 2 hours into the future, can infill missing traces, and perform backcasts.

    Posted by @0xdeadf1sh · Original source ↗

    Story title · @0xdeadf1sh · · Source ↗

    Show HN: I have trained a model to predict my blood sugar

    Submitted URL · @0xdeadf1sh · · Source ↗

    https://github.com/0xdeadf1sh/T1DMAI

    Source text · @0xdeadf1sh · · Source ↗

    I have trained a custom 31,253 parameter encoder-only transformer on a pregenerated synthetic CGM dataset and fitted it to my own personal data using LoRA.

    Source text · @0xdeadf1sh · · Source ↗

    The model began with a pretraining stage where it consumed ~19,200 CGM-years worth of synthetic data, consisting of 1 million simulated type 1 diabetics at 7 days each.

    Source text · @0xdeadf1sh · · Source ↗

    It can predict 2 hours into the future, infill missing traces, and do backcasts (predictions into the past).
  2. T1DMAI

    15 blood glucose forecasting models trained by the submitter on their own type 1 diabetes data and published on GitHub (T1DMAI). The repo contains two kinds of models: ones trained on the metabonet dataset (mostly AID) and the submitter's own MDI models. Transformers were pretrained on a large synthetic dataset and fine-tuned with a LoRA on the submitter's personal data; carbohydrates and insulin are accounted for during inference. The models are kept small to run locally on a smartphone; tested Mistral TSFMs did not beat XGBoost and the submitter's custom transformer on their own data.

    Posted by @0xdeadf1sh · Original source ↗

    Story title · @0xdeadf1sh · · Source ↗

    Show HN: I have trained 15 blood glucose forecasting models on my own data

    Submitted URL · @0xdeadf1sh · · Source ↗

    https://github.com/0xdeadf1sh/T1DMAI

    Source text · @0xdeadf1sh · · Source ↗

    My motivation for training smaller models is because I want to run them locally on my smartphone. But yes, I plan to add TSFMs to the github repo soon.

    Source text · @0xdeadf1sh · · Source ↗

    You don't even need a datacenter GPU. I trained all of my models on a laptop RTX 4070.

    Source text · @0xdeadf1sh · · Source ↗

    I created a huge synthetic dataset to help me with that. I use that for pretraining and then plug in a LoRA that got trained using my personal data.

    Source text · @0xdeadf1sh · · Source ↗

    You can test the models on your own data locally and tell me how they work for you. I have 2 kinds of models in the repo: those trained on the metabonet dataset which consists mostly of AID, and mine which is MDI.

    Source text · @0xdeadf1sh · · Source ↗

    Carbohydrates & insulin are both accounted for during inference.

    Source text · @0xdeadf1sh · · Source ↗

    I just tested Timestral (all sizes), both zero-shot and fine-tuned. It is now the top model on the metabonet dataset but couldn't beat XGBoost and my custom transformer on my own data. Here are its predictions: https://github.com/0xdeadf1sh/T1DMAI#7-mistral-models