Text Generation
PEFT
Safetensors
Transformers
sentiment-analysis
nlp
lora
business-analytics
social-media-analytics
Instructions to use 09Vaarun/sentiment-analyzer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use 09Vaarun/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, "09Vaarun/sentiment-analyzer") - Transformers
How to use 09Vaarun/sentiment-analyzer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="09Vaarun/sentiment-analyzer")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("09Vaarun/sentiment-analyzer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 09Vaarun/sentiment-analyzer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "09Vaarun/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": "09Vaarun/sentiment-analyzer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/09Vaarun/sentiment-analyzer
- SGLang
How to use 09Vaarun/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 "09Vaarun/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": "09Vaarun/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 "09Vaarun/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": "09Vaarun/sentiment-analyzer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use 09Vaarun/sentiment-analyzer with Docker Model Runner:
docker model run hf.co/09Vaarun/sentiment-analyzer
Download tokenizer.json from 09Vaarun/sentiment-analyzer: direct link, hf CLI and curl.
- Browser
- Download file 34.4 MB
-
https://huggingface.co/09Vaarun/sentiment-analyzer/resolve/main/tokenizer.json
- Command line
-
hf download hf://09Vaarun/sentiment-analyzer/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/09Vaarun/sentiment-analyzer/resolve/main/tokenizer.json
34.4 MB
- Xet hash:
- 39548a145a47e1cec1dc4388f9aaedb4ae6e29f53741b1beb99063d3ce455c0b
- Size of remote file:
- 34.4 MB
- SHA256:
- f559f2189f392b4555613965f089e7c4d300b41fbe080bf79da0d676e33ee7f0
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.