
Pakistan has achieved a significant technological milestone with the creation of Qehwa, the world’s first Pashto AI LLM and chatbot. Developed independently by Junaid Ahmed, this innovative large language model strategically addresses critical linguistic gaps for over 60 million Pashto speakers globally. Calibrated specifically for the Peshawari dialect, Qehwa surpasses existing global AI systems in its nuanced understanding and contextual accuracy of the Pashto language and cultural intricacies. This baseline development marks a pivotal advancement, demonstrating Pakistan’s capacity for indigenous innovation in the artificial intelligence sector.
The Translation: Demystifying Pakistan’s Pashto AI Breakthrough
Bridging Linguistic Divides with Advanced AI
A Large Language Model (LLM) like Qehwa functions as a sophisticated digital brain, processing and generating human-like text. Previously, Pashto speakers faced significant challenges; generic AI models often misinterpret linguistic nuances, cultural context, and idiomatic expressions specific to Pashto. Qehwa, however, provides a calibrated solution. Built on the advanced Qwen2.5-7B architecture, with “7B” denoting 7 billion parameters, it represents a massive neural network. This foundational model, already proficient in general logic and coding, was then precisely fine-tuned using 3.4 million Pakistani Pashto documents. Consequently, Qehwa demonstrates a deep, contextual understanding of the Peshawari Pashto dialect, providing a robust platform for digital interaction.
Socio-Economic Impact: Empowering Pashto Speakers Digitally
Catalyst for Inclusion and Opportunity
This indigenous Pashto AI LLM represents a profound catalyst for socio-economic uplift across Pakistan. For students in both urban centers and rural areas, it unlocks unprecedented access to information and educational resources in their native language, bridging digital literacy gaps. Professionals can now interact with technology more efficiently, fostering innovation within Pashto-speaking communities. Moreover, the model supports prompts in Pashto, English, and Urdu, generating pure Pashto responses. This structural integration facilitates clearer communication and access to digital services, empowering households and driving economic participation. The ability to translate English to Pashto with 90% accuracy and Urdu to Pashto with 84% accuracy significantly streamlines cross-linguistic interactions, promoting broader digital engagement.

The Forward Path: A Definitive Momentum Shift
Solidifying Pakistan’s Position in AI Innovation
The launch of Qehwa is undeniably a Momentum Shift for Pakistan’s technological landscape, rather than merely a stabilization move. This project, executed independently without external funding or institutional backing, underscores the raw potential within our nation’s developer community. It sets a new baseline for indigenous AI development, showcasing that significant innovation can emerge from focused, individual efforts. Furthermore, its open-source nature ensures that Qehwa will serve as a foundational component, allowing researchers and developers to build upon this achievement. This strategic approach not only addresses immediate linguistic needs but also positions Pakistan as a contributor to global AI advancements, enhancing our digital sovereignty.
Precision Engineering: Qehwa’s Development Protocol
Rigorous Two-Stage Training for Pashto Mastery
The development of Qehwa followed a meticulously planned two-stage process, ensuring both superior language understanding and task performance. Initially, the base Qwen2.5-7B model underwent extensive pre-training. This involved processing 3.4 million Pakistani Pashto documents. This phase was crucial for enhancing its Pashto vocabulary, grammatical structures, and deep cultural comprehension. Subsequently, a technique known as LoRA (Low-Rank Adaptation) was strategically employed. LoRA is an efficient mathematical method that permits fine-tuning massive AI models, such as the 7-billion-parameter Qwen2.5-7B, without requiring prohibitively expensive supercomputing resources. Instead of modifying all parameters, LoRA updates only a critical subset, thus making the training process affordable and highly efficient for a solo developer.

The second stage involved fine-tuning Qehwa on over 100,000 Pashto instruction pairs. This advanced training enabled the model to accurately follow diverse prompts, answer complex questions, execute precise translations, and manage fluid conversational tasks. This structured approach ensures Qehwa’s operational excellence.
Unlocking Qehwa: Capabilities and Deployment
Comprehensive Performance and Open-Source Availability
Qehwa’s capabilities are rigorously benchmarked. It supports multilingual prompts—Pashto, English, and Urdu—while consistently generating responses in pure Pashto. Furthermore, it introduces the first dedicated Pashto LLM benchmark, comprising 150 unique evaluation tests. Performance metrics are robust: English to Pashto translation achieved 90% accuracy, while Urdu to Pashto translation reached 84%. In specialized categories like culture, history, health, daily life, geography, and nature, the model consistently scored 90%. The overall accuracy across all 15 categories stands at an impressive 85.3%.
This pioneering project was developed independently, devoid of external funding, team support, or institutional backing. A single developer meticulously handled dataset creation, training pipelines, Unicode debugging, GPU failure management, and multiple training cycles. This remarkable solo effort highlights the power of individual initiative. Qehwa is freely available as an open-source project, encouraging global researchers and developers to leverage and expand its foundational capabilities.

Simplified Installation and Optimized Running
Deployment of the Pashto AI LLM is streamlined for accessibility. Users can efficiently install and run Qehwa using Unsloth, a popular open-source tool. Unsloth significantly accelerates fine-tuning and inference (up to 2x faster) while minimizing memory usage. More detailed instructions are available here.
For resource-constrained environments, BitsAndBytes (4-bit Quantization) offers a pragmatic solution. Quantization is a compression technique that reduces the model’s memory footprint. A standard 7-billion-parameter model typically demands substantial VRAM; however, 4-bit quantization allows Qehwa to operate effectively on consumer-grade graphics cards, such as an 8GB gaming GPU, democratizing access to advanced Pashto language technology.







