- MICROD-BIGRAM-V2.5
- 4x Quantum Oscillators
- CHANGE LOG — Updated 2026-10-25
- Reference Architectures
- Model Details
- Training Notes
- Hardware Requirements
- Test Wrappers Included
- Optional: Enhance test.sh / run.sh to Automate the Suite
- Optional: How to Add Data & Enhance the Tests
- How the Quantum Oscillators Work for Seeding
- Files in the Bundle
- Training Pipeline
- Data Sources
- License
MICROD-BIGRAM-V2.5
This model was trained from scratch using a combination of:
- Simplified policy-gradient (GRPO-style) for character-level trajectory training
- VAE fields recorded as metadata only (do not affect the transition table)
- 4× quantum harmonic oscillator superposition for deterministic seeding
It is a compact character-level bigram model — no transformer weights, just transition probabilities. Runs entirely in the browser or on any machine with Python 3.8+.
This model was produced with Micro Distillery v2.5 — a single-file HTML PWA that fetches open corpora, trains a bigram model, applies optional NLP fan-out polish, and exports a HuggingFace-ready .zip bundle. Includes the Jev Code Nous deterministic API layer for coding-focused token prediction (harness only).
Available for download in the repo folder. Here. This is an experimental, all-in-one development environment that runs completely inside a web browser. It is built as a single-file HTML Progressive Web App (PWA), meaning it operates locally on your machine, requires no server-side backend, and can even work offline once loaded.
Key Features of Micro Distillery v2.5
- In-Browser Training Pipeline: It fetches open text datasets (like Andrej Karpathy's names.txt), counts character pairs to build a 27×27 transition table, and optimizes the paths using a basic, rule-based reinforcement loop.
- Fan-Out NLP Polish (v2): The app includes a post-processing dashboard where you can hook up external text APIs. It features daily quota tracking for MyMemory (for translation/paraphrasing), Datamuse integration for lexical scoring, and configuration toggles for LanguageTool grammar checkers.
- Jev Code (Nous Deterministic Layer): It features a local, network-free code harness modal. It simulates a strict, token-by-token code prediction pipeline (tokenize → context → candidates → score → select → validate) with a built-in user confirmation popup before accepting predictions.
- Hugging Face Bundler: Once you are done experimenting in the browser, the app automatically generates a complete, standards-compliant .zip bundle. This bundle includes everything needed to host the project on Hugging Face: the structural configurations (config.json, vocab.json), interactive Python test wrappers (test.py), a formatted model card (README.md), and even pipeline architecture vector diagrams (pipeline.svg).
- Safe State Guards: To keep the browser from freezing during asynchronous tasks, the app implements strict mutual exclusion locks (state.training and state.fetching) to ensure data pulling and model training never overlap and crash the tab.
Inference-Time Plugins (The Fan-Out Layout)
When testing generations inside the browser UI, the app activates an optional Fan-out NLP Polish Layer. This architectural hook routes the model's generated text strings through external APIs to demonstrate post-inference filtering:
- LanguageTool Integration: Proxies text to api.languagetool.org or a self-hosted Docker endpoint to run live grammar checks.
- MyMemory Paraphrasing: Routes text to a translation endpoint to run round-trip phrasing passes while tracking daily rate limits in the UI.
- Datamuse Lexical Cache: Queries a vocabulary API to compute dictionary validity scores. The app saves these scores in a local JavaScript dictionary cache to minimize network calls
4x Quantum Oscillators
The 4× quantum harmonic oscillator superposition is an algorithmic simulation used exclusively as a deterministic random number generator (PRNG) lock. It does not calculate probabilities dynamically during text generation; instead, it runs at the very end of the training pipeline to collapse a complex wave simulation into a single, permanent integer seed (1251963776). This ensures that the final model.json transition table and sampling paths are entirely reproducible across any machine running Python or a browser.
CHANGE LOG — Updated 2026-10-25
Maintenance + feature release for the browser trainer. Bundle format remains mD-v2 / 2.5.0. No breaking changes to the exported artifact schema.
Added
- Enhanced Fan-out NLP Polish (v2) — configurable LanguageTool (off / public / custom URL), MyMemory paraphrase round-trip with daily quota tracking, Datamuse lexical scoring + cache. Status badges, diagnostics table, and in-flight guards.
- Jev Code — Nous Deterministic API Layer — harness-only coding-focused token prediction pipeline (tokenize → context → candidates → score → select → validate). Local, seeded, no network. Per-request yes/no confirmation modal.
- Self-host LanguageTool quick-start — Docker and MindTab proxy snippets in the UI.
- QFM (Quality Filter Module) inspect for harness uploads and artifact validation.
- Export options — selective inclusion of config, vocab, logs, knowledge graph, diagrams, and
to_parquet.py.
Fixed (fan-out review pass N01–N25)
- N01/N02:
ltStatusgains'unverified'state; badges render?for it. - N03/N24: MyMemory quota-exhausted is distinct (
'quota') and pre-checked with round-trip headroom. - N06/N07: HTTP-prefixed errors classify as
'unreachable', not'cors-blocked'. - N08: LanguageTool test button disabled when mode is off.
- N09: Fan-out “Run test” has an in-flight guard.
- N12:
lt-status-labelconsistent with mode (showsmode · ?when unverified). - N14: Cache column distinguishes
'partial'. - N16: LT test reads live URL input value.
- N18: Custom URL auto-prepends
http://when scheme is missing. - N20: Truncated MyMemory
qis trimmed to word boundary. - N21: Wizard-seen
localStorageflag set only afteropenWizardsucceeds. - N25: Fan-out diagnostics message cap raised to 48 with ellipsis.
Changed
- Version string v2.5 / format
mD-v2/ artifact version2.5.0. - Honest training notes expanded in exported
README.mdandconfig.json(no real transformer, no real VAE, no emitted EOS token, heuristic reward). - Mutual exclusion of async ops (
fetch/train/ harness) viastate.training+state.fetching. - LanguageTool defaults to off (public endpoint is CORS-blocked from browsers).
Notes
- This remains a base model and needs added datasets to it's folder to be more robust. The “model” is a 27×27 character-bigram transition table.
- VAE
latent_dimandfilter_thresholdappear in config for reference only and do not affect transitions. - No explicit EOS token is emitted; generation is bounded by
max_tokens. BOS (space) is the practical trajectory end signal. - Jev Code runs only inside the Harness modal and never makes network calls.
Reference Architectures
The bundle metadata references these modern open models as inspiration sources. The actual model is a distilled bigram — not a transformer checkpoint — and does not load via AutoModelForCausalLM.
- SmolLM2-135M (HuggingFaceTB)
- Qwen2.5-0.5B (Qwen)
- OLMo-2-1B (AllenAI)
- TinyLlama-1.1B (TinyLlama)
Model Details
- Format:
mD-v2 - Version:
2.5.0 - Reference arch: tiny-bigram (default) — selectable metadata: SmolLM2-135M / Qwen2.5-0.5B / OLMo-2-1B / TinyLlama-1.1B
- Vocab size: 27 tokens (
a–z+ space) - Transition states: 27 (source states)
- Harmonic seed: 1251963776 (default; driven by 4× oscillator measurement)
- Training method: simplified policy-gradient with KL mixing
- Created: session timestamp (ISO)
Training Notes
- No transformer, no attention, no GPU. The model is a character-bigram transition table.
- “GRPO” is simplified. Trajectories are sampled, scored with a heuristic text-shape reward (length, alpha-only, vowel-ending, no-triples), advantages are z-scored, high-advantage transitions are multiplied by
(1 + lr × advantage), then KL-mixed toward a reference snapshot. Reported loss is-mean(advantage × log_prob). - VAE fields are metadata-only. They do not filter or encode anything.
- Reward is heuristic, not a learned reward model.
- No explicit EOS token. Sentinels are declared for schema compatibility only and are never emitted.
Hardware Requirements
Component Minimum Requirements Recommended (for Self-Hosting Extensions) Processor (CPU) Any modern CPU (Intel Atom, Celeron, Raspberry Pi 3+, or newer) Intel Core i3 / AMD Ryzen 3 or equivalent Graphics (GPU) None (Not Supported) None (Not Supported) Memory (RAM) 128 MB (Total script footprint is < 5 MB) 4 GB to 8 GB (Only if running optional Docker containers) Storage < 1 MB for the model files 10 GB (If downloading external training datasets)
Test Wrappers Included
cd /the folder you have the files in/
# 1. Run the test harness
chmod +x test.sh run.sh
./test.sh
# 2. Or chat directly
python3 test.py
Optional: Enhance test.sh / run.sh to Automate the Suite
Update your bash test harness script to systematically validate predictions, catch empty states, and verify output stability across your custom files.
Optional: How to Add Data & Enhance the Tests
Because this is an ultra-compact character model trained primarily on Andrej Karpathy’s names.txt corpus (plus optional README cards), you can enhance coverage by feeding alternative datasets via the browser Harness (drag-and-drop .txt / .md / .json / .zip) or by updating the wrapper code after export.
How the Quantum Oscillators Work for Seeding
The 4× quantum harmonic oscillator superposition does not process token prediction step-by-step during inference. It runs at the end of the pipeline to establish a deterministic seed.
| Component | Operational Role |
|---|---|
| Simulated Superposition | Algorithmic simulation of 4 oscillators with frequencies ω = 1, φ, 2, π. |
| Wavefunction Collapse | Measurement collapses the superposition to a single integer (default harmonic seed 1251963776). |
| Deterministic Initialization | The seed locks the PRNG used for sampling and reproducible transition probabilities in model.json. |
Files in the Bundle
| File | Description |
| --------------------------- | ------------------------------------------------ |
| `model.json` | Trained bigram model (transitions + config) |
| `config.json` | HuggingFace-style metadata |
| `vocab.json` | Character vocabulary |
| `tokenizer_config.json` | Tokenizer metadata (sentinels declared only) |
| `knowledge_graph.json` | 2D graph seeded from corpus |
| `training_logs.json` | Per-step metrics + quantum measurements |
| `test.py` | Interactive chat wrapper |
| `test.sh` | Test harness |
| `test_readme.md` | Testing instructions |
| `run.sh` | Minimal launcher |
| `to_parquet.py` | Convert transitions to parquet |
| `manifest.json` | Bundle checksums (self-excluded) |
| `diagrams/pipeline.svg` | Training pipeline diagram |
| `diagrams/architecture.svg` | Model architecture diagram |
| `README.md` | This model card |
| `LICENSE` | Apache 2.0 |
Training Pipeline
- Fetch — pull corpus from HuggingFace + GitHub (open 2026 endpoints) or use bundled fallback
- Knowledge graph — build character-transition graph, laid out in 2D
- Seed — initialize bigram transition counts from the corpus
- Simplified GRPO — sample trajectories, heuristic reward, advantage update + KL mix
- VAE metadata — record latent_dim / filter_threshold (no effect on table)
- Quantum seed — 4 harmonic oscillators (ω = 1, φ, 2, π) collapse to deterministic seed
- Export — HuggingFace-ready
.zipwith model card, tests, diagrams, manifest
Optional at inference time (browser only): Fan-out NLP polish (LanguageTool / MyMemory / Datamuse) and Jev Code deterministic coding token prediction.
Data Sources
This bundle was produced by fetching from these free, open endpoints (with cache fallback):
raw.githubusercontent.com/karpathy/makemore/master/names.txt(training corpus)huggingface.co/HuggingFaceTB/SmolLM2-135M/raw/main/README.md(model card)huggingface.co/api/models?search=smollm2&limit=5(KG enrichment only)- (Optional / fan-out)
api.languagetool.org/v2/check,api.mymemory.translated.net/get,api.datamuse.com/words
License
Apache 2.0
- Downloads last month
- 176
Model tree for webxos/microd-bigram-v2
Base model
HuggingFaceTB/SmolLM2-135M