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"
docs: English card (translated from Bosnian)
Browse files17 unmodified lines181920212223242526273 unmodified lines3132333435363738394 unmodified lines444546474849503 unmodified lines545556575859604 unmodified lines6566676869707117 unmodified lines## 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.3 unmodified lines## BenchmarkAgentMujo-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`)** ||---|---|---|---|4 unmodified lines| 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 ||---|---|3 unmodified lines| 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.## Upotreba4 unmodified linesmodel = 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`).## Trening17 unmodified lines181920212223242526273 unmodified lines3132333435363738394 unmodified lines444546474849503 unmodified lines545556575859604 unmodified lines6566676869707117 unmodified lines## Za šta se koristi> **Bosnian non‑thinking agent model of medium size (ijekavian + en).**> Best quality‑to‑price ratio: tool_selection 1.0 on Q8 v0.4-DPO.BH-LLM-Basic-1-4B v1.0 is a production function‑calling model for the Bosnian language, derived from `alphaedge-ai/Qwen3.5-4B-bos-32768` (vocab 32768, hidden 2560, 32 layers). The repo contains two lines: **Q8 v0.4-DPO** (`model-q8-4b-dpo01.gguf`, ~3.9GB — recommended production: SFT joint-01→06 + DPO on 140 preference pairs, clean gate 13W-25T-0L without regressions) and **full bf16 v05** (`model.safetensors`, 7.3GB — newer SFT+DPO fusion jt31/dpo03, weaker on strict metric). On AgentMujo-Bench v0.5 (48 cases) Q8 v0.4 achieves tool_selection 1.0, args 0.962, multi_step 1.0, safety/refusal/json/notool 1.0. It belongs to the [BH-LLM-Basic](https://huggingface.co/collections/BH-Language-AI/bh-llm-basic) collection. This is **NOT** a general chat model — the format is `<tool_call>` XML.3 unmodified lines## BenchmarkAgentMujo-Bench v0.5 (48 cases, temp 0, nonthink). The comparison is not direct across scorer versions — both tables are original from the source cards.Q8 v0.4-DPO (recommended):| Metrika | 2B v0.5 | 4B v0.3 | **4B v0.4-DPO (ovaj `.gguf`)** ||---|---|---|---|4 unmodified lines| multi_step | 0.833 | 0.857 | **1.0** || safety / refusal / json / notool | — | 1.0 | 1.0 |Full bf16 v05 (this `model.safetensors`, 2026-11-12, second scorer):| Metrika | v05 ||---|---|3 unmodified lines| safety / refusal | 0.857 / 0.8 || confirmation / high_level / no_tool | 0.4 / 0.6 / 0.25 |Contamination note (taken from the source card): the gains of v0.4 on bench 010/035/048 are partially memorization (S41 inserted literal prompts into training) — the clean gate 13W-25T-0L is free of those cases.## Upotreba4 unmodified linesmodel = AutoModelForCausalLM.from_pretrained(mid, torch_dtype="auto", device_map="auto", trust_remote_code=True)```Q8 locally (llama.cpp / Ollama, ~3.9GB): `model-q8-4b-dpo01.gguf` from this repo — a single GGUF for both profiles (`think: true/false`).## Trening
README.md+8-8