Instructions to use enver/ayncoding-gemma2-2b 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 enver/ayncoding-gemma2-2b 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 enver/ayncoding-gemma2-2b # Run inference directly in the terminal: llama cli -hf enver/ayncoding-gemma2-2b
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf enver/ayncoding-gemma2-2b # Run inference directly in the terminal: llama cli -hf enver/ayncoding-gemma2-2b
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 enver/ayncoding-gemma2-2b # Run inference directly in the terminal: ./llama-cli -hf enver/ayncoding-gemma2-2b
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 enver/ayncoding-gemma2-2b # Run inference directly in the terminal: ./build/bin/llama-cli -hf enver/ayncoding-gemma2-2b
Use Docker
docker model run hf.co/enver/ayncoding-gemma2-2b
- LM Studio
- Jan
- vLLM
How to use enver/ayncoding-gemma2-2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "enver/ayncoding-gemma2-2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "enver/ayncoding-gemma2-2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/enver/ayncoding-gemma2-2b
- Ollama
How to use enver/ayncoding-gemma2-2b with Ollama:
ollama run hf.co/enver/ayncoding-gemma2-2b
- Unsloth Desktop
- Docker Model Runner
How to use enver/ayncoding-gemma2-2b with Docker Model Runner:
docker model run hf.co/enver/ayncoding-gemma2-2b
- Lemonade
How to use enver/ayncoding-gemma2-2b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull enver/ayncoding-gemma2-2b
Run and chat with the model
lemonade run user.ayncoding-gemma2-2b-{{QUANT_TAG}}List all available models
lemonade list
- Atomic Chat
🏛️ AynCoding-Gemma2: Sovereign Epistemic Classical Arabic Logic (Manṭiq) 2.6B
AynCoding-Gemma2 (ayncoding-gemma2-2b) is a sovereign, epistemic code synthesis and architectural refactoring model based on Google's flagship Gemma 2 2B architecture (google/gemma-2-2b-it), aligned and conditioned with Classical Arabic Logic (Manṭiq) and Morphological Root Lexicography (Ishtiqāq).
Built upon Google DeepMind's distilled Gemma 2 architecture, AynCoding-Gemma2 marries cutting-edge model distillation with 1,200 years of classical Arabic epistemological rigor. It natively engages a structured Chain-of-Thought reasoning block (<ayn_mantiq> ... </ayn_mantiq>) prior to code generation, analyzing software specifications through real essential definitions (Al-Ḥadd bi al-Dhātiyyāt), eliminating logical fallacies (Dafʿ al-Dawr, Dafʿ al-Tasalsul, ʿAdam al-Tanāquḍ), and mapping domain concepts to authentic tri-consonantal roots.
🌟 The 5 Classical Arabic Epistemic Pillars
AynCoding-Gemma2 is strictly governed by the foundational canons of classical Arabic scholarship:
- Abū Ḥāmid al-Ghazālī (Miʿyār al-ʿIlm fī Fann al-Manṭiq & Miḥakk al-Naẓar):
- Al-Ḥadd bi al-Dhātiyyāt (Real Definition by Essence): Entities are defined by their constitutive essential attributes, never accidental symptoms.
- Dafʿ al-Dawr (Elimination of Circularity): Zero circular dependencies, cyclic callbacks, or self-referential ungrounded types.
- Dafʿ al-Tasalsul (Elimination of Infinite Regress): Strictly bounded recursion, guaranteed loop termination, and timeout bounds.
- ʿAdam al-Tanāquḍ (Law of Non-Contradiction): Mutually exclusive states are unrepresentable simultaneously.
- Al-Khalīl ibn Aḥmad al-Farāhīdī (Kitāb al-ʿAyn) & Ibn Manẓūr (Lisān al-ʿArab):
- Tri-Consonantal Root Decomposition & Combinatorial Safety: Complex systems are decomposed into orthogonal, irreducible primitives anchored in authentic semantic roots (
قفل,حفظ,نقل,عقد,حسب,رتب,سلم,حكم). - Exhaustive State-Space Coverage: Zero unhandled match arms and zero silent exception swallowing (
except Exception: passis prohibited).
- Tri-Consonantal Root Decomposition & Combinatorial Safety: Complex systems are decomposed into orthogonal, irreducible primitives anchored in authentic semantic roots (
- Al-Rāghib al-Iṣfahānī (Al-Mufradāt fī Gharīb al-Qurʾān):
- Ontological Domain Modeling & Teleology (Ghāyah): Absolute ban on amorphous, vague identifiers (
data,temp,val,mgr,helper). Every symbol reflects its distinct teleological purpose.
- Ontological Domain Modeling & Teleology (Ghāyah): Absolute ban on amorphous, vague identifiers (
- Al-Zamakhsharī (Asās al-Balāghah):
- Abstraction Integrity & Rhetorical Eloquence (Ḥaqīqah vs Majāz): Delineating physical machine reality (memory, CPU caches, IO) from software abstractions. Zero leaky abstractions.
- Sībawayh (Al-Kitāb):
- Syntactic Governance (Al-ʿĀmil wa al-Maʿmūl): Strict caller-callee hierarchy, rigorous static typing, and guaranteed AST integrity.
🧠 Cognitive Chain-of-Thought Protocol (<ayn_mantiq>)
Before emitting production code, AynCoding-Gemma2 executes its epistemic reasoning:
<ayn_mantiq>
🏛️ AYN-ENGINE EPISTEMIC LOGIC & MORPHOLOGY REASONING:
- Classical Root & Morphology (الجذر والتصريف): [Root e.g. ق-ف-ل, linguistic significance]
- Real Definition & Essence (الحد بالذاتيات - معيار العلم للغزالي): [Essential attributes and invariants]
- Epistemic Fallacy Invariants (دفع الدور والتسلسل ونفي التناقض): [Circularity, regress, and contradiction guards]
- Lexicographical Teleology (الغاية وبلاغة التجريد - المفردات والأساس): [Pure purpose, zero vague abstractions]
- Syntactic Governance (العامل والمعمول - كتاب سيبويه): [Strict type contracts, caller-callee hierarchy]
</ayn_mantiq>
🧪 Benchmark & Dynamic Evaluation
In live benchmark evaluations using the 5-Pillar Static Epistemic Auditor:
- Sliding Window Rate Limiter:
- Overall Epistemic Score: 87.8% (Grade: B+)
- AST Syntax Integrity: 100% Valid ✅
- Banned Placeholders: 0 (Zero-Loss Complete) ✅
- Asās al-Balāghah (Eloquence): 10.0 / 10
- Kitāb al-ʿAyn (Decomposition): 10.0 / 10
- Sībawayh (Governance): 10.0 / 10
- Dynamic Execution: Automatically evicted oldest items in $O(1)$ under real multi-threaded execution!
🚀 Quickstart: Running with Ollama
Download the GGUF model and Modelfile:
huggingface-cli download enver/ayncoding-gemma2-2b ayncoding-gemma2-2b.gguf Modelfile --local-dir ./ayncoding-gemma2 cd ayncoding-gemma2Register with Ollama:
ollama create ayncoding-gemma2 -f ModelfileRun Inference:
ollama run ayncoding-gemma2 "Write a thread-safe sliding window rate limiter in Python"
💻 Python (llama-cpp-python) Usage
from llama_cpp import Llama
llm = Llama(
model_path="ayncoding-gemma2-2b.gguf",
n_ctx=8192,
n_threads=16 # NUMA optimization
)
output = llm.create_chat_completion(
messages=[
{"role": "user", "content": "Explain how Ghazalian logic eliminates circularity in software architecture."}
],
temperature=0.2,
max_tokens=4096
)
print(output["choices"][0]["message"]["content"])
🛠️ Included Tools in Repository
Modelfile: Sovereign Ollama definition with the 5 Classical Arabic Pillars and hyperparameter tuning.dataset/ayn_mantiq_epistemic_dataset_50.jsonl: 50 AST-validated training samples across 10 classical domains with<ayn_mantiq>CoT reasoning.tools/core/mantiq_engine.py: Classical Logic fallacy detection engine (Dawr, Tasalsul, Tanāquḍ).tools/core/mantiq_purifier.py: Automated code sanitizer purging amorphous variables and silent bareexcept:clauses.tools/bin/ayncode: Sovereign CLI developer tool for code synthesis, auditing, and purification.
📜 Heritage & Citations
- Google DeepMind, Gemma 2: Improving Open Language Models at a Practical Size.
- Abū Ḥāmid al-Ghazālī, Miʿyār al-ʿIlm fī Fann al-Manṭiq.
- Al-Khalīl ibn Aḥmad al-Farāhīdī, Kitāb al-ʿAyn.
- Al-Rāghib al-Iṣfahānī, Al-Mufradāt fī Gharīb al-Qurʾān.
- Ibn Manẓūr, Lisān al-ʿArab.
- Sībawayh, Al-Kitāb.
- Downloads last month
- 113
We're not able to determine the quantization variants.