YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

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))

Training Details

Training Procedure

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.

  • Library Version: PEFT 0.18.1
  • Method: LoRA (Low-Rank Adaptation)

Technical Specifications

Framework versions

  • PEFT 0.18.1
  • Transformers (Latest compatible)
  • PyTorch

Model Card Contact

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?
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support