Run this model with HF Jobs
Run mahaswec/setfit_ostrom on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/mahaswec/setfit_ostrom. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/mahaswec/setfit_ostrom on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use mahaswec/setfit_ostrom with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use mahaswec/setfit_ostrom with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("mahaswec/setfit_ostrom") 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 mahaswec/setfit_ostrom with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("mahaswec/setfit_ostrom") preds = model.predict(["i loved the spiderman movie!", "pineapple on pizza is the worst"]) print(preds) - Notebooks
- Google Colab
- Kaggle
mahaswec/setfit_ostrom
This is a SetFit model that can be used for text classification. The model has been trained using an efficient few-shot learning technique that involves:
- Fine-tuning a Sentence Transformer with contrastive learning.
- Training a classification head with features from the fine-tuned Sentence Transformer.
Model is meant to classify Ostrom rule types for institutional analysis. Read more at https://papers.ssrn.com/sol3/Delivery.cfm?abstractid=5845434
###Performance
Usage
To use this model for inference, first install the SetFit library:
python -m pip install setfit
You can then run inference as follows:
from setfit import SetFitModel
# Download from Hub and run inference
model = SetFitModel.from_pretrained("mahaswec/setfit_ostrom")
# Run inference
preds = model(["i loved the spiderman movie!", "pineapple on pizza is the worst ๐คฎ"])
BibTeX entry and citation info
@article{Yin2025-rt,
title = "Governing the digital commons at scale: Detecting Ostrom rule types
in {OSS}",
author = "Yin, Likang and Atkisson, Curtis and Chakraborti, Mahasweta and
Ruiz, Santiago Virguez and Bushouse, Brenda and Schweik, Charlie
and Frey, Seth and Filkov, Vladimir",
year = 2025
}
- Downloads last month
- 6
