← All posts

Procurement NLP

Procurement-title NLP API · Macro-F1 0.9639 · category F1 0.90 · about 50 ms CPU

Built with RoBERTa-large · LoRA · SBERT · UMAP · HDBSCAN · ONNX Runtime INT8 · FastAPI

Weakly supervised procurement NLP pipeline from a RoBERTa LoRA bidability teacher through ontology discovery, Max-Sim weak labels, a multiclass student, and INT8 ONNX CPU serving
Domain representation, ontology construction, weak supervision, and deployment in one pipeline

WHY

Incoming notices had to be routed immediately by bid eligibility and work category using only the title. Detailed labels were scarce, and the production environment had no inference GPU. The project therefore needed to build a domain taxonomy without exhaustive annotation and serve both decisions quickly on CPU.

Bid eligibility Macro-F1 0.9639

Accuracy 96.4%

Detailed categories F1 0.90

Weakly supervised multiclass model

CPU deployment ~50 ms

Static INT8 ONNX · about 330 MB

HOW

From scarce labels to a CPU-served label system

The teacher does more than classify: its domain representation becomes the basis for ontology discovery and work-category supervision.

  1. 01 Bidability teacher

    Fine-tune KLUE RoBERTa-large with LoRA, focal loss, R-Drop, and FGM.

  2. 02 Ontology discovery

    Project 1024-dimensional CLS representations through UMAP and HDBSCAN, then refine clusters with human review.

  3. 03 Weak labels

    Combine hard-rule overrides with SBERT 0.9 and domain-RoBERTa 0.1 Max-Sim confidence.

  4. 04 Multiclass student

    Train a class-weighted LoRA model over the dynamically constructed label set.

  5. 05 INT8 batch serving

    Merge adapters, apply static ONNX quantization, and execute two models concurrently in FastAPI.

RESULT

Bidability evaluation

ApproachMacro-F1Accuracy
LLM few-shot0.35154.0%
Fine-tuned RoBERTa + LoRA0.963996.4%
RAFT0.35053.8%
Three-agent path0.963996.4%

All rows use the same 500-record binary evaluation set.

Bar chart comparing Macro-F1 and accuracy on a 500-record bidability evaluation, with the fine-tuned RoBERTa classifier reaching 0.9639 Macro-F1 and 96.4 percent accuracy
500-record bidability evaluation · Macro-F1 and accuracy

Contribution

  • Designed the representation-to-ontology and Max-Sim weak-label path for work-category supervision.
  • Trained the binary and multiclass LoRA classifiers, exported static INT8 ONNX artifacts, and connected parallel inference to a FastAPI batch endpoint.

Evidence

Source code Preprocessing, training, ontology discovery, weak labeling, quantization, and serving