Downloads · 30 days
9
3% of all-time downloads
harishnair04/Gemma-medtr-2b-sft-v2
Gemma-medtr-2b-sft-v2 is a text generation model from harishnair04. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned variant of Gemma-2-2b, optimized for medical transcription tasks with efficient 4-bit quantization and Low-Rank Adaptation (LoRA). It handles transcription processing, keyword extraction, an…
Downloads · 30 days
9
3% of all-time downloads
All-time downloads
340
Public
Parameters
2.6B
7.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors7.6 GB · 99%
From the Hugging Face model README
This model is a fine-tuned variant of Gemma-2-2b, optimized for medical transcription tasks with efficient 4-bit quantization and Low-Rank Adaptation (LoRA). It handles transcription processing, keyword extraction, and medical specialty classification.
r=8, targeting specific transformer modules for adaptation.nf4 quantization type and bfloat16 compute precision.To load and use this model, initialize it with the following configuration:
import pandas as pd
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from peft import LoraConfig, PeftModel
model_id = "harishnair04/Gemma-medtr-2b-sft-v2"
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16
)
tokenizer = AutoTokenizer.from_pretrained(model_id, token=access_token_read)
model = AutoModelForCausalLM.from_pretrained(model_id, quantization_config=bnb_config, device_map='auto', token=access_token_read)