Downloads · 30 days
6
1% of all-time downloads
tachytelicdetonation/medgemma-27b-it-fp8-dynamic
medgemma-27b-it-fp8-dynamic is a text generation model from tachytelicdetonation. Use it when you need the model to write or continue text. The card lists the license as gemma.
This is an FP8 Dynamic quantized version of MedGemma 27B Instruct, optimized for efficient inference while maintaining model quality.
Downloads · 30 days
6
1% of all-time downloads
All-time downloads
702
Public
Parameters
27B
28.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors28.4 GB · 100%
How the weights are stored.
F8_E4M325.6B · 95%
From the Hugging Face model README
This is an FP8 Dynamic quantized version of MedGemma 27B Instruct, optimized for efficient inference while maintaining model quality.
from vllm import LLM, SamplingParams
# Initialize the model
llm = LLM(
model="YOUR_USERNAME/medgemma-27b-it-fp8-dynamic",
tensor_parallel_size=1, # Adjust based on your GPU setup
quantization="fp8"
)
# Set sampling parameters
sampling_params = SamplingParams(
temperature=0.7,
top_p=0.95,
max_tokens=512
)
# Run inference
prompts = ["Explain the symptoms of diabetes mellitus."]
outputs = llm.generate(prompts, sampling_params)
for output in outputs:
print(output.outputs[0].text)
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"YOUR_USERNAME/medgemma-27b-it-fp8-dynamic",
device_map="auto",
torch_dtype=torch.float16,
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained("YOUR_USERNAME/medgemma-27b-it-fp8-dynamic")
# Generate text
input_text = "What are the treatment options for hypertension?"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=200)
print(tokenizer.decode(outputs[0]))
This model inherits the Gemma license. Please review the original license terms before use.
If you use this model, please cite the original MedGemma paper:
@article{medgemma2024,
title={MedGemma: Medical AI Models from Google DeepMind},
author={Google DeepMind Team},
year={2024}
}