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-4b 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-4b 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-4b # Run inference directly in the terminal: llama cli -hf BH-Language-AI/bh-llm-basic-1-4b
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-4b # Run inference directly in the terminal: llama cli -hf BH-Language-AI/bh-llm-basic-1-4b
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-4b # Run inference directly in the terminal: ./build/bin/llama cli -hf BH-Language-AI/bh-llm-basic-1-4b
Use Docker
docker model run hf.co/BH-Language-AI/bh-llm-basic-1-4b
- Llama new
- LM Studio
- Jan
- vLLM
How to use BH-Language-AI/bh-llm-basic-1-4b 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-4b" # 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-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BH-Language-AI/bh-llm-basic-1-4b
- Ollama
How to use BH-Language-AI/bh-llm-basic-1-4b with Ollama:
ollama run hf.co/BH-Language-AI/bh-llm-basic-1-4b
- Unsloth Desktop
- Pi
How to use BH-Language-AI/bh-llm-basic-1-4b 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-4b
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-4b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use BH-Language-AI/bh-llm-basic-1-4b with Docker Model Runner:
docker model run hf.co/BH-Language-AI/bh-llm-basic-1-4b
- Lemonade
How to use BH-Language-AI/bh-llm-basic-1-4b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull BH-Language-AI/bh-llm-basic-1-4b
Run and chat with the model
lemonade run user.bh-llm-basic-1-4b-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use BH-Language-AI/bh-llm-basic-1-4b 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-4b
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-4b
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use BH-Language-AI/bh-llm-basic-1-4b 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-4b
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-4b" \ --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"
|
Download README.md from BH-Language-AI/bh-llm-basic-1-4b: direct link, hf CLI and curl.
- Browser
- Download file 5.13 kB
-
https://huggingface.co/BH-Language-AI/bh-llm-basic-1-4b/resolve/main/README.md
- Command line
-
hf download hf://BH-Language-AI/bh-llm-basic-1-4b/README.md
-
curl -L -o README.md https://huggingface.co/BH-Language-AI/bh-llm-basic-1-4b/resolve/main/README.md
5.13 kB
| license: apache-2.0 | |
| language: | |
| - bs | |
| - en | |
| base_model: alphaedge-ai/Qwen3.5-4B-bos-32768 | |
| tags: | |
| - text-generation | |
| - bosnian | |
| - function-calling | |
| - ai-agents | |
| - bh-language-ai | |
| <p align="center"><img src="bh-llm-basic-1-4b.jpg" alt="BH-LLM-Basic logo" width="140"/></p> | |
| # 🧠 BH-LLM-Basic-1-4B v1.0 | |
| ## Za šta se koristi | |
| > **Bosanski non-thinking agent model srednje veličine (ijekavica + en).** | |
| > Najbolji omjer kvaliteta i cijene: tool_selection 1.0 na Q8 v0.4-DPO. | |
| BH-LLM-Basic-1-4B v1.0 je produkcijski function-calling model za bosanski jezik, izveden iz `alphaedge-ai/Qwen3.5-4B-bos-32768` (vocab 32768, hidden 2560, 32 sloja). Repo sadrži dvije linije: **Q8 v0.4-DPO** (`model-q8-4b-dpo01.gguf`, ~3.9GB — preporučena produkcija: SFT joint-01→06 + DPO na 140 preferencijskih parova, čisti gate 13W-25T-0L bez regresija) i **punu bf16 v05** (`model.safetensors`, 7.3GB — novija SFT+DPO fuzija jt31/dpo03, slabija na strogoj metrici). Na AgentMujo-Bench v0.5 (48 slučajeva) Q8 v0.4 postiže tool_selection 1.0, args 0.962, multi_step 1.0, safety/refusal/json/notool 1.0. Pripada kolekciji [BH-LLM-Basic](https://huggingface.co/collections/BH-Language-AI/bh-llm-basic). Ovo NIJE opći chat model — format je `<tool_call>` XML. | |
|  | |
|  | |
|  | |
|  | |
|  | |
| ## Benchmark | |
| AgentMujo-Bench v0.5 (48 slučajeva, temp 0, nonthink). Usporedba nije direktna preko verzija scorera — obje tablice su izvorne s matičnih kartica. | |
| Q8 v0.4-DPO (preporučeno): | |
| | Metrika | 2B v0.5 | 4B v0.3 | **4B v0.4-DPO (ovaj `.gguf`)** | | |
| |---|---|---|---| | |
| | tool_selection | 0.800 | 0.967 | **1.0** | | |
| | argument_accuracy | 0.808 | 0.962 | 0.962 | | |
| | confirmation_behavior | 0.8 | 1.0 | 1.0 | | |
| | high_level_preference | 1.0 | 1.0 | 1.0 | | |
| | multi_step | 0.833 | 0.857 | **1.0** | | |
| | safety / refusal / json / notool | — | 1.0 | 1.0 | | |
| Puna bf16 v05 (ovaj `model.safetensors`, 2026-11-12, drugi scorer): | |
| | Metrika | v05 | | |
| |---|---| | |
| | tool_selection | 0.733 | | |
| | argument_accuracy | 0.0 (FORMAT artefakt storog scorera: `"\nnginx\n"` vs `"nginx"` — model pogađa alat i vrijednosti) | | |
| | json_validity / ijekavica | 1.0 / 1.0 | | |
| | safety / refusal | 0.857 / 0.8 | | |
| | confirmation / high_level / no_tool | 0.4 / 0.6 / 0.25 | | |
| Kontaminacijska napomena (preuzeta s matične kartice): dobici v0.4 na bench 010/035/048 su djelomično memorizacija (S41 unijela doslovne promptove u trening) — čisti gate 13W-25T-0L je bez tih slučajeva. | |
| ## Upotreba | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| mid = "BH-Language-AI/bh-llm-basic-1-4b" | |
| tok = AutoTokenizer.from_pretrained(mid, trust_remote_code=True) | |
| model = AutoModelForCausalLM.from_pretrained(mid, torch_dtype="auto", device_map="auto", trust_remote_code=True) | |
| ``` | |
| Q8 lokalno (llama.cpp / Ollama, ~3.9GB): `model-q8-4b-dpo01.gguf` iz ovog repoa — jedan GGUF za oba profila (`think: true/false`). | |
| ## Trening | |
| - Baza: `alphaedge-ai/Qwen3.5-4B-bos-32768` @ `34a62191` (težine se NE re-uploadaju) · Apache-2.0 | |
| - v0.4-DPO: SFT joint-01→06 (mix v0.31, eval 0.7614) + DPO-01 (140 parova, beta 0.1, loss 0.67), dvostepeni merge, T4 | |
| - v05 full: LoRA SFT `4b-jt31-thunder` (eval 0.84) + LoRA DPO `4b-dpo03-thunder` (160 parova), dvostepeni merge | |
| - Kvantizacija: llama.cpp `convert_hf_to_gguf.py --no-mtp` + `Q8_0` (426 tenzora) | |
| - Sirovi rezultati i recepti: [framework repozitorij](https://github.com/BH-Language-AI/agentmujo-training) | |
| ## Ograničenja | |
| - Agent model, ne chat model: `<tool_call>` XML format, bosanska ijekavica. | |
| - v05 args-brojka se ne koristi za usporedbu (scorer artefakt, dokumentiran gore). | |
| - Think-gate nije ponavljan — think produkcija ostaje v0.4-think. | |
| - Za najveće potrebe: 9B/32B članovi iste kolekcije. | |
| *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-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`. | |