Text Generation
Transformers
Safetensors
English
Hindi
qwen2
reasoning
coding
mathematics
quantization
4-bit model
state-of-the-art
conversational
text-generation-inference
4-bit precision
bitsandbytes
Instructions to use 169Pi/Alpie-Core with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 169Pi/Alpie-Core with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="169Pi/Alpie-Core") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("169Pi/Alpie-Core") model = AutoModelForCausalLM.from_pretrained("169Pi/Alpie-Core", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 169Pi/Alpie-Core with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "169Pi/Alpie-Core" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "169Pi/Alpie-Core", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/169Pi/Alpie-Core
- SGLang
How to use 169Pi/Alpie-Core with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "169Pi/Alpie-Core" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "169Pi/Alpie-Core", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "169Pi/Alpie-Core" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "169Pi/Alpie-Core", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 169Pi/Alpie-Core with Docker Model Runner:
docker model run hf.co/169Pi/Alpie-Core
Update README.md
Browse files4 unmodified lines56789106 unmodified lines171819202122234 unmodified lines282930313233343 unmodified lines38394041424344454647484950515253545556575859606162631 unmodified line656667686970717273747576777879808182838485868788892 unmodified lines929394959697984 unmodified lines10310410510610710810952 unmodified lines16216316416516616716 unmodified lines1841851861871881891901911921931941951961971981992002012022036 unmodified lines2102112122132142152162172182192202213 unmodified lines22522622722822923023130 unmodified lines26226326426526626726840 unmodified lines3093103113123133143153163173183193203213223233243253263273283293303313324 unmodified lines- coding- mathematics- quantizationlicense: apache-2.0datasets:- synthetic6 unmodified lines---# Alpie-Core: 4-bit Quantized Reasoning Model📄 **[Technical Report: Alpie_Core.pdf](./Alpie_Core.pdf)**<p align="center"><a href="https://169pi.ai/"><img src="https://img.shields.io/badge/🌐%20Website-169Pi%20AI-blue" alt="Website"></a>4 unmodified lines## 1. IntroductionAlpie-Core is one of the world's first fine-tuned 4-bit reasoning models, proving that aggressive quantization can surpass full-precision baselines in reasoning, mathematics, and coding. By combining cutting-edge quantization-aware training with synthetic STEM-rich datasets, Alpie-Core achieves frontier-level reasoning while being practical for real-world deployment at scale.## 2. Model Summary3 unmodified lines- **Quantization**: 4-bit NF4 with double quantization- **Context Length**: 65k tokens- **Max Output Length**: 16,384 tokens- **License**: Apache 2.0## 3. Approach**Alpie-Core** has undergone extensive **supervised fine-tuning (SFT)** to strengthen reasoning, robustness, and safety. The training leveraged a diverse mixture of curated open-source datasets and proprietary synthetic data, optimized with high-quality LLM-generated responses. The fine-tuning process emphasized adherence to rigorous safety and usability standards, including:1)**User Understanding and Clarity** – ensuring outputs are direct, interpretable, and pedagogically sound.2)**Security and Ethical Guidelines** – filtering unsafe or harmful generations during and after training.3)**Limitations, Disclaimers, and Knowledge Boundaries** – transparently communicating uncertainty and scope.4)**Handling Complex and Sensitive Topics** – balancing informativeness with responsible guardrails.5)**Safety and Respectful Engagement** – maintaining politeness, inclusivity, and cultural sensitivity.6)**Confidentiality and Responsible Use** – preventing leakage of private training data, proprietary prompts, or internal reasoning traces.This SFT approach enables Alpie-Core to deliver reliable, aligned, and context-aware responses while maintaining safety across a broad range of use cases.## 4. Model Features1 unmodified line2. **OpenAI-Compatible API** – Seamless integration with OpenAI client libraries3. **65K Context Length** – Handles very large inputs and conversations4. **16,384 Max Output Length** – Enables extremely long generations5. **4-Bit Quantization** – Memory-efficient and optimized for deployment6. **High Throughput Inference** – Powered by vLLM for efficient large-scale serving7. **Low Latency Inference** – Fast response times optimized for production8. **Customizable Safety & Moderation Filters** – Built-in guardrails for safer outputs9. **Supports Function Calling / Tool Use** – Enables structured outputs and external API integration## 5. Key Highlights1. **Frontier Performance in 4-bit**: 81.28% MMLU, 92.75% GSM8K, 57.8% SWE-Bench Verified2) **STEM + Coding Excellence**: Outperforms full-precision peers in mathematics and programming3) **Enhanced Content Access**: Provides factual responses to geopolitically sensitive topics4) **Quantization Efficiency**: A 4-bit quantized variant achieves competitive performance retention compared to full-precision models, demonstrating that aggressive quantization can preserve task accuracy while substantially reducing hardware requirements.5) **Benchmark Competitiveness**: Across more than ten standard evaluation benchmarks, the model demonstrates performance on par with or exceeding that of larger 70B+ parameter systems, highlighting the effectiveness of our training and optimization strategies.6) **Environmental Benefits**: Through quantization and efficiency-focused design, the model requires significantly fewer computational resources. This translates into lower energy consumption and reduced carbon footprint relative to full-precision deployments.## 6. Benchmark Results2 unmodified lines| Benchmark | Alpie-Core (32B-4bit) | DeepSeek-V2 (236B) | Qwen2.5 72B | Llama 3.1 405B | Llama 3.1 70B | Gemma-3 27B-PT | Mistral-Small-24B-Base-2501 ||-----------|----------------------|-------------------|-------------|---------------|---------------|----------------|----------------------------|4 unmodified lines| MBPP (pass@1) | **75.20%** | 65.0% | 72.6% | 68.4% | - | 65.6% | 69.64% || HumanEval (pass@1) | **57.23%** | 43.3% | 53.0% | 54.9% | - | 48.8% | = |### SWE-Bench Verified Performance52 unmodified lines- **Quantization**: 4-bit NF4 + Double Quantization + FP16 compute- **Dataset Domains**: Mathematics, coding, reasoning, science, general knowledge, competitive exams, Indian context + law, multilingual (Hindi and Hinglish)- **Synthetic Data Advantage**: +15-20% performance boost in STEM & coding domains## 8. Environmental Impact16 unmodified linesTotal training footprint ranges from ~298 kg CO₂e (realistic) to ~835 kg CO₂e (conservative worst-case)## 9. Use CasesBest for **STEM**, **complex mathematical reasoning**, **coding**, and **Indian context**1)**STEM**: Excels at solving advanced problems in science, technology, engineering, and mathematics with high accuracy.2)**Complex Mathematical Reasoning**: Handles multi-step logical and quantitative reasoning tasks with strong reliability.3)**Coding**: Supports software development, debugging, and algorithmic problem-solving across multiple programming languages.4)**Indian Context**: Provides culturally aware insights, competitive exam assistance (JEE, NEET, UPSC), and multilingual support in Hindi/Hinglish.## 10. Safety and Limitations6 unmodified lines- Fixed knowledge cutoff without real-time information retrieval- Occasional struggles with complex multi-hop mathematical reasoning- Potential hallucinations in factual question-answering### Mitigations- Safety classifiers and output filtering systems- Model-assisted safety pipeline using RLHF- Comprehensive adversarial testing by domain experts## 11. How to Use### Non-Streaming Inference3 unmodified linesimport torch# Load LoRA adapter configuration to find the base modelpeft_model_id = "169Pi/Alpie-Core-4-bit"config = PeftConfig.from_pretrained(peft_model_id)# Load the base model30 unmodified linesimport torch# Load LoRA adapter configuration to find the base modelpeft_model_id = "169Pi/Alpie-Core-4-bit"config = PeftConfig.from_pretrained(peft_model_id)# Load the base model40 unmodified lines```bibtex@misc{alpie2025core,title = {Alpie-Core: A 4-bit Quantized Reasoning Model Surpassing Full-Precision Benchmarks},author = {Alpie AI},year = {2025},url = {https://huggingface.co/alpie/Alpie-Core-4bit}}```## 13. LicenseApache 2.0 – Free for research and commercial use## 14. Acknowledgements / CreditsWe would like to thank **DeepSeek** for their original model, which served as the foundation for this work. Our team fine-tuned the model and implemented **4-bit quantization**, achieving improved efficiency and accuracy for downstream tasks. This model is built with respect to the contributions of the original authors and aims to provide a safe, high-performance solution for reasoning and inference.## 15. ContactFor technical inquiries and support: **contact@169pi.com**---*For technical details, training methodology, and comprehensive evaluation results, please refer to our technical report.*4 unmodified lines567891011126 unmodified lines192021222324254 unmodified lines30313233343536373839403 unmodified lines4445464748495051525354555657585960616263646566676869701 unmodified line72737475767778798081828384858687888990919293942 unmodified lines9798991001011024 unmodified lines10710810911011111211352 unmodified lines16616716816917017117217316 unmodified lines1901911921931941951961971981992002012022032042052062072082092106 unmodified lines2172182192202212222232242252262272282292302313 unmodified lines23523623723823924024130 unmodified lines27227327427527627727840 unmodified lines3193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573584 unmodified lines- coding- mathematics- quantization- 4-bit model- state-of-the-artlicense: apache-2.0datasets:- synthetic6 unmodified lines---# Alpie-Core: 4-bit Quantized Reasoning Model📄 **[Technical Report: Alpie Core.pdf](./Alpie_Core.pdf)**<p align="center"><a href="https://169pi.ai/"><img src="https://img.shields.io/badge/🌐%20Website-169Pi%20AI-blue" alt="Website"></a>4 unmodified lines## 1. Introduction**Alpie Core is one of the first fine-tuned 4-bit reasoning models from India, and among one of the first worldwide.** Trained on just 8 Hopper GPUs with LoRA, QLoRA quantization, and synthetic STEM-rich dataset distillation, it proves that aggressive quantization can not only match but also surpass full-precision baselines.With a dramatically reduced memory footprint, Alpie-Core delivers competitive, frontier-level reasoning performance, even beating some top proprietary models. It achieves **81.28% on MMLU, 92.75% on GSM8K, and 57.8% on SWE-Bench Verified**, ranking top globally on competitive leaderboards, a demonstration that efficient models can rival frontier systems while remaining practical for real-world deployment at scale.## 2. Model Summary3 unmodified lines- **Quantization**: 4-bit NF4 with double quantization- **Context Length**: 65k tokens- **Max Output Length**: 16,384 tokens- **Training Data Sources:** Synthetic (STEM, reasoning, coding) + domain-rich curated data (law, Indian context, exams, multilingual).- **License**: Apache 2.0## 3. Approach**Alpie-Core** has undergone extensive **supervised fine-tuning (SFT)** to strengthen reasoning, robustness, and safety. The training leveraged a diverse mixture of curated open-source datasets and proprietary synthetic data, optimised with high-quality LLM-generated responses. The fine-tuning process emphasised adherence to rigorous safety and usability standards, including:1.**User Understanding and Clarity** – ensuring outputs are direct, interpretable, and pedagogically sound.2.**Security and Ethical Guidelines** – filtering unsafe or harmful generations during and after training.3.**Limitations, Disclaimers, and Knowledge Boundaries** – transparently communicating uncertainty and scope.4.**Handling Complex and Sensitive Topics** – balancing informativeness with responsible guardrails.5.**Safety and Respectful Engagement** – maintaining politeness, inclusivity, and cultural sensitivity.6.**Confidentiality and Responsible Use** – preventing leakage of private training data, proprietary prompts, or internal reasoning traces.This SFT approach enables Alpie-Core to deliver reliable, aligned, and context-aware responses while maintaining safety across a broad range of use cases. This approach allows Alpie-Core to generalize across global and Indian contexts while staying aligned to safe and responsible use guidelines.## 4. Model Features1 unmodified line2. **OpenAI-Compatible API** – Seamless integration with OpenAI client libraries3. **65K Context Length** – Handles very large inputs and conversations4. **16,384 Max Output Length** – Enables extremely long generations5. **4-Bit Quantization** – Memory-efficient and optimised for deployment6. **High Throughput Inference** – Powered by vLLM for efficient large-scale serving7. **Low Latency Inference** – Fast response times optimized for production8. **Customizable Safety & Moderation Filters** – Built-in guardrails for safer outputs9. **Supports Function Calling / Tool Use** – Enables structured outputs and external API integration10. **Instruction Following** – Optimised for reasoning and chain-of-thought stepwise answers.11. **Education & Research Ready** – Tailored for competitive exams, STEM reasoning, and knowledge-intensive tasks.## 5. Key Highlights1. **First 4-bit Reasoning Model from India**: Competitive globally with frontier models2. **Benchmark Competitiveness**: Outperforms or matches 70B+ models across reasoning, math, and coding3. **STEM & Coding Strength**: Excellent on GSM8K, MATH-500, HumanEval, SWE-Bench Verified4. **Efficiency & Deployment**: 16 GB VRAM footprint, runs on commodity GPUs with vLLM5. **Extended Context Length**: 65K tokens for research papers, conversations, multi-document reasoning6. **Environmental Benefits**: ~298–835 kg CO₂e, 2–3× more efficient than FP16 training7. **Open-Source Commitment**: Released under Apache 2.0 for global use## 6. Benchmark Results2 unmodified lines| Benchmark | Alpie-Core (32B-4bit) | DeepSeek-V2 (236B) | Qwen2.5 72B | Llama 3.1 405B | Llama 3.1 70B | Gemma-3 27B-PT | Mistral-Small-24B-Base-2501 ||-----------|----------------------|-------------------|-------------|---------------|---------------|----------------|----------------------------|4 unmodified lines| MBPP (pass@1) | **75.20%** | 65.0% | 72.6% | 68.4% | - | 65.6% | 69.64% || HumanEval (pass@1) | **57.23%** | 43.3% | 53.0% | 54.9% | - | 48.8% | = |These results demonstrate Alpie-Core’s ability to rival or surpass leading proprietary and open-source models, despite being 4-bit quantized.### SWE-Bench Verified Performance52 unmodified lines- **Quantization**: 4-bit NF4 + Double Quantization + FP16 compute- **Dataset Domains**: Mathematics, coding, reasoning, science, general knowledge, competitive exams, Indian context + law, multilingual (Hindi and Hinglish)- **Synthetic Data Advantage**: +15-20% performance boost in STEM & coding domains- **Training Strategy**: Multi-stage distillation → SFT → safety alignment.- **Synthetic Data Advantage:** Clarify source: LLM-generated, curated with multi-turn reasoning traces for STEM/coding.## 8. Environmental Impact16 unmodified linesTotal training footprint ranges from ~298 kg CO₂e (realistic) to ~835 kg CO₂e (conservative worst-case)*This makes Alpie-Core one of the most carbon-efficient reasoning models released to date.*## 9. Use CasesBest for **STEM**, **complex mathematical reasoning**, **coding**, and **Indian context**1.**STEM**: Excels at solving advanced problems in science, technology, engineering, and mathematics with high accuracy.2.**Complex Mathematical Reasoning**: Handles multi-step logical and quantitative reasoning tasks with strong reliability.3.**Coding**: Supports software development, debugging, algorithmic problem-solving, and structured reasoning in code..4.**Indian Context**: Provides culturally aware insights, competitive exam assistance (JEE, NEET, UPSC), and multilingual support in Hindi/Hinglish.5.**Research Assistants**: Handle long contexts (65K) for academic and legal research.## 10. Safety and Limitations6 unmodified lines- Fixed knowledge cutoff without real-time information retrieval- Occasional struggles with complex multi-hop mathematical reasoning- Potential hallucinations in factual question-answering- Hallucinations: As with all LLMs, outputs should not be used for medical/legal advice without expert oversight.- Biases: Training on synthetic + curated datasets reduces bias, but some risks may persist.### Mitigations- Safety classifiers and output filtering systems- Model-assisted safety pipeline using RLHF- Comprehensive adversarial testing by domain experts## 11. How to Use### Non-Streaming Inference3 unmodified linesimport torch# Load LoRA adapter configuration to find the base modelpeft_model_id = "169Pi/Alpie-Core"config = PeftConfig.from_pretrained(peft_model_id)# Load the base model30 unmodified linesimport torch# Load LoRA adapter configuration to find the base modelpeft_model_id = "169Pi/Alpie-Core"config = PeftConfig.from_pretrained(peft_model_id)# Load the base model40 unmodified lines```bibtex@misc{alpie2025core,title = {Alpie-Core: A 4-bit Quantized Reasoning Model Surpassing Full-Precision Benchmarks},author = {169Pi AI},year = {2025},url = {https://huggingface.co/alpie/Alpie-Core}}```## 13. Community & ContributionsThis model is released under the Apache 2.0 license, and we warmly welcome the community to build, download, and extend it.1.**Issues & Discussions:** Report bugs, suggest features, or start conversations on the Hugging Face model page.2.**Contributions:** Pull requests are welcome for error fixes, performance improvements, and extended functionality.3.**Fine-tuning Results:** Share your experiments, benchmarks, and downstream applications with the community.4.**Collaboration:** We encourage researchers, developers, and organisations to join in shaping the future of this model.Together, we can continue to improve accessibility, safety, and performance for real-world AI applications.## 14. LicenseApache 2.0 License – Permissive, allowing free use, modification, and distribution for both research and commercial purposes.## 15. Acknowledgements / CreditsWe would like to thank DeepSeek for their original model, which served as the foundation for this work. Our team fine-tuned the model and implemented 4-bit quantization, achieving improved efficiency and accuracy for downstream tasks. This model is built with respect to the contributions of the original authors and aims to provide a safe, high-performance solution for reasoning and inference.We are also grateful to the Hugging Face ecosystem (Transformers, PEFT, vLLM, bitsandbytes), the open-source community datasets (MMLU, GSM8K, SWE-Bench, and others), and the support of various cloud providers. Finally, we acknowledge the broader AI research community and companies whose innovations and insights continue to inspire our work.## 16. ContactFor technical inquiries and support: **contact@169pi.com**---Alpie-Core represents a milestone for open-source AI from India, one of the first globally to show that 4-bit reasoning models can rival frontier-scale systems. We hope this release empowers developers, researchers, and organisations worldwide to build more efficient, inclusive, and impactful AI.*For technical details, training methodology, and comprehensive evaluation results, please refer to our technical report.*
README.md+66-40