Instructions to use Metric-AI/Ayb-0.5-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Metric-AI/Ayb-0.5-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Metric-AI/Ayb-0.5-9B") 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("Metric-AI/Ayb-0.5-9B") model = AutoModelForMultimodalLM.from_pretrained("Metric-AI/Ayb-0.5-9B", 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 Metric-AI/Ayb-0.5-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Metric-AI/Ayb-0.5-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Metric-AI/Ayb-0.5-9B", "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/Metric-AI/Ayb-0.5-9B
- SGLang
How to use Metric-AI/Ayb-0.5-9B 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 "Metric-AI/Ayb-0.5-9B" \ --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": "Metric-AI/Ayb-0.5-9B", "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 "Metric-AI/Ayb-0.5-9B" \ --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": "Metric-AI/Ayb-0.5-9B", "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 Metric-AI/Ayb-0.5-9B with Docker Model Runner:
docker model run hf.co/Metric-AI/Ayb-0.5-9B
Ayb-0.5-9B
This repository contains the weights of Ayb-0.5-9B, the post-trained model, in the Hugging Face Transformers format. It works with Transformers and vLLM, like Qwen3.5-9B.
Ayb-0.5-9B is the largest model of Ayb-0.5, the first release of Ayb, a family of open-weight Armenian language models from Metric AI Lab, named after Ա (Ayb), the first letter of the Armenian alphabet. It is built on Qwen3.5-9B: we extended the tokenizer with Armenian tokens, continued pretraining on about 26B tokens of Armenian and English text, and post-trained it with SFT, DPO and GRPO.
Ayb-0.5-9B Highlights
- Fluent Armenian: ArmBench 0.616, the highest in the Ayb family, strongest in reading comprehension and text correction.
- Instruction following: IFEval-hy 0.729, holding up across multi-turn conversations.
- Efficient tokenizer: 2,558 added Armenian tokens halve the token count of Armenian text.
- Honest and tool-ready: says when it does not know, rejects false premises, and calls tools in the standard Qwen3.5 format.
Model Overview
- Type: Causal Language Model with Vision Encoder
- Training Stage: Continued Pre-training & Post-training (SFT, DPO, GRPO)
- Base Model: Qwen/Qwen3.5-9B-Base
- Languages: Armenian, English
- Number of Parameters: 9B
- Number of Layers: 32
- Hidden Dimension: 4096
- Vocabulary: 250,635 (Qwen3.5 + 2,558 Armenian tokens)
- Context Length: 262,144 (inherited from Qwen3.5; tested up to 8,192)
- Training Tokens: ~27B (26.2B continued pre-training + 0.9B post-training)
- Training Compute: ~1,360 NVIDIA B200 GPU-hours
- Knowledge Cutoff: mid-2026
Benchmark Results
All results are zero-shot with thinking mode off.
| Ayb-0.5-9B | Ayb-0.5-4B | Ayb-0.5-0.8B | |
|---|---|---|---|
| ArmBench (24 tasks) | |||
| Overall | 0.616 | 0.583 | 0.530 |
| Knowledge | 0.480 | 0.428 | 0.334 |
| Reading comprehension | 0.774 | 0.738 | 0.693 |
| Analysis | 0.653 | 0.652 | 0.564 |
| Generation | 0.270 | 0.249 | 0.189 |
| Correction | 0.905 | 0.848 | 0.870 |
| Instruction following | |||
| IFEval-hy (3 turns) | 0.729 | 0.491 | 0.245 |
| lm-evaluation-harness | |||
| MultiBLiMP-hy | 0.991 | 0.984 | 0.965 |
| HellaSwag-hy | 0.260 | 0.258 | 0.256 |
| ARC-hy | 0.232 | 0.224 | 0.218 |
| m_MMLU-hy | 0.382 | 0.336 | 0.307 |
| INCLUDE-hy | 0.789 | 0.727 | 0.589 |
| Belebele-hy | 0.811 | 0.731 | 0.569 |
| Mean | 0.578 | 0.543 | 0.484 |
Leaderboards: ArmBench-LLM (data) and IFEval-hy. The lm-evaluation-harness tasks are the harness's own Armenian tasks, run zero-shot.
Tokenizer. Ayb uses Qwen3.5's tokenizer plus 2,558 Armenian tokens. Armenian text needs about half as many tokens as with Qwen3.5.
| Tokenizer | Tokens per word (Armenian Wikipedia) ↓ | Armenian / English tokens (Belebele) ↓ |
|---|---|---|
| Ayb | 2.90 | 1.69 |
| Qwen3.5 | 5.51 | 3.67 |
| GPT-4o / GPT-5 (o200k) | 2.88 | 1.79 |
| Gemma 3 / 4 | 4.39 | 2.87 |
Examples
Real outputs of Ayb-0.5-9B (greedy decoding, thinking off).
Armenian history
Prompt:
Պատմիր հակիրճ Մեսրոպ Մաշտոցի մասին։
Ayb-0.5-9B:
Մեսրոպ Մաշտոցը հայ հոգևորական և լեզվաբան էր, ով 405 թվականին ստեղծեց հայոց գրերը՝ ապահովելով հայ ժողովրդի մշակութային և կրոնական զարգացումը։ Նրա շնորհիվ հայերենով հնարավոր եղավ թարգմանել Աստվածաշունչը և բազմաթիվ այլ գրքեր։ Մաշտոցը համարվում է հայոց գրերի ստեղծման հիմնադիրը և հայ մշակույթի մեծագույն գործիչներից մեկը։
Following instructions
Exactly 3 points, one sentence each, no commas.
Prompt:
Գրիր Երևանի մասին ցուցակ՝ ճիշտ 3 կետով։ Յուրաքանչյուր կետ պետք է լինի մեկ նախադասություն, և պատասխանում մի՛ օգտագործիր ստորակետ։
Ayb-0.5-9B:
Երևանը Հայաստանի մայրաքաղաքն է
Երևանում է գտնվում Մատենադարանը
Երևանն ունի հազարամյակների պատմություն
Tool calling
With a get_weather(city) tool. The model calls it for both cities at once; the tool returns {"temp_c": 4, "condition": "cloudy", "wind_kmh": 12} for Gyumri and {"temp_c": 6, "condition": "light rain", "wind_kmh": 8} for Vanadzor.
Prompt:
Ինչպիսի՞ եղանակ է հիմա Գյումրիում և Վանաձորում։
Ayb-0.5-9B (tool calls):
<tool_call>
<function=get_weather>
<parameter=city>
Գյումրի
</parameter>
</function>
</tool_call>
<tool_call>
<function=get_weather>
<parameter=city>
Վանաձոր
</parameter>
</function>
</tool_call>
Ayb-0.5-9B (after the tool results):
Գյումրիում հիմա ամպամած եղանակ է, ջերմաստիճանը 4 աստիճան է, իսկ քամին՝ 12 կմ/ժ։ Վանաձորում թեթև անձրև է գալիս, ջերմաստիճանը 6 աստիճան է, իսկ քամին՝ 8 կմ/ժ։
Quickstart
Ayb-0.5-9B is trained without thinking mode. Turn it off with
"chat_template_kwargs": {"enable_thinking": false}.
Serve the model with vLLM (0.20 or newer):
vllm serve Metric-AI/Ayb-0.5-9B --port 8000 --max-model-len 8192 --enable-auto-tool-choice --tool-call-parser qwen3_coder
Then call it through the OpenAI-compatible API:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
response = client.chat.completions.create(
model="Metric-AI/Ayb-0.5-9B",
messages=[{"role": "user", "content": "Պատմիր հակիրճ Մեսրոպ Մաշտոցի մասին։"}],
temperature=0.7,
top_p=0.9,
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
)
print(response.choices[0].message.content)
Best Practices
- Sampling:
temperature=0.7,top_p=0.9for chat;temperature=0for short factual answers. - Multiple-choice questions: ask the model to reason step by step before giving the letter. It tends to answer directly otherwise.
- Dates: the model does not know today's date. Put it in a system message when it matters.
- Tool calling: use the standard Qwen3.5 tool format (
tools=[...]), as in the serve command above.
License
Ayb-0.5-9B is released under CC BY-NC 4.0. It is built on Qwen/Qwen3.5-9B-Base (Apache 2.0).
Citation
@misc{ayb2026ayb05,
title = {{Ayb-0.5}: Open Armenian Language Models},
author = {Bughdaryan, Spartak and Navasardyan, Zaruhi and Minasyan, Bagratuni and Davtyan, Hrant},
year = {2026},
publisher = {Metric AI Lab},
howpublished = {\url{https://huggingface.co/Metric-AI/Ayb-0.5-9B}}
}
- Downloads last month
- -
Model tree for Metric-AI/Ayb-0.5-9B
Base model
Qwen/Qwen3.5-9B-Base