Software Engineer (AI/ML), Vivasoft Limited

Md. Hasnain Ali

I take language, speech, and vision models from experiment to production.

I fine-tune, benchmark, quantize, and self-host LLM and speech models so they run on the hardware a product can actually afford, CPU-only servers and bare-metal Kubernetes included.

Portrait of Md. Hasnain Ali
Open to research collaborations
Now
Software Engineer (AI/ML) at Vivasoft Limited, building Previea and Novara
Research
3 peer-reviewed papers in Elsevier, MDPI, and IEEE venues
Certified
AWS Solutions Architect – Associate · MongoDB Associate Developer
Studied
B.Sc. in CSE, University of Rajshahi, CGPA 3.56/4.00
Based in
Dhaka, Bangladesh · Open to relocation

Recently

Updated November 2026

  1. Earned AWS Certified Solutions Architect – Associate (SAA-C03).
  2. Geo-HySTE available online in Computers and Electrical Engineering (Vol. 139, Article 111375).
  3. Earned MongoDB Associate Developer certification.
  4. Promoted to Software Engineer (AI/ML) at Vivasoft Limited, working on Previea and Novara.

Selected work

Two products in production and the research code around them. Every result names its dataset and hardware; open a card for the approach and what I would do differently.

9 of 9 projects

Screenshot of previea.aiLive site
LanguageNov 2025 – present

PrevieaAI interview platform

Per-interview LLM cost cut from $5.00 to $0.50 (90%); 1,000+ audio interviews a month, scaling to 50 concurrent sessions on bare-metal Kubernetes.

  • FastAPI
  • Whisper
  • Piper
  • Supertonic
  • Prompt caching
  • Kubernetes
  • Argo CD
  • OpenTelemetry
How it was built
Problem
An end-to-end voice interview platform was spending $5.00 in LLM API fees per interview, which made the product unsellable at its intended price, and every interview also paid a commercial TTS vendor per character.
Approach
Rebuilt the agent loop around cost: provider-side prompt caching, compression of the conversation context between turns, and batched token management so a long interview stops re-sending its own history. A job-adaptive scoring pipeline picks rubric criteria per job and weight-averages per-criterion LLM scores. Whisper Large v3 transcribes each answer on end-of-speech detection; self-hosted Piper and Supertonic replaced the TTS vendor. The whole pipeline runs on self-managed bare-metal Kubernetes, delivered through GitLab CI/CD and Argo CD, with OpenTelemetry tracing every ASR, LLM, and TTS stage.
Result
$0.50 per interview, a 90% reduction, with no change to the interview format and no per-character synthesis cost; the platform serves 1,000+ assessments a month and scales horizontally to 50 concurrent sessions with audio latency held flat.
What I would do differently
I optimised cost before I had a quality regression suite, so the evidence that answer scoring did not drift is weaker than it should be. Next time the eval harness comes first, and every cost change gets reported against it.
Screenshot of novara.myLive site
LanguageNov 2025 – present

NovaraAI recruiting platform

Job-recommendation engine used by 1,000+ monthly active users; OCR resume parser at 87% field-level accuracy on a 100-resume evaluation set.

  • Embeddings
  • Hugging Face Transformers
  • Tesseract OCR
  • FastAPI
  • OpenTelemetry
  • Prometheus
  • Grafana
How it was built
Problem
A recruiting platform needed to rank candidates against each job and to read resumes that arrive as PDF and Word files in every layout imaginable.
Approach
Ranked candidates by a weighted average of embedding similarity and non-embedding scores across four signals: resume content, location, department, and experience level. Built an OCR-based parser that pulls structured candidate fields out of PDF and DOCX resumes, and wired the observability stack: OpenTelemetry metrics to Prometheus, traces to Tempo, and logs to Loki, all surfaced in Grafana.
Result
The first version of the recommendation engine, now used by 1,000+ monthly active users, and a parser reaching 87% field-level extraction accuracy on a 100-resume evaluation set.
What I would do differently
The ranking weights were set by hand. With usage data available now, I would learn them from recruiter decisions and track an offline ranking metric such as NDCG before changing anything live. The 100-resume evaluation set is also small; I would grow it and report accuracy per field.
Illustration of HTML-to-JSON extractionIllustration
LanguageMay 2025 – Oct 2025

HTML-to-JSON extractionGPT API replaced by a 1.5B model on CPU

~10× lower inference cost than the GPT API it replaced, with no loss in output accuracy: a fine-tuned, 4-bit Jina ReaderLM-v2 (1.5B) served by llama.cpp on CPU-only AWS EC2.

  • Jina ReaderLM-v2
  • Hugging Face Transformers
  • llama.cpp
  • GGUF quantization
  • PyTorch
  • AWS EC2
