Instructions to use hamayawayuri/ayanokoji with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hamayawayuri/ayanokoji with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hamayawayuri/ayanokoji") 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("hamayawayuri/ayanokoji") model = AutoModelForMultimodalLM.from_pretrained("hamayawayuri/ayanokoji", 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 hamayawayuri/ayanokoji with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hamayawayuri/ayanokoji" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hamayawayuri/ayanokoji", "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/hamayawayuri/ayanokoji
- SGLang
How to use hamayawayuri/ayanokoji 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 "hamayawayuri/ayanokoji" \ --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": "hamayawayuri/ayanokoji", "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 "hamayawayuri/ayanokoji" \ --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": "hamayawayuri/ayanokoji", "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 hamayawayuri/ayanokoji with Docker Model Runner:
docker model run hf.co/hamayawayuri/ayanokoji
Commit History
-
Upload model-00015-of-00015.safetensors with huggingface_hub
LmaoVerified signatureac61c63 -
Upload model-00014-of-00015.safetensors with huggingface_hub
LmaoVerified signaturea6c2492 -
Upload model-00013-of-00015.safetensors with huggingface_hub
LmaoVerified signature4095e3d -
Upload model-00012-of-00015.safetensors with huggingface_hub
LmaoVerified signature8082d72 -
Upload model-00011-of-00015.safetensors with huggingface_hub
LmaoVerified signature9cdb3fa -
Upload model-00010-of-00015.safetensors with huggingface_hub
LmaoVerified signaturefbd4ac5 -
Upload model-00009-of-00015.safetensors with huggingface_hub
LmaoVerified signature5b81ae6 -
Upload model-00008-of-00015.safetensors with huggingface_hub
LmaoVerified signaturea48e2af -
Upload model-00007-of-00015.safetensors with huggingface_hub
LmaoVerified signature180fef9 -
Upload model-00006-of-00015.safetensors with huggingface_hub
LmaoVerified signature1d0045a -
Upload model-00005-of-00015.safetensors with huggingface_hub
LmaoVerified signaturef799d76 -
Upload model-00004-of-00015.safetensors with huggingface_hub
LmaoVerified signaturec425719 -
Upload model-00003-of-00015.safetensors with huggingface_hub
LmaoVerified signaturebfb66f6 -
Upload model-00002-of-00015.safetensors with huggingface_hub
LmaoVerified signaturedcb857b -
Upload model-00001-of-00015.safetensors with huggingface_hub
LmaoVerified signature1cf09fa -
Upload vocab.json with huggingface_hub
LmaoVerified signature01f699f -
Upload video_preprocessor_config.json with huggingface_hub
LmaoVerified signature4cc4dc5 -
Upload tokenizer_config.json with huggingface_hub
LmaoVerified signature7e33a32 -
Upload tokenizer.json with huggingface_hub
LmaoVerified signature7fcc9da -
Upload preprocessor_config.json with huggingface_hub
LmaoVerified signature9227ee3 -
Upload model.safetensors.index.json with huggingface_hub
LmaoVerified signature12421bf -
Upload merges.txt with huggingface_hub
LmaoVerified signature305d4ca -
Upload generation_config.json with huggingface_hub
LmaoVerified signature9f0f74a -
Upload configuration.json with huggingface_hub
LmaoVerified signature619d320 -
Upload config.json with huggingface_hub
LmaoVerified signaturef67a176 -
Upload chat_template.jinja with huggingface_hub
LmaoVerified signature3f9a0b1 -
Upload README.md with huggingface_hub
LmaoVerified signature25397ac -
Upload LICENSE with huggingface_hub
LmaoVerified signaturecf25971 -
Upload .gitattributes with huggingface_hub
LmaoVerified signature0c0007b -
initial commit
LmaoVerified signature81140d1