Instructions to use aelgendy/QModel 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 aelgendy/QModel 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 aelgendy/QModel:Q8_0 # Run inference directly in the terminal: llama cli -hf aelgendy/QModel:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf aelgendy/QModel:Q8_0 # Run inference directly in the terminal: llama cli -hf aelgendy/QModel:Q8_0
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 aelgendy/QModel:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf aelgendy/QModel:Q8_0
Use Docker
docker model run hf.co/aelgendy/QModel:Q8_0
- Llama new
- LM Studio
- Jan
- Ollama
How to use aelgendy/QModel with Ollama:
ollama run hf.co/aelgendy/QModel:Q8_0
- Unsloth Desktop
- Pi
How to use aelgendy/QModel with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf aelgendy/QModel:Q8_0
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:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "aelgendy/QModel:Q8_0" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use aelgendy/QModel with Docker Model Runner:
docker model run hf.co/aelgendy/QModel:Q8_0
- Lemonade
How to use aelgendy/QModel with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull aelgendy/QModel:Q8_0
Run and chat with the model
lemonade run user.QModel-Q8_0
List all available models
lemonade list
- Hermes Agent
How to use aelgendy/QModel with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf aelgendy/QModel:Q8_0
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:8080/v1 hermes config set model.default aelgendy/QModel:Q8_0
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use aelgendy/QModel with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf aelgendy/QModel:Q8_0
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:8080/v1 \ --custom-model-id "aelgendy/QModel:Q8_0" \ --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 tests/test_eval_parsing.py from aelgendy/QModel: direct link, hf CLI and curl.
- Browser
- Download file 4.08 kB
-
https://huggingface.co/aelgendy/QModel/resolve/main/tests/test_eval_parsing.py
- Command line
-
hf download hf://aelgendy/QModel/tests/test_eval_parsing.py
-
curl -L -o test_eval_parsing.py https://huggingface.co/aelgendy/QModel/resolve/main/tests/test_eval_parsing.py
4.08 kB
| """Tests for the answer-eval citation parser (eval/run_answers.py).""" | |
| import unittest | |
| from eval.run_answers import cited_ids, is_refusal, lang_ok | |
| class TestCitedIds(unittest.TestCase): | |
| def test_quran_urls(self): | |
| answer = ("[[1](https://surahquran.com/aya-255-sora-2.html)] ๏ดฟ...๏ดพ " | |
| "[[1](https://quran.ksu.edu.sa/tafseer/qortobi/sura24-aya35.html)]") | |
| self.assertEqual(cited_ids(answer, {}), {"2:255", "24:35"}) | |
| self.assertEqual(cited_ids("[[1](https://quran.com/2/278)]", {}), {"2:278"}) | |
| def test_english_hadith_refs(self): | |
| answer = ("Recorded in Sahih al-Bukhari 6116. Also Sunan Abu Dawood No. 4800 " | |
| "and Jami' at-Tirmidhi #2516, Sunan Ibn Majah, hadith 224.") | |
| self.assertEqual(cited_ids(answer, {}), | |
| {"bukhari_6116", "abudawud_4800", "tirmidhi_2516", "ibnmajah_224"}) | |
| def test_arabic_hadith_refs(self): | |
| answer = "ุฑูุงู ุตุญูุญ ุงูุจุฎุงุฑูุ ุฑูู 13. ููู ุตุญูุญ ู ุณูู ุ ุฑูู 45. ููู ู ูุทุฃ ู ุงููุ ุฑูู 1." | |
| self.assertEqual(cited_ids(answer, {}), {"bukhari_13", "muslim_45", "malik_1"}) | |
| answer = ("ุงูุชุฑู ุฐูุ ุฑูู ุงูุญุฏูุซ 2024. ูุตุญูุญ ู ุณูู ุจุฑูู 440. ูุณูู ุงุจู ู ุงุฌูุ ุงูุฑูู 4303. " | |
| "ูุงูุจุฎุงุฑูุ ูุชุงุจ ุงูุฅูู ุงูุ ุญุฏูุซ ุฑูู 1. ูุฑูุงู ู ุณูู ูู ุตุญูุญู (6382).") | |
| self.assertEqual(cited_ids(answer, {}), | |
| {"tirmidhi_2024", "muslim_440", "ibnmajah_4303", "bukhari_1", "muslim_6382"}) | |
| def test_hadith_ref_needs_adjacent_number(self): | |
| # The number belongs to the collection right before it, not one earlier in the sentence | |
| self.assertEqual(cited_ids("Sahih al-Bukhari and Sahih Muslim 1907", {}), {"muslim_1907"}) | |
| # "ู ุณูู " as an ordinary word ("every Muslim") is not a citation | |
| self.assertEqual(cited_ids("ุทูุจ ุงูุนูู ูุฑูุถุฉ ุนูู ูู ู ุณูู 3 ู ุฑุงุช", {}), set()) | |
| def test_fatwa_urls(self): | |
| url_to_id = {"https://www.islamweb.net/ar/fatwa/857": "islamweb_857"} | |
| answer = "ู ุฑูุฒ ุงููุชูู [[1](https://www.islamweb.net/ar/fatwa/857/)]." | |
| self.assertEqual(cited_ids(answer, url_to_id), {"islamweb_857"}) | |
| class TestAnswerChecks(unittest.TestCase): | |
| def test_refusal_and_language(self): | |
| not_found = {"arabic": "ูู ุฃุฌุฏ", "english": "not found"} | |
| self.assertTrue(is_refusal("The dataset does not contain sufficient information.", "en", not_found)) | |
| self.assertFalse(is_refusal("Yes, it is obligatory. And Allah knows best.", "en", not_found)) | |
| self.assertTrue(lang_ok("ูุนู ุ ูุฐุง ูุงุฌุจ. ูุงููู ุฃุนูู .", "ar")) | |
| self.assertFalse(lang_ok("Yes, it is obligatory.", "ar")) | |
| if __name__ == "__main__": | |
| unittest.main() | |
| class TestRequiredLabels(unittest.TestCase): | |
| def test_hit_without_required_source_is_incomplete(self): | |
| from eval.run_eval import score_case | |
| case = {"id": "x", "category": "quran_topic", "query": "Is alcohol forbidden?", | |
| "relevant": ["5:90", "2:219"], "required": ["5:90"]} | |
| out = {"results": [{"id": "29:49"}, {"id": "2:219"}], "intent": "general", "top_score": 1.0, | |
| "gated": False, "confidence": 0.9, "confidence_source": "reranker"} | |
| row = score_case(case, out, 8, {}) | |
| self.assertEqual(row["hit@k"], 1) # still a hit, as before | |
| self.assertEqual(row["complete@k"], 0) # but the decisive verse is missing | |
| self.assertEqual(row["missing_required"], ["5:90"]) | |
| def test_required_must_be_subset_of_relevant(self): | |
| import tempfile | |
| from pathlib import Path | |
| from eval.run_eval import load_golden | |
| with tempfile.NamedTemporaryFile("w", suffix=".jsonl", delete=False, encoding="utf-8") as f: | |
| f.write('{"id": "x", "category": "c", "query": "q", "relevant": ["2:219"], "required": ["5:90"]}\n') | |
| with self.assertRaises(ValueError): | |
| load_golden(Path(f.name), None) | |