Instructions to use ChayanM/Swin-GPT2_Mimic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ChayanM/Swin-GPT2_Mimic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ChayanM/Swin-GPT2_Mimic")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("ChayanM/Swin-GPT2_Mimic") model = AutoModelForImageTextToText.from_pretrained("ChayanM/Swin-GPT2_Mimic") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ChayanM/Swin-GPT2_Mimic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ChayanM/Swin-GPT2_Mimic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ChayanM/Swin-GPT2_Mimic", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ChayanM/Swin-GPT2_Mimic
- SGLang
How to use ChayanM/Swin-GPT2_Mimic 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 "ChayanM/Swin-GPT2_Mimic" \ --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": "ChayanM/Swin-GPT2_Mimic", "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 "ChayanM/Swin-GPT2_Mimic" \ --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": "ChayanM/Swin-GPT2_Mimic", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ChayanM/Swin-GPT2_Mimic with Docker Model Runner:
docker model run hf.co/ChayanM/Swin-GPT2_Mimic
Training in progress, epoch 1
Browse files- config.json +0 -0
- model.safetensors +3 -0
- preprocessor_config.json +22 -0
- training_args.bin +3 -0
config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d577ddff22e96011451f589197e7fb046bc43de983bf9352cd4facce4098d5a9
|
| 3 |
+
size 965957568
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_normalize": true,
|
| 3 |
+
"do_rescale": true,
|
| 4 |
+
"do_resize": true,
|
| 5 |
+
"image_mean": [
|
| 6 |
+
0.485,
|
| 7 |
+
0.456,
|
| 8 |
+
0.406
|
| 9 |
+
],
|
| 10 |
+
"image_processor_type": "ViTFeatureExtractor",
|
| 11 |
+
"image_std": [
|
| 12 |
+
0.229,
|
| 13 |
+
0.224,
|
| 14 |
+
0.225
|
| 15 |
+
],
|
| 16 |
+
"resample": 3,
|
| 17 |
+
"rescale_factor": 0.00392156862745098,
|
| 18 |
+
"size": {
|
| 19 |
+
"height": 384,
|
| 20 |
+
"width": 384
|
| 21 |
+
}
|
| 22 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6dd77040949647fa4b081f2f6be19d1ed5b3019d92fd8ecb74d288af93cd6290
|
| 3 |
+
size 4411
|