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

GitHub License Python Model Collection Hybrid Collection Working Paper

Architecture graph for ethicalabs/Echo-DSRN-v0.1.4-Embed-Intent-CLF. Open in hfviewer

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 mean_c_all 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

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. "I will file a police report if there is pineapple on this pizza." -> general_quirky (44%)

    • 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."
    • (Note: It misses takeaway_order here because the slow state gets overwhelmed by the high-entropy threat of police involvement.)
  2. "One Margherita pizza, and strictly no pineapples, thanks." -> takeaway_order (61%)

    • The Model: "A polite, standard transaction. No drama, just dough. Solid takeaway_order intent."
  3. "Fun fact: Pineapples take almost two years to grow." -> general_quirky (97%)

    • 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:

Task Original Embed-Intent Post-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.

Downloads last month
690
Safetensors
Model size
98.4M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

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

Dataset used to train ethicalabs/Echo-DSRN-v0.1.4-Embed-Intent-CLF

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

Evaluation results