Instructions to use yasserrmd/Fanar-1-9B-Instruct-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use yasserrmd/Fanar-1-9B-Instruct-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="yasserrmd/Fanar-1-9B-Instruct-gguf", filename="Fanar-1-9B-Instruct-F16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use yasserrmd/Fanar-1-9B-Instruct-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M
Use Docker
docker model run hf.co/yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use yasserrmd/Fanar-1-9B-Instruct-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yasserrmd/Fanar-1-9B-Instruct-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yasserrmd/Fanar-1-9B-Instruct-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M
- Ollama
How to use yasserrmd/Fanar-1-9B-Instruct-gguf with Ollama:
ollama run hf.co/yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M
- Unsloth Studio new
How to use yasserrmd/Fanar-1-9B-Instruct-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for yasserrmd/Fanar-1-9B-Instruct-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for yasserrmd/Fanar-1-9B-Instruct-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for yasserrmd/Fanar-1-9B-Instruct-gguf to start chatting
- Docker Model Runner
How to use yasserrmd/Fanar-1-9B-Instruct-gguf with Docker Model Runner:
docker model run hf.co/yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M
- Lemonade
How to use yasserrmd/Fanar-1-9B-Instruct-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull yasserrmd/Fanar-1-9B-Instruct-gguf:Q4_K_M
Run and chat with the model
lemonade run user.Fanar-1-9B-Instruct-gguf-Q4_K_M
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf yasserrmd/Fanar-1-9B-Instruct-gguf:# Run inference directly in the terminal:
llama-cli -hf yasserrmd/Fanar-1-9B-Instruct-gguf:Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf yasserrmd/Fanar-1-9B-Instruct-gguf:# Run inference directly in the terminal:
./llama-cli -hf yasserrmd/Fanar-1-9B-Instruct-gguf:Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf yasserrmd/Fanar-1-9B-Instruct-gguf:# Run inference directly in the terminal:
./build/bin/llama-cli -hf yasserrmd/Fanar-1-9B-Instruct-gguf:Use Docker
docker model run hf.co/yasserrmd/Fanar-1-9B-Instruct-gguf:Fanar-1-9B-Instruct — GGUF quantized
This repo contains multiple GGUF builds of the Arabic-English LLM Fanar-1-9B-Instruct, the instruction-tuned variant of Fanar-1-9B created by QCRI / HBKU. The base model is a 9 B-parameter continuation of gemma-2-9b trained on ≈1 T Arabic + English tokens and aligned through SFT → DPO (4.5 M / 250 K pairs). License remains Apache-2.0 and the context window is 4 096 tokens. :contentReference[oaicite:0]{index=0}
Available files
| Bits | Format | Size (≈) |
|---|---|---|
| Q2_K | 2-bit | 3.4 GB |
| Q3_K_M | 3-bit | 4.4 GB |
| Q4_0 / Q4_K_M | 4-bit | 5.1 GB / 5.4 GB |
| Q5_0 / Q5_K_M | 5-bit | 6.1 GB / 6.3 GB |
| Q6_K | 6-bit | 8 GB* |
| Q8_0 | 8-bit | 9.3 GB |
| F16 / F32 | 16 / 32-bit | 17.6 GB |
*value shown on the HF page is a placeholder.
Quick start (llama.cpp ≥ 0.2)
git clone https://github.com/ggerganov/llama.cpp && cd llama.cpp && make -j
./main -m Fanar-1-9B-Instruct.Q4_K_M.gguf -p "ما هي عاصمة قطر؟"
Python (llama-cpp-python)
from llama_cpp import Llama
llm = Llama(
model_path="Fanar-1-9B-Instruct.Q4_K_M.gguf",
n_ctx=4096,
chat_format="gemma" # Fanar follows Gemma chat template
)
print(llm.create_chat_completion(
messages=[{"role":"user","content":"Translate 'peace' to Arabic"}]
).choices[0].message.content)
Credits & notes
- Original model:
QCRI/Fanar-1-9B-Instruct(please consult its model card for training data, evaluation results and limitations). (Hugging Face) - This repository only supplies GGUF conversions for efficient local inference on CPU/GPU; no weights were changed.
- Use responsibly—outputs may be inaccurate, biased, or culturally sensitive.
- Downloads last month
- 69
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
32-bit
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf yasserrmd/Fanar-1-9B-Instruct-gguf:# Run inference directly in the terminal: llama-cli -hf yasserrmd/Fanar-1-9B-Instruct-gguf: