A recent experiment on GitHub shows that intent classification across 77 banking categories can be handled with a remarkably small and fast pipeline. By combining frozen sentence-transformer embeddings with a standard sklearn logistic regression, the author achieves 94.25% accuracy on the Banking77 dataset using a classifier that weighs in at just 642 KB. No fine-tuning, no GPU, and no enormous model serving infrastructure required.
The Setup and the Numbers
The Banking77 dataset contains 3,080 test queries spread across 77 banking intent classes, covering everything from package tracking to card declines to PIN changes and currency exchange. The pipeline is straightforward: each text input passes through a frozen sentence-transformer model to produce a dense vector, those vectors are scaled with sklearn's StandardScaler, and a logistic regression classifier is trained on top.
Two encoder configurations were tested on a MacBook Pro M3 running entirely on CPU. The BAAI/bge-large-en-v1.5 model produces 1024-dimensional embeddings and reaches 94.25% accuracy with roughly 3 seconds of classifier training time. The smaller all-MiniLM-L6-v2 model produces 384-dimensional embeddings, runs at about 93.0% accuracy, and completes training in approximately 2 seconds.
The classifier and scaler together occupy about 642 KB on disk. The embedding model itself, which remains separate and is used only to convert text into vectors at runtime, is roughly 1.2 GB for bge-large-en-v1.5 or 91 MB for all-MiniLM-L6-v2.
Why the Details Matter
Several choices in the implementation make the difference between a mediocre result and a strong one. The logistic regression uses C=0.01 rather than the default C=1.0. Higher regularization is essential when working with high-dimensional embeddings, where the default settings tend to overfit. The solver is set to newton-cg rather than the default lbfgs, which performs slightly better on this problem. Class weights are balanced to account for any uneven distribution across the 77 intent categories.
The embedding model is used frozen, meaning its weights are never updated during training. This eliminates the need for GPU hardware and makes the entire pipeline reproducible on modest hardware. The heavy lifting is done by the pre-trained encoder; the logistic regression simply draws a boundary in the space it has already been shaped to occupy.
The Pipeline in Practice
The implementation is reproducible with a single command and three pip packages: datasets, sentence-transformers, and scikit-learn. Running the script with the default model reproduces the 93% result. Passing --model BAAI/bge-large-en-v1.5 switches to the larger encoder and reaches 94.25%.
The evaluation includes a per-class breakdown showing which intents are hardest and which are easiest, identified by F1 score. Five example queries demonstrate inference in action, with each prediction accompanied by its confidence percentage. This kind of transparency matters when the model is being used to route customer queries in a real system.
What This Says About Practical ML
The result is a useful reminder that enormous models are not always the answer. A frozen encoder that was trained once for general semantic representation, combined with a tiny linear classifier trained in seconds, can match or exceed the performance of much heavier architectures on a well-defined classification task. The 642 KB classifier can be bundled into a service, deployed anywhere, and updated independently of the encoder.
This does not generalize to every NLP problem. Banking77 is a relatively clean dataset with clearly separated intents, and the frozen encoder already encodes the semantic distinctions well enough for a linear boundary to work. For tasks requiring generation, complex reasoning, or fine-grained stylistic control, the approach would fall short.
What it does demonstrate is that the barrier to deploying a competent intent classifier has never been lower. Three Python packages, a single script, and a few seconds of training time are all that stand between a developer and a production-ready classifier handling 77 categories of banking queries at over 94% accuracy.