How it was built
Problem
Structured extraction from job-posting HTML ran through a third-party GPT API, and the production servers that had to replace it had no GPU.
Approach
Benchmarked Llama 3.1 8B, Qwen3 8B, and Jina ReaderLM-v2 (1.5B) on extraction accuracy and CPU latency, and picked the task-specialized 1.5B model over generalists 5× its size. Curated and hand-annotated a 5.4K-pair HTML–JSON corpus, fine-tuned the model on it, quantized it to 4-bit GGUF, and served it with llama.cpp.
Result
Roughly a tenth of the inference cost with no loss in output accuracy, running on the CPU-only infrastructure that already existed. The training corpus is open-sourced on Hugging Face.
What I would do differently
The model choice rested on a benchmark I built for this one schema. I would publish that evaluation alongside the dataset, with field-level accuracy per model, so the 5× size argument can be checked by someone else.
Illustration of BanglaShiftIllustration
LanguageJan 2025 1

BanglaShiftBanglish to Bangla translation

Llama 3.1 8B Instruct fine-tuned with 4-bit QLoRA on 5,006 Banglish–Bangla pairs: 180 steps in 8.3 minutes on a single RTX 3090 within 7.3 GB of VRAM.

  • Llama 3.1 8B
  • Unsloth
  • TRL
  • PEFT
  • FastAPI
  • MLflow
  • Docker
How it was built
Problem
Bengali speakers write Bengali in Latin script, and commercial translation APIs handle it poorly while charging per call.
Approach
Fine-tuned Llama 3.1 8B Instruct with 4-bit QLoRA (Unsloth + TRL, rank 16) on a 5,006-pair transliteration dataset, then shipped it as a Dockerized FastAPI service with MLflow experiment tracking and Model Registry versioning, plus a background retraining endpoint that fine-tunes on user-verified corrections without taking the service offline. Built at the BitFest AI Hackathon, where the team reached the final.
Result
A complete fine-tune on one consumer GPU in under ten minutes, served behind a versioned registry so a retrained model can replace the live one without downtime.
What I would do differently
I can say how cheaply the model trains but not how well it transliterates: there was no held-out test set nobody trained against and no chrF or BLEU score. That evaluation comes first next time, with blinded annotation of the outputs.
Illustration of Construction safetyIllustration
VisionNov 2024

Construction safetyReal-time detection benchmark

YOLOv8x: 91.4% [email protected] at 5.9 ms/frame; YOLO11n: 89.4% at 0.65 ms. 8 YOLO variants benchmarked at 640×640 on an RTX 4090, on a 13,293-image worker/tool/firearm dataset.

  • YOLOv8–v11
  • PyTorch
  • OpenCV
  • Roboflow
How it was built
Problem
On-site alerting for workers, power tools, and firearms has to run in real time, and published YOLO comparisons do not tell you how much accuracy you give up for each millisecond on this kind of footage.
Approach
Merged and re-annotated YouTube-GDD with a Roboflow power-tool set into 13,293 images with balanced train/validation/test splits, then trained eight YOLO variants from v8 to v11 at 640×640 under the same budget and mapped the accuracy/latency trade-off rather than picking on mAP alone.
Result
A clear curve to choose from: YOLOv8x reaches 91.4% [email protected] at 5.9 ms per frame, while YOLO11n keeps 89.4% at 0.65 ms on an RTX 4090: two points of mAP for a 9× speed-up.
What I would do differently
mAP is averaged over classes that are not equally frequent, and the rare classes are the ones that matter for alerting. I would report per-class results, use k-fold splits instead of one, and time inference on the edge device that would sit on site instead of a workstation GPU.
Illustration of VisionDeskIllustration
VisionApr 2025 – May 2025

VisionDeskWorkforce activity analytics

Live RTSP pipeline that classifies each worker as working, idle, or away-from-desk, maps people to desks by region geometry, and streams annotated frames to the dashboard as MJPEG.

  • YOLO
  • OpenCV
  • FastAPI
  • Django REST Framework
  • PostgreSQL
  • Redis
  • FFmpeg
  • MediaMTX
