Run this model with HF Jobs

Run numind/NuSentiment 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/numind/NuSentiment. 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/numind/NuSentiment 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.

Model

The base version of e5-v2 finetunned on an annotated subset of C4. This model provides generic embedding for sentiment analysis. Embeddings can be used out of the box or fine-tuned on specific datasets.

Blog post: https://www.numind.ai/blog/creating-task-specific-foundation-models-with-gpt-4

Usage

Below is an example to encode text and get embedding.

import torch
from transformers import AutoTokenizer, AutoModel


model = AutoModel.from_pretrained("Numind/e5-base-sentiment_analysis")
tokenizer = AutoTokenizer.from_pretrained("Numind/e5-base-sentiment_analysis")
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
model.to(device)

size = 256
text = "This movie is amazing"

encoding = tokenizer(
    text,
    truncation=True, 
    padding='max_length', 
    max_length= size,
)

emb = model(
      torch.reshape(torch.tensor(encoding.input_ids),(1,len(encoding.input_ids))).to(device),output_hidden_states=True
).hidden_states[-1].cpu().detach()

embText = torch.mean(emb,axis = 1)
Downloads last month
113
Safetensors
Model size
0.1B params
Tensor type
I64
·
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for numind/NuSentiment

Quantizations
2 models

Dataset used to train numind/NuSentiment

Collection including numind/NuSentiment

⌂ 换网址