sentiment-analyzer / README.md
Kavi11's picture
Update README.md
dbe00a8 verified
|
Raw History Blame Contribute Delete
2.63 kB
metadata
base_model: google/gemma-2b
library_name: peft
pipeline_tag: text-generation
tags:
  - base_model:adapter:google/gemma-2b
  - lora
  - qlora
  - peft
  - transformers

Gemma-2B LoRA Fine-Tuned Model

This repository contains LoRA adapter weights fine-tuned on top of the google/gemma-2b base model.
The model is optimized for lightweight deployment and efficient fine-tuning using PEFT / QLoRA, making it suitable for low-resource environments.


Model Details

Model Description

  • Base model: google/gemma-2b
  • Fine-tuning method: LoRA (Parameter-Efficient Fine-Tuning)
  • Library: PEFT + Hugging Face Transformers
  • Pipeline type: Text Generation
  • Language: English
  • Model format: LoRA adapter (not merged)

This repository does not contain full Gemma weights. It provides adapter layers that must be loaded on top of the base Gemma-2B model.


Model Type

  • Causal Language Model (Decoder-only Transformer)

License

  • Same as base model: Gemma License
    (Users must comply with Google Gemma usage terms)

Finetuned From

  • google/gemma-2b

Intended Uses

Direct Use

This model can be used for:

  • Domain-specific text generation
  • Instruction-following tasks (depending on dataset)
  • Prototyping GenAI applications with limited compute

Downstream Use

  • Can be further fine-tuned with additional LoRA adapters
  • Can be merged with base model for inference if required
  • Suitable for chatbots, assistants, or internal tools

Out-of-Scope Use

  • High-risk domains (medical, legal, financial advice)
  • Fully autonomous decision-making systems
  • Tasks requiring multilingual or long-context reasoning beyond base model limits

Bias, Risks, and Limitations

  • Inherits biases from the base Gemma-2B model and training data
  • Performance is highly dependent on the fine-tuning dataset
  • Not evaluated for safety-critical applications
  • LoRA adapters may underperform compared to full fine-tuning

Recommendations

  • Validate outputs before production use
  • Add guardrails for sensitive or user-facing deployments
  • Perform task-specific evaluation before downstream use

How to Get Started

Loading the Model

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base_model = "google/gemma-2b"
adapter_repo = "Kavi11/gemma-2b-lora"  # update if needed

tokenizer = AutoTokenizer.from_pretrained(base_model)

model = AutoModelForCausalLM.from_pretrained(
    base_model,
    device_map="auto"
)

model = PeftModel.from_pretrained(model, adapter_repo)