Instructions to use nur-dev/farabi-0.6B-agent-rag with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nur-dev/farabi-0.6B-agent-rag with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nur-dev/farabi-0.6B-agent-rag") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("nur-dev/farabi-0.6B-agent-rag") model = AutoModelForMultimodalLM.from_pretrained("nur-dev/farabi-0.6B-agent-rag") 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]:])) - HERMES
How to use nur-dev/farabi-0.6B-agent-rag with HERMES:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nur-dev/farabi-0.6B-agent-rag with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nur-dev/farabi-0.6B-agent-rag" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nur-dev/farabi-0.6B-agent-rag", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nur-dev/farabi-0.6B-agent-rag
- SGLang
How to use nur-dev/farabi-0.6B-agent-rag 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 "nur-dev/farabi-0.6B-agent-rag" \ --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": "nur-dev/farabi-0.6B-agent-rag", "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 "nur-dev/farabi-0.6B-agent-rag" \ --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": "nur-dev/farabi-0.6B-agent-rag", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nur-dev/farabi-0.6B-agent-rag with Docker Model Runner:
docker model run hf.co/nur-dev/farabi-0.6B-agent-rag
Access Farabi-0.6B-agent-rag
Access is granted automatically once you complete this short form. Please tell us who you are, your organization, and how you intend to use the model. Your Hugging Face username and email are shared with the authors automatically.
This model is released for NON-COMMERCIAL use only under CC BY-NC 4.0. By requesting access you confirm the information below is accurate and you agree to these terms.
Log in or Sign Up to review the conditions and access this model content.
Farabi-0.6B-agent-rag
A compact (0.6B) Kazakh / Russian / English assistant tuned for grounded RAG and agentic tool-calling. It is designed to run on-device and to drop into agent stacks that expect OpenAI-style function calling.
Built on Qwen3-0.6B and adapted for Kazakh, Russian, and English.
Capabilities
- Grounded RAG. Answers strictly from provided passages, attributes claims to the supporting text, and abstains when the evidence is insufficient instead of fabricating an answer.
- Tool-calling (Hermes / OpenAI function calling). Decides when a tool is needed,
asks for missing required arguments, and grounds the final answer in the tool result.
- Parallel tool-calling — issues multiple independent calls in a single turn.
- Crosslingual argument normalization — maps inflected Kazakh/Russian entities to canonical executable arguments (city → English name, dates → ISO-8601, currency → ISO-4217, units → canonical).
- Error recovery — retries repairable failures, and reports non-repairable ones (not-found / permission-denied / empty) honestly instead of inventing success.
- Prompt-injection resistance. Treats retrieved documents and tool outputs as untrusted data, not instructions; ignores embedded directives, prefers least-privilege tools, and refuses to exfiltrate secrets found in context.
- Text workbench. Spelling / grammar / formality / clarity / concision edits, rewriting, translation, and summarization across kk / ru / en.
- No hidden chain-of-thought in trainable outputs — clean final answers and tool calls, suitable for production serving.
Benchmarks
Agentic & RAG capabilities (held-out probe)
| Capability | Score |
|---|---|
| Prompt-injection resistance (overall) | 89% |
| • instruction-in-retrieved-chunk | 100% |
| • tool-output injection | 100% |
| • least-privilege tool use | 100% |
| • secret / data-exfiltration refusal | 54% |
| Parallel tool-calling | 99% |
| Crosslingual argument normalization | 87% |
| Text editing / workbench | 81% |
Note: secret-exfiltration refusal (54%) is the model's weakest safety dimension — use an output filter for credential-bearing contexts.
Academic (ISSAI Kazakh/Russian QOLDA suite, n=250/bench; RAGBench = chrF)
Accuracy (%), compared with same-size and larger models for context. AVG is the mean of the 10 accuracy benchmarks.
| Model | Size | ARC-kk | ARC-ru | MMLU-kk | GPQA-kk | GPQA-ru | GSM8k-kk | GSM8k-ru | PolyMath-kk | MMLU-Pro-kk | MMLU-Pro-ru | RAGBench (chrF) | AVG |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Farabi-0.6B-agent-rag | 0.6B | 46.4 | 59.2 | 36.0 | 24.4 | 28.4 | 21.2 | 32.4 | 12.4 | 15.2 | 17.6 | 17.0 | 29.3 |
| ISSAI foggen-0.6B | 0.6B | 33.6 | 59.6 | 30.0 | 28.8 | 30.4 | 8.0 | 37.2 | 7.6 | 18.8 | 22.4 | 7.3 | 27.6 |
| Qwen3-0.6B | 0.6B | 29.6 | 51.2 | 33.2 | 22.0 | 22.4 | 7.2 | 41.6 | 8.0 | 14.0 | 16.8 | 15.6 | 24.6 |
| ISSAI Sherkala-8B-Chat | 8B | 74.8 | 78.4 | 47.6 | 30.0 | 25.6 | 68.8 | 80.0 | 20.4 | 20.4 | 22.4 | 41.0 | 46.8 |
At its size class Farabi-0.6B leads on the QOLDA average, ahead of both ISSAI foggen-0.6B and the Qwen3-0.6B base. Sherkala-8B is shown as a larger-model reference point.
Translation (FLORES-200, BLEU)
| Direction | BLEU |
|---|---|
| ru → en | 24.4 |
| en → ru | 17.1 |
| kk → en | 13.8 |
| en → kk | 8.2 |
| ru → kk | 5.6 |
| kk → ru | 1.9 |
Serving
Works with vLLM's OpenAI-compatible server using the Hermes tool-call parser:
vllm serve nur-dev/farabi-0.6B-agent-rag \
--chat-template chat_template.jinja \
--enable-auto-tool-choice --tool-call-parser hermes
Then call it with the OpenAI SDK (and the OpenAI Agents SDK):
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="x")
resp = client.chat.completions.create(
model="nur-dev/farabi-0.6B-agent-rag",
messages=[{"role": "user", "content": "Бүгін Алматыда ауа райы қандай?"}],
tools=[{
"type": "function",
"function": {
"name": "get_weather",
"description": "Current weather for a city.",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string", "description": "Canonical English city name."}},
"required": ["city"],
},
},
}],
tool_choice="auto",
)
print(resp.choices[0].message.tool_calls)
Languages
Kazakh (kk), Russian (ru), English (en).
License
CC BY-NC 4.0 — non-commercial use only. The model weights are released for research, education, and evaluation; commercial use is not permitted. Built on Qwen3-0.6B (Apache-2.0); the base-model components remain under their original Apache-2.0 terms.
- Downloads last month
- 19