Sentence Similarity
sentence-transformers
Safetensors
Transformers
English
echo
feature-extraction
echo-dsrn
linear-complexity
recurrent-hybrid
custom_code
Instructions to use ethicalabs/Echo-DSRN-v0.1.3-Embed-Exp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use ethicalabs/Echo-DSRN-v0.1.3-Embed-Exp with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("ethicalabs/Echo-DSRN-v0.1.3-Embed-Exp", trust_remote_code=True) sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use ethicalabs/Echo-DSRN-v0.1.3-Embed-Exp with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ethicalabs/Echo-DSRN-v0.1.3-Embed-Exp", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
sync modules: block padding tokens in non-causal attention (no-op under vLLM)
Browse files- modeling_embedding.py +1 -0
modeling_embedding.py
CHANGED
|
@@ -118,6 +118,7 @@ class EchoModelForSentenceEmbedding(EchoPreTrainedModel):
|
|
| 118 |
past_key_values=past_key_values,
|
| 119 |
inputs_embeds=inputs_embeds,
|
| 120 |
position_ids=position_ids,
|
|
|
|
| 121 |
output_attentions=output_attentions,
|
| 122 |
output_hidden_states=output_hidden_states,
|
| 123 |
return_dict=True,
|
|
|
|
| 118 |
past_key_values=past_key_values,
|
| 119 |
inputs_embeds=inputs_embeds,
|
| 120 |
position_ids=position_ids,
|
| 121 |
+
attention_mask=attention_mask,
|
| 122 |
output_attentions=output_attentions,
|
| 123 |
output_hidden_states=output_hidden_states,
|
| 124 |
return_dict=True,
|