Text Generation
Safetensors
GGUF
Arabic
arabic
saudi-dialect
tool-calling
function-calling
long-context
yarn
qlora
langgraph
conversational
Instructions to use bnbasel/allam-plus-7b 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 bnbasel/allam-plus-7b 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 bnbasel/allam-plus-7b:Q4_K_M # Run inference directly in the terminal: llama cli -hf bnbasel/allam-plus-7b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf bnbasel/allam-plus-7b:Q4_K_M # Run inference directly in the terminal: llama cli -hf bnbasel/allam-plus-7b:Q4_K_M
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 bnbasel/allam-plus-7b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf bnbasel/allam-plus-7b:Q4_K_M
Use Docker
docker model run hf.co/bnbasel/allam-plus-7b:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use bnbasel/allam-plus-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bnbasel/allam-plus-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bnbasel/allam-plus-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/bnbasel/allam-plus-7b:Q4_K_M
- Ollama
How to use bnbasel/allam-plus-7b with Ollama:
ollama run hf.co/bnbasel/allam-plus-7b:Q4_K_M
- Unsloth Desktop
- Pi
How to use bnbasel/allam-plus-7b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bnbasel/allam-plus-7b:Q4_K_M
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": "bnbasel/allam-plus-7b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use bnbasel/allam-plus-7b with Docker Model Runner:
docker model run hf.co/bnbasel/allam-plus-7b:Q4_K_M
- Lemonade
How to use bnbasel/allam-plus-7b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull bnbasel/allam-plus-7b:Q4_K_M
Run and chat with the model
lemonade run user.allam-plus-7b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use bnbasel/allam-plus-7b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bnbasel/allam-plus-7b:Q4_K_M
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 bnbasel/allam-plus-7b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use bnbasel/allam-plus-7b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bnbasel/allam-plus-7b:Q4_K_M
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 "bnbasel/allam-plus-7b:Q4_K_M" \ --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 Modelfile.go-template from bnbasel/allam-plus-7b: direct link, hf CLI and curl.
- Browser
- Download file 3.12 kB
-
https://huggingface.co/bnbasel/allam-plus-7b/resolve/main/Modelfile.go-template
- Command line
-
hf download hf://bnbasel/allam-plus-7b/Modelfile.go-template
-
curl -L -o Modelfile.go-template https://huggingface.co/bnbasel/allam-plus-7b/resolve/main/Modelfile.go-template
3.12 kB
| # Ollama setup for allam-plus-7b with a Go template: for Ollama before 0.40, or with OLLAMA_GO_TEMPLATE=1. | |
| # (written by scripts/make_template.py; the Jinja template inside the GGUF, chat_template.jinja, is the reference) | |
| # ollama create allam-plus -f Modelfile.go-template | |
| # | |
| # It builds the same turns as the reference: the Arabic tool guide and one JSON line per tool in the system turn, | |
| # <tool_call> lines in assistant turns, <tool_result> lines in user turns, same-role turns merged, ALLaM's [INST] | |
| # format around them. One known difference: Go prints each tool's "parameters" (and past calls' arguments) as compact | |
| # JSON in its own key order, where training used "key": value spacing; docs/PHASE4.md has the scores through it. | |
| # Ollama adds the first <s> itself, so the first turn starts with " [INST]"; later turns write <s> explicitly. | |
| FROM ./allam-plus-7b-Q4_K_M.gguf | |
| TEMPLATE """{{- $sys := "" }} | |
| {{- range .Messages }}{{ if eq .Role "system" }}{{ $sys = .Content }}{{ end }}{{ end }} | |
| {{- if .Tools }} | |
| {{- if not $sys }}{{ $sys = "أنت مساعد مفيد ترد باللغة العربية." }}{{ end }} | |
| {{- $sys = printf "%s\n\n%s\n" $sys "يمكنك استخدام الأدوات المدرجة أدناه. لاستدعاء أداة، رد بهذا السطر فقط ولا شيء آخر:\n<tool_call>{\"name\": \"<اسم الأداة>\", \"arguments\": {<الوسائط بصيغة JSON>}}</tool_call>\nلاستدعاء عدة أدوات دفعة واحدة، اكتب سطرًا واحدًا كهذا لكل استدعاء. تعود نتائج الأدوات على شكل <tool_result>...</tool_result>. إذا لم تناسب أي أداة الطلب، أو كان هناك تفصيل مطلوب مفقود، فرد على المستخدم بشكل عادي. الأدوات:" }} | |
| {{- range $i, $t := .Tools }} | |
| {{- if $i }}{{ $sys = printf "%s\n" $sys }}{{ end }} | |
| {{- $sys = printf "%s{\"name\": %s, \"description\": %s, \"parameters\": %s}" $sys (json $t.Function.Name) (json $t.Function.Description) (json $t.Function.Parameters) }} | |
| {{- end }} | |
| {{- end }} | |
| {{- $prev := "" }} | |
| {{- $first := true }} | |
| {{- range .Messages }} | |
| {{- if eq .Role "system" }}{{ continue }}{{ end }} | |
| {{- $role := .Role }} | |
| {{- if eq .Role "tool" }}{{ $role = "user" }}{{ end }} | |
| {{- if .ToolCalls }}{{ $role = "assistant" }}{{ end }} | |
| {{- if eq $role $prev }} | |
| {{- "\n" }} | |
| {{- else }} | |
| {{- if eq $prev "user" }} [/INST]{{ else if eq $prev "assistant" }} </s>{{ end }} | |
| {{- if eq $role "user" }}{{ if not $first }}<s>{{ end }} [INST] {{ if and $first $sys }}<<SYS>> | |
| {{ $sys }} | |
| <</SYS>> | |
| {{ end }} | |
| {{- else }} {{ end }} | |
| {{- $first = false }} | |
| {{- end }} | |
| {{- if eq .Role "tool" }}<tool_result>{{ .Content }}</tool_result> | |
| {{- else if .ToolCalls }}{{ if .Content }}{{ .Content }} | |
| {{ end }}{{ range $j, $c := .ToolCalls }}{{ if $j }} | |
| {{ end }}<tool_call>{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}</tool_call>{{ end }} | |
| {{- else }}{{ .Content }} | |
| {{- end }} | |
| {{- $prev = $role }} | |
| {{- end }} | |
| {{- if eq $prev "user" }} [/INST]{{ end }}""" | |
| PARAMETER stop "</s>" | |
| PARAMETER temperature 0 | |
| PARAMETER num_ctx 16384 | |