Generative large language models (LLMs) are often optimized for natural language text generation, which can introduce latency when applied to middleware tasks like real-time financial transaction inspection. To address this, specialized classification techniques modify LLM pipelines to bypass text generation entirely. Instead of generating conversational responses, these modified models evaluate structured queries in a single parallel pass and output classification probabilities directly. Writing on the Ubuntu blog on September 30, 2026, Rob Gibbon detailed how developers can leverage open-source MLOps tools to run an open-weight classification model for real-time fraud detection.
Optimizing LoRA Models with AWQ Quantization
Deploying open-weight models locally—such as the system-one-qwen3.5-4b-scorer—requires optimization to avoid excessive memory usage. The workflow combines Low-Rank Adaptation (LoRA) weights directly into the base model to eliminate the operational overhead of running dual model paths simultaneously.
To reduce resource requirements further, Activation-aware Weight Quantization (AWQ) is applied. This 4-bit post-training quantization technique reduces the model's memory footprint from roughly 18GB to around 5GB with minimal impact on accuracy. While AWQ is typically optimized for GPU acceleration, the quantized artifacts can also run on standard CPU architecture for local development setups.
Deploying Inference Workloads with KServe and vLLM
The operational environment relies on Canonical's open-source MLOps tools, specifically deploying KServe on a MicroK8s Kubernetes cluster configured via Juju and Terraform. KServe acts as the control plane for managing inference pods in production environments.
Model serving is handled by vLLM. Once deployed within the Kubernetes cluster, vLLM loads the quantized model artifacts into memory and exposes API endpoints for processing structured inference requests.
Single-Pass Fraud Risk Classification
Rather than requesting long-form explanations, client applications transmit structured transaction records—including transaction types, amounts, and account balance changes—alongside categorical risk options (such as LOW_RISK, MEDIUM_RISK, or HIGH_RISK_FRAUD).
By evaluating log probabilities across token choices in a single forward pass, the model returns specific decision tokens alongside confidence metrics. While local CPU deployments serve primarily for testing and development, production deployments targeting low-millisecond latencies across high-volume transaction loops typically require dedicated GPU hardware.
AI-generated editorial illustration; not a documentary photograph.
Source: Realtime transaction fraud detection – with an LLM?

Leave a Reply