procesaur commited on
Commit
fcae639
·
verified ·
1 Parent(s): 0bd5ed4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +91 -142
README.md CHANGED
@@ -1,142 +1,91 @@
1
- ---
2
- tags:
3
- - sentence-transformers
4
- - sentence-similarity
5
- - feature-extraction
6
- pipeline_tag: sentence-similarity
7
- library_name: sentence-transformers
8
- ---
9
-
10
- # SentenceTransformer
11
-
12
- This is a [sentence-transformers](https://www.SBERT.net) model trained. It maps sentences & paragraphs to a 16-dimensional dense vector space and can be used for retrieval.
13
-
14
- ## Model Details
15
-
16
- ### Model Description
17
- - **Model Type:** Sentence Transformer
18
- <!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
19
- - **Maximum Sequence Length:** 256 tokens
20
- - **Output Dimensionality:** 16 dimensions
21
- - **Similarity Function:** Cosine Similarity
22
- - **Supported Modality:** Text
23
- <!-- - **Training Dataset:** Unknown -->
24
- <!-- - **Language:** Unknown -->
25
- <!-- - **License:** Unknown -->
26
-
27
- ### Model Sources
28
-
29
- - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
30
- - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
31
- - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
32
-
33
- ### Full Model Architecture
34
-
35
- ```
36
- SentenceTransformer(
37
- (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'RobertaModel'})
38
- (1): Pooling({'embedding_dimension': 1024, 'pooling_mode': 'mean', 'include_prompt': True})
39
- (2): Dense({'in_features': 1024, 'out_features': 16, 'bias': True, 'activation_function': 'torch.nn.modules.linear.Identity', 'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
40
- )
41
- ```
42
-
43
- ## Usage
44
-
45
- ### Direct Usage (Sentence Transformers)
46
-
47
- First install the Sentence Transformers library:
48
-
49
- ```bash
50
- pip install -U sentence-transformers
51
- ```
52
- Then you can load this model and run inference.
53
- ```python
54
- from sentence_transformers import SentenceTransformer
55
-
56
- # Download from the 🤗 Hub
57
- model = SentenceTransformer("sentence_transformers_model_id")
58
- # Run inference
59
- sentences = [
60
- 'The weather is lovely today.',
61
- "It's so sunny outside!",
62
- 'He drove to the stadium.',
63
- ]
64
- embeddings = model.encode(sentences)
65
- print(embeddings.shape)
66
- # [3, 16]
67
-
68
- # Get the similarity scores for the embeddings
69
- similarities = model.similarity(embeddings, embeddings)
70
- print(similarities)
71
- # tensor([[1.0000, 0.9751, 0.6222],
72
- # [0.9751, 1.0000, 0.5589],
73
- # [0.6222, 0.5589, 1.0000]])
74
- ```
75
- <!--
76
- ### Direct Usage (Transformers)
77
-
78
- <details><summary>Click to see the direct usage in Transformers</summary>
79
-
80
- </details>
81
- -->
82
-
83
- <!--
84
- ### Downstream Usage (Sentence Transformers)
85
-
86
- You can finetune this model on your own dataset.
87
-
88
- <details><summary>Click to expand</summary>
89
-
90
- </details>
91
- -->
92
-
93
- <!--
94
- ### Out-of-Scope Use
95
-
96
- *List how the model may foreseeably be misused and address what users ought not to do with the model.*
97
- -->
98
-
99
- <!--
100
- ## Bias, Risks and Limitations
101
-
102
- *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
103
- -->
104
-
105
- <!--
106
- ### Recommendations
107
-
108
- *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
109
- -->
110
-
111
- ## Training Details
112
-
113
- ### Framework Versions
114
- - Python: 3.12.9
115
- - Sentence Transformers: 5.6.1
116
- - Transformers: 5.14.1
117
- - PyTorch: 2.6.0+cu118
118
- - Accelerate: 1.12.0
119
- - Datasets: 4.3.0
120
- - Tokenizers: 0.22.2
121
-
122
- ## Citation
123
-
124
- ### BibTeX
125
-
126
- <!--
127
- ## Glossary
128
-
129
- *Clearly define terms in order to be accessible across audiences.*
130
- -->
131
-
132
- <!--
133
- ## Model Card Authors
134
-
135
- *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
136
- -->
137
-
138
- <!--
139
- ## Model Card Contact
140
-
141
- *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
142
- -->
 
1
+ ---
2
+ language:
3
+ - sr
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - feature-extraction
8
+ - sentence-similarity
9
+ - emotion-detection
10
+ - serbian
11
+ base_model: jerteh/Jerteh-355
12
+ library_name: sentence-transformers
13
+ pipeline_tag: feature-extraction
14
+ datasets:
15
+ - te-sla/emocije
16
+ ---
17
+
18
+ # EMO355 (Jerteh-355 Emotion & Evocation Embeddings)
19
+
20
+ <table style="width:100%;height:100%">
21
+ <tr style="width:100%;height:100%">
22
+ <td width=50%>
23
+ <h2>Model za Detekciju i Vektorizaciju Emocija na Srpskom Jeziku</h2>
24
+ <p><span class="highlight-container"><span class="highlight">355 Miliona Parametara</span></span> zasnovan na <b>jerteh/Jerteh-355</b> roBERTa arhitekturi.</p>
25
+ <p>Fine-tunovan za regresiju <b>16 dimenzionalnog prostora emocija</b> (8 ispoljenih emocija i 8 evociranih emocija).</p>
26
+ <p>Obučen na preko <span class="highlight-container"><span class="highlight">30.000 anotiranih primera</span></span> iz Reddit i Twitter korpusa na srpskom jeziku.</p>
27
+ <p>Integrisan kao nativni <b>SentenceTransformer</b> pipeline za jednostavnu inferenciju bez dodatnih klase definicija.</p>
28
+ </td>
29
+ <td>
30
+ <h2>Serbian Emotion and Evocation Vector Embedding Model</h2>
31
+ <p><span class="highlight-container"><span class="highlight">355 Million Parameters</span></span> fine-tuned on top of the <b>jerteh/Jerteh-355</b> RoBERTa base.</p>
32
+ <p>Designed for <b>16-dimensional emotion vector regression</b> (8 base emotions & 8 evocation emotions).</p>
33
+ <p>Trained on over <span class="highlight-container"><span class="highlight">30,000 annotated samples</span></span> from Serbian Reddit and Twitter datasets.</p>
34
+ <p>Exported directly as a native <b>SentenceTransformer</b> module for instant inference.</p>
35
+ </td>
36
+ </tr>
37
+ <tr>
38
+ <td colspan=2>
39
+ <table style='width:100%;font-size:12pt;text-align:right'>
40
+ <tr>
41
+ <th style='width:30%'><b>Dimenzija / Dimension</b></th>
42
+ <th style='width:35%'><b>Bazne Emocije / Base Emotions</b></th>
43
+ <th style='width:35%'><b>Evocirane Emocije / Evocation Emotions</b></th>
44
+ </tr>
45
+ <tr>
46
+ <td>0 - 7</td>
47
+ <td>Anger, Anticipation, Disgust, Fear, Joy, Sadness, Surprise, Trust</td>
48
+ <td>-</td>
49
+ </tr>
50
+ <tr>
51
+ <td>8 - 15</td>
52
+ <td>-</td>
53
+ <td>Anger, Anticipation, Disgust, Fear, Joy, Sadness, Surprise, Trust</td>
54
+ </tr>
55
+ </table>
56
+ </td>
57
+ </tr>
58
+ </table>
59
+
60
+ ## 🚀 Usage / Upotreba
61
+
62
+ Model se u potpunosti učitava i koristi preko `sentence_transformers` biblioteke:
63
+
64
+ ```python
65
+ from sentence_transformers import SentenceTransformer
66
+
67
+ # Load EMO355 model
68
+ model = SentenceTransformer("procesaur/emo355")
69
+
70
+ # Input sentences in Serbian
71
+ sentences = [
72
+ "Sjajne vesti! Veoma sam srećan i ponosan na uspeh našeg tima.",
73
+ "Ovo je nedopustivo! Kakav užasan uspeh i sramota za celu zemlju."
74
+ ]
75
+
76
+ # Predict 16-dimensional emotion vector
77
+ predictions = model.encode(sentences)
78
+
79
+ EMOTION_LABELS = [
80
+ # 8 Base
81
+ "base_anger", "base_anticipation", "base_disgust", "base_fear",
82
+ "base_joy", "base_sadness", "base_surprise", "base_trust",
83
+ # 8 Evocation
84
+ "evoc_anger", "evoc_anticipation", "evoc_disgust", "evoc_fear",
85
+ "evoc_joy", "evoc_sadness", "evoc_surprise", "evoc_trust"
86
+ ]
87
+
88
+ for text, pred in zip(sentences, predictions):
89
+ print(f"\nText: {text}")
90
+ for label, val in zip(EMOTION_LABELS, pred):
91
+ print(f" {label:<18}: {val:.4f}")