Image-Text-to-Text
PEFT
Safetensors
Transformers
lora
orthopaedic-surgery
frame-captioning
conversational
Instructions to use rbryant19/opscribe-captioner-ortho-tool-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use rbryant19/opscribe-captioner-ortho-tool-v4 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-v4") - Transformers
How to use rbryant19/opscribe-captioner-ortho-tool-v4 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-v4") 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-v4", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use rbryant19/opscribe-captioner-ortho-tool-v4 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-v4" # 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-v4", "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-v4
- SGLang
How to use rbryant19/opscribe-captioner-ortho-tool-v4 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-v4" \ --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-v4", "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-v4" \ --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-v4", "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-v4 with Docker Model Runner:
docker model run hf.co/rbryant19/opscribe-captioner-ortho-tool-v4
opscribe-captioner-ortho-tool-v4
SVD task arithmetic merge for Qwen2.5-VL-72B-Instruct surgical frame captioning.
| Adapter | Weight | Rank | Data |
|---|---|---|---|
| captioner_voiceover_v1 | 0.60 | 16 | Surgeon-narrated ortho voiceover โ broad visual vocabulary |
| captioner_v3 | 0.40 | 32 | targeted_captioner_v1 + v2 combined (1380 train / 187 val, val_loss 1.9630) โ expanded TKA/THA/MTP missed-instrument coverage |
Merged to rank 32 (alpha=32, scale=1.0) via efficient thin-SVD task arithmetic.
Training Details (captioner_v3 source)
- Dataset: targeted_captioner_v1 (1001 train) + targeted_captioner_v2 (379 train) = 1380 total
- New terms in v2: Gelpi, Aquamantys, Mueller, Alice/Allis, Kocher, precision saw, sponge, grafting (THA); McGlamery, Kocher, oscillating saw, suction, irrigation (MTP); keel punch, lap sponge, double-angle retractor, wide flat osteotome, Tumi, rich retractor, marking pen (TKA)
- Epochs: 3 | batch_size: 1 | grad_accum: 8 | lr: 5e-5 | lora_rank: 32
- Hardware: 4ร NVIDIA H200, device_map=auto, bf16
- Best val_loss: 1.9630 (epoch 3)
- Downloads last month
- 2
Model tree for rbryant19/opscribe-captioner-ortho-tool-v4
Base model
Qwen/Qwen2.5-VL-72B-Instruct