Hybrid Lexicon-Based Streaming Compressor for AI Infrastructure
Project description
🚀 Poetix (poetix-torch)
The Engine that Democratized AI Training: Breaking the 2 Million Tokens/Sec Barrier on Consumer Hardware.
Poetix is not just a library; it's a paradigm shift. Designed by Mazen Mohamed (21 years old), this Rust-backed engine was built to solve the ultimate bottleneck in LLM training: Data Starvation.
While others require massive server farms, Poetix allows you to feed your GPUs at professional speeds using nothing but a standard consumer CPU.
🏗️ Hardware & Experimental Setup
All benchmarks were executed on a Standard Consumer Machine:
- CPU: Intel Core i5 (Mid-range)
- RAM: Testing included scenarios with only 8GB .
- Model: Experiments performed on high-efficiency training models (~77M Parameters).
The Result? We hit 1.98 Million Tokens/Sec on a single thread. This isn't just code; it's mechanical sympathy between Rust and Hardware.
⚡ The Performance Revolution: Rocket vs. Tank
We provide two distinct engines to suit your infrastructure needs:
1. The "Rocket" Mode (In-Memory)
- Speed: 1.98M+ tokens/sec.
- The Trade-off: Loads the entire dataset into RAM.
- Best for: Fast iterations on small-to-medium datasets (up to a few GBs) where speed is the only god.
2. The "Tank" Mode (Infinite Streaming) 🛡️
- Speed: ~770k+ tokens/sec.
- The Magic: ZERO RAM Pressure. Constant memory footprint (< 10 MB).
- Why it's a game-changer: You can train on a 2 Terabyte dataset using a 4GB RAM laptop. It streams data "by the drop" from the disk, ensuring your system never freezes or crashes with
Out of Memory (OOM)errors.
💻 CLI Command Center
| Action | Command | Use Case |
|---|---|---|
| Standard Compress | poetix compress data.json data.ptx |
Fast, block-based compression. |
| Infinite Stream | `cat data.json | poetix stream-compress > data.ptx` |
| Decompress | poetix decompress data.ptx data.json |
Restore original data instantly. |
| Stream Restore | `cat data.ptx | poetix stream-decompress > data.json` |
🧠 Core Features
- Zero-Copy Architecture: Leveraging Rust's safety and speed to bypass Python's Global Interpreter Lock (GIL).
- Lexicon-Based Hybrid Compression: Combines Aho-Corasick pattern mining with Zstd for up to 90% storage savings.
- PyTorch Integration: Direct injection of
torch.Tensorbatches into your training loop.
📦 Installation
pip install poetix-torch
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file poetix_torch-0.3.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: poetix_torch-0.3.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce54bd9878ea8ea646b1a761e242a49e8c4abb07f055b88afd6702e78729bf2d
|
|
| MD5 |
2303e77e372b836ec4b1eb50c8940afa
|
|
| BLAKE2b-256 |
a537418ab7d2423c3319ebd611e0cbd2bd1d0a94af36e57265f7047cd92d0d45
|