How it was built
Problem
A workforce-analytics product needed per-desk activity from ordinary CCTV cameras, and needed to be testable without a live camera on every developer's desk.
Approach
A FastAPI inference service reads RTSP streams over TCP with OpenCV, switchable at runtime between a live CCTV camera and an FFmpeg-to-MediaMTX loopback that replays recorded footage. A fine-tuned YOLO detector labels each person as working, idle, or away; desk-region geometry maps people to workstations. Detections POST to a Django REST API backed by PostgreSQL, and Redis buffers the annotated frames that stream to the dashboard.
Result
The AI service and backend of a real-time analytics platform that runs against either a live camera or replayed footage with no code change.
What I would do differently
"Working" versus "idle" is a value judgement I encoded as a label, and I never measured how the classifier's errors are distributed across individuals. I would define the labels together with the people being measured, report per-subject error rates, and keep only detections rather than frames.
Illustration of Image similarity engineIllustration
VisionFeb 2025 6

Image similarity engineVisual search

Sub-millisecond queries over 100,000+ images; 70% less compute after PCA on 2048-dim ResNet-50 features.

  • PyTorch
  • ResNet-50
  • FAISS
  • PCA
  • CUDA
  • t-SNE
How it was built
Problem
Finding near-duplicate images in a large collection by pairwise comparison does not finish.
Approach
ResNet-50 penultimate-layer features indexed in FAISS with GPU acceleration, PCA to compress the 2048-dimensional descriptors before indexing, and t-SNE plots to sanity-check that the clusters correspond to something a person would call similar.
Result
Sub-millisecond query time across 100,000+ images with roughly 70% of the compute removed by the PCA step.
What I would do differently
I reported the speedup but never measured what the compression cost in recall@k against an uncompressed index. That ablation is the interesting result, and product quantisation deserved a comparison against PCA.
Illustration of Retinal vessel segmentationIllustration
Vision2024

Retinal vessel segmentationU-Net on DRIVE

Custom U-Net trained on the DRIVE dataset (40 fundus images), served through a Streamlit interface for inference on a CPU.

  • U-Net
  • TensorFlow
  • OpenCV
  • Streamlit
  • Medical imaging
How it was built
Problem
Vessel maps are a prerequisite for grading diabetic retinopathy, and tracing them by hand does not scale to a screening programme.
Approach
A U-Net built and trained from scratch on DRIVE rather than fine-tuned from a large backbone, kept small enough that inference runs without a GPU, and wrapped in Streamlit so a clinician can drop in an image and see the mask.
Result
A working segmentation tool with a memory footprint small enough for a laptop in a clinic instead of a GPU server.
What I would do differently
Training and testing both happened on DRIVE's 40 images, which tells you nothing about a different camera. The first thing to add is cross-dataset testing on CHASE_DB1 and STARE, reported without retraining.
Illustration of explore-rag-techniquesIllustration
LanguageOngoing since 2025 8

explore-rag-techniquesTeaching resource

An open, continuously updated walkthrough of retrieval-augmented generation layer by layer, from chunking through evaluation, each notebook runnable.

  • RAG
  • Retrieval
  • Evaluation
  • Python
  • Teaching
How it was built
Problem
RAG advice online is a pile of tricks with no account of which layer each trick belongs to or when it helps.
Approach
Working notebooks organised by layer (chunking, embedding, retrieval, re-ranking, generation), each one runnable, with the trade-off written down next to the code instead of in a blog post.
Result
A resource I keep updating and use to explain retrieval systems to other engineers.
What I would do differently
It grew notebook by notebook without a shared evaluation, so the techniques cannot be compared against each other. Adding one retrieval benchmark that every notebook reports against would make it genuinely useful.

More code on github.com/mdhasnainali

Experience

