Instructions to use Pavithrapn-01/sentiment-analyzer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Pavithrapn-01/sentiment-analyzer with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-2b") model = PeftModel.from_pretrained(base_model, "Pavithrapn-01/sentiment-analyzer") - Transformers
How to use Pavithrapn-01/sentiment-analyzer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Pavithrapn-01/sentiment-analyzer")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Pavithrapn-01/sentiment-analyzer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Pavithrapn-01/sentiment-analyzer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Pavithrapn-01/sentiment-analyzer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Pavithrapn-01/sentiment-analyzer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Pavithrapn-01/sentiment-analyzer
- SGLang
How to use Pavithrapn-01/sentiment-analyzer with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Pavithrapn-01/sentiment-analyzer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Pavithrapn-01/sentiment-analyzer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Pavithrapn-01/sentiment-analyzer" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Pavithrapn-01/sentiment-analyzer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Pavithrapn-01/sentiment-analyzer with Docker Model Runner:
docker model run hf.co/Pavithrapn-01/sentiment-analyzer
Sentiment Analyzer
A fine-tuned sentiment analysis model developed and shared by Pavithrapn-01.
This model is designed to analyze text and classify sentiment efficiently using a lightweight fine-tuning approach.
Model Details
Model Description
This model is a sentiment analysis system built by fine-tuning the google/gemma-2b base model using LoRA (Low-Rank Adaptation).
It is optimized for understanding emotional polarity in text such as positive, negative, or neutral sentiment.
- Developed by: Pavithra PN
- Shared by: Pavithrapn-01
- Model type: Text Generation / Sentiment Analysis
- Language(s): English
- License: Open-source (same as base model)
- Finetuned from model: google/gemma-2b
Model Sources
- Repository: Pavithrapn-01/sentiment-analyzer
- Base Model: google/gemma-2b
Uses
Direct Use
- Sentiment analysis of user reviews
- Opinion mining from social media text
- Feedback and survey analysis
- Educational and academic projects
Downstream Use
- Can be integrated into chatbots
- Can be used in recommendation systems
- Can be further fine-tuned for domain-specific sentiment tasks
Out-of-Scope Use
- Medical or legal decision-making
- High-risk or safety-critical applications
- Multilingual sentiment analysis (English only)
Bias, Risks, and Limitations
- The model may reflect biases present in the training data
- Performance may vary on slang, sarcasm, or ambiguous text
- Best suited for short to medium-length text inputs
Recommendations
Users should validate outputs before deploying the model in real-world applications and avoid using it for sensitive decision-making.
How to Get Started with the Model
from transformers import pipeline
classifier = pipeline("sentiment-analysis", model="Pavithrapn-01/sentiment-analyzer")
result = classifier("I really enjoyed using this application!")
print(result)
- Downloads last month
- 1
Model tree for Pavithrapn-01/sentiment-analyzer
Base model
google/gemma-2b