Text Classification
Scikit-learn
Joblib
English
intent-classification
logistic-regression
conference-talk-demo
Instructions to use thinktecture/intent-logreg-nextera with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use thinktecture/intent-logreg-nextera with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("thinktecture/intent-logreg-nextera", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Attach model card from MODEL_CARDS.md (LogReg Intent Classifier)
Browse files
README.md
CHANGED
|
@@ -1,24 +1,14 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
-
base_model: google/embeddinggemma-300m
|
| 4 |
-
library_name: sklearn
|
| 5 |
tags:
|
| 6 |
-
- conference-demo
|
| 7 |
-
- local-ai
|
| 8 |
- intent-classification
|
| 9 |
-
--
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
- Source repository: [thinktecture-labs/local-multi-model-agent-slm](https://github.com/thinktecture-labs/local-multi-model-agent-slm)
|
| 18 |
-
- Threat model + out-of-scope: [`SECURITY.md`](SECURITY.md)
|
| 19 |
-
- Licensing details: [`MODEL_LICENSES.md`](MODEL_LICENSES.md)
|
| 20 |
-
- All five models in the stack: [Collection — Local Multi-Model Agent — nextera fine-tunes](https://huggingface.co/collections/thinktecture/local-multi-model-agent-nextera-fine-tunes-6a04a8ff2a40e5696f3c2f18)
|
| 21 |
-
|
| 22 |
---
|
| 23 |
|
| 24 |
## LogReg Intent Classifier
|
|
@@ -27,13 +17,17 @@ deployable artefact. No security audit, no SLA, pinned to the talk's state.
|
|
| 27 |
|---|---|
|
| 28 |
| **Base** | scikit-learn `LogisticRegression`, multinomial, L2 penalty |
|
| 29 |
| **License** | Apache-2.0 (this repo) — but inputs are EmbeddingGemma vectors so the [Gemma Terms](MODEL_LICENSES.md) cover the embedding step |
|
| 30 |
-
| **Training script** | [`training/train_intent_logreg.py`](
|
| 31 |
| **Method** | LogReg on FT-EmbeddingGemma's 768-dim output vectors. Held-out 90/10 split. ~2 minutes on CPU. |
|
| 32 |
| **Training data** | Same as Gemma3-1B intent: `data/training-data/gemma3_intent_{scenario}.jsonl` (re-embedded with the FT EmbeddingGemma) |
|
| 33 |
| **Hardware** | CPU is sufficient. Requires the FT EmbeddingGemma llama-server running on port 9092/9096 to embed training examples. |
|
| 34 |
| **Intended use** | Replaces the 1B generative classifier as the primary intent router. ~10ms per query (vs ~200ms for the 1B). Same accuracy on the standard eval set. |
|
| 35 |
-
| **Out of scope** | Anything that requires generation (it's a 3-way classifier).
|
| 36 |
| **Reference eval (Nextera)** | 96.1% on 180-query eval set. ~10ms per classification (single CPU thread). |
|
| 37 |
| **Known failure modes** | When the EmbeddingGemma FT changes, the LogReg weights become invalid — `intent_classifier_logreg.py:13-15` warns about this coupling. Re-train both together. |
|
| 38 |
|
| 39 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
| 3 |
tags:
|
|
|
|
|
|
|
| 4 |
- intent-classification
|
| 5 |
+
- text-classification
|
| 6 |
+
- logistic-regression
|
| 7 |
+
- sklearn
|
| 8 |
+
- conference-talk-demo
|
| 9 |
+
language:
|
| 10 |
+
- en
|
| 11 |
+
library_name: sklearn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
## LogReg Intent Classifier
|
|
|
|
| 17 |
|---|---|
|
| 18 |
| **Base** | scikit-learn `LogisticRegression`, multinomial, L2 penalty |
|
| 19 |
| **License** | Apache-2.0 (this repo) — but inputs are EmbeddingGemma vectors so the [Gemma Terms](MODEL_LICENSES.md) cover the embedding step |
|
| 20 |
+
| **Training script** | [`training/train_intent_logreg.py`](../training/train_intent_logreg.py) |
|
| 21 |
| **Method** | LogReg on FT-EmbeddingGemma's 768-dim output vectors. Held-out 90/10 split. ~2 minutes on CPU. |
|
| 22 |
| **Training data** | Same as Gemma3-1B intent: `data/training-data/gemma3_intent_{scenario}.jsonl` (re-embedded with the FT EmbeddingGemma) |
|
| 23 |
| **Hardware** | CPU is sufficient. Requires the FT EmbeddingGemma llama-server running on port 9092/9096 to embed training examples. |
|
| 24 |
| **Intended use** | Replaces the 1B generative classifier as the primary intent router. ~10ms per query (vs ~200ms for the 1B). Same accuracy on the standard eval set. |
|
| 25 |
+
| **Out of scope** | Anything that requires generation (it's a 3-way classifier). Low-confidence predictions (< 0.60 threshold, configurable in `intent_classifier_logreg.py`) are overridden to `direct_answer` as a safe fallback intent. The 1B generative classifier is only used as a load-time fallback when the LogReg model file is absent, not as a per-query confidence fallback. |
|
| 26 |
| **Reference eval (Nextera)** | 96.1% on 180-query eval set. ~10ms per classification (single CPU thread). |
|
| 27 |
| **Known failure modes** | When the EmbeddingGemma FT changes, the LogReg weights become invalid — `intent_classifier_logreg.py:13-15` warns about this coupling. Re-train both together. |
|
| 28 |
|
| 29 |
---
|
| 30 |
+
|
| 31 |
+
Source repository: https://github.com/thinktecture-labs/local-multi-model-agent-slm
|
| 32 |
+
|
| 33 |
+
Generated from `finetune/MODEL_CARDS.md` — see source repo for the full pipeline + reproducibility instructions.
|