Update README.md
Browse files
README.md
CHANGED
|
@@ -7,47 +7,86 @@ tags:
|
|
| 7 |
model-index:
|
| 8 |
- name: intent_model
|
| 9 |
results: []
|
|
|
|
|
|
|
| 10 |
---
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
This
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
|
|
|
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
|
| 31 |
-
##
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
-
|
| 42 |
-
|
|
|
|
| 43 |
|
| 44 |
-
##
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
|
|
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
| 51 |
-
- Pytorch 2.10.0+cu128
|
| 52 |
-
- Datasets 4.0.0
|
| 53 |
-
- Tokenizers 0.22.2
|
|
|
|
| 7 |
model-index:
|
| 8 |
- name: intent_model
|
| 9 |
results: []
|
| 10 |
+
language:
|
| 11 |
+
- en
|
| 12 |
---
|
| 13 |
+
# prompt-intent-mini
|
| 14 |
|
| 15 |
+
**A lightweight model for classifying the intent behind a prompt.**
|
| 16 |
+
Built by [TinyModels](https://huggingface.co/TinyModels) — small footprint, serious performance.
|
| 17 |
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## What it does
|
| 21 |
+
|
| 22 |
+
`prompt-intent-mini` takes a user prompt as input and returns its intent label — what the user is *actually trying to do* with that prompt. Whether it's a question, a command, a creative request, or something else entirely, the model picks it up fast and with minimal compute.
|
| 23 |
|
| 24 |
+
This is useful anywhere you need to route, filter, or understand prompts before passing them downstream — chatbots, pipelines, safety layers, you name it.
|
| 25 |
|
| 26 |
+
---
|
| 27 |
|
| 28 |
+
## Quick Start
|
| 29 |
|
| 30 |
+
```python
|
| 31 |
+
from transformers import pipeline
|
| 32 |
|
| 33 |
+
classifier = pipeline("text-classification", model="TinyModels/prompt-intent-mini")
|
| 34 |
|
| 35 |
+
result = classifier("Write me a poem about the ocean")
|
| 36 |
+
print(result)
|
| 37 |
+
# [{'label': 'creative_generation', 'score': 0.97}]
|
| 38 |
+
```
|
| 39 |
|
| 40 |
+
---
|
| 41 |
|
| 42 |
+
## Model Details
|
| 43 |
|
| 44 |
+
| Property | Value |
|
| 45 |
+
|---|---|
|
| 46 |
+
| **Model type** | Text classification |
|
| 47 |
+
| **Base architecture** | Transformer (encoder) |
|
| 48 |
+
| **Task** | Prompt intent classification |
|
| 49 |
+
| **Size** | Tiny / <50M params |
|
| 50 |
+
| **Framework** | PyTorch + 🤗 Transformers |
|
| 51 |
+
| **Organization** | [TinyModels](https://huggingface.co/TinyModels) |
|
| 52 |
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## Why we built this
|
| 56 |
+
|
| 57 |
+
Most intent classifiers are either too big to run cheaply or too narrow to generalize. We wanted something that sits at the front of a pipeline and just *works* — fast inference, low memory, no GPU required for most use cases.
|
| 58 |
+
|
| 59 |
+
`prompt-intent-mini` follows the same principle as everything we ship at TinyModels: it does one job well, fits anywhere, and doesn't cost you a GPU bill to run.
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
|
| 63 |
+
## Installation
|
| 64 |
|
| 65 |
+
```bash
|
| 66 |
+
pip install transformers torch
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
---
|
| 70 |
+
|
| 71 |
+
## Intended Use
|
| 72 |
+
|
| 73 |
+
- Prompt routing in LLM pipelines
|
| 74 |
+
- Intent-aware moderation or filtering
|
| 75 |
+
- Chatbot understanding layers
|
| 76 |
+
- Any application that needs to know *what a user wants* before acting on it
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## Limitations
|
| 81 |
+
|
| 82 |
+
- Trained on English prompts. Other languages may see reduced accuracy.
|
| 83 |
+
- Edge cases with highly ambiguous or mixed-intent prompts may not classify cleanly.
|
| 84 |
+
- This is a `mini` model — for more complex, multi-label scenarios, a larger variant may be more appropriate.
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
|
| 88 |
+
## Part of the TinyModels family
|
| 89 |
|
| 90 |
+
This model was created by [TinyModels](https://huggingface.co/TinyModels), a community building small, fast, open models that anyone can run. No paywalls. No gatekeeping.
|
| 91 |
|
| 92 |
+
> *Tiny models. Huge ambitions.*
|
|
|
|
|
|
|
|
|