Instructions to use ethicalabs/Echo-SmolTools-114M-Intent-CLF-Gen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ethicalabs/Echo-SmolTools-114M-Intent-CLF-Gen with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ethicalabs/Echo-SmolTools-114M-Intent-CLF-Gen", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("ethicalabs/Echo-SmolTools-114M-Intent-CLF-Gen", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from ethicalabs/Echo-SmolTools-114M-Intent-CLF-Gen: direct link, hf CLI and curl.
- Browser
- Download file 3.18 kB
-
https://huggingface.co/ethicalabs/Echo-SmolTools-114M-Intent-CLF-Gen/resolve/main/README.md
- Command line
-
hf download hf://ethicalabs/Echo-SmolTools-114M-Intent-CLF-Gen/README.md
-
curl -L -o README.md https://huggingface.co/ethicalabs/Echo-SmolTools-114M-Intent-CLF-Gen/resolve/main/README.md
3.18 kB
| library_name: transformers | |
| tags: | |
| - text-classification | |
| - zero-shot-classification | |
| - echo-dsrn | |
| base_model: | |
| - ethicalabs/Echo-DSRN-114M-v0.1.2 | |
| new_version: ethicalabs/Echo-DSRN-v0.1.3-Intent-CLF | |
| # Echo-SmolTools-114M-Intent-CLF-Gen | |
| [](https://github.com/ethicalabs-ai/Echo-DSRN/) | |
| [](https://opensource.org/licenses/Apache-2.0) | |
| [](https://www.python.org/downloads/) | |
| [](https://huggingface.co/collections/ethicalabs/echo-dsrn) | |
| [](https://huggingface.co/collections/ethicalabs/echo-dsrn-hybrid) | |
| [](https://github.com/ethicalabs-ai/Echo-DSRN/blob/main/PAPER.md) | |
| > [!WARNING] | |
| > This repository contains experimental models designed strictly for academic evaluation and research purposes. | |
| > | |
| > Critical Constraints: | |
| > * **No Production Deployment:** Experimental models must not be deployed in commercial, enterprise, or mission-critical environments under any circumstances. | |
| > * **No Liability:** Experimental models are provided "as-is" without warranties of any kind. The developers assume zero liability for downstream consequences, system integration failures, or regulatory non-compliance resulting from unauthorized deployment. | |
| This is a **generative** sequence classification model based on the **Echo-DSRN** architecture. | |
| It was merged from the base model [`ethicalabs/Echo-DSRN-114M-v0.1.2`](https://huggingface.co/ethicalabs/Echo-DSRN-114M-v0.1.2) | |
| and the PEFT adapter [`ethicalabs/Echo-SmolTools-114M-Intent-PEFT`](https://huggingface.co/ethicalabs/Echo-SmolTools-114M-Intent-PEFT). | |
| No additional linear head is trained — the adapter's generative knowledge is used directly via | |
| **constrained next-token scoring**: for each candidate label the model sums the log-probability | |
| of each of its tokens, then picks the highest-scoring one. | |
| ## Model Details | |
| - **Architecture:** `EchoForGenerativeClassification` | |
| - **Base model:** `ethicalabs/Echo-DSRN-114M-v0.1.2` | |
| - **Adapter:** `ethicalabs/Echo-SmolTools-114M-Intent-PEFT` | |
| - **Labels:** 60 Amazon MASSIVE intents (51 languages) | |
| - **Dtype:** `bfloat16` | |
| - **Constraint Method:** Next-token generative scoring | |
| ## Usage | |
| This model requires `trust_remote_code=True` to load the custom architecture. | |
| ```python | |
| import torch | |
| from transformers import AutoTokenizer | |
| from echo_dsrn.modeling_generative_clf import EchoForGenerativeClassification | |
| model_id = "ethicalabs/Echo-SmolTools-114M-Intent-CLF-Gen" # or your hub path | |
| tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True) | |
| model = EchoForGenerativeClassification.from_pretrained( | |
| model_id, | |
| trust_remote_code=True, | |
| torch_dtype=torch.bfloat16, | |
| device_map="auto", | |
| ) | |
| # Single utterance | |
| label, probs = model.classify("Enter your text here", tokenizer) | |
| print(f"Prediction: {label}") | |
| ``` |