Model ID:Manas281/scheme-recommendation-model-2 Base Model:microsoft/Phi-3-mini-4k-instruct Fine-tuning Method: LoRA (Low-Rank Adaptation via PEFT)
📘 Overview
This model has been fine-tuned to recommend appropriate Indian government schemes based on structured descriptions of developmental work in rural areas. It understands domain-specific infrastructure and welfare needs and provides targeted scheme recommendations with justifications.
Key Capabilities
✅ Structured Input Processing - Accepts Domain, Indicator, and Description
✅ Multi-Domain Coverage - Water & Sanitation, Education, Health, Roads, Electricity, etc.
✅ Scheme Identification - Recommends both infrastructure and individual welfare schemes
✅ Contextual Justification - Explains why each scheme is relevant
✅ JSON Output - Structured format for easy integration
### Instruction:
Domain: [Domain Name]
Indicator: [Indicator Code and Description]
Description: [Detailed description of the work/need]
Based on the above work description, recommend appropriate government schemes.
### Response:
Example Input
### Instruction:
Domain: 1. Domain: Drinking Water and Sanitation
Indicator: 1.2 Household Tap Connections
Description: Extend pipeline to the Ambedkar Colony to cover 45 households
Based on the above work description, recommend appropriate government schemes.
### Response:
Example Output
json
1{2"infrastructure_schemes":[3{4"identified_need":"Extend water pipeline to Ambedkar Colony for 45 households.",5"suggested_scheme":"Jal Jeevan Mission - Ensure tap connections for each household.",6"justification":"This scheme directly addresses the need for tap connections in Ambedkar Colony."7}8],9"individual_schemes":[],10"total_recommendations":111}
📊 Covered Domains
The model has been trained on the following rural development domains:
Drinking Water and Sanitation - Water supply, drainage, waste management, toilets
Education - School infrastructure, scholarships, enrollment
Health and Nutrition - Health facilities, insurance, maternal care, Anganwadis
Social Security - Pensions for elderly, widows, disabled persons
Roads and Connectivity - Road construction, bridges, culverts, footpaths
Electricity - Village electrification, household connections, street lighting
1from transformers import AutoModelForCausalLM, AutoTokenizer
23# Load model and tokenizer4model_name ="Manas281/scheme-recommendation-model-2"5tokenizer = AutoTokenizer.from_pretrained(model_name)6model = AutoModelForCausalLM.from_pretrained(model_name)78# Prepare prompt9prompt ="""### Instruction:
10Domain: 1. Domain: Drinking Water and Sanitation
11Indicator: 1.2 Household Tap Connections
12Description: Extend pipeline to the Ambedkar Colony to cover 45 households
1314Based on the above work description, recommend appropriate government schemes.
1516### Response:
17"""1819# Generate recommendation20inputs = tokenizer(prompt, return_tensors="pt")21outputs = model.generate(22**inputs,23 max_new_tokens=512,24 temperature=0.7,25 top_p=0.9,26 do_sample=True,27 pad_token_id=tokenizer.pad_token_id
28)2930response = tokenizer.decode(outputs[0], skip_special_tokens=True)31print(response)
Using with PEFT
python
1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
34# Load base model5base_model = AutoModelForCausalLM.from_pretrained(6"microsoft/Phi-3-mini-4k-instruct",7 torch_dtype=torch.float16,8 device_map="auto"9)1011# Load LoRA adapter12model = PeftModel.from_pretrained(base_model,"Manas281/scheme-recommendation-model-2")13tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-4k-instruct")1415161718## 💡 Use Cases1920✅ **Government Planning Automation**- Automated scheme mapping for development projects
21✅ **Rural Development Systems**- AI-powered recommendation engines for gram panchayats
22✅ **E-Governance Assistants**- Chatbots for scheme information and guidance
23✅ **Educational Tools**- Training materials for public policy and administration
24✅ **Grant Application Systems**- Automated scheme identification for funding proposals
2526## 🎯 Major Government Schemes Covered2728### Infrastructure Schemes29-**Jal Jeevan Mission (JJM)**- Tap water connections
30-**Swachh Bharat Mission - Gramin (SBM-G)**- Sanitation and waste management
31-**Pradhan Mantri Gram Sadak Yojana (PMGSY)**- Rural roads
32-**Saubhagya Scheme**- Household electrification
33-**Integrated Child Development Services (ICDS)**- Anganwadi infrastructure
34-**Samagra Shiksha**- School infrastructure
35-**Common Service Centers (CSC)**- Digital infrastructure
3637### Individual/Household Schemes38-**Pradhan Mantri Awaas Yojana - Gramin (PMAY-G)**- Housing
39-**Pradhan Mantri Ujjwala Yojana (PMUY)**- LPG connections
40-**Ayushman Bharat (PM-JAY)**- Health insurance
41-**PM Jan Dhan Yojana (PMJDY)**- Bank accounts
42-**PM Suraksha Bima Yojana (PMSBY)**- Accident insurance
43-**PM Jeevan Jyoti Bima Yojana (PMJJBY)**- Life insurance
44-**National Social Assistance Programme (NSAP)**- Social pensions
45-**Pre-Matric and Post-Matric Scholarships**- SC student support
46-**PM Kaushal Vikas Yojana (PMKVY)**- Skill training
47-**DAY-NRLM**- Self-Help Groups and livelihoods
48-**Mahatma Gandhi NREGA**- Employment generation
49-**Soil Health Card Scheme**- Agricultural support
5051## ⚠️ Limitations52531.**Dataset Size**- Trained on 179 examples; coverage may be incomplete for edge cases
542.**Geographic Focus**- Primarily focused on Indian government schemes
553.**Output Repetition**- Model may occasionally generate repeated recommendations (requires post-processing)564.**JSON Parsing**- Some outputs may need cleaning to extract valid JSON
575.**Scheme Updates**- Does not reflect scheme changes after training cutoff date (2024)586.**Language**- Primarily English; limited Hindi understanding
5960## 🔮 Future Improvements6162-[] Expand dataset to 500+ examples covering more states and districts
63-[] Add scheme eligibility criteria and application procedures
64-[] Include budget allocation recommendations
65-[] Multi-language support (Hindi, regional languages)66-[] Integration with live scheme databases for real-time updates
67-[] Retrieval-Augmented Generation (RAG)for hybrid recommendations
68-[] State-specific scheme variants and customizations
69-[] Mobile-optimized version for field workers
7071## 🛠️ Technical Stack7273-**Framework:** Hugging Face Transformers + PEFT
74-**Base Model:** Microsoft Phi-3-mini-4k-instruct
75-**Training:** LoRA (Low-Rank Adaptation)76-**Quantization:**8-bit during training
77-**Hardware:** GPU (CUDA-enabled)78-**Languages:** Python
7980## 📄 Citation8182If you use this model in your research or applications, please cite:8384```bibtex
85@misc{scheme-recommendation-model-2024,86 author ={Manas Patil},87 title ={Government Scheme Recommendation Model},88 year ={2024},89 publisher ={Hugging Face},90 howpublished ={\url{https://huggingface.co/Manas281/scheme-recommendation-model-2}}91}