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
Overwriting with 150-step adapter
Browse files- README.md +14 -4
- adapter_config.json +1 -1
- adapter_model.safetensors +2 -2
- processor_config.json +2 -2
- tokenizer_config.json +1 -1
README.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
|
@@ -15,7 +22,7 @@ tags: []
|
|
| 15 |
|
| 16 |
<!-- Provide a longer summary of what this model is. -->
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
- **Developed by:** [More Information Needed]
|
| 21 |
- **Funded by [optional]:** [More Information Needed]
|
|
@@ -196,4 +203,7 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 196 |
|
| 197 |
## Model Card Contact
|
| 198 |
|
| 199 |
-
[More Information Needed]
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: Qwen/Qwen2-VL-7B-Instruct
|
| 3 |
+
library_name: peft
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- base_model:adapter:Qwen/Qwen2-VL-7B-Instruct
|
| 7 |
+
- lora
|
| 8 |
+
- sft
|
| 9 |
+
- transformers
|
| 10 |
+
- trl
|
| 11 |
---
|
| 12 |
|
| 13 |
# Model Card for Model ID
|
|
|
|
| 22 |
|
| 23 |
<!-- Provide a longer summary of what this model is. -->
|
| 24 |
|
| 25 |
+
|
| 26 |
|
| 27 |
- **Developed by:** [More Information Needed]
|
| 28 |
- **Funded by [optional]:** [More Information Needed]
|
|
|
|
| 203 |
|
| 204 |
## Model Card Contact
|
| 205 |
|
| 206 |
+
[More Information Needed]
|
| 207 |
+
### Framework versions
|
| 208 |
+
|
| 209 |
+
- PEFT 0.18.1
|
adapter_config.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
| 25 |
"peft_type": "LORA",
|
| 26 |
"peft_version": "0.18.1",
|
| 27 |
"qalora_group_size": 16,
|
| 28 |
-
"r":
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
|
|
|
| 25 |
"peft_type": "LORA",
|
| 26 |
"peft_version": "0.18.1",
|
| 27 |
"qalora_group_size": 16,
|
| 28 |
+
"r": 8,
|
| 29 |
"rank_pattern": {},
|
| 30 |
"revision": null,
|
| 31 |
"target_modules": [
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f78bf26ec42b174b943bc9da258889d681aa7335a809cb38f1e5929ac85b1805
|
| 3 |
+
size 80797976
|
processor_config.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
| 21 |
"resample": 3,
|
| 22 |
"rescale_factor": 0.00392156862745098,
|
| 23 |
"size": {
|
| 24 |
-
"longest_edge":
|
| 25 |
"shortest_edge": 200704
|
| 26 |
},
|
| 27 |
"temporal_patch_size": 2
|
|
@@ -47,7 +47,7 @@
|
|
| 47 |
0.27577711
|
| 48 |
],
|
| 49 |
"max_frames": 768,
|
| 50 |
-
"max_pixels":
|
| 51 |
"merge_size": 2,
|
| 52 |
"min_frames": 4,
|
| 53 |
"min_pixels": 200704,
|
|
|
|
| 21 |
"resample": 3,
|
| 22 |
"rescale_factor": 0.00392156862745098,
|
| 23 |
"size": {
|
| 24 |
+
"longest_edge": 1003520,
|
| 25 |
"shortest_edge": 200704
|
| 26 |
},
|
| 27 |
"temporal_patch_size": 2
|
|
|
|
| 47 |
0.27577711
|
| 48 |
],
|
| 49 |
"max_frames": 768,
|
| 50 |
+
"max_pixels": 1003520,
|
| 51 |
"merge_size": 2,
|
| 52 |
"min_frames": 4,
|
| 53 |
"min_pixels": 200704,
|
tokenizer_config.json
CHANGED
|
@@ -21,7 +21,7 @@
|
|
| 21 |
"<|video_pad|>"
|
| 22 |
],
|
| 23 |
"is_local": false,
|
| 24 |
-
"max_pixels":
|
| 25 |
"min_pixels": 200704,
|
| 26 |
"model_max_length": 32768,
|
| 27 |
"pad_token": "<|endoftext|>",
|
|
|
|
| 21 |
"<|video_pad|>"
|
| 22 |
],
|
| 23 |
"is_local": false,
|
| 24 |
+
"max_pixels": 1003520,
|
| 25 |
"min_pixels": 200704,
|
| 26 |
"model_max_length": 32768,
|
| 27 |
"pad_token": "<|endoftext|>",
|