Text Generation
GGUF
English
Arabic
code
qwen2.5-coder
mantiq
logic
arabic
epistemology
reasoning
chain-of-thought
aynengine
speculative-decoding
Eval Results (legacy)
conversational
Instructions to use enver/ayncoding-qwen2.5-coder-1.5b 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-qwen2.5-coder-1.5b 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-qwen2.5-coder-1.5b # Run inference directly in the terminal: llama cli -hf enver/ayncoding-qwen2.5-coder-1.5b
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf enver/ayncoding-qwen2.5-coder-1.5b # Run inference directly in the terminal: llama cli -hf enver/ayncoding-qwen2.5-coder-1.5b
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-qwen2.5-coder-1.5b # Run inference directly in the terminal: ./llama-cli -hf enver/ayncoding-qwen2.5-coder-1.5b
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-qwen2.5-coder-1.5b # Run inference directly in the terminal: ./build/bin/llama-cli -hf enver/ayncoding-qwen2.5-coder-1.5b
Use Docker
docker model run hf.co/enver/ayncoding-qwen2.5-coder-1.5b
- Llama new
- LM Studio
- Jan
- vLLM
How to use enver/ayncoding-qwen2.5-coder-1.5b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "enver/ayncoding-qwen2.5-coder-1.5b" # 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-qwen2.5-coder-1.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/enver/ayncoding-qwen2.5-coder-1.5b
- Ollama
How to use enver/ayncoding-qwen2.5-coder-1.5b with Ollama:
ollama run hf.co/enver/ayncoding-qwen2.5-coder-1.5b
- Unsloth Desktop
- Pi
How to use enver/ayncoding-qwen2.5-coder-1.5b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf enver/ayncoding-qwen2.5-coder-1.5b
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": "enver/ayncoding-qwen2.5-coder-1.5b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use enver/ayncoding-qwen2.5-coder-1.5b with Docker Model Runner:
docker model run hf.co/enver/ayncoding-qwen2.5-coder-1.5b
- Lemonade
How to use enver/ayncoding-qwen2.5-coder-1.5b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull enver/ayncoding-qwen2.5-coder-1.5b
Run and chat with the model
lemonade run user.ayncoding-qwen2.5-coder-1.5b-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use enver/ayncoding-qwen2.5-coder-1.5b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf enver/ayncoding-qwen2.5-coder-1.5b
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 enver/ayncoding-qwen2.5-coder-1.5b
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use enver/ayncoding-qwen2.5-coder-1.5b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf enver/ayncoding-qwen2.5-coder-1.5b
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 "enver/ayncoding-qwen2.5-coder-1.5b" \ --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 tools/core/speculative_engine.py from enver/ayncoding-qwen2.5-coder-1.5b: direct link, hf CLI and curl.
- Browser
- Download file 9.65 kB
-
https://huggingface.co/enver/ayncoding-qwen2.5-coder-1.5b/resolve/main/tools/core/speculative_engine.py
- Command line
-
hf download hf://enver/ayncoding-qwen2.5-coder-1.5b/tools/core/speculative_engine.py
-
curl -L -o speculative_engine.py https://huggingface.co/enver/ayncoding-qwen2.5-coder-1.5b/resolve/main/tools/core/speculative_engine.py
9.65 kB
| #!/usr/bin/env python3 | |
| """ | |
| speculative_engine.py | |
| AynEngine AI Coding Edition: Hierarchical Mixture of Experts (H-MoE) Speculative Hybrid Accelerator. | |
| Drastically accelerates code generation while guaranteeing epistemic software integrity by orchestrating: | |
| 1. Tier 1 (Ultra-Fast Local Drafter): ayncoding-model (1.5B @ 60+ tokens/sec, ~3-5s). | |
| 2. Deterministic 5-Pillar Static Router: 0.01s AST, error taxonomy, and knowledge purge auditing. | |
| 3. Tier 2 (Neural Cloud Refiner): deepseek-flash via high-throughput API (~2-8s) on audit failure. | |
| 4. Tier 3 (Resilient Offline Fallback): ayncoding-qwen3-8b-slim on Ollama or deterministic AST repair. | |
| Epistemic Pillars Grounding: | |
| - Al-Mufradāt: Teleological domain types and explicit role identification. | |
| - Asās al-Balāghah: Clean isolation between fast-path draft and multi-tiered neural refinement. | |
| - Lisān al-ʿArab: Exhaustive error handling and lifecycle states (Active, Degraded, Fallback). | |
| - Kitāb al-ʿAyn: Orthogonal atomic primitive decomposition. | |
| - Al-Kitāb of Sībawayh: Strict type contracts, caller-callee governance, zero placeholders. | |
| """ | |
| import os | |
| import time | |
| from pathlib import Path | |
| from typing import Dict, Any, Optional | |
| from core.coding_engine import AynCodingEngine | |
| from core.static_auditor import AynStaticAuditor | |
| from core.knowledge_purger import AynKnowledgePurger | |
| from core.provider_transport import AynProviderError | |
| class AynSpeculativeEngine: | |
| """ | |
| Hierarchical Symbolic-Neural Mixture of Experts (H-MoE) Engine. | |
| Combines sub-second deterministic static routers with multi-tier neural models. | |
| """ | |
| def __init__( | |
| self, | |
| draft_model: str = "ayncoding-model", | |
| verifier_model: Optional[str] = None, | |
| provider: Optional[str] = None, | |
| draft_provider: str = "ollama", | |
| verifier_provider: Optional[str] = None, | |
| fallback_model: str = "ayncoding-qwen3-8b-slim", | |
| fallback_provider: str = "ollama" | |
| ) -> None: | |
| self.lifecycle_state = "initializing" | |
| self._hydrate_environment() | |
| # Resolve provider configurations with backwards compatibility | |
| if provider: | |
| self.draft_provider = provider | |
| self.verifier_provider = provider | |
| else: | |
| self.draft_provider = draft_provider | |
| has_deepseek = bool(os.getenv("DEEPSEEK_API_KEY", "").strip()) | |
| self.verifier_provider = verifier_provider or ("deepseek" if has_deepseek else "ollama") | |
| self.draft_model = draft_model | |
| if verifier_model: | |
| self.verifier_model = verifier_model | |
| else: | |
| self.verifier_model = "deepseek-flash" if self.verifier_provider == "deepseek" else "ayncoding-qwen3-8b-slim" | |
| self.fallback_provider = fallback_provider | |
| self.fallback_model = fallback_model | |
| # Assemble engines | |
| self.draft_engine = AynCodingEngine(provider=self.draft_provider, model=self.draft_model) | |
| self.verifier_engine = AynCodingEngine(provider=self.verifier_provider, model=self.verifier_model) | |
| self.fallback_engine = ( | |
| AynCodingEngine(provider=self.fallback_provider, model=self.fallback_model) | |
| if (self.fallback_provider != self.verifier_provider or self.fallback_model != self.verifier_model) | |
| else None | |
| ) | |
| self.lifecycle_state = "active" | |
| def _hydrate_environment(self) -> None: | |
| """Hydrates execution environment with configurations from local storage.""" | |
| repository_root = Path(__file__).parent.parent.resolve() | |
| env_configuration_path = repository_root / ".env" | |
| if not env_configuration_path.exists(): | |
| return | |
| for config_line in env_configuration_path.read_text(encoding="utf-8").splitlines(): | |
| trimmed_line = config_line.strip() | |
| if trimmed_line and not trimmed_line.startswith("#") and "=" in trimmed_line: | |
| config_key, config_value = trimmed_line.split("=", 1) | |
| os.environ.setdefault(config_key.strip(), config_value.strip()) | |
| def synthesize_accelerated( | |
| self, | |
| prompt: str, | |
| language: str = "python", | |
| max_tokens: int = 4096 | |
| ) -> Dict[str, Any]: | |
| """ | |
| Executes hierarchical speculative hybrid synthesis: | |
| 1. Fast Draft: Generates candidate code using 1.5B local model (~3-5s). | |
| 2. Deterministic Audit: Scores candidate AST and knowledge purity in 0.01s. | |
| 3. Tier 1 Fast Path: If pure (Grade A+), returns instantly (~3-5s). | |
| 4. Tier 2 Neural Refinement: DeepSeek Flash refines flawed code (~2-8s). | |
| 5. Tier 3 Offline Fallback: If cloud fails/depleted, routes to local 8B-slim. | |
| """ | |
| start_timestamp = time.perf_counter() | |
| # ── Step 1: Fast Local Draft Synthesis (1.5B @ 60+ tok/s) ───────────── | |
| draft_outcome = self.draft_engine.synthesize( | |
| prompt=prompt, | |
| language=language | |
| ) | |
| draft_candidate_code = draft_outcome.get("code", "") | |
| draft_elapsed_seconds = time.perf_counter() - start_timestamp | |
| # ── Step 2: Instant Deterministic 5-Pillar Static Audit (0.01s) ─────── | |
| sanitized_draft_code = AynKnowledgePurger.rectify_vague_identifiers(draft_candidate_code) | |
| static_audit_record = AynStaticAuditor.audit_code(sanitized_draft_code, language, "speculative_draft.py") | |
| knowledge_purge_record = AynKnowledgePurger.audit_unlearning_readiness(sanitized_draft_code) | |
| is_epistemically_pure = ( | |
| static_audit_record.composite_score_percent >= 85.0 | |
| and knowledge_purge_record["is_purged_and_pure"] | |
| and static_audit_record.syntax_valid | |
| and bool(sanitized_draft_code.strip()) | |
| ) | |
| if is_epistemically_pure: | |
| total_duration_seconds = time.perf_counter() - start_timestamp | |
| return { | |
| "success": True, | |
| "code": sanitized_draft_code, | |
| "reasoning": draft_outcome.get("mantiq_reasoning", draft_outcome.get("reasoning", "")), | |
| "ast_valid": True, | |
| "speculative_tier": "tier_1_instant_draft", | |
| "verifier_used": f"{self.draft_provider}:{self.draft_model}", | |
| "epistemic_score": static_audit_record.composite_score_percent, | |
| "epistemic_grade": static_audit_record.epistemic_grade, | |
| "draft_duration_seconds": round(draft_elapsed_seconds, 2), | |
| "duration_seconds": round(total_duration_seconds, 2), | |
| "speedup_achieved": "20x - 30x (Pure Fast Path)" | |
| } | |
| # ── Step 3: Tier 2 Neural Refinement (DeepSeek Flash Cloud Refiner) ─── | |
| detected_violations = knowledge_purge_record.get("detected_anti_patterns", []) | |
| refinement_objective = ( | |
| f"Fix and epistemically purify this draft code to eliminate all detected violations:\n" | |
| f"Violations Detected: {detected_violations}\n" | |
| f"Draft Code:\n```{language}\n{sanitized_draft_code}\n```" | |
| ) | |
| tier_label = "tier_2_deepseek_flash_refactor" | |
| active_verifier_identity = f"{self.verifier_provider}:{self.verifier_model}" | |
| refactored_output_record: Dict[str, Any] = {} | |
| try: | |
| refactored_output_record = self.verifier_engine.refactor( | |
| code=sanitized_draft_code, | |
| language=language, | |
| goal=refinement_objective | |
| ) | |
| except AynProviderError as provider_failure: | |
| # ── Step 4: Tier 3 Resilient Local Fallback (8B-Slim / Offline) ─── | |
| print(f"⚠️ [H-MoE Router] Primary verifier failure ({provider_failure}). Routing to Tier 3 Fallback...") | |
| tier_label = "tier_3_local_fallback_refactor" | |
| active_verifier_identity = f"{self.fallback_provider}:{self.fallback_model}" | |
| if self.fallback_engine is not None: | |
| refactored_output_record = self.fallback_engine.refactor( | |
| code=sanitized_draft_code, | |
| language=language, | |
| goal=refinement_objective | |
| ) | |
| else: | |
| refactored_output_record = { | |
| "refactored_code": sanitized_draft_code, | |
| "reasoning": f"Fallback to sanitized draft due to provider error: {provider_failure}" | |
| } | |
| final_purified_code = refactored_output_record.get( | |
| "refactored_code", | |
| refactored_output_record.get("code", sanitized_draft_code) | |
| ) | |
| final_rectified_code = AynKnowledgePurger.rectify_vague_identifiers(final_purified_code) | |
| final_static_audit = AynStaticAuditor.audit_code(final_rectified_code, language, "refactored.py") | |
| total_duration_seconds = time.perf_counter() - start_timestamp | |
| return { | |
| "success": True, | |
| "code": final_rectified_code, | |
| "reasoning": refactored_output_record.get("reasoning", ""), | |
| "ast_valid": final_static_audit.syntax_valid, | |
| "speculative_tier": tier_label, | |
| "verifier_used": active_verifier_identity, | |
| "epistemic_score": final_static_audit.composite_score_percent, | |
| "epistemic_grade": final_static_audit.epistemic_grade, | |
| "draft_duration_seconds": round(draft_elapsed_seconds, 2), | |
| "duration_seconds": round(total_duration_seconds, 2), | |
| "speedup_achieved": "Targeted Neural Refinement (Cloud Accelerated)" if "tier_2" in tier_label else "Targeted Local Refinement" | |
| } | |