Downloads · 30 days
0
Manikeshjy/sentiment-analyzer
sentiment-analyzer is a machine learning model from Manikeshjy. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Based on the details provided in your code snippet, I have updated the README.md file. I've filled in your Username, Model ID, and specified that this is a Sentiment Analysis model using LoRA fine-tuning on the Gemma-…
Downloads · 30 days
0
Access
Public
Updated Jan 22, 2026
Repo size
42.3 MB
Likes
0
Public
Click a slice to open those files.
.json34.4 MB · 81%
From the Hugging Face model README
Based on the details provided in your code snippet, I have updated the README.md file. I've filled in your Username, Model ID, and specified that this is a Sentiment Analysis model using LoRA fine-tuning on the Gemma-2b base.
---
base_model: google/gemma-2b
library_name: peft
pipeline_tag: text-generation
tags:
- base_model:adapter:google/gemma-2b
- lora
- transformers
- sentiment-analysis
---
# sentiment-analyzer
This model is a fine-tuned version of the **Google Gemma-2b** base model, optimized for sentiment analysis tasks. It was trained using Parameter-Efficient Fine-Tuning (PEFT) specifically via the Low-Rank Adaptation (LoRA) method.
## Model Details
### Model Description
- **Developed by:** Manikeshjy
- **Model type:** Causal Language Model (Fine-tuned with LoRA)
- **Language(s) (NLP):** English
- **Finetuned from model:** google/gemma-2b
### Model Sources
- **Repository:** [https://huggingface.co/Manikeshjy/sentiment-analyzer](https://huggingface.co/Manikeshjy/sentiment-analyzer)
## Uses
### Direct Use
This model is intended for sentiment classification and analysis. It can process text inputs and generate labels or descriptions indicating the underlying sentiment (e.g., positive, negative, neutral).
## Bias, Risks, and Limitations
As this is a fine-tuned version of Gemma-2b, it may inherit biases present in the base model. Users should perform their own evaluation for specific use cases, especially those involving sensitive social contexts.
## How to Get Started with the Model
Use the code below to load the model and adapter:
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
model_id = "google/gemma-2b"
adapter_id = "Manikeshjy/sentiment-analyzer"
tokenizer = AutoTokenizer.from_config(model_id)
base_model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
model = PeftModel.from_pretrained(base_model, adapter_id)
inputs = tokenizer("I really enjoyed this movie!", return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=20)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The model was trained using the PEFT (LoRA) library to reduce the number of trainable parameters, making the fine-tuning process more efficient while maintaining high performance.
For questions or feedback, please reach out via the Hugging Face profile: Manikeshjy.
---
### Key Updates Made:
* **Username & ID:** Updated to `Manikeshjy/sentiment-analyzer`.
* **Tags:** Added `sentiment-analysis` to the metadata.
* **Usage Code:** Added a Python snippet showing how to load your specific LoRA adapter using the `peft` library.
* **Context:** Defined the model's purpose as a sentiment analyzer.
Would you like me to help you write a specific **Dataset Card** to describe the data you used for this sentiment training?