Image-Text-to-Text
Transformers
Safetensors
English
qwen2_5_vl
text-generation-inference
unsloth
conversational
Instructions to use COURSEMO/coursemo_model_final with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use COURSEMO/coursemo_model_final with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="COURSEMO/coursemo_model_final") 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_final") model = AutoModelForMultimodalLM.from_pretrained("COURSEMO/coursemo_model_final", 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_final with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "COURSEMO/coursemo_model_final" # 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_final", "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_final
- SGLang
How to use COURSEMO/coursemo_model_final 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_final" \ --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_final", "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_final" \ --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_final", "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_final with Docker Model Runner:
docker model run hf.co/COURSEMO/coursemo_model_final
Commit History
-
(Trained with Unsloth)
Ziang HuangVerified signature11297e8 -
(Trained with Unsloth)
Ziang HuangVerified signature6348090 -
(Trained with Unsloth)
Ziang HuangVerified signature2474a6c -
(Trained with Unsloth)
Ziang HuangVerified signaturead6ef35 -
(Trained with Unsloth)
Ziang HuangVerified signature3702ef5 -
(Trained with Unsloth)
Ziang HuangVerified signatured4f052d -
(Trained with Unsloth)
Ziang HuangVerified signature8e8d635 -
(Trained with Unsloth)
Ziang HuangVerified signature296c7e5 -
(Trained with Unsloth)
Ziang HuangVerified signature8259c16 -
(Trained with Unsloth)
Ziang HuangVerified signature9c97cde -
(Trained with Unsloth)
Ziang HuangVerified signature04014ae -
(Trained with Unsloth)
Ziang HuangVerified signature602d95d -
(Trained with Unsloth)
Ziang HuangVerified signatured6b9968 -
(Trained with Unsloth)
Ziang HuangVerified signature4460178 -
(Trained with Unsloth)
Ziang HuangVerified signature22ec9b5 -
(Trained with Unsloth)
Ziang HuangVerified signature698614d -
(Trained with Unsloth)
Ziang HuangVerified signature6aacded -
(Trained with Unsloth)
Ziang HuangVerified signaturee117b1d -
(Trained with Unsloth)
Ziang HuangVerified signature899c473 -
(Trained with Unsloth)
Ziang HuangVerified signatured6cd153 -
(Trained with Unsloth)
Ziang HuangVerified signaturebc68731 -
(Trained with Unsloth)
Ziang HuangVerified signature505e0c5 -
(Trained with Unsloth)
Ziang HuangVerified signaturee38577c -
(Trained with Unsloth)
Ziang HuangVerified signature4b46965 -
(Trained with Unsloth)
Ziang HuangVerified signaturee1c64b2 -
(Trained with Unsloth)
Ziang HuangVerified signatured8d6c5b -
(Trained with Unsloth)
Ziang HuangVerified signaturecb8f794 -
(Trained with Unsloth)
Ziang HuangVerified signature343ee5c -
(Trained with Unsloth)
Ziang HuangVerified signature0a47492 -
(Trained with Unsloth)
Ziang HuangVerified signature1e54b12 -
(Trained with Unsloth)
Ziang HuangVerified signaturecd76399 -
(Trained with Unsloth)
Ziang HuangVerified signaturece222ae -
(Trained with Unsloth)
Ziang HuangVerified signature4f67646 -
Unsloth Model Card
Ziang HuangVerified signature4ea7f2c -
initial commit
Ziang HuangVerified signaturef61c5a7