Instructions to use vbartolo/surftown-1.2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vbartolo/surftown-1.2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="vbartolo/surftown-1.2") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("vbartolo/surftown-1.2") model = AutoModelForMultimodalLM.from_pretrained("vbartolo/surftown-1.2", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vbartolo/surftown-1.2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vbartolo/surftown-1.2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vbartolo/surftown-1.2", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/vbartolo/surftown-1.2
- SGLang
How to use vbartolo/surftown-1.2 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 "vbartolo/surftown-1.2" \ --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": "vbartolo/surftown-1.2", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "vbartolo/surftown-1.2" \ --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": "vbartolo/surftown-1.2", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use vbartolo/surftown-1.2 with Docker Model Runner:
docker model run hf.co/vbartolo/surftown-1.2
Commit History
-
Upload processor
Verified signatureefd2605 -
Upload LlavaNextVideoForConditionalGeneration
Verified signatured472acd -
Training in progress, step 200
Verified signaturedce22d8 -
Training in progress, step 195
Verified signature4cbc7e8 -
Training in progress, step 190
Verified signaturecbaa7a4 -
Training in progress, step 185
Verified signaturef1bed0e -
Training in progress, step 180
Verified signature9f30eb5 -
Training in progress, step 175
Verified signatured606282 -
Training in progress, step 170
Verified signature4d59690 -
Training in progress, step 165
Verified signature37a3d15 -
Training in progress, step 160
Verified signature8f92a76 -
Training in progress, step 155
Verified signature05792f3 -
Training in progress, step 150
Verified signature1053f63 -
Training in progress, step 145
Verified signature0f73dd2 -
Training in progress, step 140
Verified signaturef794ffa -
Training in progress, step 135
Verified signaturefde814e -
Training in progress, step 130
Verified signatureff61611 -
Training in progress, step 125
Verified signature3e91dfa -
Training in progress, step 120
Verified signatureb7907cb -
Training in progress, step 115
Verified signature0df28ed -
Training in progress, step 110
Verified signature5dcc9b9 -
Training in progress, step 105
Verified signature04dc282 -
Training in progress, step 100
Verified signaturedd3f84f -
Training in progress, step 95
Verified signaturebc84021 -
Training in progress, step 90
Verified signature0a353da -
Training in progress, step 85
Verified signature45bf51c -
Training in progress, step 80
Verified signaturea3d29a2 -
Training in progress, step 75
Verified signature5a6ca07 -
Training in progress, step 70
Verified signature62c6918 -
Training in progress, step 65
Verified signaturecb8a577 -
Training in progress, step 60
Verified signature732bc44 -
Training in progress, step 55
Verified signature6a4af02 -
Training in progress, step 50
Verified signaturec4dfa26 -
Training in progress, step 45
Verified signatureac92daa -
Training in progress, step 40
Verified signature178b0c4 -
Training in progress, step 35
Verified signaturea177413 -
Training in progress, step 30
Verified signature6c3e4e9 -
Training in progress, step 25
Verified signature77d91c6 -
Training in progress, step 20
Verified signaturecb0b58d -
Training in progress, step 15
Verified signature568aaee -
Training in progress, step 10
Verified signature57b3523 -
Training in progress, step 5
Verified signature97dc730 -
initial commit
Verified signature29f217c