Instructions to use Lin-Chen/ShareGPT4V-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lin-Chen/ShareGPT4V-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Lin-Chen/ShareGPT4V-7B")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Lin-Chen/ShareGPT4V-7B", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Lin-Chen/ShareGPT4V-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lin-Chen/ShareGPT4V-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lin-Chen/ShareGPT4V-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Lin-Chen/ShareGPT4V-7B
- SGLang
How to use Lin-Chen/ShareGPT4V-7B 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 "Lin-Chen/ShareGPT4V-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lin-Chen/ShareGPT4V-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Lin-Chen/ShareGPT4V-7B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lin-Chen/ShareGPT4V-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Lin-Chen/ShareGPT4V-7B with Docker Model Runner:
docker model run hf.co/Lin-Chen/ShareGPT4V-7B
chenlin commited on
Commit ·
6f78d02
1
Parent(s): 5e427bd
Add model files
Browse files- .gitattributes +1 -0
- README.md +35 -1
- config.json +3 -0
- generation_config.json +3 -0
- pytorch_model-00001-of-00002.bin +3 -0
- pytorch_model-00002-of-00002.bin +3 -0
- pytorch_model.bin.index.json +3 -0
- special_tokens_map.json +3 -0
- tokenizer.model +3 -0
- tokenizer_config.json +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.json filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
inference: false
|
| 3 |
---
|
| 4 |
+
<br>
|
| 5 |
+
<br>
|
| 6 |
+
|
| 7 |
+
# ShareGPT4V-7B Model Card
|
| 8 |
+
|
| 9 |
+
## Model details
|
| 10 |
+
|
| 11 |
+
**Model type:**
|
| 12 |
+
ShareGPT4V-7B is an open-source chatbot trained by fine-tuning CLP vision tower and LLaMA/Vicuna on GPT4-Vision-assisted [ShareGPT4V](https://huggingface.co/datasets/Lin-Chen/ShareGPT4V) data and LLaVA instruction-tuning data.
|
| 13 |
+
|
| 14 |
+
**Model date:**
|
| 15 |
+
ShareGPT4V-7B was trained in Nov 2023.
|
| 16 |
+
|
| 17 |
+
**Paper or resources for more information:**
|
| 18 |
+
[[Project](https://ShareGPT4V.github.io/)] [[Paper](https://huggingface.co/papers/2311.12793)] [[Code](https://github.com/InternLM/InternLM-XComposer/tree/main/projects/ShareGPT4V)]
|
| 19 |
+
|
| 20 |
+
## License
|
| 21 |
+
Llama 2 is licensed under the LLAMA 2 Community License,
|
| 22 |
+
Copyright (c) Meta Platforms, Inc. All Rights Reserved.
|
| 23 |
+
|
| 24 |
+
## Intended use
|
| 25 |
+
**Primary intended uses:**
|
| 26 |
+
The primary use of ShareGPT4V-7B is research on large multimodal models and chatbots.
|
| 27 |
+
|
| 28 |
+
**Primary intended users:**
|
| 29 |
+
The primary intended users of the model are researchers and hobbyists in computer vision, natural language processing, machine learning, and artificial intelligence.
|
| 30 |
+
|
| 31 |
+
## Training dataset
|
| 32 |
+
- 1.2M high-quality image-text pairs, i.e., ShareGPT4V-PT data
|
| 33 |
+
- 100K GPT4-Vision-generated image-text pairs
|
| 34 |
+
- LLaVA instruction-tuning data
|
| 35 |
+
|
| 36 |
+
## Evaluation dataset
|
| 37 |
+
A collection of 11 benchmarks
|
config.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d6e2fec0e911b019482f465c139d6905b40b9a863116962c02a9d3131949c7e
|
| 3 |
+
size 1160
|
generation_config.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2b4818acc825ace1ce4a9daed9838645d103990a451adba4bc90696e38d3fc1f
|
| 3 |
+
size 162
|
pytorch_model-00001-of-00002.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5972401762d0f1e4dbc344461f132fb00e83e3284b8a222030e9cdc68cd4da58
|
| 3 |
+
size 9976634558
|
pytorch_model-00002-of-00002.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64a22d5baa48260b3fd1eee00369932e7efa49bf662f0c57344c85ca0d46e169
|
| 3 |
+
size 3542276251
|
pytorch_model.bin.index.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:487578d3f7ec21c057596d0f9dc71084acc349eb8f13bd8b5af86c26460f2d31
|
| 3 |
+
size 27068
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:719833ff26ac897a3ec8ed946028a135de2a351470af59b4008744ab1f0ee9b7
|
| 3 |
+
size 438
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
| 3 |
+
size 499723
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cf01145c6de57f061991ff871e85d0402c38481f968daea8874c431cd0c7740f
|
| 3 |
+
size 749
|