Instructions to use CodCodingCode/medgemma-27b-conversation-finetune with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use CodCodingCode/medgemma-27b-conversation-finetune with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/medgemma-27b-text-it") model = PeftModel.from_pretrained(base_model, "CodCodingCode/medgemma-27b-conversation-finetune") - Transformers
How to use CodCodingCode/medgemma-27b-conversation-finetune with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CodCodingCode/medgemma-27b-conversation-finetune") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("CodCodingCode/medgemma-27b-conversation-finetune", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use CodCodingCode/medgemma-27b-conversation-finetune with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CodCodingCode/medgemma-27b-conversation-finetune" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CodCodingCode/medgemma-27b-conversation-finetune", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CodCodingCode/medgemma-27b-conversation-finetune
- SGLang
How to use CodCodingCode/medgemma-27b-conversation-finetune with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "CodCodingCode/medgemma-27b-conversation-finetune" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CodCodingCode/medgemma-27b-conversation-finetune", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "CodCodingCode/medgemma-27b-conversation-finetune" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CodCodingCode/medgemma-27b-conversation-finetune", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CodCodingCode/medgemma-27b-conversation-finetune with Docker Model Runner:
docker model run hf.co/CodCodingCode/medgemma-27b-conversation-finetune
Training in progress, step 875
Browse files
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 227149016
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c51a2d802810f7014ea70ee34309108585f13325a6eb223adec23ea11fa85afb
|
| 3 |
size 227149016
|
runs/Jul12_22-07-56_192-222-50-225/events.out.tfevents.1752358076.192-222-50-225.12949.0
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d09431558ddf8b2adae22dc264018305fdf20302e938cd866c2cc2c90bc0cbbb
|
| 3 |
+
size 44069
|