Hanafi Haffidz

Hi, I'm a certified CAIE Associate AI Engineer based in Singapore.

For over a decade, I thrived as a freelance filmmaker and company owner, overseeing diverse projects from inception to completion. This experience allowed me to excel in various roles, including project management, training, design thinking, content development, branding and communication.

One unique advantage I bring to the AI landscape is my non-STEM background. In my previous work, the foremost focus has always been on the human experience. As the world becomes increasingly digitized, I hope to bridge the gap between cutting-edge technology and intuitive, user-centric AI solutions that resonate with people.

Check out my machine learning projects, view my previous creative work, or connect with me here.

Machine Learning Projects

LLM Agents for Therapy Use Case

In my recent role as an AI & full stack engineer for a mental healthcare organisation, my work involved applied machine learning, prompt engineering, backend & API development, and prototyping frontend/UI solutions.

I designed and implemented multiple chatbot applications for users at various stages of their therapy journey, created analytics dashboards for tracking progress and program effectiveness, implemented advanced LLM data management features like vector storage and knowledge graph retrieval-augmented generation (KG RAG), built session transcription and therapy note-taking solutions, integrated speech-to-text and text-to-speech systems in chatbots.

I managed the full project lifecycle from POC design to production deployment, implemented CI/CD pipeline monitoring with error alerting and metrics tracking, and security protocols including SSL, API keys, data encryption, anonymization and error monitoring.

See a demo here.

PROJECT TYPE

LLM Agents/Applications

TECH STACK

Docker, FastAPI, Celery, OpenAI, Next.js, LlamaIndex, HuggingFace, MongoDB, Tailwind CSS, AWS Cloud

TAGS

Large Language Models, Chat Agents, Text-to-speech, Speech-to-text, LLM Application, Retrieval Augmented Generation

 

Model Deployment with FastAPI/Celery

This project utilizes a robust tech stack, including FastAPI, Celery, RabbitMQ, and Redis, to serve a PyAnNet model tailored for Voice Activity Detection (VAD).

The implementation leverages FastAPI’s asynchronous web framework to handle heavy audio processing workloads by offloading them to separate worker nodes handled by Celery, coordinated via RabbitMQ’s messaging system.

Redis acts as the results backend data store, ensuring seamless caching and data persistence. The resultant system facilitates rapid and scalable deployment of the VAD model, and can be run locally on a single desktop or cloud deployed for larger workloads.

PROJECT TYPE

Model Deployment

TECH STACK

Docker, FastAPI, Celery, RabbitMQ, Redis, Pytorch Lightning

TAGS

Audio, Speech Recognition, Voice Activity Detection, Deployment, Distributed Systems, CNN, LSTM

 

ChatPDF – PDF Document Information Retrieval with AI Chat Interaction

This project involves the ingestion of PDF files and the extraction of relevant information through an interactive chat method. Users can ask questions, and the application leverages the power of GPT-3.5-turbo to provide responses based on the content of the PDFs.

After ingesting PDF files, multi-qa-mpnet-base-dot-v1 model is used to generate embeddings on the tokenized sentences.

When user submits a chat query, the nearest matches are retrieved, and the query and document matches are sent to gpt3.5-turbo along with a prompt message to only reply if the document matches provide sufficient information for it to reply to the user's query

PROJECT TYPE

Retrieval Augmented Generation

TECH STACK

Langchain, Transformers, OpenAI, Gradio

TAGS

Retrieval Augmented Generation, Large Language Models, Natural Language Processing, Semantic Search

 

Plant Disease Detection

This project aims to develop a plant disease detection system by utilizing TensorFlow Object Detection API and deploying it through Docker and TF Serving.

The 'PlantDoc' dataset is used for training and evaluation purposes. Initial phase utilized the SSD MobileNetV2 FPNLite 320×320 model, but it did not yield usable results. ResNet101 FPN model was then selected based on a performance/speed chart. Image augmentation techniques were implemented in the training pipeline to enhance model performance. TensorBoard was employed to monitor the training and evaluation processes.

The model was finally deployed using Docker and TF Serving, enabling inference through a REST client.

PROJECT TYPE

Object Detection

TECH STACK

Tensorflow, Tensorboard, Docker

TAGS

Convolutional Neural Networks, Image Classification, Transfer Learning

 

'Auntie Lucy' – Supermarket Educational Mobile Game for Children

This capstone project, developed as part of the IBM SGUnited Mid Career Pathways Programme, introduces ‘Auntie Lucy,’ a mobile game aimed at educating young children about fruits and vegetables. The game utilizes TensorFlow CNN image classification and transfer learning techniques, with Flask deployment on Heroku.

The primary objective of ‘Auntie Lucy’ is to help children recognize various fruits and vegetables while providing interesting facts about them. However, the project faced limitations due to a free account, resulting in a model size constraint of 50MB, which affected performance. The project repository can be accessed for further details, and the deployment is available on a free Heroku dyno, which may take some time to spin up.

Key techniques employed in this project include Convolutional Neural Network (CNN) for image classification, transfer learning using MobileNet and InceptionV3 architectures, and the Flask framework for seamless deployment.

PROJECT TYPE

Image Classification

TECH STACK

Tensorflow, Flask

TAGS

Convolutional Neural Networks, Image Classification

 

Predicting Passenger Survival using sklearn Classifiers

This project focuses on developing a classifier model to predict the survivability of passengers in a ship crash, leveraging actual data and passenger manifests. By identifying meaningful patterns in the available data, the model aims to optimize the allocation of search-and-rescue resources for the remaining missing passengers.

The developed classifier model achieved an accuracy score of 0.80576 on Kaggle, with a commendable leaderboard position of 256 out of 2350 participants.

Utilised a range of techniques and methodologies, including conditional imputation of missing values, KNNImputer, OneHotEncoder, OrdinalEncoder, Regex, RobustScaler, PCA, GridSearchCV, GaussianNB, LogisticRegression, SVC, Adaboost, RandomForest, HistGBM, and Pipelines for the final model.

PROJECT TYPE

Tabular Classification

TECH STACK

scikit-learn

TAGS

Tabular Classification, Kaggle Playground Series

 

Exploring NLP Text Mining, Sentiment Analysis, Topic Modelling

Exploratory exercises focusing on sentiment analysis of book reviews, spam classification of NUS text messages, and topic modelling of BBC News articles.

Techniques employed include:
Utilization of CountVectorizer and tf-idf embeddings for text representation.
Dimensionality reduction techniques such as PCA, t-SNE, and UMAP for visualizing and determining the optimal number of clusters (n_clusters).
Application of Latent Dirichlet Allocation for topic modelling.
Leveraging BERTopic with pre-trained sentence transformer models for advanced topic extraction.
Visualizing topic keywords using Wordcloud visualizations..

PROJECT TYPE

Natural Language Processing, Text Classification, Clustering

TECH STACK

NLTK, gensim, SpaCy, BERTopic

TAGS

Natural Language Processing, Text Classification, Clustering, Topic Modelling, Text Mining

 

Past Creative Work

Here is some of my past work as a media practitioner, that hopefully showcases some of the sensibilities and soft skills I've developed over the years.

© 2023 Hanafi Haffidz
linkedin  github credly