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
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

rbryant19
/
opscribe-captioner-ortho-tool-v2

Image-Text-to-Text
PEFT
Safetensors
Transformers
lora
orthopaedic-surgery
frame-captioning
conversational
Model card Files Files and versions
xet
Community

Instructions to use rbryant19/opscribe-captioner-ortho-tool-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • PEFT

    How to use rbryant19/opscribe-captioner-ortho-tool-v2 with PEFT:

    from peft import PeftModel
    from transformers import AutoModelForCausalLM
    
    base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-VL-72B-Instruct")
    model = PeftModel.from_pretrained(base_model, "rbryant19/opscribe-captioner-ortho-tool-v2")
  • Transformers

    How to use rbryant19/opscribe-captioner-ortho-tool-v2 with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-text-to-text", model="rbryant19/opscribe-captioner-ortho-tool-v2")
    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("rbryant19/opscribe-captioner-ortho-tool-v2", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use rbryant19/opscribe-captioner-ortho-tool-v2 with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "rbryant19/opscribe-captioner-ortho-tool-v2"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "rbryant19/opscribe-captioner-ortho-tool-v2",
    		"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/rbryant19/opscribe-captioner-ortho-tool-v2
  • SGLang

    How to use rbryant19/opscribe-captioner-ortho-tool-v2 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 "rbryant19/opscribe-captioner-ortho-tool-v2" \
        --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": "rbryant19/opscribe-captioner-ortho-tool-v2",
    		"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 "rbryant19/opscribe-captioner-ortho-tool-v2" \
            --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": "rbryant19/opscribe-captioner-ortho-tool-v2",
    		"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 rbryant19/opscribe-captioner-ortho-tool-v2 with Docker Model Runner:

    docker model run hf.co/rbryant19/opscribe-captioner-ortho-tool-v2
opscribe-captioner-ortho-tool-v2
1.75 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
rbryant19's picture
rbryant19
SVD merge: voiceover_v1 (0.40) + captioner_v2 (0.60) β†’ rank 32
97f0f31 verified 4 months ago
  • .gitattributes
    1.57 kB
    SVD merge: voiceover_v1 (0.40) + captioner_v2 (0.60) β†’ rank 32 4 months ago
  • README.md
    893 Bytes
    SVD merge: voiceover_v1 (0.40) + captioner_v2 (0.60) β†’ rank 32 4 months ago
  • adapter_config.json
    1.11 kB
    SVD merge: voiceover_v1 (0.40) + captioner_v2 (0.60) β†’ rank 32 4 months ago
  • adapter_model.safetensors
    1.74 GB
    xet
    SVD merge: voiceover_v1 (0.40) + captioner_v2 (0.60) β†’ rank 32 4 months ago
  • chat_template.jinja
    1.02 kB
    SVD merge: voiceover_v1 (0.40) + captioner_v2 (0.60) β†’ rank 32 4 months ago
  • processor_config.json
    656 Bytes
    SVD merge: voiceover_v1 (0.40) + captioner_v2 (0.60) β†’ rank 32 4 months ago
  • tokenizer.json
    11.4 MB
    xet
    SVD merge: voiceover_v1 (0.40) + captioner_v2 (0.60) β†’ rank 32 4 months ago
  • tokenizer_config.json
    757 Bytes
    SVD merge: voiceover_v1 (0.40) + captioner_v2 (0.60) β†’ rank 32 4 months ago