CoolFace
Modelpublic

ethicalabs/Echo-DSRN-v0.1.4-Embed-Intent-CLF

sourceHugging Faceapache-2.0updated 1mo agoView on Hugging Face
1likes188downloads
Model Card

Model Card for ethicalabs/Echo-DSRN-v0.1.4-Embed-Intent-CLF

![GitHub](https://github.com/ethicalabs-ai/Echo-DSRN/) ![License](https://opensource.org/licenses/Apache-2.0) ![Python](https://www.python.org/downloads/) ![Model Collection](https://huggingface.co/collections/ethicalabs/echo-dsrn) ![Hybrid Collection](https://huggingface.co/collections/ethicalabs/echo-dsrn-hybrid) ![Working Paper](https://github.com/ethicalabs-ai/Echo-DSRN/blob/main/PAPER.md)

<a href="https://hfviewer.com/ethicalabs/Echo-DSRN-v0.1.4-Embed-Intent-CLF?utmsource=huggingface&amp;utmmedium=embeddedmodelcard&amp;utmcampaign=ethicalabsEcho-DSRN-v0.1.4-Embed-Intent-CLFcard&amp;utmcontent=embeddedcardopenviewer&amp;from=embedded-model-card" target="_blank" rel="noopener"> <img src="https://hfviewer.com/api/card.svg?source=ethicalabs%2FEcho-DSRN-v0.1.4-Embed-Intent-CLF&amp;granularity=auto&amp;v=20260516-title-pills-card" alt="Architecture graph for ethicalabs/Echo-DSRN-v0.1.4-Embed-Intent-CLF. Open in hfviewer" width="100%" /> </a>

60-class multilingual intent classifier built on `ethicalabs/Echo-DSRN-v0.1.3-Embed-Intent`.

Uses mean_c_all pooling on the DSRN recurrent slow state (2048-dim), followed by a linear classification head initialized via sklearn SGDClassifier (86.49% training accuracy on 1.78M MASSIVE utterances) and refined with cross-entropy fine-tuning.

Architecture: EchoForSequenceClassification — Dual-State Recurrent Neural Network (DSRN) backbone with linear classification head.

Two paths to build an Echo classifier

Echo-DSRN supports two distinct classifier construction paths:

Path 1: Causal LM → Classifier (from_causal_lm)

Used by v0.1.3-Intent-CLF. Builds on a generative backbone:

  • Pooling: Last-token hidden state (768-dim fast state)
  • Inference: Chat template required (system_prompt + user_template baked into config)
  • Training: Frozen backbone → sklearn LogisticRegression → copy weights → no further fine-tuning
  • Strength: Exploits LM-trained surface-form features

Path 2: Embedding → Classifier (from_embedding) ← this model

Built on v0.1.3-Embed-Intent:

  • Pooling: Mean of recurrent slow states c_all (2048-dim)
  • Inference: Raw text — no chat template (classification_use_chat_template: false)
  • Training: Sklearn SGDClassifier init (86.49% train acc) + cross-entropy fine-tuning
  • Strength: Cross-lingual consistency from MNRL-trained embedding space

Training

  • Base: ethicalabs/Echo-DSRN-v0.1.3-Embed-Intent
  • Conversion: EchoForSequenceClassification.from_embedding() with random init
  • Sklearn init: SGDClassifier on precomputed 2048-dim meancall embeddings (1.78M samples, 86.49% training accuracy)
  • CE fine-tuning: 5 epochs, batch_size=32, lr=2e-5, cosine schedule
  • Dataset: Amazon MASSIVE, all 51 locales

Example Usage

python
from transformers import pipeline
pipe = pipeline("text-classification", model="ethicalabs/Echo-DSRN-v0.1.4-Embed-Intent-CLF", trust_remote_code=True, device="cpu")
sentences = [
    "I will file a police report if there is pineapple on this pizza.",
    "One Margherita pizza, and strictly no pineapples, thanks.",
    "Fun fact: Pineapples take almost two years to grow."
]
predictions = pipe.predict(sentences)
print(predictions)

Output

[{'label': 'general_quirky', 'score': 0.44068652391433716}, {'label': 'takeaway_order', 'score': 0.6128405332565308}, {'label': 'general_quirky', 'score': 0.9770827293395996}]

What the model is thinking:

  1. 1.`"I will file a police report if there is pineapple on this pizza."` -> `general_quirky` (44%)
  2. 2.The Model: "There is a 44% chance this person is making a quirky joke, but I am also detecting a strong undercurrent of genuine hostility toward tropical fruit. I am not entirely sure if this is a pizza order or a legal threat."
  3. 3.(Note: It misses `takeaway_order` here because the slow state gets overwhelmed by the high-entropy threat of police involvement.)
  1. 1.`"One Margherita pizza, and strictly no pineapples, thanks."` -> `takeaway_order` (61%)
  2. 2.The Model: "A polite, standard transaction. No drama, just dough. Solid takeaway_order intent."
  1. 1.`"Fun fact: Pineapples take almost two years to grow."` -> `general_quirky` (97%)
  2. 2.The Model: "Ah, unprompted trivia. 97% confidence that this user is just being weird and definitely does not want a pizza."

Results

Classification

Benchmarked on the MASSIVE en-US validation subset (100 samples): 79% accuracy via classify().

The model uses raw text — no chat template (classification_use_chat_template: false in config).

Post-CE Embedding Quality (MTEB)

After CE fine-tuning, the classifier backbone was extracted (discarding the classification head) and evaluated via MTEB's logistic regression protocol onfrozen embeddings.

Compared to the original embedding model:

TaskOriginal Embed-IntentPost-CE BackboneΔ
MassiveIntentClassification (51 langs)72.42%73.90%+1.48
MassiveScenarioClassification (51 langs)79.00%80.48%+1.48

The identical +1.48 improvement on both independently-evaluated tasks confirms a systematic improvement: CE fine-tuning pushed the backbone clusters to maximize class separation, and the structural improvement survived removal of the fine-tuned classification head.


Note on tokenizer padding

The benchmark results on this card were measured with left padding (padding_side: left), and this model version reproduces them under that convention. A right-padded training version is planned: right padding keeps padded-batch embeddings consistent with single-request embeddings (leading pad tokens do not pollute the recurrent state), so future checkpoints will be batch-composition independent.

ethicalabs/Echo-DSRN-v0.1.4-Embed-Intent-CLF · CoolFace