Downloads · 30 days
0
sadisylarq/gemma-2-9b-custom
gemma-2-9b-custom is a machine learning model from sadisylarq. 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 custom handler for deploying the google/gemma-2-9b model as a HuggingFace Inference Endpoint.
Downloads · 30 days
0
Access
Public
Updated Nov 28, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md3.2 KB · 41%
From the Hugging Face model README
This repository contains a custom handler for deploying the google/gemma-2-9b model as a HuggingFace Inference Endpoint.
Basic input:
{
"inputs": "Patient presents with fever and cough. What are potential diagnoses?"
}
With custom parameters:
{
"inputs": "Patient presents with fever and cough. What are potential diagnoses?",
"parameters": {
"max_new_tokens": 512,
"temperature": 0.7,
"top_p": 0.9,
"do_sample": true,
"repetition_penalty": 1.1
}
}
[
{
"generated_text": "Based on the symptoms of fever and cough, potential diagnoses include..."
}
]
sadisylarq/gemma-2-9b-customdx24-gemma-2-9bus-east-1nvidia-a10g (recommended) or nvidia-l4011800 secondsNote: Gemma-2-9b requires more powerful GPUs. The nvidia-a10g instance is recommended for optimal performance.
Once deployed, test with:
import requests
API_URL = "https://your-endpoint-url.aws.endpoints.huggingface.cloud"
headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
data = {
"inputs": "Patient presents with fever and cough. Provide diagnosis.",
"parameters": {
"max_new_tokens": 256,
"temperature": 0.7
}
}
response = requests.post(API_URL, headers=headers, json=data)
print(response.json())
Follows the license of the base model: google/gemma-2-9b