Instructions to use UWECProgrammer/setfit-model-2.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use UWECProgrammer/setfit-model-2.1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("UWECProgrammer/setfit-model-2.1") 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] - setfit
How to use UWECProgrammer/setfit-model-2.1 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("UWECProgrammer/setfit-model-2.1") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - Notebooks
- Google Colab
- Kaggle
Download config.json from UWECProgrammer/setfit-model-2.1: direct link, hf CLI and curl.
- Browser
- Download file 784 Bytes
-
https://huggingface.co/UWECProgrammer/setfit-model-2.1/resolve/refs%2Fpr%2F1/config.json
- Command line
-
hf download hf://UWECProgrammer/setfit-model-2.1@refs/pr/1/config.json
-
curl -L -o config.json https://huggingface.co/UWECProgrammer/setfit-model-2.1/resolve/refs%2Fpr%2F1/config.json
784 Bytes
| { | |
| "_name_or_path": "/root/.cache/torch/sentence_transformers/distilbert-base-uncased-finetuned-sst-2-english", | |
| "activation": "gelu", | |
| "architectures": [ | |
| "DistilBertModel" | |
| ], | |
| "attention_dropout": 0.1, | |
| "dim": 768, | |
| "dropout": 0.1, | |
| "finetuning_task": "sst-2", | |
| "hidden_dim": 3072, | |
| "id2label": { | |
| "0": "NEGATIVE", | |
| "1": "POSITIVE" | |
| }, | |
| "initializer_range": 0.02, | |
| "label2id": { | |
| "NEGATIVE": 0, | |
| "POSITIVE": 1 | |
| }, | |
| "max_position_embeddings": 512, | |
| "model_type": "distilbert", | |
| "n_heads": 12, | |
| "n_layers": 6, | |
| "output_past": true, | |
| "pad_token_id": 0, | |
| "qa_dropout": 0.1, | |
| "seq_classif_dropout": 0.2, | |
| "sinusoidal_pos_embds": false, | |
| "tie_weights_": true, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.31.0", | |
| "vocab_size": 30522 | |
| } | |