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

Check out the documentation for more information.

Gemma-3 Finetuned QA Model

This repository contains a finetuned Gemma-3 model trained on a custom question-answering (QA) dataset.
You can use this model directly for QA tasks using Hugging Face transformers.


Model Details

  • Model Name: Gemma-3 Finetuned
  • Task: Question Answering (Text2Text)
  • Finetuned On: Custom QA dataset
  • Framework: PyTorch
  • License: Add your license here

Installation

# Install Hugging Face Transformers and Datasets
pip install transformers datasets evaluate torch



## Load Model

from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
import torch

MODEL_NAME = "Akhand108/gemma_finetuned"

# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME).to("cuda")  # use 'cpu' if no GPU

# Create a pipeline for QA
qa_pipe = pipeline("text2text-generation", model=model, tokenizer=tokenizer, device=0)



## Inference

# Example question and context
context = "Fanconi anemia (FA) is a rare genetic disorder that affects bone marrow."
question = "How to diagnose Fanconi Anemia?"

# Prepare input in text2text format
inputs = f"Question: {question}\nContext: {context}\nAnswer:"

# Generate answer
output = qa_pipe(inputs, max_new_tokens=64, do_sample=False)[0]["generated_text"]

print("Question:", question)
print("Answer:", output)
Downloads last month
2
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support