The YZLite package by Yizhu Technology is an experimental Python package with command-line utilities and scripts for developing machine learning models for embedded platforms. It provides features such as command-line interface, Python API, model profiler, model training and evaluation, model summary, visualization, quantization, audio feature generation, C++ Python wrappers, and more. The package does not come with any warranty or support services, but it is supported by online documentation and community support. YZLite can be installed using pre-built Python package or by building from Github. The software is provided "as-is" without any warranty, but it can be used for any purpose including commercial applications, subject to certain restrictions.
This is a Python package with command-line utilities and scripts to aid the development of machine learning models for Yizhu Technology 's embedded platforms.
The features of this Python package include:
- Command-line - Execute all ML operations from a simple command-line interface
- Python API - Execute all ML operations from a Python script
- Model Profiler - Determine how efficiently an ML model will execute on an embedded platform
- Model Training - Train an ML model using Google Tensorflow
- Remote Training via SSH - Securely and seamlessly train the model on a remote "cloud" machine
- Model Training Monitor - Monitor/profile the training of a model using Tensorboard
- Model Evaluation - Evaluate a trained ML model's accuracy and other metrics
- Model Summary - Generate a summary of the model's contents
- Model Visualization - Interactively view the ML model's structure
- Model Quantization - Reduce the memory footprint of an ML model by using the Tensorflow-Lite Converter
- Model Parameters - Embed custom parameters into the generated model file
- Audio Feature Generator - Library and tools to convert streaming audio into spectrograms
- Audio Utilities - Utilities to aid the development of audio classification models
- C++ Python Wrappers - Enable sharing source code between embedded targets and model training scripts
- ReRAM Simulator - Simulate neural network inference on ReRAM crossbar arrays with realistic hardware characteristics
Refer to Why YZLITE? for more details on the benefits of using the YZLITE.
A complete simulation environment for ReRAM-based Processing-In-Memory (PIM) architectures:
from yzlite.core import TfliteMicro
# Load model with ReRAM simulation
model = TfliteMicro.load_tflite_model('model.tflite', accelerator='reram')
# Configure ReRAM parameters
model.accelerator.configure_crossbar(rows=256, cols=256, levels=8)
model.accelerator.set_adc_resolution(bits=4)
# Test with fault injection
model.accelerator.inject_faults(fault_rate=0.01)
results = model.profile()
# Get performance metrics
stats = model.accelerator.get_statistics()
print(f"Energy: {stats['energy_uj']} ฮผJ, Latency: {stats['latency_us']} ฮผs")Key Capabilities:
- โ Multi-Level Cell (MLC): 2-16 configurable resistance levels
- โ Realistic Hardware Modeling: IR drop, sneak path, write/read variation
- โ Fault Injection: Reliability analysis with configurable fault rates
- โ Performance Metrics: Energy (ฮผJ), latency (ฮผs), operation counts
- โ Flexible Configuration: Crossbar size, ADC resolution, cell levels
- Extended Python Support - Now supports Python 3.7-3.13 (previously 3.7-3.10)
- Updated TensorFlow - Compatible with TensorFlow 2.13+ (tested with 2.13.1)
- Enhanced Documentation - 90 KB of comprehensive ReRAM simulator documentation
- 100% Test Coverage - All 56 tests passing across multiple configurations
Based on latest academic research (2019-2024):
- RAELLA - Low-resolution ADC for analog PIM
- FARe - Fault-aware GNN training on ReRAM
- FPSA - Reconfigurable ReRAM accelerator
- RED - ReRAM-based deconvolution
.. raw:: html
<iframe src="./_static/overview/index.html" width="100%" height="600" frameborder="0" class="slideshow-iframe" allowfullscreen style="min-height: 600px; border: 1px solid #e0e0e0; border-radius: 4px; display: block;"></iframe>
Install the pre-built Python package:
.. tab-set::
.. tab-item:: Windows
.. code-block:: shell
pip install yizhu-yzlite
.. tab-item:: Linux
.. code-block:: shell
pip3 install yizhu-yzlite
Or, build and install the Python package from Github:
.. tab-set::
.. tab-item:: Windows
.. code-block:: shell
pip install git+https://github.com/ReRAM-Labs/yzlite.git
.. tab-item:: Linux
.. code-block:: shell
pip3 install git+https://github.com/ReRAM-Labs/yzlite.git
Refer to the Installation Guide for more details on how to install the YZLITE.
from reram_simulator_example import ReRAMSimulator
import numpy as np
# Create simulator
simulator = ReRAMSimulator(rows=128, cols=128, adc_resolution=4)
# Load weights
weights = np.random.randn(128, 128)
simulator.load_weights(weights)
# Run inference
input_data = np.random.randn(128)
output = simulator.inference(input_data)
# Test fault tolerance
num_faults = simulator.crossbar.inject_stuck_at_faults(0.01)
output_with_faults = simulator.inference(input_data)Requires Python 3.10 environment with TensorFlow:
# Create compatible environment
conda create -n yzlite python=3.10 -y
conda activate yzlite
pip install tensorflow==2.13.1
# Install YZLITE
pip install yizhu-yzlite- Installation Guide - Install YZLITE
- Quick Reference - Command reference
- Frequently Asked Questions - Common questions
- Model Profiler - Profile model performance
- Model Training - Train ML models
- Model Evaluation - Evaluate accuracy
- Model Quantization - Reduce model size
- Model Visualization - Visualize model structure
- C++ Development Guide - C++ development overview
- C++ Python Wrappers - Wrapper documentation
- MVP Wrapper - MVP accelerator
- ReRAM Wrapper - ReRAM simulator
- ReRAM Quick Start - Get started quickly
- ReRAM Research - Research papers and design
- How to Use - Detailed usage guide
- Implementation Guide - Implementation details
- Changelog - Version history
- โ Python 3.7, 3.8, 3.9, 3.10 - Fully supported
- โ Python 3.11, 3.12 - Supported (less tested)
โ ๏ธ Python 3.13 - Standalone ReRAM simulator works, TensorFlow has known issues
- โ TensorFlow 2.13.1 - Recommended (tested)
- โ TensorFlow 2.14-2.19 - Should work
โ ๏ธ TensorFlow 2.20+ - Compatibility issues with Python 3.13
Recommended Setup: Python 3.10 + TensorFlow 2.13.1
Contributions are welcome! Please see the documentation for development guidelines.
SPDX-License-Identifier: Zlib
See LICENSE.md for full license text.
If you use YZLITE or the ReRAM simulator in your research, please cite:
@software{yzlite2025,
title = {YZLITE: Machine Learning Toolkit for Embedded Platforms},
author = {Yizhu Technology},
year = {2025},
version = {0.2.0},
url = {https://github.com/ReRAM-Labs/yzlite}
}For the ReRAM simulator specifically:
@software{yzlite_reram2025,
title = {YZLITE ReRAM Crossbar Array Simulator},
author = {Yizhu Technology},
year = {2025},
note = {Based on RAELLA, FARe, FPSA, and RED research},
url = {https://github.com/ReRAM-Labs/yzlite}
}