Two live products at Vivasoft, the extraction work before them, and the lab where the papers came from.

  1. Nov 2025 – Present

    Software Engineer (AI/ML)

    Vivasoft Limited Dhaka, Bangladesh

    Previea AI interview platform

    previea.ai
    • Architected the backend and AI infrastructure for an end-to-end interview platform that runs 1,000+ real-time, audio-based candidate assessments per month.
    • Designed a job-adaptive LLM scoring pipeline that selects rubric criteria per job and weight-averages the per-criterion LLM scores.
    • Cut per-interview inference cost by 90% ($5.00 → $0.50) through Anthropic/OpenAI prompt caching, conversation-context compression, and batched token management.
    • Integrated Whisper Large v3 for multilingual speech-to-text, transcribing each answer on end-of-speech detection; replaced commercial TTS vendors with self-hosted Piper and Supertonic, removing per-character synthesis cost with no regression in voice naturalness.
    • Deployed the pipeline on self-managed bare-metal Kubernetes, scaling horizontally to 50 concurrent sessions with audio latency held flat; GitLab CI/CD with GitOps delivery through Argo CD, Route 53 geolocation routing, and OpenTelemetry traces of per-stage latency across ASR, LLM, and TTS.
    • FastAPI
    • Whisper
    • Piper
    • Supertonic
    • Anthropic & OpenAI APIs
    • Kubernetes
    • Argo CD
    • GitLab CI/CD
    • AWS Route 53
    • OpenTelemetry
    • OpenObserve

    Novara AI recruiting platform

    novara.my
    • Built the first version of a job-recommendation engine used by 1,000+ monthly active users, ranking candidates by a weighted average of embedding-similarity and non-embedding scores across resume content, location, department, and experience level.
    • Developed an OCR-based resume parser that extracts structured fields from PDF and DOCX resumes with varied layouts, reaching 87% field-level extraction accuracy on a 100-resume evaluation set.
    • Integrated the observability stack: OpenTelemetry instrumentation exporting metrics to Prometheus, traces to Tempo, and logs to Loki, surfaced through Grafana.
    • Python
    • Hugging Face Transformers
    • Embeddings
    • Tesseract OCR
    • FastAPI
    • Prometheus
    • Grafana
    • Tempo
    • Loki
  2. May 2025 – Oct 2025

    Associate Software Engineer (AI/ML)

    Vivasoft Limited Dhaka, Bangladesh

    • Led an R&D initiative replacing third-party GPT API calls with a self-hosted model for HTML-to-JSON structured extraction on CPU-only production infrastructure (AWS EC2), cutting inference cost by ~10× with no loss in output accuracy.
    • Benchmarked Llama 3.1 8B, Qwen3 8B, and Jina ReaderLM-v2 (1.5B) on extraction accuracy and CPU latency, selecting the task-specialized 1.5B model over 5× larger generalists to meet the no-GPU constraint.
    • Curated and hand-annotated a 5.4K-pair HTML–JSON training corpus, open-sourced on Hugging Face; fine-tuned the selected model on it, quantized it to 4-bit GGUF, and served it with llama.cpp.
    • Python
    • PyTorch
    • Hugging Face Transformers
    • Jina ReaderLM-v2
    • llama.cpp
    • GGUF quantization
    • AWS EC2
  3. Jan 2023 – Oct 2025

    Undergraduate Research Assistant (part-time)

    BioMe Lab, University of Rajshahi Rajshahi, Bangladesh

    • Built and preprocessed the datasets behind three peer-reviewed studies in medical image analysis and 3D human pose estimation.
    • Trained and evaluated multiple CNN architectures on fundus photographs and ran interpretability analysis comparing learned features with clinical grading criteria, quantifying where deep networks diverge from human diagnostic reasoning.
    • Supervisor: Sangeeta Biswas, Associate Professor, Dept. of CSE.
    • PyTorch
    • CNNs
    • Grad-CAM
    • Integrated Gradients

What I work on

Three questions, each backed by a paper, a repository, or a dataset.

Publications

Three co-authored, peer-reviewed papers. Each links to its DOI and says what I did on it.

  1. 2026 · Journal · Available online 16 Jul 2026

    Geo-HySTE: Geometric Hybrid Spatio-Temporal Encoder for Enhanced 3D Human Pose Estimation

    S. Kumar, S. Biswas, M. A. A. Khan, M. H. Ali, M. H. Shakil

    Computers and Electrical Engineering (Elsevier), Vol. 139, Article 111375, November 2026

    My part. Gathered the datasets and ran the literature review during the project's early phase.

  2. 2025 · Journal

    Interpreting Deep Neural Networks in Diabetic Retinopathy Grading: A Comparison with Human Decision Criteria

    S. Biswas, M. A. A. Khan, M. H. Ali, J. Rohdin, S. Pramanik, M. I. A. Khan, S. K. Chakravarty, B. K. Pramanik

    Life (MDPI), Vol. 15, No. 9, Article 1473, September 2025

    My part. Compiled and preprocessed the fundus-photograph dataset, trained and benchmarked the CNN architectures, ran the interpretability analysis against clinician decision criteria, and wrote the original draft.

  3. 2023 · Conference

    Competency Comparison of Deep Neural Networks for Identifying Gender in Color Fundus Photographs

    M. A. A. Khan, M. H. Ali, N. Saha, M. S. S. Shoumik, S. Biswas

    26th International Conference on Computer and Information Technology (ICCIT, IEEE), Dhaka, December 2023

    My part. Assembled and preprocessed the fundus-photograph dataset, trained and compared the CNN architectures, wrote the original draft, and presented the paper orally at ICCIT.

Datasets

Annotated data from the work above, packaged so someone else can reproduce the numbers.

