Sleep Thought Pattern Checker

Paste the thoughts keeping you up and an AI model in your browser names patterns and suggests a line to park until morning.

Private.

Not medical advice.

Last updatedHow we build & check our tools

Interactive Tool

This tool runs in your browser and is loading now.

Enter your values once it appears to see your results.

How Sleep Thought Pattern Checker works

Press Load model once: your browser downloads Gemma 3 1B instruction-tuned (web build) (728 MB) from this site and keeps it in its cache. Then add your text and press Check locally. The model runs on this device using your graphics card, so nothing you enter is sent to a server. Until the model is loaded, or if your device cannot run it, the tool falls back to a simple keyword check and labels the result as the fallback.

Gemma 3 1B instruction-tuned (web build) is a small open language model from Google. The tool sends it the instruction below plus your text, asks for a JSON answer with fixed fields, and shows each field as a card. It runs at temperature 0, so the same input gives the same answer on the same device, though different graphics cards can word it slightly differently.

Inputs longer than 6,000 characters are cut to that length before they reach the model, and the result says so. The model only sees what you paste: it does not look anything up.

The instruction also carries one worked example: the built-in sample with the answer the larger Gemma 4 E2B model gave for it. That example is what lets this smaller model follow the answer format reliably.

If what you enter mentions suicide or self-harm, the tool does not run the model. It shows crisis lines instead (in the US, call or text 988), because a trained person can help in a way a small model cannot.

The instruction the model gets

You read the thoughts a person has at bedtime or when they wake at night and organise them: the thoughts close to their words, the patterns they show (for example worrying about tomorrow, replaying the day, all-or-nothing thinking, to-do lists), and the topics they are about. Then suggest one thing they could write down to park for the morning, using their own topics. You do not diagnose, do not name conditions or disorders, do not give medical or therapeutic advice, and never change or suggest medication doses. You only organise and reflect what the user wrote, in plain, kind language. Do not present yourself as a substitute for a therapist, doctor or other professional.

What it returns

  • Thoughts: Each thought, close to their words.
  • Patterns: One entry per pattern, as 'pattern: the thought that shows it'.
  • Topics: What the thoughts are about, such as work, money, family or health.
  • Write down to park for the morning: One short line they could write on a note before sleep, built from their own topics.

Worked example

The model's output for the built-in sample, recorded on a desktop browser. Your run may word things slightly differently.

Sleep thoughts: If I do not answer every message tonight, tomorrow will be a disaster. I keep replaying one awkward sentence from the meeting.
Thoughts
If I do not answer every message tonight, tomorrow will be a disaster. I keep replaying one awkward sentence from the meeting
Patterns
pattern: worrying about tomorrow pattern: replaying the day
Topics
messages work
Write down to park for the morning
Focus on tomorrow's steps.

The model

The files are served from this site, versioned so a cached copy is never stale. Nothing is fetched from a third party while you use the tool.

You can switch models in the tool. Also available: Gemma 4 E2B instruction-tuned (web build) (2.0 GB). The larger language model gives more thorough answers but is a bigger download and needs a stronger device.

ModelDownloadRuns onLicence
Gemma 3 1B instruction-tuned (web build)700 MBGraphics card (WebGPU)Gemma Terms of Use
Gemma 4 E2B instruction-tuned (web build)2.0 GBGraphics card (WebGPU)Apache-2.0

Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms.

Limitations

  • Small language models make mistakes: they can miss an item, merge two, or state something more confidently than the text supports. Check the result against your input before you rely on it.
  • It needs WebGPU and about 4 GB of memory, so it is offered on desktops and laptops, not on phones and tablets. Devices that cannot run it get the keyword fallback, clearly labelled.
  • Results describe the input you gave, not the real-world situation behind it. Review them yourself before acting.
  • This is not a medical device and does not give medical advice, a diagnosis or a treatment plan. Ask a qualified health professional about any symptom, medication or change to your routine.

Good uses

  • Triage mental health and wellbeing notes before deeper review
  • Prepare consistent labels for repeat workflows
  • Reduce manual sorting on small batches
  • Keep sensitive drafts in the browser preview

Frequently Asked Questions

Common questions about the Sleep Thought Pattern Checker

No. The model files download from this site once, and then everything runs in your browser tab. The text you enter is never sent to a server, and closing the tab discards it.

Sources & References

Mental-health information

Authoritative mental-health and wellbeing information from the U.S. CDC.