Image-Text-to-Text
Transformers
Safetensors
GGUF
Indonesian
English
qwen3_5
joko
lora-merged
conversational
Instructions to use Mesosfer/Joko with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mesosfer/Joko with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Mesosfer/Joko") 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("Mesosfer/Joko") model = AutoModelForMultimodalLM.from_pretrained("Mesosfer/Joko", 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 Mesosfer/Joko with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mesosfer/Joko" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mesosfer/Joko", "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/Mesosfer/Joko
- SGLang
How to use Mesosfer/Joko 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 "Mesosfer/Joko" \ --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": "Mesosfer/Joko", "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 "Mesosfer/Joko" \ --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": "Mesosfer/Joko", "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 Mesosfer/Joko with Docker Model Runner:
docker model run hf.co/Mesosfer/Joko
Fix chat end-of-turn stop token and padding configuration
Browse files- generation_config.json +6 -2
- manifest.json +2 -2
generation_config.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
| 1 |
{
|
| 2 |
-
"_from_model_config":
|
| 3 |
-
"eos_token_id":
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"transformers_version": "5.20.2",
|
| 5 |
"use_cache": true
|
| 6 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_from_model_config": false,
|
| 3 |
+
"eos_token_id": [
|
| 4 |
+
248044,
|
| 5 |
+
248046
|
| 6 |
+
],
|
| 7 |
+
"pad_token_id": 248044,
|
| 8 |
"transformers_version": "5.20.2",
|
| 9 |
"use_cache": true
|
| 10 |
}
|
manifest.json
CHANGED
|
@@ -44,7 +44,7 @@
|
|
| 44 |
"sha256": "2984c03425a28d242744e234a5003786fd289b3713db79fe0958c65eb59d85b2"
|
| 45 |
},
|
| 46 |
"generation_config.json": {
|
| 47 |
-
"size":
|
| 48 |
-
"sha256": "
|
| 49 |
}
|
| 50 |
}
|
|
|
|
| 44 |
"sha256": "2984c03425a28d242744e234a5003786fd289b3713db79fe0958c65eb59d85b2"
|
| 45 |
},
|
| 46 |
"generation_config.json": {
|
| 47 |
+
"size": 165,
|
| 48 |
+
"sha256": "e7d4d9c9615aa67c8dd930108697b894602dac74f9cf680dab276b625b6ef4cf"
|
| 49 |
}
|
| 50 |
}
|