Downloads · 30 days
5
36% of all-time downloads
Akhand108/gemma_finetuned
gemma_finetuned is a machine learning model from Akhand108. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
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.
Downloads · 30 days
5
36% of all-time downloads
All-time downloads
14
Public
Parameters
268M
9.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt6.4 GB · 59%
From the Hugging Face model README
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.
# 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)