Instructions to use UWECProgrammer/setfit-model-2.4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use UWECProgrammer/setfit-model-2.4 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("UWECProgrammer/setfit-model-2.4") 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.4 with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("UWECProgrammer/setfit-model-2.4") 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.4: direct link, hf CLI and curl.
- Browser
- Download file 936 Bytes
-
https://huggingface.co/UWECProgrammer/setfit-model-2.4/resolve/refs%2Fpr%2F1/config.json
- Command line
-
hf download hf://UWECProgrammer/setfit-model-2.4@refs/pr/1/config.json
-
curl -L -o config.json https://huggingface.co/UWECProgrammer/setfit-model-2.4/resolve/refs%2Fpr%2F1/config.json
936 Bytes
| { | |
| "_name_or_path": "/root/.cache/torch/sentence_transformers/cardiffnlp_twitter-roberta-base-sentiment-latest", | |
| "architectures": [ | |
| "RobertaModel" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "bos_token_id": 0, | |
| "classifier_dropout": null, | |
| "eos_token_id": 2, | |
| "gradient_checkpointing": false, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "negative", | |
| "1": "neutral", | |
| "2": "positive" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "negative": 0, | |
| "neutral": 1, | |
| "positive": 2 | |
| }, | |
| "layer_norm_eps": 1e-05, | |
| "max_position_embeddings": 514, | |
| "model_type": "roberta", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 1, | |
| "position_embedding_type": "absolute", | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.31.0", | |
| "type_vocab_size": 1, | |
| "use_cache": true, | |
| "vocab_size": 50265 | |
| } | |