Text Generation
Safetensors
GGUF
Bosnian
English
qwen3_5_text
bosnian
function-calling
ai-agents
bh-language-ai
conversational
Instructions to use BH-Language-AI/bh-llm-basic-1-2b 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-2b 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-2b # Run inference directly in the terminal: llama cli -hf BH-Language-AI/bh-llm-basic-1-2b
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-2b # Run inference directly in the terminal: llama cli -hf BH-Language-AI/bh-llm-basic-1-2b
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-2b # Run inference directly in the terminal: ./build/bin/llama cli -hf BH-Language-AI/bh-llm-basic-1-2b
Use Docker
docker model run hf.co/BH-Language-AI/bh-llm-basic-1-2b
- Llama new
- LM Studio
- Jan
- vLLM
How to use BH-Language-AI/bh-llm-basic-1-2b 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-2b" # 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-2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BH-Language-AI/bh-llm-basic-1-2b
- Ollama
How to use BH-Language-AI/bh-llm-basic-1-2b with Ollama:
ollama run hf.co/BH-Language-AI/bh-llm-basic-1-2b
- Unsloth Desktop
- Pi
How to use BH-Language-AI/bh-llm-basic-1-2b 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-2b
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-2b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use BH-Language-AI/bh-llm-basic-1-2b with Docker Model Runner:
docker model run hf.co/BH-Language-AI/bh-llm-basic-1-2b
- Lemonade
How to use BH-Language-AI/bh-llm-basic-1-2b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull BH-Language-AI/bh-llm-basic-1-2b
Run and chat with the model
lemonade run user.bh-llm-basic-1-2b-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use BH-Language-AI/bh-llm-basic-1-2b 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-2b
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-2b
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use BH-Language-AI/bh-llm-basic-1-2b 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-2b
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-2b" \ --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: 4,936 Bytes
45010db 269a455 3b8b24b 45010db 3b8b24b 45010db 3b8b24b 269a455 3b8b24b 269a455 15decc8 269a455 f64048b 3b8b24b f64048b 3b8b24b f64048b 3b8b24b 15decc8 3b8b24b f64048b 3b8b24b 15decc8 3b8b24b f64048b 3b8b24b f64048b 3b8b24b 15decc8 3b8b24b f64048b 3b8b24b 15decc8 3b8b24b f64048b 3b8b24b f64048b 75da38f 6dd172a | 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 | ---
license: apache-2.0
language:
- bs
- en
base_model: alphaedge-ai/Qwen3.5-2B-bos-32768
tags:
- text-generation
- bosnian
- function-calling
- ai-agents
- bh-language-ai
---
<p align="center"><img src="bh-llm-basic-1-2b.jpg" alt="BH-LLM-Basic logo" width="140"/></p>
# 🧠 BH-LLM-Basic-1-2B v1.0
## Za šta se koristi
> **Bosanski non-thinking agent model (ijekavica + en) — brz, mali, za CPU.**
> Umjesto slobodnog chatta vraća mašinski čitljiv `<tool_call>` XML za Linux/dijagnostičke alate.
BH-LLM-Basic-1-2B v1.0 je produkcijski function-calling model za bosanski jezik: trijaža zahtjeva, dijagnostika servisa, višekorakni agent loop s verifikacijom. Namijenjen AI agentima i poslovnim aplikacijama kojima treba pouzdan poziv alata na bosanskoj ijekavici, lokalno na CPU-u (Q8) ili GPU-u (bf16). Model je izveden iz `alphaedge-ai/Qwen3.5-2B-bos-32768` (bosanska adaptacija s vokabularom 32768) i objavljen u dvije datoteke: puna bf16 (`model.safetensors`, v0.5 joint-23 merge) i kvantizirana Q8 (`model-q8-2b-dpo01.gguf`, v1.0 DPO). Na AgentMujo-Bench v0.5 (48 slučajeva) Q8 v1.0 postiže tool_selection 0.833, safety 1.0, json 1.0, ijekavica 1.0; na v0.6 (63 slučaja) tool 0.824, safety 0.909. Pripada kolekciji [BH-LLM-Basic](https://huggingface.co/collections/BH-Language-AI/bh-llm-basic). Ovo NIJE opći chat model — za slobodan razgovor će odgovarati stilom alata, ne razgovora.





## Benchmark
AgentMujo-Bench v0.5 (48 slučajeva, greedy) i v0.6 (63 slučaja). Q8 v1.0 (dpo01); puna bf16 je v0.5 joint-23 merge.
| Metrika (v0.5) | v0.4 | v0.5 full (ovaj `model.safetensors`) | **v1.0 Q8 (ovaj `.gguf`)** |
|---|---|---|---|
| tool_selection | 0.667 | 0.800 | **0.833** |
| argument_accuracy | 0.731 | 0.808 | 0.731 |
| confirmation_behavior | 0.6 | 0.8 | **1.0** |
| high_level_preference | 0.8 | 1.0 | 1.0 |
| no_tool_correctness | 0.75 | 1.0 | 1.0 |
| refusal / safety | 1.0 / 1.0 | 0.8 / 1.0 | **1.0 / 1.0** |
| ijekavica / json | 1.0 / 1.0 | 1.0 / 1.0 | 1.0 / 1.0 |
v0.6: tool 0.824, safety 0.909. Lokalni neovisni run (`results_dpo01_prod_nonthink.json`, n≈30): tool 0.80, args 0.846, safety 1.0.
## Upotreba
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
mid = "BH-Language-AI/bh-llm-basic-1-2b"
tok = AutoTokenizer.from_pretrained(mid, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(mid, torch_dtype="auto", device_map="auto", trust_remote_code=True)
# prompt: bosanska ijekavica + <tool_call><function=IME><parameter=P>..</parameter></function></tool_call>
```
Q8 lokalno (llama.cpp / Ollama): `model-q8-2b-dpo01.gguf` iz ovog repoa.
## Trening
- Baza: `alphaedge-ai/Qwen3.5-2B-bos-32768` @ `2f89b833` (težine se NE re-uploadaju) · Apache-2.0
- SFT: LoRA r16/alpha 32, 7 modula, bf16 · FC → agentic → rebalance → joint-23 (v0.5)
- DPO-01 (samo Q8 v1.0): dpo_9b_v05 mix (1000 tool + 1000 safety parova), loss 0.086, seed 42, LUMI
- Puna bf16 DPO fuzija nije objavljena kao safetensors (planirano); Q8 v1.0 je mjerena produkcija
- Sirovi rezultati: `benchmark/results_dpo01_prod_nonthink.json` u [framework repozitoriju](https://github.com/BH-Language-AI/agentmujo-training)
## Ograničenja
- Agent model, ne chat model: slobodan razgovor nije namjena; format je `<tool_call>` XML.
- args 0.731 — složene argumente provjeriti verifikacijskim korakom u loopu.
- Za veće potrebe: 4B/9B/32B članovi iste kolekcije.
- Salamandra-2B SFT eksperiment (sal2b-sft01–03) ostaje istraživački, nije dio v1.0.
*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-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)
- [bh-llm-basic-1-9b](https://huggingface.co/BH-Language-AI/bh-llm-basic-1-9b)
## 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`.
|