The HTML-native knowledge OS

Change the way the world learns.

sodarie is the AI-native note system for people who have outgrown static markdown vaults. Build interactive lessons, research maps, code, media, and private knowledge directly inside local HTML notes.

Totally free right now No subscription, no in-app purchases, and no locked features during this early release.
Local-firstAI writes real notesHTML instead of flat markdown
test_html/RNN/LSTM_Gates_Explained.html

LSTM Gates — Interactive Notes

Created: 2026年5月16日 Modified: 2026年5月16日

LSTM Gates Explained

An RNN with a protected memory lane.

Long Short-Term Memory networks solve the vanishing gradient problem by introducing a cell state (conveyor belt) and three gating mechanisms that carefully add or remove information.

🚫The Vanilla RNN Problem

ht = tanh(Wh ht-1 + Wx xt)

Each new hidden state overwrites the old one. Over long sequences, gradients either explode or vanish.

🏭The Conveyor Belt

Imagine an assembly line (the cell state) running straight through. At each station, gates decide:

  • Forget Gate: drop old products?
  • Input Gate: add new ones?
  • Output Gate: what to expose?

🗑️Forget Gate

ft = σ(Wf · [ht-1, xt] + bf)

Discards information from the cell state when a new context starts.

📥Input + Output Gates

it = σ(Wi · [ht-1, xt] + bi)
ot = σ(Wo · [ht-1, xt] + bo)

🎮Interactive Demo: The Conveyor Belt

Thecatsatonthemat
h0 h1 h2 h3 h4 h5
Cell State (conveyor) Hidden State (output)

Retrieval-Augmented Generation

Giving LLMs an open-book exam instead of a closed-book memory test.

RAG augments a language model by fetching relevant external documents from a knowledge base at inference time, grounding generation in facts.

📚The Exam Analogy

ParadigmAnalogyHallucination
Plain LLMClosed-bookHigh
Fine-tuningStudyingMedium
RAGOpen-bookLow

🔍Step 1: Indexing

Documents are chunked and embedded into a high-dimensional vector space.

vdoc = fenc(chunk) ∈ ℝd

🎯Step 2: Retrieval

score(q, d) = (vq · vd) / (‖vq‖ ‖vd‖)

Return the top-k chunks using approximate search like HNSW for billion-scale retrieval.

✍️Step 3: Generation

Use the following context to answer.
If the answer is not in the context, say "I don't know".

Context: {retrieved chunks}
Question: {query}
Answer:

🎮Interactive Demo: Vector Search

Convolution Operators

Sliding a flashlight over an image to find patterns.

Convolution is a local, translation-equivariant operator that learns spatial hierarchies by sliding learnable filters across an input grid.

🔦The Flashlight Metaphor

Imagine shining a small flashlight (the kernel) over a photograph, one patch at a time. The collection becomes a feature map.

📐Discrete 2D Convolution

(I * K)(i, j) = Σm Σn I(i+m, j+n) · K(m, n)

Where I = input image, K = kernel weights.

🎛️Classic Hand-Crafted Kernels

KernelEffect
Sobel XHorizontal edges
GaussianSmoothing
SharpenEnhance detail

📏Padding & Stride

O = ⌊(I − K + 2P) / S⌋ + 1

Padding adds a zero border. Stride controls how many pixels the flashlight jumps.

🎮Interactive Demo: Kernel Slideshow

Input (7×7)

Kernel (Sobel X)

-101 -202 -101

Position: (0, 0)

Output (5×5)

Seq2Seq & Cross-Attention

One RNN reads; another writes. Attention lets them whisper to each other.

Sequence-to-sequence models map variable-length inputs to variable-length outputs using an encoder-decoder pair. Attention liberates the decoder from a single fixed-size context vector.

🍾The Encoder-Decoder Bottleneck

A classic Seq2Seq compresses the entire input into one context vector c.

Fitting a 50-word paragraph into 256 dims is like fitting a novel into a tweet.

🎯Attention to the Rescue

ct = Σj=1T αtj · hjenc

The decoder gets a different context vector at every step.

📊Alignment Weights

αtj = exp(etj) / Σk exp(etk)

where etj = score(st-1, hj).

🌉From Seq2Seq to Transformers

Seq2Seq attention is cross-attention: queries from decoder, keys/values from encoder. This exact pattern survives in Transformers today.

🎮Interactive Demo: Alignment Heatmap

Source (EN)
Iloveyouverymuch
Target (FR)
Je t'aime beaucoup

A note is a web app

Not another markdown vault

Markdown is great for static text. sodarie treats every note as a small web app, so your study plans, research canvases, charts, simulations, and AI-generated tools can live in the same local file.

Living HTML note preview

AI rewrites the file

AI that actually edits the artifact

sodarie AI doesn't stop at advice — it edits the file. Watch it drop a yellow callout block into a note, restructure a section, and refactor a study card straight into the .html on disk. The clip on the right is running entirely against a local model: no API keys, no cloud, your weights doing the work.

