Instructions to use ChayanM/ViT-RadBert_Mimic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ChayanM/ViT-RadBert_Mimic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ChayanM/ViT-RadBert_Mimic")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("ChayanM/ViT-RadBert_Mimic") model = AutoModelForImageTextToText.from_pretrained("ChayanM/ViT-RadBert_Mimic") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ChayanM/ViT-RadBert_Mimic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ChayanM/ViT-RadBert_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/ViT-RadBert_Mimic", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ChayanM/ViT-RadBert_Mimic
- SGLang
How to use ChayanM/ViT-RadBert_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/ViT-RadBert_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/ViT-RadBert_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/ViT-RadBert_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/ViT-RadBert_Mimic", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ChayanM/ViT-RadBert_Mimic with Docker Model Runner:
docker model run hf.co/ChayanM/ViT-RadBert_Mimic
Training in progress, epoch 1
Browse files- config.json +5 -5
- model.safetensors +2 -2
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -85,7 +85,7 @@
|
|
| 85 |
},
|
| 86 |
"decoder_start_token_id": 0,
|
| 87 |
"encoder": {
|
| 88 |
-
"_name_or_path": "google/vit-
|
| 89 |
"add_cross_attention": false,
|
| 90 |
"architectures": [
|
| 91 |
"ViTForImageClassification"
|
|
@@ -109,7 +109,7 @@
|
|
| 109 |
"forced_eos_token_id": null,
|
| 110 |
"hidden_act": "gelu",
|
| 111 |
"hidden_dropout_prob": 0.0,
|
| 112 |
-
"hidden_size":
|
| 113 |
"id2label": {
|
| 114 |
"0": "tench, Tinca tinca",
|
| 115 |
"1": "goldfish, Carassius auratus",
|
|
@@ -1114,7 +1114,7 @@
|
|
| 1114 |
},
|
| 1115 |
"image_size": 384,
|
| 1116 |
"initializer_range": 0.02,
|
| 1117 |
-
"intermediate_size":
|
| 1118 |
"is_decoder": false,
|
| 1119 |
"is_encoder_decoder": false,
|
| 1120 |
"label2id": {
|
|
@@ -2124,11 +2124,11 @@
|
|
| 2124 |
"min_length": 0,
|
| 2125 |
"model_type": "vit",
|
| 2126 |
"no_repeat_ngram_size": 0,
|
| 2127 |
-
"num_attention_heads":
|
| 2128 |
"num_beam_groups": 1,
|
| 2129 |
"num_beams": 1,
|
| 2130 |
"num_channels": 3,
|
| 2131 |
-
"num_hidden_layers":
|
| 2132 |
"num_return_sequences": 1,
|
| 2133 |
"output_attentions": false,
|
| 2134 |
"output_hidden_states": false,
|
|
|
|
| 85 |
},
|
| 86 |
"decoder_start_token_id": 0,
|
| 87 |
"encoder": {
|
| 88 |
+
"_name_or_path": "google/vit-base-patch16-384",
|
| 89 |
"add_cross_attention": false,
|
| 90 |
"architectures": [
|
| 91 |
"ViTForImageClassification"
|
|
|
|
| 109 |
"forced_eos_token_id": null,
|
| 110 |
"hidden_act": "gelu",
|
| 111 |
"hidden_dropout_prob": 0.0,
|
| 112 |
+
"hidden_size": 768,
|
| 113 |
"id2label": {
|
| 114 |
"0": "tench, Tinca tinca",
|
| 115 |
"1": "goldfish, Carassius auratus",
|
|
|
|
| 1114 |
},
|
| 1115 |
"image_size": 384,
|
| 1116 |
"initializer_range": 0.02,
|
| 1117 |
+
"intermediate_size": 3072,
|
| 1118 |
"is_decoder": false,
|
| 1119 |
"is_encoder_decoder": false,
|
| 1120 |
"label2id": {
|
|
|
|
| 2124 |
"min_length": 0,
|
| 2125 |
"model_type": "vit",
|
| 2126 |
"no_repeat_ngram_size": 0,
|
| 2127 |
+
"num_attention_heads": 12,
|
| 2128 |
"num_beam_groups": 1,
|
| 2129 |
"num_beams": 1,
|
| 2130 |
"num_channels": 3,
|
| 2131 |
+
"num_hidden_layers": 12,
|
| 2132 |
"num_return_sequences": 1,
|
| 2133 |
"output_attentions": false,
|
| 2134 |
"output_hidden_states": false,
|
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:2371b80236ca2f8b5d62586264a192fae13de09de32ff400f45f0cf1e45325d4
|
| 3 |
+
size 959047772
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4411
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a0f96a1663ea83cf24651aa3e0a3b789a732732fa915133e48bb93d0fa04d8e
|
| 3 |
size 4411
|