Instructions to use rhymes-ai/Aria with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rhymes-ai/Aria with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="rhymes-ai/Aria") 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)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("rhymes-ai/Aria") model = AutoModelForImageTextToText.from_pretrained("rhymes-ai/Aria") 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use rhymes-ai/Aria with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rhymes-ai/Aria" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rhymes-ai/Aria", "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/rhymes-ai/Aria
- SGLang
How to use rhymes-ai/Aria 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 "rhymes-ai/Aria" \ --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": "rhymes-ai/Aria", "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 "rhymes-ai/Aria" \ --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": "rhymes-ai/Aria", "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 rhymes-ai/Aria with Docker Model Runner:
docker model run hf.co/rhymes-ai/Aria
add AIBOM
#22
by fatima113 - opened
- rhymes-ai_Aria.json +65 -0
rhymes-ai_Aria.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bomFormat": "CycloneDX",
|
| 3 |
+
"specVersion": "1.6",
|
| 4 |
+
"serialNumber": "urn:uuid:600758d1-72a4-49d5-a093-440f3cee528c",
|
| 5 |
+
"version": 1,
|
| 6 |
+
"metadata": {
|
| 7 |
+
"timestamp": "2025-06-05T09:39:49.879992+00:00",
|
| 8 |
+
"component": {
|
| 9 |
+
"type": "machine-learning-model",
|
| 10 |
+
"bom-ref": "rhymes-ai/Aria-e3891dd2-656a-5590-b76e-1fafb4755666",
|
| 11 |
+
"name": "rhymes-ai/Aria",
|
| 12 |
+
"externalReferences": [
|
| 13 |
+
{
|
| 14 |
+
"url": "https://huggingface.co/rhymes-ai/Aria",
|
| 15 |
+
"type": "documentation"
|
| 16 |
+
}
|
| 17 |
+
],
|
| 18 |
+
"modelCard": {
|
| 19 |
+
"modelParameters": {
|
| 20 |
+
"task": "image-text-to-text",
|
| 21 |
+
"architectureFamily": "aria",
|
| 22 |
+
"modelArchitecture": "AriaForConditionalGeneration"
|
| 23 |
+
},
|
| 24 |
+
"properties": [
|
| 25 |
+
{
|
| 26 |
+
"name": "library_name",
|
| 27 |
+
"value": "transformers"
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"name": "base_model",
|
| 31 |
+
"value": "rhymes-ai/Aria-Base-64K"
|
| 32 |
+
}
|
| 33 |
+
]
|
| 34 |
+
},
|
| 35 |
+
"authors": [
|
| 36 |
+
{
|
| 37 |
+
"name": "rhymes-ai"
|
| 38 |
+
}
|
| 39 |
+
],
|
| 40 |
+
"licenses": [
|
| 41 |
+
{
|
| 42 |
+
"license": {
|
| 43 |
+
"id": "Apache-2.0",
|
| 44 |
+
"url": "https://spdx.org/licenses/Apache-2.0.html"
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
],
|
| 48 |
+
"tags": [
|
| 49 |
+
"transformers",
|
| 50 |
+
"safetensors",
|
| 51 |
+
"aria",
|
| 52 |
+
"image-text-to-text",
|
| 53 |
+
"multimodal",
|
| 54 |
+
"conversational",
|
| 55 |
+
"en",
|
| 56 |
+
"arxiv:2410.05993",
|
| 57 |
+
"base_model:rhymes-ai/Aria-Base-64K",
|
| 58 |
+
"base_model:finetune:rhymes-ai/Aria-Base-64K",
|
| 59 |
+
"license:apache-2.0",
|
| 60 |
+
"endpoints_compatible",
|
| 61 |
+
"region:us"
|
| 62 |
+
]
|
| 63 |
+
}
|
| 64 |
+
}
|
| 65 |
+
}
|