Update README.md
Browse files
README.md
CHANGED
|
@@ -1,270 +1,131 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
-
- en
|
| 4 |
-
library_name: transformers
|
| 5 |
pipeline_tag: text-classification
|
| 6 |
-
base_model: distilbert-base-uncased
|
| 7 |
-
metrics:
|
| 8 |
-
- accuracy
|
| 9 |
-
- f1
|
| 10 |
tags:
|
| 11 |
-
- intent-classification
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
|
| 15 |
-
- adtech
|
| 16 |
-
- calibrated-confidence
|
| 17 |
-
license: apache-2.0
|
| 18 |
---
|
| 19 |
|
| 20 |
-
#
|
| 21 |
|
| 22 |
-
|
|
|
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
##
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
| `intent.type` | `commercial`, `informational`, `navigational`, `transactional`, … |
|
| 36 |
-
| `intent.subtype` | `product_discovery`, `comparison`, `how_to`, … |
|
| 37 |
-
| `intent.decision_phase` | `awareness`, `consideration`, `decision`, … |
|
| 38 |
-
| `iab_content` | IAB Content Taxonomy 3.0 tier1 / tier2 / tier3 labels |
|
| 39 |
-
| `component_confidence` | Per-head calibrated confidence with threshold flags |
|
| 40 |
-
| `system_decision` | Monetization eligibility, opportunity type, policy |
|
| 41 |
-
|
| 42 |
-
---
|
| 43 |
|
| 44 |
-
##
|
| 45 |
|
| 46 |
-
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
| 57 |
-
from transformers import pipeline
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
| 64 |
|
| 65 |
-
|
| 66 |
-
print(out["meta"])
|
| 67 |
-
print(out["model_output"]["classification"]["intent"])
|
| 68 |
-
```
|
| 69 |
-
|
| 70 |
-
---
|
| 71 |
|
| 72 |
-
|
|
|
|
|
|
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
|
|
|
|
|
|
|
|
|
| 79 |
|
| 80 |
-
|
| 81 |
-
t0 = time.perf_counter()
|
| 82 |
-
out = clf(q)
|
| 83 |
-
print(f"latency_ms={(time.perf_counter() - t0) * 1000:.1f}")
|
| 84 |
-
```
|
| 85 |
|
| 86 |
-
|
|
|
|
|
|
|
| 87 |
|
| 88 |
-
|
| 89 |
-
from transformers import pipeline
|
| 90 |
|
| 91 |
-
|
| 92 |
-
"admesh-intent",
|
| 93 |
-
model="admesh/agentic-intent-classifier",
|
| 94 |
-
trust_remote_code=True,
|
| 95 |
-
)
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
```python
|
| 103 |
-
# batch
|
| 104 |
-
results = clf([
|
| 105 |
-
"Best running shoes under $100",
|
| 106 |
-
"How does TCP work?",
|
| 107 |
-
"Buy noise-cancelling headphones",
|
| 108 |
-
])
|
| 109 |
-
|
| 110 |
-
# custom confidence thresholds
|
| 111 |
-
result = clf(
|
| 112 |
-
"Buy headphones",
|
| 113 |
-
threshold_overrides={"intent_type": 0.6, "intent_subtype": 0.35},
|
| 114 |
-
)
|
| 115 |
-
```
|
| 116 |
-
|
| 117 |
-
---
|
| 118 |
|
| 119 |
-
##
|
| 120 |
|
| 121 |
-
|
| 122 |
-
2. **New Endpoint** → select `admesh/agentic-intent-classifier`
|
| 123 |
-
3. Framework: **PyTorch** — Task: **Text Classification**
|
| 124 |
-
4. Enable **"Load with trust_remote_code"**
|
| 125 |
-
5. Deploy
|
| 126 |
|
| 127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
|
| 129 |
-
|
| 130 |
-
curl https://<your-endpoint>.endpoints.huggingface.cloud \
|
| 131 |
-
-H "Authorization: Bearer $HF_TOKEN" \
|
| 132 |
-
-H "Content-Type: application/json" \
|
| 133 |
-
-d '{"inputs": "Which laptop should I buy for college?"}'
|
| 134 |
-
```
|
| 135 |
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
```python
|
| 141 |
-
# app.py for a Gradio Space
|
| 142 |
-
import gradio as gr
|
| 143 |
-
from transformers import pipeline
|
| 144 |
-
|
| 145 |
-
clf = pipeline(
|
| 146 |
-
"admesh-intent",
|
| 147 |
-
model="admesh/agentic-intent-classifier",
|
| 148 |
-
trust_remote_code=True,
|
| 149 |
-
)
|
| 150 |
-
|
| 151 |
-
def classify(text):
|
| 152 |
-
return clf(text)
|
| 153 |
-
|
| 154 |
-
gr.Interface(fn=classify, inputs="text", outputs="json").launch()
|
| 155 |
-
```
|
| 156 |
-
|
| 157 |
-
---
|
| 158 |
|
| 159 |
-
|
|
|
|
| 160 |
|
| 161 |
-
|
| 162 |
-
import sys
|
| 163 |
-
from huggingface_hub import snapshot_download
|
| 164 |
|
| 165 |
-
|
| 166 |
-
repo_id="admesh/agentic-intent-classifier",
|
| 167 |
-
repo_type="model",
|
| 168 |
-
)
|
| 169 |
-
sys.path.insert(0, local_dir)
|
| 170 |
-
|
| 171 |
-
from pipeline import AdmeshIntentPipeline
|
| 172 |
-
clf = AdmeshIntentPipeline()
|
| 173 |
-
result = clf("I need a CRM for a 5-person startup")
|
| 174 |
-
```
|
| 175 |
-
|
| 176 |
-
Or the one-liner factory:
|
| 177 |
-
|
| 178 |
-
```python
|
| 179 |
-
from pipeline import AdmeshIntentPipeline
|
| 180 |
-
clf = AdmeshIntentPipeline.from_pretrained("admesh/agentic-intent-classifier")
|
| 181 |
-
```
|
| 182 |
-
|
| 183 |
-
---
|
| 184 |
-
|
| 185 |
-
## Troubleshooting (avoid environment errors)
|
| 186 |
-
|
| 187 |
-
### `No module named 'combined_inference'` (or similar)
|
| 188 |
-
|
| 189 |
-
This means the Hub repo root is missing required Python files. Ensure these exist at the **root of the model repo** (same level as `pipeline.py`):
|
| 190 |
-
|
| 191 |
-
- `pipeline.py`, `config.json`, `config.py`
|
| 192 |
-
- `combined_inference.py`, `schemas.py`
|
| 193 |
-
- `model_runtime.py`, `multitask_runtime.py`, `multitask_model.py`
|
| 194 |
-
- `inference_intent_type.py`, `inference_subtype.py`, `inference_decision_phase.py`, `inference_iab_classifier.py`
|
| 195 |
-
- `iab_classifier.py`, `iab_taxonomy.py`
|
| 196 |
-
|
| 197 |
-
### `does not appear to have a file named model.safetensors`
|
| 198 |
-
|
| 199 |
-
Transformers requires a standard checkpoint at the repo root for `pipeline()` to initialize. This repo includes a **small dummy** `model.safetensors` + tokenizer files at the root for compatibility; the *real* production weights live in:
|
| 200 |
-
|
| 201 |
-
- `multitask_intent_model_output/`
|
| 202 |
-
- `iab_classifier_model_output/`
|
| 203 |
-
- `artifacts/calibration/`
|
| 204 |
-
|
| 205 |
-
---
|
| 206 |
-
|
| 207 |
-
## Example Output
|
| 208 |
-
|
| 209 |
-
```json
|
| 210 |
-
{
|
| 211 |
-
"model_output": {
|
| 212 |
-
"classification": {
|
| 213 |
-
"iab_content": {
|
| 214 |
-
"taxonomy": "IAB Content Taxonomy",
|
| 215 |
-
"taxonomy_version": "3.0",
|
| 216 |
-
"tier1": {"id": "552", "label": "Style & Fashion"},
|
| 217 |
-
"tier2": {"id": "579", "label": "Men's Fashion"},
|
| 218 |
-
"mapping_mode": "exact",
|
| 219 |
-
"mapping_confidence": 0.73
|
| 220 |
-
},
|
| 221 |
-
"intent": {
|
| 222 |
-
"type": "commercial",
|
| 223 |
-
"subtype": "product_discovery",
|
| 224 |
-
"decision_phase": "consideration",
|
| 225 |
-
"confidence": 0.9549,
|
| 226 |
-
"commercial_score": 0.656
|
| 227 |
-
}
|
| 228 |
-
}
|
| 229 |
-
},
|
| 230 |
-
"system_decision": {
|
| 231 |
-
"policy": {
|
| 232 |
-
"monetization_eligibility": "allowed_with_caution",
|
| 233 |
-
"eligibility_reason": "commercial_discovery_signal_present"
|
| 234 |
-
},
|
| 235 |
-
"opportunity": {"type": "soft_recommendation", "strength": "medium"}
|
| 236 |
-
},
|
| 237 |
-
"meta": {
|
| 238 |
-
"system_version": "0.6.0-phase4",
|
| 239 |
-
"calibration_enabled": true,
|
| 240 |
-
"iab_mapping_is_placeholder": false
|
| 241 |
-
}
|
| 242 |
-
}
|
| 243 |
-
```
|
| 244 |
-
|
| 245 |
-
## Reproducible Revision
|
| 246 |
-
|
| 247 |
-
```python
|
| 248 |
-
from huggingface_hub import snapshot_download
|
| 249 |
-
local_dir = snapshot_download(
|
| 250 |
-
repo_id="admesh/agentic-intent-classifier",
|
| 251 |
-
repo_type="model",
|
| 252 |
-
revision="0584798f8efee6beccd778b0afa06782ab5add60",
|
| 253 |
-
)
|
| 254 |
-
```
|
| 255 |
-
|
| 256 |
-
## Included Artifacts
|
| 257 |
-
|
| 258 |
-
| Path | Contents |
|
| 259 |
|---|---|
|
| 260 |
-
|
|
| 261 |
-
|
|
| 262 |
-
|
|
| 263 |
-
|
|
| 264 |
-
|
|
|
|
|
|
|
|
| 265 |
|
| 266 |
-
|
|
|
|
| 267 |
|
| 268 |
-
- `trust_remote_code=True` is required because this model uses a custom multi-head architecture that does not map to a single standard `AutoModel` checkpoint.
|
| 269 |
-
- `meta.iab_mapping_is_placeholder: true` means IAB artifacts were missing or skipped; train and calibrate IAB for full production accuracy.
|
| 270 |
-
- For long-running servers, instantiate once and reuse — models are cached in memory after the first call.
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
+
- en
|
|
|
|
| 4 |
pipeline_tag: text-classification
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
tags:
|
| 6 |
+
- intent-classification
|
| 7 |
+
- conversational-ai
|
| 8 |
+
- contextual-relevance
|
| 9 |
+
license: other
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Ingence 0.1
|
| 13 |
|
| 14 |
+
Ingence is a proprietary intent-understanding model developed by AdMesh for
|
| 15 |
+
conversational and agentic applications.
|
| 16 |
|
| 17 |
+
> **Release status:** Experimental. Ingence 0.1 is intended for evaluation and
|
| 18 |
+
> controlled use. It has not been validated for safety-critical or high-impact
|
| 19 |
+
> decisions.
|
| 20 |
|
| 21 |
+
## What It Does
|
| 22 |
|
| 23 |
+
Ingence converts a user request or short conversation into structured signals
|
| 24 |
+
describing:
|
| 25 |
|
| 26 |
+
- the user's general intent;
|
| 27 |
+
- a more specific intent subtype;
|
| 28 |
+
- the user's stage in a decision journey;
|
| 29 |
+
- a relevant contextual content category; and
|
| 30 |
+
- whether the system should fall back because a prediction is uncertain.
|
| 31 |
|
| 32 |
+
These signals can support intent routing, contextual relevance, aggregate
|
| 33 |
+
analytics, and controlled advertising or content-selection experiences.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
## Intended Uses
|
| 36 |
|
| 37 |
+
Ingence 0.1 is intended for:
|
| 38 |
|
| 39 |
+
- intent routing in assistants and agents;
|
| 40 |
+
- understanding research, comparison, and purchase-oriented requests;
|
| 41 |
+
- contextual content and advertising selection;
|
| 42 |
+
- aggregate intent analytics; and
|
| 43 |
+
- research, testing, and controlled product evaluation.
|
| 44 |
|
| 45 |
+
## Restricted and Unsupported Uses
|
| 46 |
|
| 47 |
+
Ingence must not be used:
|
|
|
|
| 48 |
|
| 49 |
+
- to infer sensitive personal characteristics;
|
| 50 |
+
- for surveillance or individual behavioral profiling;
|
| 51 |
+
- as the sole moderation or safety mechanism;
|
| 52 |
+
- to make decisions about credit, employment, housing, insurance, healthcare,
|
| 53 |
+
education, or legal services;
|
| 54 |
+
- as the sole basis for decisions that materially affect a person; or
|
| 55 |
+
- to target advertising using sensitive personal information.
|
| 56 |
|
| 57 |
+
## Training and Evaluation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
+
Ingence 0.1 was developed using a mixture of synthetic, curated, and
|
| 60 |
+
taxonomy-based examples. Synthetic examples were used to improve coverage of
|
| 61 |
+
different intents and linguistic patterns.
|
| 62 |
|
| 63 |
+
Important qualifications:
|
| 64 |
|
| 65 |
+
- Synthetic-label agreement does not establish real-world accuracy.
|
| 66 |
+
- Training data may not represent every population, dialect, industry, or
|
| 67 |
+
interaction style.
|
| 68 |
+
- Evaluation on representative, human-reviewed production data is ongoing.
|
| 69 |
+
- Definitive accuracy, fairness, and calibration claims are not currently
|
| 70 |
+
published for this experimental release.
|
| 71 |
|
| 72 |
+
## Confidence Scores
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
+
Model confidence values are not guaranteed probabilities. Applications should
|
| 75 |
+
not interpret a score such as `0.80` as an 80% probability that a prediction is
|
| 76 |
+
correct. Integrations should honor uncertainty and fallback indicators.
|
| 77 |
|
| 78 |
+
## Known Limitations
|
|
|
|
| 79 |
|
| 80 |
+
Ingence 0.1 may:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
|
| 82 |
+
- confuse closely related research and decision stages;
|
| 83 |
+
- misclassify short or context-dependent follow-up messages;
|
| 84 |
+
- have difficulty distinguishing general price questions from commercial
|
| 85 |
+
intent;
|
| 86 |
+
- return broad content categories when several related categories apply;
|
| 87 |
+
- fall back on valid requests when confidence is low;
|
| 88 |
+
- perform differently on language styles not represented in development data;
|
| 89 |
+
and
|
| 90 |
+
- produce unreliable results for languages other than English.
|
| 91 |
|
| 92 |
+
Outputs are probabilistic predictions and should be treated as one input into a
|
| 93 |
+
broader decision system.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
+
## Safety and Privacy
|
| 96 |
|
| 97 |
+
Applications using Ingence should:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
+
- minimize personal information included in requests;
|
| 100 |
+
- avoid retaining raw conversations unnecessarily;
|
| 101 |
+
- provide a safe fallback when the service is uncertain or unavailable;
|
| 102 |
+
- use independent policy enforcement for sensitive applications;
|
| 103 |
+
- monitor model quality and distribution drift; and
|
| 104 |
+
- clearly disclose when automated predictions materially influence an
|
| 105 |
+
experience.
|
| 106 |
|
| 107 |
+
## Access and Intellectual Property
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
|
| 109 |
+
Ingence 0.1 is proprietary technology owned by AdMesh. Model weights, source
|
| 110 |
+
code, training data, internal evaluation artifacts, and deployment details are
|
| 111 |
+
not publicly distributed. No license to copy, modify, redistribute, reverse
|
| 112 |
+
engineer, or create derivative works is granted by this model card.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
+
Authorized access may be provided through AdMesh-operated services under
|
| 115 |
+
applicable commercial terms.
|
| 116 |
|
| 117 |
+
## Version Information
|
|
|
|
|
|
|
| 118 |
|
| 119 |
+
| Property | Value |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
|---|---|
|
| 121 |
+
| Model | Ingence |
|
| 122 |
+
| Version | 0.1 |
|
| 123 |
+
| Developer | AdMesh |
|
| 124 |
+
| Primary language | English |
|
| 125 |
+
| Release status | Experimental |
|
| 126 |
+
|
| 127 |
+
## Contact
|
| 128 |
|
| 129 |
+
For product questions, feedback, privacy requests, or responsible disclosure,
|
| 130 |
+
visit [useadmesh.com](https://useadmesh.com).
|
| 131 |
|
|
|
|
|
|
|
|
|