Run this model with HF Jobs

Run numind/NuSentiment-multilingual 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-multilingual. 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-multilingual 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.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("feature-extraction", model="numind/NuSentiment-multilingual")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("numind/NuSentiment-multilingual")
model = AutoModel.from_pretrained("numind/NuSentiment-multilingual", device_map="auto")
Quick Links

Model

Base version of e5-multilingual finetunned on an annotated subset of mC4 (multilingual C4). This model provide generic embedding for sentiment analysis. Embeddings can be used out of the box or fine tune 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-multilingual-sentiment_analysis")
tokenizer = AutoTokenizer.from_pretrained("Numind/e5-multilingual-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
130
Safetensors
Model size
0.3B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Collection including numind/NuSentiment-multilingual