Better HN
topnewbestaskshowjobs
Log inSign up

0xdeadf1sh

103 karma · joined Jan 19, 2026 (10mo ago) · 29 submissions

I train & test blood glucose forecasting models by injecting insulin and comparing my body's responses with models' predictions (I am a type 1 diabetic).

Professionally I work as a C/C++ programmer specializing in computer vision, embedded devices, and graphics programming via Vulkan.

Most of my work boils down to making software run fast. The majority of performance improvements come from the clever use of the zero-copy capabilities of the systems I work with, and offloading of compute-heavy workloads to GPUs & NPUs, not from C++.

Submissions

comment 1w ago · link · parent

I did fingersticks, but I haven't exhaustively checked every measurement. Most are within +-20 mg/dL.

comment 1w ago · link · parent

Yeah I definitely "feel" it when a hypo is coming. At some point improving the accuracy of these models will likely involve a BCI.

comment 1w ago · link · parent

Yuwell Anytime has the smoothest traces. The noisiest has to be the Linx sensor.

comment 1w ago · link · parent

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

comment 1w ago · link · parent

Feel free to do so. I have reverse engineered many Chinese CGMs to add some variety to the training datasets, you can grab them from my T1DMDROID repo.

comment 1w ago · link · parent

Thanks, but note that the models are struggling with hypos, so I still have a lot to do.

comment 1w ago · link · parent

Hmm maybe I should build my own wearable using an ESP32 + heart rate sensor? I'm already pretty good at embedded stuff and it would be a nice weekend project.

comment 1w ago · link · parent

Unfortunately no, well at least not in my case. My heartrate gets higher before I wake up, and incidentally this is also the time when there is a higher likelihood of getting high blood sugar.

Regarding exercise, my blood sugar gets higher during anaerobic exercises but lower when doing aerobics.

At the moment I consider heartrate a confounding variable rather than a good predictor of BG. I think it could work for sedentary populations for whom higher heartrate correlates well with some kind of aerobic activity.

comment 1w ago · link · parent

I absolutely hate exercise. I mean as a machine-learning guy it is the hardest quantifiable feature and yet it causes large swings in blood sugar. I haven't added exercise as additional input yet because I'm still searching for a better way to quantify it.

comment 1w ago · link · parent

Feel free to share! I am currently testing Mistral's newly released TSFMs (Time-Series Foundation Models) on my blood sugar the results of which will be in the repo in the next couple of days.

comment 1w ago · link · parent

Yeah all models are weirdly much worse at predicting hypos than hypers. I'd say the models are better than me when it comes to predicting hypers. Could be a data leak in my brain, but I'm not sure. There are neurons in the brain that sense falling blood sugar [1], so it is likely that I have access to some info that these models don't, albeit unconsciously.

[1] https://pmc.ncbi.nlm.nih.gov/articles/PMC10450823/

comment 1w ago · link · parent

When I began this project my model was indeed being provided time-of-day features (they were sinusoidal like in the published literature). Then one day I decided to remove it to see what happens. The accuracy didn't degrade so I thought hmm maybe it's because the model can *infer* time-of-day from past blood sugar alone? So I attached a time-of-day head to test it and it worked!

Interestingly I have noticed that I get sleepy when the model's predicted clock gets close to midnight rather than the actual clock when I travel between time zones.

comment 1w ago · link · parent

Fixing the underlying issue requires something like stem cell therapy, which I'm not sure if I can do in a garage, but maybe one day.

comment 1w ago · link · parent

The model can easily learn when you want to chomp. It's much harder for it to predict how much you want to chomp.

comment 1w ago · link · parent

Yeah I was using the macro-nutrient approach as well, but then switched to simply providing GI (glycemic index) alongside the carbs in grams and found out that there was practically no difference between the two.

During training I artificially wobble the carb amounts so they are more like guesstimates than true carbs. This also partially fixed the quantile bands (before that they were too narrow).

comment 1w ago · link · parent

Helping hands are always needed. 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.

comment 1w ago · link · parent

I also didn't have enough personal data to train on (transformers are very data-hungry), so 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.

comment 1w ago · link · parent

Thanks for the comment!

You can copy the data from the app to nightscout, but I haven't added the reverse direction. My app allows me to read from multiple CGMs simultaneously (I did this because different CGM models have their own algorithms and you don't want your machine learning model to be fitted to one particular algorithm).

I do a lot of reverse engineering to connect my app directly to the CGM sensors, bypassing official vendor solutions (they suck anyway).

comment 1w ago · link · parent

TSFMs are really really big. 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.

comment 1w ago · link · parent

Thanks, N=1 training is really the way to go. In my case training on large N >> 1 (i.e. metabonet dataset) actually hurt the performance of the models predicting my own blood sugar.

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

21.

Show HN: I have trained a model to predict my blood sugar(github.com ↗)

6 points · by 0xdeadf1sh · 1w ago · 4 comments

comment 2w ago · link · parent

The whole reason this extension exists is to help me with my non-AI hobby projects like path tracer in C, and my C++ Vulkan renderer.

I don't think this extension is valuable for people who use agents to code.

comment 2w ago · link · parent

I've made this for my hobby projects where I still get to write the code manually. If you are using agentic coding then you don't need neovim to begin with.

24.

Show HN: Godbolt-in-a-floating-window for Neovim (C, C++, Rust)(github.com ↗)

107 points · by 0xdeadf1sh · 2w ago · 20 comments

comment 2w ago · link · parent

Carbohydrates & insulin are both accounted for during inference. I'm not sure if that's what you meant by dietary info though.

comment 2w ago · link · parent

Yeah I'm thinking of adding more (especially recent) models and compare their published metrics with those of mine to see how they hold up. Then I'll likely post about it here again. See you then!

27.

Show HN: I have trained 15 blood glucose forecasting models on my own data(github.com ↗)

120 points · by 0xdeadf1sh · 2w ago · 64 comments

comment 10mo ago · link · parent

This can maybe work on a small 7b or 14b model, but >70b models are already pretty good at identifying prompt injections. You will probably need to use weird/out-of-distribution tokens (remember MagicKarp?).