Instructions to use C0mos/VLM-DoctorHandzriting with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use C0mos/VLM-DoctorHandzriting with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2-VL-7B-Instruct") model = PeftModel.from_pretrained(base_model, "C0mos/VLM-DoctorHandzriting") - Transformers
How to use C0mos/VLM-DoctorHandzriting with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="C0mos/VLM-DoctorHandzriting") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("C0mos/VLM-DoctorHandzriting", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use C0mos/VLM-DoctorHandzriting with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "C0mos/VLM-DoctorHandzriting" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "C0mos/VLM-DoctorHandzriting", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/C0mos/VLM-DoctorHandzriting
- SGLang
How to use C0mos/VLM-DoctorHandzriting 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 "C0mos/VLM-DoctorHandzriting" \ --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": "C0mos/VLM-DoctorHandzriting", "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 "C0mos/VLM-DoctorHandzriting" \ --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": "C0mos/VLM-DoctorHandzriting", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use C0mos/VLM-DoctorHandzriting with Docker Model Runner:
docker model run hf.co/C0mos/VLM-DoctorHandzriting
Initial upload: Qwen2-VL medical handwriting adapters
Browse files- adapter_config.json +3 -3
- adapter_model.safetensors +1 -1
adapter_config.json
CHANGED
|
@@ -29,12 +29,12 @@
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
| 32 |
-
"v_proj",
|
| 33 |
"k_proj",
|
|
|
|
|
|
|
| 34 |
"o_proj",
|
| 35 |
"up_proj",
|
| 36 |
-
"
|
| 37 |
-
"down_proj",
|
| 38 |
"q_proj"
|
| 39 |
],
|
| 40 |
"target_parameters": null,
|
|
|
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
|
|
|
| 32 |
"k_proj",
|
| 33 |
+
"down_proj",
|
| 34 |
+
"gate_proj",
|
| 35 |
"o_proj",
|
| 36 |
"up_proj",
|
| 37 |
+
"v_proj",
|
|
|
|
| 38 |
"q_proj"
|
| 39 |
],
|
| 40 |
"target_parameters": null,
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 161539072
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a44f42cfbb7a9694635c30fd7949fabb06349ccb7e18688f557f4dce4c8ebd23
|
| 3 |
size 161539072
|