Image-Text-to-Text
PEFT
Safetensors
Transformers
lora
orthopaedic-surgery
frame-captioning
conversational
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", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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
SVD task arithmetic merge for Qwen2.5-VL-72B-Instruct surgical frame captioning.
| Adapter | Weight | Rank | Data |
|---|---|---|---|
| captioner_voiceover_v1 | 0.40 | 16 | Surgeon-narrated ortho voiceover dataset โ general captioning |
| captioner_v2 | 0.60 | 32 | Targeted v2 dataset (793 train) โ priority-tool pass for mallet, reamer, Bovie, saw |
Merged to rank 32 (alpha=32, scale=1.0) via efficient thin-SVD task arithmetic.
Training Details
- captioner_v2 best val_loss: 0.0963 (3 epochs)
- Hardware: 4ร NVIDIA H200, device_map=auto, bf16
- LoRA targets: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
- Downloads last month
- 1
Model tree for rbryant19/opscribe-captioner-ortho-tool-v2
Base model
Qwen/Qwen2.5-VL-72B-Instruct