Declarative ML ✦ Edge-Ready TFLite ✦ Zero-TensorFlow Inference
Transform configuration files into trained text classification models with instant edge deployment.
About ✦ Features ✦ Installation ✦ Usage ✦ Architecture ✦ Contributing
TensorSuggestLite turns structured configuration files (JSON, YAML, TOML) into trained TensorFlow/Keras text classification models with automated TFLite export for embedded and edge environments.
Machine learning prototypes often suffer from repetitive boilerplate code for tokenization, label encoding, training loops, and quantization. TensorSuggestLite treats configuration directly as training data: declare categories and examples in standard structured formats, and the engine trains, profiles, evaluates, and converts the model into an optimized artifact ready for production.
The pipeline produces both a full Keras model for server workloads and a quantized TFLite binary that runs with sub-2ms latency on edge runtimes.
"Configuration as training data."
This is a Core Red Project, part of the Sxnnyside Project's ecosystem.
- Declarative Multi-Format Input: Direct parsing of JSON, YAML, and TOML datasets.
- Dataset Profiling & Diagnostics: Automated detection of class imbalance, duplicate sentences, and contradictory labeling prior to training.
- Complete Artifact Bundle: Exports
tokenizer.json,text_classifier.keras,label_encoder.json,text_classifier.tflite, and richmodel_metadata.json. - Confusion Matrix & Metrics: Transparent training telemetry reporting F1-Score, Precision, Recall, Confusion Matrix, and tensor shapes.
- Live Inference Playground: Real-time cross-validation in GUI and CLI (
--compare) verifying prediction parity between Keras and TFLite. - Zero-TensorFlow Lightweight Runtime: Standalone inference engine (
lite_runtime.py) executing predictions with ~5 MB dependencies and ~1 ms latency. - Dual Packaging: Headless CLI for servers/containers alongside a native desktop GUI with dark/light themes.
- Python (3.11)
- uv (recommended task/package manager) or standard
pip - just (command runner for source builds)
# Headless CLI only (lightweight, zero GUI dependencies)
pip install tensorsuggestlite
# Full installation with desktop PyQt6 GUI
pip install "tensorsuggestlite[gui]"git clone https://github.com/core-red-project/tensorsuggestlite.git
cd tensorsuggestlite
# Install dependencies and sync virtual environment
just install
# Run automated test suite
just test# Inspect and profile dataset integrity
uv run tensorsuggestlite inspect examples/example.json
# Train model headlessly with custom hyperparameters
uv run tensorsuggestlite train examples/example.json --output-dir generated/json --epochs 12 --learning-rate 0.001
# Convert Keras model to quantized TFLite
uv run tensorsuggestlite convert generated/json
# Run real-time prediction
uv run tensorsuggestlite predict generated/json "This product is fantastic!"
# Cross-validate Keras vs TFLite parity side-by-side
uv run tensorsuggestlite predict generated/json "Outstanding experience!" --compare
# Audit model registry and historical runs
uv run tensorsuggestlite history generated/json# Launch GUI in development mode
just dev- Import: Click Import JSON/YAML/TOML or drag & drop configuration files into the window.
- Profile: Review dataset balance and sample counts in the console.
- Train: Adjust hyperparameters (
Epochs,Learning Rate,Dropout) and click Train Model. - Convert & Export: Click Generate TFLite and save the binary artifact.
- Playground: Test sentences in real-time or click Compare Keras vs TFLite to verify quantization consistency.
For edge deployment or resource-constrained microservices without full TensorFlow:
uv run python scripts/standalone_infer.py generated/json "Can you help me solve this?"tensorsuggestlite/
├── src/tensorsuggestlite/
│ ├── core/ # Domain entities, protocols, profiler, and exceptions
│ ├── parsers/ # Format parsers (JSON, YAML, TOML) with dynamic registry
│ ├── ml/ # Keras training engine, TFLite exporter, and predictors
│ ├── use_cases/ # Application workflows (Train, Export, Predict)
│ ├── ui/ # PyQt6 interface, native fonts, worker threads, and themes
│ ├── lite_runtime.py # Standalone Zero-TF inference runner
│ └── main.py # Dual-mode CLI/GUI entry point
├── scripts/ # Standalone inference scripts
├── styles/ # Dark and light QSS stylesheets
├── examples/ # Verified multi-format training fixtures
├── tests/ # Automated test suite (29 tests)
└── Justfile # Canonical engineering task recipes
Contributions are accepted. See CONTRIBUTING.md for guidelines.
Before contributing, read the Code of Conduct.
This project is licensed under the MIT License — see the LICENSE file for details.
TensorSuggestLite — A Core Red Project
© 2026 Sxnnyside Project
