Skip to content

This project shows why tokenization should be integrated into ONNX-based DNN models for text processing. It improves speed, reduces preprocessing, and optimizes memory. πŸš€

Notifications You must be signed in to change notification settings

PramodBasavarajMenasi/ONNX-NLP-DNN-Perf-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ONNX-NLP-DNN-Perf

πŸš€ Project Overview

This project demonstrates the importance of integrating tokenization directly into ONNX-based Deep Neural Network (DNN) models for NLP tasks. By doing so, we improve inference speed, optimize memory usage, and eliminate the need for separate preprocessing steps.

πŸ“Œ Why This Project?

  • Traditional DNN models (like OpenCV's DNN module) do not handle textual data.
  • ONNX bridges the gap, enabling NLP models to work efficiently within a DNN pipeline.
  • By integrating tokenization inside the model, we achieve faster inference and better memory optimization.

πŸ› οΈ Required Libraries

Ensure you have the following dependencies installed before running the project:

pip install onnxruntime transformers datasets numpy opencv-python

πŸ“‚ How to Set Up & Run

  1. Clone the repository:
    [git clone https://github.com/your-username/ONNX-NLP-DNN-Perf.git](https://github.com/PramodBasavarajMenasi/ONNX-NLP-DNN-Perf-.git)
    cd ONNX-NLP-DNN-Perf

πŸ“Š Results

Scenario Execution Time Memory Usage
Before Tokenization Integration 2.5495 seconds 53.31 KB
After Tokenization Integration 0.3809 seconds 46.17 KB

πŸ“’ Key Takeaways

  • Without tokenization inside the model: Higher execution time and memory overhead.
  • With tokenization inside the model: Faster inference and reduced memory usage.

About

This project shows why tokenization should be integrated into ONNX-based DNN models for text processing. It improves speed, reduces preprocessing, and optimizes memory. πŸš€

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published