Run this model with HF Jobs
Run zeroshot/sst2-distilbert-sparse 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/zeroshot/sst2-distilbert-sparse. 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/zeroshot/sst2-distilbert-sparse 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 zeroshot/sst2-distilbert-sparse with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zeroshot/sst2-distilbert-sparse with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="zeroshot/sst2-distilbert-sparse")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("zeroshot/sst2-distilbert-sparse") model = AutoModelForSequenceClassification.from_pretrained("zeroshot/sst2-distilbert-sparse", device_map="auto") - Notebooks
- Google Colab
- Kaggle
DISTILBERT RUNNING ON DEEPSPARSE GOES BRHMMMMMMMM. πππ
This model is π
ββββββββ βββββββ ββββββ βββββββ ββββββββ ββββββββ
ββββββββ ββββββββ ββββββββ ββββββββ ββββββββ ββββββββ
ββββββββ ββββββββ ββββββββ ββββββββ ββββββββ ββββββ
ββββββββ βββββββ ββββββββ ββββββββ βββββββββ βββββ
ββββββββ βββ βββ βββ βββ ββ βββββββββ ββββββββ
ββββββββ βββ βββ βββ βββ ββ βββββββββ ββββββββ
LOOKS LIKE THIS π
Inference endpoints, outside of outliers (4ms) is avg. latency on 2 vCPUs:
Handler for access to inference endpoints
class EndpointHandler:
def __init__(self, path=""):
self.pipeline = Pipeline.create(task="text-classification", model_path=path)
def __call__(self, data: Dict[str, Any]) -> Dict[str, str]:
"""
Args:
data (:obj:): prediction input text
"""
inputs = data.pop("inputs", data)
start = perf_counter()
prediction = self.pipeline(inputs)
end = perf_counter()
latency = end - start
return {
"labels": prediction.labels,
"scores": prediction.scores,
"latency (secs.)": latency
}
Μ·ΜΝ Μ΅ΝΜ³RΜΆΝΜiΜΈΝΜcΜ΄ΜΜ»kΜΈΜΝyΜ·ΝΜ³ ΜΈΜΜͺ Μ·ΝΝ
- Downloads last month
- 20


