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 files23 unmodified lines2425262728293017 unmodified lines4849505051525354555556575758595960616162636364656566676832 unmodified lines1011021031041041051061061071081091101101111124 unmodified lines11711811912112012112237 unmodified lines1601611621651631641651661671681691701711721731751761771781791801741751761771781791831801811821831841853 unmodified lines18919019119419519619219319819419520019619720219819920020120220313 unmodified lines21721821922022122222322422522622722822923023123222423323423523684 unmodified lines3213223233243253163173183193203263273283293303313323233333343353364 unmodified lines34134234333434434534634733834834934035035134235235334435435535635734835835936036135236236336436536636735836836937037123 unmodified lines<p align="center"> <a href="https://169pi.ai/"><img src="https://img.shields.io/badge/🌐%20Website-169Pi%20AI-blue" alt="Website"></a> <a href="https://huggingface.co/169Pi"><img src="https://img.shields.io/badge/🤗%20Hugging%20Face-169Pi%20AI-yellow" alt="Hugging Face"></a> <a href="https://pypi.org/project/pi169/0.1/"><img src="https://img.shields.io/badge/PyPI-pi169-blue" alt="PyPI"></a> <a href="https://www.linkedin.com/company/169pi/"><img src="https://img.shields.io/badge/LinkedIn-169Pi%20AI-blue" alt="LinkedIn"></a> <a href="https://x.com/169Pi_ai"><img src="https://img.shields.io/badge/X-169Pi%20AI-black" alt="X"></a></p>17 unmodified lines- **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.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.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.3. **Limitations, Disclaimers, and Knowledge Boundaries** – transparently communicating uncertainty and scope.
4.**Handling Complex and Sensitive Topics** – balancing informativeness with responsible guardrails.4. **Handling Complex and Sensitive Topics** – balancing informativeness with responsible guardrails.
5.**Safety and Respectful Engagement** – maintaining politeness, inclusivity, and cultural sensitivity.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.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.
32 unmodified lines| BBH (3-shot) | **85.12%** | 78.8% | 79.8% | 82.9% | 81.6% | 77.7% | - || MMLU-Pro (5-shot) | **64.78%** | 51.4% | 58.3% | 52.8% | 53.8% | 52.2% | 54.37% || 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% | = || 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.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 Performance
| Rank | Model | Accuracy (%) | Performance vs Alpie ||------|-------|-------------|---------------------|| **1** | **Alpie Core** | **57.8** | **Alpie** |4 unmodified lines| 6 | DeepSeek R1 | 49.2 | Below Alpie || 7 | Devstral | 46.8 | Below Alpie |
### Humanity's Last Exam Leaderboard Performance
| Rank | Model | Accuracy (%) | Performance vs Alpie |37 unmodified lines- **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.- **Synthetic Data Source**: LLM-generated, curated with multi-turn reasoning traces for STEM/coding.
## 8. Environmental Impact

**Carbon Footprint**: We estimated the environmental impact of training Alpie Core (32B) on 8× NVIDIA H100-80GB GPUs by calculating carbon emissions from GPU energy consumption. The calculation follows the formula:
CO₂e (kg) = Grid CO₂ Factor (kg/kWh) × Runtime (hours) × Power per GPU (kW) × Number of GPUs
Training Parameters:Grid CO₂ Factor (Azure average): 0.364 kg CO₂e per kWh Runtime: 408 hoursGPUs: 8× H100-80GBWe report results under two assumption modes:
Realistic mode (average training draw ≈ 250 W per GPU = 0.25 kWh/hr): 0.364 × 408 × 0.25 × 8 ≈ 298 kg CO₂e- Grid CO₂ Factor (Azure average): 0.364 kg CO₂e per kWh - Runtime: 408 hours- GPUs: 8× H100-80GB
We report results under two assumption modes:
Conservative mode (near TDP ≈ 700 W per GPU = 0.70 kWh/hr): 0.364 × 408 × 0.70 × 8 ≈ 835 kg CO₂e**Realistic mode** (average training draw ≈ 250 W per GPU = 0.25 kWh/hr): 0.364 × 408 × 0.25 × 8 ≈ **298 kg CO₂e**
**Conservative mode** (near TDP ≈ 700 W per GPU = 0.70 kWh/hr): 0.364 × 408 × 0.70 × 8 ≈ **835 kg CO₂e**
Total training footprint ranges from ~298 kg CO₂e (realistic) to ~835 kg CO₂e (conservative worst-case)
3 unmodified lines
Best 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.1. **STEM**: Excels at solving advanced problems in science, technology, engineering, and mathematics with high accuracy.
3.**Coding**: Supports software development, debugging, algorithmic problem-solving, and structured reasoning in code..2. **Complex Mathematical Reasoning**: Handles multi-step logical and quantitative reasoning tasks with strong reliability.
4.**Indian Context**: Provides culturally aware insights, competitive exam assistance (JEE, NEET, UPSC), and multilingual support in Hindi/Hinglish.3. **Coding**: Supports software development, debugging, algorithmic problem-solving, and structured reasoning in code.
5.**Research Assistants**: Handle long contexts (65K) for academic and legal research.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 Limitations
13 unmodified lines- Model-assisted safety pipeline using RLHF- Comprehensive adversarial testing by domain experts
## 11. Quick Start
```bash# Install the SDKpip install pi169
# Set your API keyexport ALPIE_API_KEY="your_key_here"
# Start using the CLIpi169 "Explain 4-bit quantization in simple terms"```
## 11. How to Use## 12. How to Use
### Non-Streaming Inference```python84 unmodified lines - **Size**: 20GB - **Requirements**: Minimum 20GB RAM/VRAM for local execution - **Local Deployment**: Runs efficiently on local machines with sufficient resources
```bash # Pull the model ollama pull 169pi/alpie-core # Run the model ollama run 169pi/alpie-core# Pull the modelollama pull 169pi/alpie-core
# Run the modelollama run 169pi/alpie-core```
## 12. Citation## 13. Citation
```bibtex@misc{169pi2025alpiecore,4 unmodified lines}```
## 13. Community & Contributions## 14. Community & Contributions
This 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.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.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.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.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. License## 15. License
Apache 2.0 License – Permissive, allowing free use, modification, and distribution for both research and commercial purposes.
## 15. Acknowledgements / Credits## 16. Acknowledgements / Credits
We 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. Contact## 17. Contact
For technical inquiries and support: **contact@169pi.com**
README.md+50-40