Illustration of the job-html-to-json datasetIllustration
Dataset

mdhasnainali/job-html-to-json

The hand-annotated corpus behind the HTML-to-JSON extraction work at Vivasoft: raw job-posting HTML paired with structured JSON (title, location, salary, requirements, tools, …). Used to fine-tune Jina ReaderLM-v2 (1.5B) that replaced a GPT API on CPU-only servers.

  • 5,400 train / 55 test
  • 4 configs
  • parquet
  • MIT
Illustration of the construction-safety-13k datasetIllustration
Datasetsample entry

mdhasnainali/construction-safety-13k

The re-annotated worker / tool / firearm detection images behind the construction-safety benchmark: 13,293 frames merged from YouTube-GDD and a Roboflow power-tool set, with the train/validation/test splits used for the YOLO comparison.

  • 13,293 images
  • train / val / test
  • dataset

About

I care more about understanding how things work than about getting them to work once. That started in undergrad, in a medical-imaging lab: it was not enough that a model graded retinal images correctly, I wanted to know which part of the image it was looking at and whether a clinician would have looked there too.

The same question followed me into industry. I build the AI infrastructure behind an interview platform that runs 1,000+ audio interviews a month, and I spend my time making language and speech models small enough and cheap enough to run in production: a $5.00 interview reduced to $0.50, and a GPT API replaced by a fine-tuned 1.5B model on CPUs at roughly a tenth of the cost.

I am an AI/ML engineer in Dhaka with a B.Sc. in Computer Science and Engineering from the University of Rajshahi (CGPA 3.56/4.00), where I spent nearly three years as a part-time research assistant in the BioMe medical-imaging lab under Sangeeta Biswas. My undergraduate thesis compared convolutional and quantum convolutional neural networks for image classification.

My work is production-side: fine-tuning open-weight LLMs to replace commercial APIs, quantizing them to run without a GPU, self-hosting speech recognition and synthesis, and running the whole pipeline on Kubernetes with tracing on every stage. Three co-authored papers came out of the lab work, on interpretability in retinal imaging, gender identification from fundus photographs, and spatio-temporal models for 3D pose estimation.

Education

B.Sc. in Computer Science and Engineering
University of Rajshahi · Jan 2020 – Oct 2025 · CGPA 3.56/4.00

Thesis: A Comparative Study of Convolutional Neural Networks (CNN) and Quantum Convolutional Neural Networks (QCNN) for Image Classification. Supervised by Sangeeta Biswas.

Skills

Tools with a number appear in that many projects. Select one to filter the work above.

LLM engineering
  • LoRA / QLoRA
  • Context compression
  • Anthropic & OpenAI APIs
Serving & optimization
  • CPU-only inference
Speech & vision
Deep learning
  • CNNs
  • Grad-CAM
  • Integrated Gradients
  • Dataset annotation
MLOps & infrastructure
  • GitLab CI/CD
  • GitHub Actions
  • AWS
  • OpenObserve
Languages & backend
  • SQL
  • Bash
  • MongoDB
  • Linux
  • Git

Competitions & awards

Team Machine Mindset receiving the AI Hackathon 2025 winner cheque for the manufacturing track
Champion, AI Hackathon 2025. Bangladesh Innovation Conclave × BRAC University.
  1. 2nd Runner-Up
    Fragments of Feeling: Contextual Emotion Contest
    Kaggle contest on contextual emotion detection. 58% private-leaderboard accuracy, within 5 points of the winning submission (63%).
    Moonmind Research Lab · Aug 2025
  2. Champion
    AI Hackathon 2025
    One of six winning solutions selected from 177 team submissions across 70 organizations; top 31 shortlisted for the final showcase.
    Bangladesh Innovation Conclave × BRAC University · May 2025
  3. Finalist
    BitFest AI Hackathon
    Advanced from a national field of 250+ teams; built BanglaShift, the Banglish-to-Bangla translation service.
    Dept. of CSE, KUET × Brain Station 23 · Jan 2025
  4. Finalist · Top 7
    Datathon 3.0
    Top 7 of 1,000+ teams (3,500+ participants) in Bangladesh's largest applied data-science competition.
    Robi Axiata Limited · Jun 2024
  5. 1st Runner-Up
    NACTAR Robotics Olympiad, Poster Presentation
    Poster presentation track of the national robotics olympiad.
    National Academy for Computer Training & Research · Aug 2022

Let's talk.

Inference cost, self-hosted speech, or a medical-imaging model that needs a second pair of eyes: I am happy to hear about it, whether it is a collaboration, a role, or a code review.