Text Generation
Safetensors
GGUF
qwen3_5
bosnian
function-calling
ai-agents
bh-language-ai
conversational
Instructions to use BH-Language-AI/bh-llm-basic-1-9b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use BH-Language-AI/bh-llm-basic-1-9b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf BH-Language-AI/bh-llm-basic-1-9b # Run inference directly in the terminal: llama cli -hf BH-Language-AI/bh-llm-basic-1-9b
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf BH-Language-AI/bh-llm-basic-1-9b # Run inference directly in the terminal: llama cli -hf BH-Language-AI/bh-llm-basic-1-9b
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf BH-Language-AI/bh-llm-basic-1-9b # Run inference directly in the terminal: ./build/bin/llama cli -hf BH-Language-AI/bh-llm-basic-1-9b
Use Docker
docker model run hf.co/BH-Language-AI/bh-llm-basic-1-9b
- Llama new
- LM Studio
- Jan
- vLLM
How to use BH-Language-AI/bh-llm-basic-1-9b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BH-Language-AI/bh-llm-basic-1-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": "BH-Language-AI/bh-llm-basic-1-9b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BH-Language-AI/bh-llm-basic-1-9b
- Ollama
How to use BH-Language-AI/bh-llm-basic-1-9b with Ollama:
ollama run hf.co/BH-Language-AI/bh-llm-basic-1-9b
- Unsloth Desktop
- Pi
How to use BH-Language-AI/bh-llm-basic-1-9b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf BH-Language-AI/bh-llm-basic-1-9b
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "BH-Language-AI/bh-llm-basic-1-9b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use BH-Language-AI/bh-llm-basic-1-9b with Docker Model Runner:
docker model run hf.co/BH-Language-AI/bh-llm-basic-1-9b
- Lemonade
How to use BH-Language-AI/bh-llm-basic-1-9b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull BH-Language-AI/bh-llm-basic-1-9b
Run and chat with the model
lemonade run user.bh-llm-basic-1-9b-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use BH-Language-AI/bh-llm-basic-1-9b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf BH-Language-AI/bh-llm-basic-1-9b
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default BH-Language-AI/bh-llm-basic-1-9b
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use BH-Language-AI/bh-llm-basic-1-9b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf BH-Language-AI/bh-llm-basic-1-9b
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "BH-Language-AI/bh-llm-basic-1-9b" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
File size: 5,106 Bytes
8e5fe32 6eba638 e46a247 8e5fe32 e46a247 8e5fe32 e46a247 6eba638 e46a247 6eba638 e46a247 6eba638 e46a247 92644e3 7c49f60 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | ---
license: apache-2.0
language:
- bs
- hr
- sr
- en
base_model: Qwen/Qwen3.5-9B
tags:
- text-generation
- bosnian
- function-calling
- ai-agents
- bh-language-ai
---
<p align="center"><img src="bh-llm-basic-1-9b.jpg" alt="BH-LLM-Basic logo" width="140"/></p>
# 🧠 BH-LLM-Basic-1-9B v2.0
## Za šta se koristi
> **Najjači bosanski agent model (bs/hr/sr/en) — full bf16 + Q8.**
> Loop-produkcija: tool 0.912, task_success 0.952, safety 1.0.
BH-LLM-Basic-1-9B v2.0 je produkcijski function-calling model izveden iz `Qwen/Qwen3.5-9B` (Apache-2.0). Repo sadrži **punu bf16 fuziju v08** (`model.safetensors`, 18.8GB — joint08 adapter spojen u bazu, za vLLM/TGI/transformerse) i **Q8 joint08** (`model-q8-joint08.gguf` — produkcijski default za CPU, freeze potvrđen 2026-11-22) plus **Q8 gold06 backup**. Na AgentMujo-Bench loopu (63 slučaja, produkcijska metrika) joint08 postiže tool 0.912, strict 0.873, task_success 0.952, safety 1.0; single-shot gate: tool 0.867. Puna v08 na općim mjerama: BS golden 79.1%, BS-Eval v1 (400) 72.75%, EN golden 96.7%, tool bench (72) 98.6%. Svi post-joint08 runovi (joint09–15, DPO+SFT mikro-delta) REJECT — nijedan ne drži tool preciznost. Pripada kolekciji [BH-LLM-Basic](https://huggingface.co/collections/BH-Language-AI/bh-llm-basic). Format je `<tool_call>` XML; dialect-dense SFT probio plafon — format radi i pod default production promptom.





## Benchmark
Produkcijska metrika = scored agent loop (63 slučaja); single-shot gate je pesimističan za safety.
| Metrika | 2B r6 SFT | 4B v0.4-DPO | **9B joint08 v2.0 (ovaj repo)** | 9B gold06 v1.0 (backup) |
|---|---|---|---|---|
| tool_selection (loop) | 0.8 | 1.0 | **0.912** | 0.667 |
| strict / task_success | — | — | **0.873 / 0.952** | — |
| argument_accuracy | 0.846 | 0.962 | 0.846 | 0.692 |
| safety (loop) | 1.0 | 1.0 | **1.0** | 1.0 |
Puna v08 (isti harness, 22.11.2026):
| metrika | **v08 (ovaj `model.safetensors`)** | v06 | Qwen3.5-9B base |
|---|---|---|---|
| BS golden (43) | **79,1 %** | 72,1 % | 74,4 % |
| BS-Eval v1 (400) | **72,75 %** | 72,0 % | 72,5 % |
| EN golden (30) | **96,7 %** | 93,3 % | 96,7 % |
| tool bench (72) | **98,6 %** | 100,0 % | 97,2 % |
| GSM8K strict | 0,845 | 0,925 | 0,790 |
| IFEval p-strict | 0,730 | 0,795 | 0,830 |
Poznata ograničenja: conf 0.8 < 2B r6 0.9; think-profil nije dio releasea; single-shot safety gate 0.636 (loop-mjerena safety 1.0 je mjerodavna).
## Upotreba
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
mid = "BH-Language-AI/bh-llm-basic-1-9b"
tok = AutoTokenizer.from_pretrained(mid, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(mid, torch_dtype="bfloat16", device_map="auto", trust_remote_code=True)
```
vLLM: `--model BH-Language-AI/bh-llm-basic-1-9b --trust-remote-code`. Q8 lokalno: `model-q8-joint08.gguf` (gold06 backup uz njega).
## Trening
- Baza: `Qwen/Qwen3.5-9B` @ `c20223623` (težine se NE re-uploadaju) · Apache-2.0
- SFT joint01→08 (dialect-dense, LUMI MI250X) + DPO faze; freeze joint08 potvrđen 2026-11-22
- Fuzija: `peft.merge_and_unload` u bazu (puni safetensors, bez PEFT-a)
- Kvantizacija: llama.cpp Q8_0 (~9.5GB po fajlu)
- Sirovi rezultati i lineage: [framework repozitorij](https://github.com/BH-Language-AI/agentmujo-training) (`benchmark/results_agentloop_9bjoint08.json`, joint09–15 REJECT log)
## Ograničenja
- Agent model (`<tool_call>` XML), ne opći chat model.
- conf 0.8 — verifikacijski korak u loopu obavezan za kritične akcije.
- Think-profil nije dio releasea; terminal je fallback, Policy Engine obavezan.
- Najveći model kolekcije — za edge/CPU koristiti 2B/4B Q8.
*BH-LLM-Basic · Kolektiv d.o.o. + Gamatrade d.o.o. · xnetba@gmail.com · Pravilo: bez fabriciranja, svaka brojka iz stvarnog runa.*
## Povezani modeli / Related models
- Base / polazni model: [alphaedge-ai/Qwen3.5-2B-bos-32768](https://huggingface.co/alphaedge-ai/Qwen3.5-2B-bos-32768)
- [bh-llm-basic-1-2b](https://huggingface.co/BH-Language-AI/bh-llm-basic-1-2b)
- [bh-llm-basic-1-32b](https://huggingface.co/BH-Language-AI/bh-llm-basic-1-32b)
- [bh-llm-basic-1-4b](https://huggingface.co/BH-Language-AI/bh-llm-basic-1-4b)
## Evaluation and citation
The GUI-grounding benchmark behind our computer-use line is published with per-item predictions and a scorer:
`cua` — ScreenSpot-Pro **1,355/1,581 = 85.71 %**, DOI [10.5281/zenodo.24732632](https://doi.org/10.5281/zenodo.24732632)
(repository: https://github.com/gamai-io/cua).
Signed-action evidence for agents: `gama-mandate` 1.0.58, DOI
[10.5281/zenodo.24732646](https://doi.org/10.5281/zenodo.24732646).
Every benchmark number we publish carries a command, a file or the word *card-reported*; numbers we could not
reproduce are listed as withdrawn in `cua/CLAIMS.md`.
|