Loading…
Loading…
psikosen/t-rsi-ocr)[!WARNING]
⚠️ EXPERIMENTAL RESEARCH RELEASE — PRELIMINARY BENCHMARK NOTICE
- Verification Advisory: This is an experimental research model. Do not trust benchmark results until independently verified by a secondary source.
- Evaluation Environment & Origin: Evaluated on an Apple Silicon M-Series (128GB Unified RAM) testbench.
- Replication Requirement: Requires additional independent benchmarks across expanded document callsets prior to production deployment.
T-RSI Fast Reflex OCR is a machine-native optical character recognition engine engineered for extreme memory efficiency, microsecond-level latency, and multiplication-free digital agent execution.
model.safetensors: 590 KB (standard Hugging Face Safetensors format).weights_packed_1.58bit.bin: 80 KB (2-bit packed binary representation: 4 ternary weights per byte).model.safetensors: Quantized 1.58-bit ternary tensor weights ({-1, 0, +1}) in standard Hugging Face Safetensors format.weights_packed_1.58bit.bin: 2-bit packed binary representation (80 KB, 4 ternary weights per byte).config.json: Model hyperparameters, BitNet quantization schema, and evaluation hardware metadata.vocab.json & tokenizer.json: Vocabulary mapping for 256 OCR tokens, special tokens, and ASCII characters.engine.py: Standalone, multiplication-free execution engine.model_architecture.py: PyTorch architecture with Straight-Through Estimator (STE) ternary quantization.train_bitnet_ocr.py: Training and weight export pipeline.live_interactive_test.py: Live interactive runner with on-screen HUD telemetry and CLI REPL.packing_utils.py: 2-bit packing and unpacking utilities.from PIL import Image
from engine import FastReflexOCREngine
# 1. Load model weights and config directly from Hugging Face Hub or local path
engine = FastReflexOCREngine.from_pretrained("psikosen/t-rsi-ocr")
# 2. Execute multiplication-free OCR inference
image = Image.open("sample_images/simple_invoice.png")
text, latency_us, ram_kb = engine.recognize(image)
print(f"Recognized: '{text}' in {latency_us:.1f} µs (Peak RAM: {ram_kb:.1f} KB)")
# 1. Run 5-part autonomous OCR benchmark mission with HUD telemetry
python3 live_interactive_test.py --benchmark
# 2. Recognize custom text rendered on-the-fly
python3 live_interactive_test.py --text "TOTAL: $49.99"
# 3. Recognize an image file
python3 live_interactive_test.py --image path/to/image.png
# 4. Launch interactive terminal decision shell
python3 live_interactive_test.py --interactive
To fine-tune or train the BitNet OCR model:
python3 train_bitnet_ocr.py
Outputs updated model.safetensors and weights_packed_1.58bit.bin.