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.