Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

s0close
/
medgemma-dsa-lora

Image-Text-to-Text
Transformers
Safetensors
medical-imaging
radiology
dsa
medgemma
lora
conversational
Model card Files Files and versions
xet
Community

Instructions to use s0close/medgemma-dsa-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use s0close/medgemma-dsa-lora with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-text-to-text", model="s0close/medgemma-dsa-lora")
    messages = [
        {
            "role": "user",
            "content": [
                {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
                {"type": "text", "text": "What animal is on the candy?"}
            ]
        },
    ]
    pipe(text=messages)
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("s0close/medgemma-dsa-lora", dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps
  • vLLM

    How to use s0close/medgemma-dsa-lora with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "s0close/medgemma-dsa-lora"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "s0close/medgemma-dsa-lora",
    		"messages": [
    			{
    				"role": "user",
    				"content": [
    					{
    						"type": "text",
    						"text": "Describe this image in one sentence."
    					},
    					{
    						"type": "image_url",
    						"image_url": {
    							"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
    						}
    					}
    				]
    			}
    		]
    	}'
    Use Docker
    docker model run hf.co/s0close/medgemma-dsa-lora
  • SGLang

    How to use s0close/medgemma-dsa-lora 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 "s0close/medgemma-dsa-lora" \
        --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": "s0close/medgemma-dsa-lora",
    		"messages": [
    			{
    				"role": "user",
    				"content": [
    					{
    						"type": "text",
    						"text": "Describe this image in one sentence."
    					},
    					{
    						"type": "image_url",
    						"image_url": {
    							"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
    						}
    					}
    				]
    			}
    		]
    	}'
    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 "s0close/medgemma-dsa-lora" \
            --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": "s0close/medgemma-dsa-lora",
    		"messages": [
    			{
    				"role": "user",
    				"content": [
    					{
    						"type": "text",
    						"text": "Describe this image in one sentence."
    					},
    					{
    						"type": "image_url",
    						"image_url": {
    							"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
    						}
    					}
    				]
    			}
    		]
    	}'
  • Docker Model Runner

    How to use s0close/medgemma-dsa-lora with Docker Model Runner:

    docker model run hf.co/s0close/medgemma-dsa-lora
medgemma-dsa-lora
2.76 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 11 commits
s0close's picture
s0close
Update README.md
226e95e verified 3 months ago
  • .gitattributes
    1.57 kB
    Upload processor 3 months ago
  • README.md
    4.81 kB
    Update README.md 3 months ago
  • adapter_config.json
    1.13 kB
    Upload model 3 months ago
  • adapter_model.safetensors
    2.72 GB
    xet
    Upload model 3 months ago
  • chat_template.jinja
    1.53 kB
    Upload processor 3 months ago
  • processor_config.json
    676 Bytes
    Upload processor 3 months ago
  • tokenizer.json
    33.4 MB
    xet
    Upload processor 3 months ago
  • tokenizer_config.json
    743 Bytes
    Upload processor 3 months ago
  • training_run.json
    526 Bytes
    Upload training_run.json with huggingface_hub 3 months ago