Gemma 2B IA3 Fine-Tuned Model

Model Overview

This model is a parameter-efficient fine-tuned version of the Gemma 2B base model using IA3 (Infused Adapter by Inhibiting and Amplifying Inner Activations). It is trained on an instruction-following dataset to improve structured response generation and general task understanding.

Model Details

  • Base Model: google/gemma-2b
  • Fine-Tuning Method: IA3 (PEFT)
  • Task Type: Causal Language Modeling
  • Language: English
  • Dataset: yahma/alpaca-cleaned (subset ~2000 samples)

Intended Use

Direct Use

  • Instruction following
  • Question answering
  • General text generation

Downstream Use

  • Domain-specific fine-tuning (e.g., cybersecurity, assistants)
  • Chatbot or API integration

Out-of-Scope Use

  • High-risk domains (medical, legal, financial decisions)
  • Safety-critical applications
  • Real-time autonomous systems

Training Details

Preprocessing

  • Instruction-input-response formatting
  • Tokenization with max length 512
  • Labels copied from input_ids for causal LM

Hyperparameters

  • Epochs: 1
  • Batch size: 2
  • Gradient accumulation: 8
  • Learning rate: 2e-4
  • Precision: FP16

IA3 Configuration

  • Target modules:
    • k_proj
    • v_proj
    • down_proj

Evaluation

Evaluation was performed qualitatively using prompt-based testing. The model demonstrates improved instruction-following capability compared to the base model.

Limitations

  • Small dataset size limits generalization
  • May produce hallucinations or incorrect outputs
  • No alignment tuning (e.g., RLHF/DPO) applied

Bias and Risks

  • Inherits biases from base model and dataset
  • May generate harmful or misleading content
  • Requires monitoring in production systems

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("your-username/gemma-ia3-alpaca")
tokenizer = AutoTokenizer.from_pretrained("your-username/gemma-ia3-alpaca")

prompt = "### Instruction:\nExplain SQL injection attack\n\n### Response:"
inputs = tokenizer(prompt, return_tensors="pt")

outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
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

Model tree for Sujith2121/gemma-ia3-alpaca

Base model

google/gemma-2b
Finetuned
(287)
this model

Dataset used to train Sujith2121/gemma-ia3-alpaca