04 · AI policy & compliance analysis · US SaaS

Turning a data-science team's GPU models into a multi-tenant product.

SYBAL is a US AI SaaS startup that analyses company policies for compliance gaps. Its data scientists and AI engineer built the models. I owned the backend, the servers and the deployments, and did the work that makes models usable in a product: asynchronous GPU inference, durable result ingestion, and a separate database for each customer.
Role
Lead Backend Engineer, Platform & ML Integration
Period
Oct 2025 — Apr 2026
Engagement
Remote
Team
With the company's AI engineer and data scientists
Location
United States · from Lahore
of 1,109 commits: top contributor in six months
338
of 281 commits on the main web app
274
GPU instances, async endpoint autoscaling
0 → 5
retries per result, plus a 5-minute sweeper
40

counted, not estimated · no client business metrics

01Context

SYBAL's product reads a company's policies, extracts the rules in them, finds the gaps and flags anomalies. Machine-learning models do the analysis; around them is a multi-tenant web application with single sign-on, billing and CRM connectors.

I joined as lead backend engineer in October 2025. I owned the backend, the servers and the deployments, built much of the frontend, and worked with the AI engineer to bring the models into production.

02The problem

A trained model is not a product. It runs in a notebook on one machine, with data shaped exactly the way the researcher shaped it, and none of that survives real users, real documents and real request volume.

Here the documents are large, GPU inference is slow and expensive, and every customer's data has to stay separate from every other customer's.

03Architecture
fig. 01ml integration · tenancy
TENANTStenant atenant btenant cDjango APIdb router · celeryS3 staginginputs · outputsSAGEMAKER ASYNC · AUTOSCALE 0 → 5Qwen2.5-3B LoRArule extractorRoBERTa NERentity extractioncontinuation tokens · partial mergeCelery ingestionauto-save · 40 retries · sweeper5-minute sweeper re-queues pendingper-tenant anomaly detectionAURORA POSTGRESQLrds proxyddl endpointdb_adb_bdb_cdatabase per tenant · encrypted credentials
04What I built
  1. 01Oct–Nov 2025

    Research pipelines → an ML API

    I wrapped the data scientists' pipelines (sentence-transformers with FAISS for rule extraction, gap analysis and anomaly scoring) in a Django REST service with Celery and Redis workers, S3 input and output, execution tracking, and a non-root Docker image.

  2. 02Jan–Apr 2026

    Async GPU inference that handles large documents

    The AI engineer deployed a Qwen2.5-3B rule extractor (a QLoRA adapter) and a RoBERTa NER model to a SageMaker asynchronous endpoint that scales from 0 to 5 GPU instances. I built the integration: stage inputs in S3, invoke the endpoint asynchronously, poll for results, retry, and time out cleanly.

    • Continuation-token batching and partial-result merging for documents too large for one invocation
    • 3 retries and a 10-minute timeout per invocation
    • Least-privilege IAM: InvokeEndpoint on that one endpoint, and only the S3 prefixes it needs
  3. 03

    Ingestion that does not lose results

    GPU results arrive late and sometimes fail. Celery saves each result with up to 40 retries, and a sweeper runs every five minutes to re-queue anything still pending or failed. Anomaly detection runs daily for each tenant.

  4. 04Feb–Apr 2026

    A database per tenant

    I implemented database-per-tenant isolation: a Django database router driven by the current company, asynchronous provisioning of tenant databases on Aurora PostgreSQL (shared and dedicated-cluster tiers), RDS Proxy for application traffic and the direct endpoint for schema changes, encrypted database credentials, and migrations run across every tenant on deploy.

  5. 05

    Servers and deploys

    Staging and production container builds (Gunicorn with Uvicorn workers; Celery worker, beat and Flower; Redis with AOF persistence; health checks and resource limits) and a GitHub Actions deploy with memory and disk checks, migrations, health polling and cache warm-up. Nginx and Cloudflare in front, and the frontend on AWS Amplify.

05Stack
Services
PythonDjango 5Django REST FrameworkCelery + beatRedisPostgreSQLAurora PostgreSQLRDS Proxy
ML integration
SageMaker async inferenceS3IAMQwen2.5-3B (QLoRA)RoBERTa NERsentence-transformersFAISS
Platform
DockerGitHub ActionsNginxCloudflareAWS Amplify
Product
ReactViteAzure AD SSOStripe
06My part
  • The backend, the servers and the deployments, and much of the frontend
  • Top contributor on the backend: 338 of 1,109 commits between October 2025 and April 2026
  • 274 of 281 commits on the main web app
  • Productionising the models and integrating them with the platform, working with the AI engineer
07Notes for reviewers
  • I did not train the models or build the SageMaker endpoint. The AI engineer built and deployed them; my part was productionisation and integration.
  • SYBAL's code is private and is not linked.
→For hiring teams

Platform, DevOps or AI-platform role? Let's talk.

I build and run production systems on AWS, and I deploy and operate models in them. I'm looking for a senior platform, DevOps or AI-platform role, and I'm relocating to Japan in 2027. A résumé and references are available on request.

Role
Platform & AI Engineer · Technical Lead
Location
Lahore, Pakistan · Relocating to Tokyo · 2027
Languages
English (professional) · Urdu (native) · Japanese (beginner, studying daily)
Email
contact@codewithmuh.com