AI & Edge Computing · Low-Resource NLP & Quantization

Edge-AI LoRA Pipeline

Adapting Qwen 2.5 for Kenyan Sheng through Low-Rank Adaptation (LoRA), FP16 adapter fusion, and 4-bit GGUF quantization. Engineered to eliminate tokenization fertility bottlenecks and run on 4GB VRAM / 8GB RAM host machines with a minimal 476.2 MB RAM footprint.

Project Overview: Adapting Qwen 2.5 for Kenyan Sheng LoRA Pipeline
Empirical RAM Footprint: 476.2 MB (Zero Swap Paging)4-Bit GGUF Quantization · Sub-2s CPU Inference

Overcoming Dialect & Compute Boundaries

How custom instruction tuning and quantization retain linguistic nuances without burning cloud compute.

Tokenization Fertility

Standard LLM tokenizers fragment urban Sheng terms ("msee", "rada", "tusetup") into multiple subwords, driving up CPU decoding cycles. Targeted instruction tuning teaches the model clean sequential transitions across subwords.

Pragmatic Equivalence

Curated custom JSONL instruction sets reflecting genuine Kenyan tech sales. Technical terms ("hosting", "domain", "package") remain in English while conversational framing shifts fluidly into coastal Sheng.

PEFT / LoRA Attention

Base Qwen 2.5 weights stay completely frozen. Low-rank trainable matrices are injected into attention layers via LLaMA-Factory, preventing catastrophic forgetting and overfitting on localized datasets.

4-Bit GGUF Quantization

Merged FP16 adapters converted via llama.cpp into 4-bit GGUF format. Verified against recurring customer prompts to confirm zero linguistic degradation while leaving 3GB+ free RAM headroom on the host.

Empirical Pipeline Telemetry & Proof

Hardware-verified telemetry confirming sub-second latency and zero swap thrashing.

LoRA Fine-Tuning Pipeline Diagram

LoRA Training & Export Pipeline

Step-by-step workflow from LLaMA-Factory training, FP16 adapter merge, GGUF export, to llama.cpp deployment.

Empirical Memory Proof Telemetry on Edge Host

Hardware Memory Telemetry

Real-time terminal telemetry confirming a total RAM consumption of just 476.2 MB on dual-core Ivy Bridge hardware.

The Empirical Benchmark Proof

Empirical Benchmark Validation

Benchmarking inference response times, dialect fluency, and memory ceiling limits across quantization variants.

The Live OmniRoute Dynamic Dialect Operation

Live OmniRoute Dialect Interception

Dynamic payload routing: English queries dispatch to Hermes; Sheng tokens route directly to the Sheng Qwen model.

Pipeline Technologies

Qwen 2.5 0.5B / 1.5BLow-Rank Adaptation (LoRA)PEFTLLaMA-FactoryHugging Face Transformersllama.cpp4-Bit GGUF QuantizationQ8_0 Symmetrical QuantizationCustom JSONL Instruction TuningOmniRoute Semantic Proxy