Image-Text-to-Text
Transformers
Safetensors
English
qwen2_5_vl
text-generation-inference
unsloth
conversational
Instructions to use COURSEMO/coursemo_model_400 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use COURSEMO/coursemo_model_400 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="COURSEMO/coursemo_model_400") 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("COURSEMO/coursemo_model_400") model = AutoModelForMultimodalLM.from_pretrained("COURSEMO/coursemo_model_400", 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 COURSEMO/coursemo_model_400 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "COURSEMO/coursemo_model_400" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "COURSEMO/coursemo_model_400", "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/COURSEMO/coursemo_model_400
- SGLang
How to use COURSEMO/coursemo_model_400 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 "COURSEMO/coursemo_model_400" \ --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": "COURSEMO/coursemo_model_400", "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 "COURSEMO/coursemo_model_400" \ --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": "COURSEMO/coursemo_model_400", "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" } } ] } ] }' - Unsloth Desktop
- Docker Model Runner
How to use COURSEMO/coursemo_model_400 with Docker Model Runner:
docker model run hf.co/COURSEMO/coursemo_model_400
Commit History
-
(Trained with Unsloth)
Ziang HuangVerified signature775520c -
(Trained with Unsloth)
Ziang HuangVerified signaturede56f8d -
(Trained with Unsloth)
Ziang HuangVerified signatureccc5721 -
(Trained with Unsloth)
Ziang HuangVerified signature86b3493 -
(Trained with Unsloth)
Ziang HuangVerified signature2ff5794 -
(Trained with Unsloth)
Ziang HuangVerified signature9ad852c -
(Trained with Unsloth)
Ziang HuangVerified signature45117b4 -
(Trained with Unsloth)
Ziang HuangVerified signaturebe9860d -
(Trained with Unsloth)
Ziang HuangVerified signature2fb5bc5 -
(Trained with Unsloth)
Ziang HuangVerified signature17486e2 -
(Trained with Unsloth)
Ziang HuangVerified signature77f2fe7 -
(Trained with Unsloth)
Ziang HuangVerified signature2863008 -
(Trained with Unsloth)
Ziang HuangVerified signature9b71cdb -
(Trained with Unsloth)
Ziang HuangVerified signature8694a87 -
(Trained with Unsloth)
Ziang HuangVerified signature1edb313 -
(Trained with Unsloth)
Ziang HuangVerified signature7c0bd50 -
(Trained with Unsloth)
Ziang HuangVerified signature2ad6678 -
(Trained with Unsloth)
Ziang HuangVerified signatureba60d19 -
(Trained with Unsloth)
Ziang HuangVerified signatureeeb64a4 -
(Trained with Unsloth)
Ziang HuangVerified signature5f7ff94 -
(Trained with Unsloth)
Ziang HuangVerified signature70ab900 -
(Trained with Unsloth)
Ziang HuangVerified signature5e2d5dd -
(Trained with Unsloth)
Ziang HuangVerified signature8f79309 -
(Trained with Unsloth)
Ziang HuangVerified signaturea5f4a2e -
(Trained with Unsloth)
Ziang HuangVerified signaturebdd6908 -
(Trained with Unsloth)
Ziang HuangVerified signature0509e6e -
(Trained with Unsloth)
Ziang HuangVerified signature61f98fe -
(Trained with Unsloth)
Ziang HuangVerified signature894e49a -
(Trained with Unsloth)
Ziang HuangVerified signature029be00 -
(Trained with Unsloth)
Ziang HuangVerified signature1c4ac9d -
(Trained with Unsloth)
Ziang HuangVerified signature71bfe00 -
(Trained with Unsloth)
Ziang HuangVerified signaturec91beff -
(Trained with Unsloth)
Ziang HuangVerified signature6cf0649 -
Unsloth Model Card
Ziang HuangVerified signature3195860 -
initial commit
Ziang HuangVerified signature40005fe