Local AI test

AI editing a live note

Edit anything, anywhere

One-click edit any file, in place

No exporting, no opening a separate editor. Toggle edit mode on any note and rewrite the HTML right there — add a block, delete a chart, restructure a section, or paste a snippet from elsewhere. Swap fonts on the fly, and use the format painter to copy a heading, paragraph, or block style and keep everything perfectly aligned across the note. Save commits the change straight to the file on your disk; Cancel rolls it back. Create, rename, move, and trash files without leaving the vault.

In-place HTML editing

See your thinking

A vault graph you can actually read

Search your vault, follow backlinks, then ask sodarie to turn connected notes into a path you can learn from. The graph renders locally on Cytoscape with the fcose layout — fast at thousands of nodes, and it stays out of the way until you need it.

Vault graph view

Your vault, your way

Drag, drop, reorder — your vault on disk

Reorder the sidebar by dragging. Drop a file into another folder and the structure on disk updates with it. Pull a note into a different folder, rename without losing backlinks — the file system is the source of truth, and sodarie keeps the visible structure in sync as you move things around.

Sidebar drag-and-drop + folder moves

AI you choose

Swap models in a click — never locked in

Toggle between a local model — Ollama, LM Studio, anything OpenAI-compatible running on your hardware — and a cloud API in a single click. sodarie doesn't lock you to one provider, and swapping never restarts the app. Same prompt, different brain, instantly.

One-click switch between local AI and cloud APIs

From prompt to vault

Spin up a whole vault from a single prompt

Don't know HTML? Doesn't matter. Describe the vault you want — a six-week linear-algebra course, a research vault on transformer interpretability, a daily journal — or paste in any reference content, and sodarie scaffolds the entire vault, notes and all, into a folder on your disk. No template hunting, no boilerplate.

AI scaffolding a brand-new vault

Quick switcher

Find anything in a keystroke

Cmd+P or Ctrl+P to fuzzy-find any note. Click the search field in the top-left to grep across everything you've written. CJK works, partial matches work, and you can jump to a heading inside a note in two keystrokes.

Cmd/Ctrl+P quick switcher and full-text search

Make it yours

Themes that fit your eyes

Swap the whole vault between warm cream, midnight, sepia, and high-contrast palettes — and pick any font size from compact to extra-large. Every note picks up the new look instantly, no reload, no plugin required.

Warm Cream

The signature sodarie palette. Easy on the eyes for long study sessions in daylight.

Midnight

Deep brown-black with warm accents. Built for late-night writing and OLED displays.

Sepia

Warm parchment tones. Comfortable for reading-heavy notes and research vaults.

High Contrast

Crisp black on white with a single accent. Maximum legibility for shared screens.

Font size

Aa Compact
Aa Default
Aa Comfortable
Aa Large

Positioning

Built for people who are ready to leave static notes behind.

Old vault Files you organize

Folders, markdown, plugins, and a graph that often becomes another thing to maintain.

sodarie Knowledge that works back

Local HTML notes that can render tools, run trusted interactions, and become lessons with AI.

Core system

A notebook with an engine.

Full-text search with CJK support

Trigram tokenization for Chinese, Japanese, and mixed content.

Knowledge graph

Cytoscape-powered backlink graph with fcose layout. See your thinking unfold.

Per-file trust system

Sandboxed iframes for scripts you allow, with AI security audits before trusting a file.

More than markdown

Embed media, code, charts, and 3D content in one local HTML file.

Quick switcher

Cmd+P or Ctrl+P to fuzzy-find any note, with Chinese fuzzy matching included.

Cross-platform

macOS and Windows builds are available today, with one download button that adapts to the visitor.

Local by design

Private by default. Powered by your machine.

A notebook with an engine.

sodarie is a desktop-first app that runs entirely on your computer. Your notes, your vault, your AI prompts — none of it touches a sodarie server, because there is no sodarie server. The only network calls are the ones you explicitly configure (a local model, or an AI provider you trust).

Plug in local AI

Point sodarie at Ollama, LM Studio, or any OpenAI-compatible endpoint running on your own hardware. Prompts, context, and replies never leave the machine.

Your vault lives on your disk

Plain .html files in a folder you choose. No cloud sync. No sodarie account. No third-party storage. Back it up the way you back up anything else.

Zero telemetry

No analytics. No usage pings. No crash reporters phoning home. What you write, how you write it, and what you ask the AI is between you and your computer — full stop.

Per-file trust gate

Interactive HTML is sandboxed by default. Scripts and network access only run after you (or an AI security audit) explicitly trust the file. Nothing executes behind your back.

The promise: if your computer is offline, sodarie still works. The only data that leaves your machine is data you sent somewhere on purpose.

Start building the vault that replaces your old one.

sodarie 0.1.6 is ready for macOS and Windows. The button checks your device locally in the browser.

Totally free right now No subscription, no in-app purchases, and no locked features during this early release.