Text Classification
setfit
Safetensors
sentence-transformers
gemma3_text
generated_from_setfit_trainer
text-embeddings-inference
Instructions to use ShiWarai/CVC-Panda with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use ShiWarai/CVC-Panda with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("ShiWarai/CVC-Panda") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - sentence-transformers
How to use ShiWarai/CVC-Panda with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("ShiWarai/CVC-Panda") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Auto-upload: модель обучена через CI/CD (GitHub: 186dbab)
Browse files- 2_Dense/model.safetensors +1 -1
- 3_Dense/model.safetensors +1 -1
- README.md +32 -47
- config_setfit.json +3 -8
- model.safetensors +1 -1
- model_head.pkl +2 -2
2_Dense/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9437272
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1c9c62918f1ab6ccca9d4c99b8983785f4aec53012f94bc1215cfc9f4fd584ae
|
| 3 |
size 9437272
|
3_Dense/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9437272
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc37b3c6ed80cd8ed63810bc523e7bb70e272425cd635e5bee2dbfe4230c598f
|
| 3 |
size 9437272
|
README.md
CHANGED
|
@@ -5,11 +5,11 @@ tags:
|
|
| 5 |
- text-classification
|
| 6 |
- generated_from_setfit_trainer
|
| 7 |
widget:
|
| 8 |
-
- text:
|
| 9 |
-
- text:
|
| 10 |
-
- text:
|
| 11 |
-
- text:
|
| 12 |
-
- text:
|
| 13 |
metrics:
|
| 14 |
- accuracy
|
| 15 |
pipeline_tag: text-classification
|
|
@@ -28,7 +28,7 @@ model-index:
|
|
| 28 |
split: test
|
| 29 |
metrics:
|
| 30 |
- type: accuracy
|
| 31 |
-
value:
|
| 32 |
name: Accuracy
|
| 33 |
---
|
| 34 |
|
|
@@ -48,7 +48,7 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
| 48 |
- **Sentence Transformer body:** [google/embeddinggemma-300M](https://huggingface.co/google/embeddinggemma-300M)
|
| 49 |
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
| 50 |
- **Maximum Sequence Length:** 2048 tokens
|
| 51 |
-
- **Number of Classes:**
|
| 52 |
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
| 53 |
<!-- - **Language:** Unknown -->
|
| 54 |
<!-- - **License:** Unknown -->
|
|
@@ -60,28 +60,23 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
| 60 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
| 61 |
|
| 62 |
### Model Labels
|
| 63 |
-
| Label | Examples
|
| 64 |
-
|:-------------------|:-------------------------------------------------------------------------------------------------------
|
| 65 |
-
|
|
| 66 |
-
| stand_at_attention | <ul><li>'
|
| 67 |
-
|
|
| 68 |
-
|
|
| 69 |
-
|
|
| 70 |
-
|
|
| 71 |
-
| stop_running | <ul><li>'а
|
| 72 |
-
|
|
| 73 |
-
| bind | <ul><li>'привязывать робота'</li><li>'панда привяжи панду'</li><li>'привяжите робота'</li></ul> |
|
| 74 |
-
| unbind | <ul><li>'панда отвяжи панду'</li><li>'отвяжешь панду'</li><li>'отвяжи панду панда'</li></ul> |
|
| 75 |
-
| lie_down | <ul><li>'быстро ложись'</li><li>'упасть'</li><li>'полежи'</li></ul> |
|
| 76 |
-
| run | <ul><li>'надо бежать'</li><li>'побеги'</li><li>'хотела бы чтобы панда бежала'</li></ul> |
|
| 77 |
-
| help | <ul><li>'надо помочь'</li><li>'помог бы'</li><li>'команды'</li></ul> |
|
| 78 |
|
| 79 |
## Evaluation
|
| 80 |
|
| 81 |
### Metrics
|
| 82 |
| Label | Accuracy |
|
| 83 |
|:--------|:---------|
|
| 84 |
-
| **all** |
|
| 85 |
|
| 86 |
## Uses
|
| 87 |
|
|
@@ -99,9 +94,9 @@ Then you can load this model and run inference.
|
|
| 99 |
from setfit import SetFitModel
|
| 100 |
|
| 101 |
# Download from the 🤗 Hub
|
| 102 |
-
model = SetFitModel.from_pretrained("
|
| 103 |
# Run inference
|
| 104 |
-
preds = model("
|
| 105 |
```
|
| 106 |
|
| 107 |
<!--
|
|
@@ -133,23 +128,18 @@ preds = model("беги бы")
|
|
| 133 |
### Training Set Metrics
|
| 134 |
| Training set | Min | Median | Max |
|
| 135 |
|:-------------|:----|:-------|:----|
|
| 136 |
-
| Word count | 1 | 2.
|
| 137 |
|
| 138 |
| Label | Training Sample Count |
|
| 139 |
|:-------------------|:----------------------|
|
| 140 |
-
|
|
| 141 |
-
|
|
| 142 |
-
|
|
| 143 |
-
|
|
| 144 |
-
|
|
| 145 |
-
|
|
| 146 |
-
|
|
| 147 |
-
|
|
| 148 |
-
| silence | 22 |
|
| 149 |
-
| stand_at_attention | 70 |
|
| 150 |
-
| stop_running | 108 |
|
| 151 |
-
| unbind | 30 |
|
| 152 |
-
| unknown | 381 |
|
| 153 |
|
| 154 |
### Training Hyperparameters
|
| 155 |
- batch_size: (128, 128)
|
|
@@ -173,14 +163,9 @@ preds = model("беги бы")
|
|
| 173 |
### Training Results
|
| 174 |
| Epoch | Step | Training Loss | Validation Loss |
|
| 175 |
|:------:|:----:|:-------------:|:---------------:|
|
| 176 |
-
| 0.
|
| 177 |
-
| 0.
|
| 178 |
-
| 0.
|
| 179 |
-
| 0.3759 | 150 | 0.0098 | - |
|
| 180 |
-
| 0.5013 | 200 | 0.0044 | - |
|
| 181 |
-
| 0.6266 | 250 | 0.0031 | - |
|
| 182 |
-
| 0.7519 | 300 | 0.0031 | - |
|
| 183 |
-
| 0.8772 | 350 | 0.0022 | - |
|
| 184 |
|
| 185 |
### Framework Versions
|
| 186 |
- Python: 3.11.14
|
|
|
|
| 5 |
- text-classification
|
| 6 |
- generated_from_setfit_trainer
|
| 7 |
widget:
|
| 8 |
+
- text: покажи лапу мне
|
| 9 |
+
- text: эй вставай
|
| 10 |
+
- text: возьмите джойстик
|
| 11 |
+
- text: вращайся пожалуйста
|
| 12 |
+
- text: равняйся
|
| 13 |
metrics:
|
| 14 |
- accuracy
|
| 15 |
pipeline_tag: text-classification
|
|
|
|
| 28 |
split: test
|
| 29 |
metrics:
|
| 30 |
- type: accuracy
|
| 31 |
+
value: 1.0
|
| 32 |
name: Accuracy
|
| 33 |
---
|
| 34 |
|
|
|
|
| 48 |
- **Sentence Transformer body:** [google/embeddinggemma-300M](https://huggingface.co/google/embeddinggemma-300M)
|
| 49 |
- **Classification head:** a [LogisticRegression](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html) instance
|
| 50 |
- **Maximum Sequence Length:** 2048 tokens
|
| 51 |
+
- **Number of Classes:** 8 classes
|
| 52 |
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
| 53 |
<!-- - **Language:** Unknown -->
|
| 54 |
<!-- - **License:** Unknown -->
|
|
|
|
| 60 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
| 61 |
|
| 62 |
### Model Labels
|
| 63 |
+
| Label | Examples |
|
| 64 |
+
|:-------------------|:-------------------------------------------------------------------------------------------------------|
|
| 65 |
+
| reconnect_joystick | <ul><li>'подключиться к джойстику'</li><li>'подключись уже'</li><li>'возьми джойстик сейчас'</li></ul> |
|
| 66 |
+
| stand_at_attention | <ul><li>'равняйся пожалуйста'</li><li>'выровняйся'</li><li>'равняйся быстро'</li></ul> |
|
| 67 |
+
| rotate | <ul><li>'покрутиться'</li><li>'эй кувырок'</li><li>'давай кувырок'</li></ul> |
|
| 68 |
+
| lie_down | <ul><li>'упади на пол'</li><li>'легла бы'</li><li>'робот ложись'</li></ul> |
|
| 69 |
+
| give_paw | <ul><li>'эй лапу'</li><li>'панда дай лапу'</li><li>'дать лапу'</li></ul> |
|
| 70 |
+
| run | <ul><li>'беги ко мне'</li><li>'бегом'</li><li>'панда беги'</li></ul> |
|
| 71 |
+
| stop_running | <ul><li>'панда хватит бегать'</li><li>'нука стоп бег'</li><li>'стоп робот бег'</li></ul> |
|
| 72 |
+
| dismiss | <ul><li>'закончить'</li><li>'надо прекратить'</li><li>'можно встать'</li></ul> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
## Evaluation
|
| 75 |
|
| 76 |
### Metrics
|
| 77 |
| Label | Accuracy |
|
| 78 |
|:--------|:---------|
|
| 79 |
+
| **all** | 1.0 |
|
| 80 |
|
| 81 |
## Uses
|
| 82 |
|
|
|
|
| 94 |
from setfit import SetFitModel
|
| 95 |
|
| 96 |
# Download from the 🤗 Hub
|
| 97 |
+
model = SetFitModel.from_pretrained("tmputos8_qn/panda_commands")
|
| 98 |
# Run inference
|
| 99 |
+
preds = model("равняйся")
|
| 100 |
```
|
| 101 |
|
| 102 |
<!--
|
|
|
|
| 128 |
### Training Set Metrics
|
| 129 |
| Training set | Min | Median | Max |
|
| 130 |
|:-------------|:----|:-------|:----|
|
| 131 |
+
| Word count | 1 | 2.0847 | 5 |
|
| 132 |
|
| 133 |
| Label | Training Sample Count |
|
| 134 |
|:-------------------|:----------------------|
|
| 135 |
+
| dismiss | 78 |
|
| 136 |
+
| give_paw | 29 |
|
| 137 |
+
| lie_down | 47 |
|
| 138 |
+
| reconnect_joystick | 46 |
|
| 139 |
+
| rotate | 48 |
|
| 140 |
+
| run | 45 |
|
| 141 |
+
| stand_at_attention | 31 |
|
| 142 |
+
| stop_running | 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
|
| 144 |
### Training Hyperparameters
|
| 145 |
- batch_size: (128, 128)
|
|
|
|
| 163 |
### Training Results
|
| 164 |
| Epoch | Step | Training Loss | Validation Loss |
|
| 165 |
|:------:|:----:|:-------------:|:---------------:|
|
| 166 |
+
| 0.0087 | 1 | 0.2008 | - |
|
| 167 |
+
| 0.4348 | 50 | 0.0304 | - |
|
| 168 |
+
| 0.8696 | 100 | 0.0003 | - |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 169 |
|
| 170 |
### Framework Versions
|
| 171 |
- Python: 3.11.14
|
config_setfit.json
CHANGED
|
@@ -1,18 +1,13 @@
|
|
| 1 |
{
|
| 2 |
-
"normalize_embeddings": false,
|
| 3 |
"labels": [
|
| 4 |
-
"bind",
|
| 5 |
"dismiss",
|
| 6 |
"give_paw",
|
| 7 |
-
"help",
|
| 8 |
"lie_down",
|
| 9 |
"reconnect_joystick",
|
| 10 |
"rotate",
|
| 11 |
"run",
|
| 12 |
-
"silence",
|
| 13 |
"stand_at_attention",
|
| 14 |
-
"stop_running"
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
]
|
| 18 |
}
|
|
|
|
| 1 |
{
|
|
|
|
| 2 |
"labels": [
|
|
|
|
| 3 |
"dismiss",
|
| 4 |
"give_paw",
|
|
|
|
| 5 |
"lie_down",
|
| 6 |
"reconnect_joystick",
|
| 7 |
"rotate",
|
| 8 |
"run",
|
|
|
|
| 9 |
"stand_at_attention",
|
| 10 |
+
"stop_running"
|
| 11 |
+
],
|
| 12 |
+
"normalize_embeddings": false
|
|
|
|
| 13 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1211486072
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9dfd0c10bac4d3812b60dca5ef8df23180768c41c12975559cccd02a8bf474e1
|
| 3 |
size 1211486072
|
model_head.pkl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:49e61a22848bd6e480a51d76cc3062811bb15dabeb63e863dd7e203826042908
|
| 3 |
+
size 50615
|