Instructions to use idrock/aruz with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use idrock/aruz with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="idrock/aruz") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("idrock/aruz") model = AutoModelForCausalLM.from_pretrained("idrock/aruz", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use idrock/aruz with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "idrock/aruz" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "idrock/aruz", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/idrock/aruz
- SGLang
How to use idrock/aruz 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 "idrock/aruz" \ --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": "idrock/aruz", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "idrock/aruz" \ --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": "idrock/aruz", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use idrock/aruz with Docker Model Runner:
docker model run hf.co/idrock/aruz
Aruz
A small, fast Uzbek (Latin script) language model for tool calling and for answering from retrieved text. Replies are short and immediate, with no chain-of-thought. It is tuned for these tasks, not for maths, code or open-ended knowledge questions.
Built from google/gemma-4-E2B-it: a new 32,768-token Uzbek tokenizer, continued pretraining on Uzbek text, then fine-tuning for tool use, grounded answers and instruction following. 2.2 B parameters, bfloat16, text only.
Usage
import json, torch
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("idrock/aruz")
model = AutoModelForCausalLM.from_pretrained("idrock/aruz", dtype=torch.bfloat16, device_map="auto")
def tool(name, description, properties):
return {"type": "function", "function": {"name": name, "description": description,
"parameters": {"type": "object", "properties": properties, "required": list(properties)}}}
tools = [
tool("search_knowledge_base",
"bilimlar bazasidan tarif, xizmat, protsedura va limitlar haqida ma'lumot qidirish",
{"query": {"type": "string"},
"topic": {"type": "string", "enum": ["tarif", "xizmat", "protsedura", "limit"]}}),
tool("get_weather", "shahar bo'yicha ob-havo ma'lumotini olish",
{"city": {"type": "string"}, "date": {"type": "string"}}),
tool("set_reminder", "eslatma qo'yish", {"time": {"type": "string"}, "text": {"type": "string"}}),
]
def reply(messages):
inputs = tok.apply_chat_template(messages, tools=tools, add_generation_prompt=True,
return_tensors="pt", return_dict=True).to(model.device)
out = model.generate(**inputs, max_new_tokens=120, do_sample=False)
return tok.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=False)
messages = [{"role": "user", "content": "Registonga talabalar uchun chipta qancha turadi?"}]
print(reply(messages)) # <|tool_call>call:search_knowledge_base{query:<|"|>...<|"|>,topic:<|"|>...<|"|>}<tool_call|>
chunks = [{"id": "d1", "title": "Kirish narxi",
"text": "Registon ansambliga kirish chiptasi kattalar uchun 65000 so'm, talabalar uchun 30000 so'm turadi."}]
messages += [
{"role": "assistant", "tool_calls": [{"id": "c1", "type": "function", "function": {
"name": "search_knowledge_base", "arguments": {"query": "Registon chipta narxi", "topic": "tarif"}}}]},
{"role": "tool", "tool_call_id": "c1", "name": "search_knowledge_base",
"content": json.dumps({"chunks": chunks}, ensure_ascii=False)},
]
print(reply(messages))
Keep search_knowledge_base exactly as above and declare it alongside other
tools — declared on its own, its name comes out garbled.
With vLLM, don't use --tool-call-parser gemma4; it corrupts tool names under
this tokenizer. Render the prompt with the chat template, call /v1/completions
with skip_special_tokens: false, and parse the tool call from the text.
License
Apache 2.0. Aruz is a modified version of Google's Gemma 4 E2B (vocabulary replaced, vision and audio encoders removed, all weights further trained), which is released under the Apache 2.0 license. Not affiliated with or endorsed by Google.
- Downloads last month
- 264