https://github.com/dartayous/voice-intent-classifier
“Modular ML pipeline for voice search intent classification with GPU profiling via Nsight Systems.”
https://github.com/dartayous/voice-intent-classifier
gpu machine-learning nlp profiling tensorflow
Last synced: about 2 months ago
JSON representation
“Modular ML pipeline for voice search intent classification with GPU profiling via Nsight Systems.”
- Host: GitHub
- URL: https://github.com/dartayous/voice-intent-classifier
- Owner: Dartayous
- Created: 2025-08-30T00:17:01.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-30T01:19:40.000Z (10 months ago)
- Last Synced: 2025-08-30T03:18:08.741Z (10 months ago)
- Topics: gpu, machine-learning, nlp, profiling, tensorflow
- Language: Jupyter Notebook
- Homepage:
- Size: 2.42 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Voice Search Intent Classifier (with GPU Profiling Lab)
This project trains an artificial neural network to classify voice search queries by intent—such as `information`, `command`, `shopping`, or `entertainment`. Built for clarity, modularity, and performance, the lab includes full GPU profiling using NVIDIA Nsight Systems and NVTX markers.
---


---
## Project Structure
ml-training-lab/
├── train_model.py # Training script with NVTX profiling
├── predict_intent.py # Inference script for new voice queries
├── utils.py # Shared preprocessing and encoding functions
├── assets/ # .png files for viewing
├── traces/ # Nsight Systems .nsys-rep files
└── README.md # Project overview and instructions
---
## What This Project Demonstrates
- ✅ Real-world NLP pipeline using voice search data
- ✅ Intent classification with TensorFlow/Keras
- ✅ Modular design for training, inference, and preprocessing
- ✅ GPU profiling with Nsight Systems + NVTX annotations
- ✅ Interview-ready explanations of model behavior and performance
---
## Dataset
- **Source**: `voice_search_query_captures.csv`
- **Fields used**:
- `query_text`: Input to the model
- `intent`: Target label
- **Preprocessing**:
- Lowercasing, punctuation removal
- Tokenization + padding
- Label encoding

---
## Model Architecture
- `Embedding` layer (vocab size: 1000, dim: 16)
- `GlobalAveragePooling1D`
- `Dense` (24 units, ReLU)
- `Dense` (softmax output for multi-class classification)


---
## Architecture Overview






---
## Profiling with Nsight Systems
Training is wrapped with NVTX markers for each epoch:
```python
with nvtx.annotate("Epoch 1", color="blue"):
model.fit(...)
```
---
### To generate a trace:
nsys profile -o traces/nn_training_trace --trace=cuda,nvtx python train_model.py
### Open the .nsys-rep file in Nsight Systems to visualize:
* CUDA kernel launches
* Memory transfers
* NVTX-labeled epochs
* CPU orchestration

### Inference Example
python predict_intent.py
### Sample output:
Query: 'Play jazz music on Spotify' → Predicted Intent: 'entertainment'
Query: 'Turn off the living room lights' → Predicted Intent: 'command'
---
## Simulation Notebook
Explore the full training and testing workflow in the interactive notebook:
[`ml_training_lab_SIM.ipynb`](ml_training_lab_SIM.ipynb)
This notebook walks through:
- Data loading and preprocessing
- Model architecture and training
- NVTX-wrapped profiling setup
- Inference on new voice queries
- Commentary and visual outputs
---
## Requirements
* Python 3.8+
* TensorFlow
* scikit-learn
* NVIDIA Nsight Systems
* NVTX (pip install nvtx)
---
## Future Enhancements
* Add confusion matrix and intent distribution visualizations
* Integrate real-time voice input via microphone
* Expand to multilingual intent classification
* Profile inference latency and memory footprint
---
## Author
Dartayous — Creative Technologist & AI/ML Engineer
Focused on cinematic, modular GPU workflows and explainable AI.
Built this lab to showcase real-world ML engineering and profiling mastery.
---
## 📎 License
MIT License — feel free to fork, remix, and build upon it.