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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
-
- **License:** apache-2.0
|
| 17 |
-
- **Finetuned from model :** unsloth/gemma-3-4b-it-unsloth-bnb-4bit
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: unsloth/gemma-3-4b-it
|
| 4 |
tags:
|
|
|
|
|
|
|
|
|
|
| 5 |
- gemma3
|
| 6 |
+
- unsloth
|
| 7 |
+
- conversational
|
| 8 |
+
- education
|
| 9 |
+
- instruction-tuning
|
| 10 |
+
- question-answering
|
| 11 |
+
- bengali
|
| 12 |
+
- indian-universities
|
| 13 |
+
- trl
|
| 14 |
+
- sft
|
| 15 |
language:
|
| 16 |
- en
|
| 17 |
+
datasets:
|
| 18 |
+
- millat/indian_university_guidance_for_bangladeshi_students
|
| 19 |
+
metrics:
|
| 20 |
+
- perplexity
|
| 21 |
+
- loss
|
| 22 |
+
library_name: transformers
|
| 23 |
+
pipeline_tag: text-generation
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+
# Gemma-3-4B Indian University Guide for Bangladeshi Students
|
| 27 |
+
|
| 28 |
+
<div align="center">
|
| 29 |
+
<img src="https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo-with-title.png" width="200"/>
|
| 30 |
+
|
| 31 |
+
**A specialized educational counselor AI fine-tuned on 7,044 high-quality Q&A pairs**
|
| 32 |
+
|
| 33 |
+
[](https://opensource.org/licenses/Apache-2.0)
|
| 34 |
+
[](https://huggingface.co/google/gemma-3-4b-it)
|
| 35 |
+
[](https://huggingface.co/datasets/millat/indian_university_guidance_for_bangladeshi_students)
|
| 36 |
+
[](https://github.com/unslothai/unsloth)
|
| 37 |
+
</div>
|
| 38 |
+
|
| 39 |
+
---
|
| 40 |
+
|
| 41 |
+
## ๐ Model Description
|
| 42 |
+
|
| 43 |
+
**Gemma-3-4B Indian University Guide** is a fine-tuned Large Language Model specifically designed to assist Bangladeshi students in navigating the admission process for Indian universities. The model provides accurate, culturally-sensitive guidance on topics including:
|
| 44 |
+
|
| 45 |
+
- ๐ **Admissions Requirements** - Entry criteria, eligibility, and application processes
|
| 46 |
+
- ๐ **Documentation** - Required documents, equivalence certificates, and attestation
|
| 47 |
+
- ๐ฐ **Scholarships** - Merit-based scholarships, GPA requirements, and eligibility
|
| 48 |
+
- ๐ซ **University Information** - Programs, fees, accommodation, and facilities
|
| 49 |
+
- ๐ **Visa Guidance** - Student visa process, requirements, and timelines
|
| 50 |
+
- ๐ **Grade Conversion** - Bangladesh to India GPA/percentage equivalence
|
| 51 |
+
- ๐ **Lateral Entry** - Polytechnic diploma to B.Tech admission pathways
|
| 52 |
+
- ๐ฏ **Program Equivalence** - Degree recognition between Bangladesh and India
|
| 53 |
+
|
| 54 |
+
### Model Details
|
| 55 |
+
|
| 56 |
+
- **Developed by:** [MD Millat Hosen](https://huggingface.co/millat)
|
| 57 |
+
- **Model type:** Causal Language Model (Instruction-tuned)
|
| 58 |
+
- **Base Model:** [unsloth/gemma-3-4b-it](https://huggingface.co/unsloth/gemma-3-4b-it)
|
| 59 |
+
- **Language:** English
|
| 60 |
+
- **License:** Apache 2.0
|
| 61 |
+
- **Parameters:** 4 Billion
|
| 62 |
+
- **Fine-tuning Method:** QLoRA (Quantized Low-Rank Adaptation)
|
| 63 |
+
- **Training Framework:** Unsloth + HuggingFace TRL
|
| 64 |
+
- **Precision:** 16-bit (BF16)
|
| 65 |
+
- **Context Length:** 1024 tokens
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## ๐ฏ Intended Use
|
| 70 |
+
|
| 71 |
+
### Primary Use Cases
|
| 72 |
+
|
| 73 |
+
1. **Educational Counseling Chatbot** - Deploy as an AI assistant for Bangladeshi students seeking admission to Indian universities
|
| 74 |
+
2. **University Admission Support** - Provide instant, accurate answers about admission requirements, processes, and eligibility
|
| 75 |
+
3. **Scholarship Guidance** - Help students understand scholarship criteria and calculate their eligibility
|
| 76 |
+
4. **Document Preparation** - Guide students through required documentation and equivalence procedures
|
| 77 |
+
5. **Research Applications** - Academic research on instruction-tuned LLMs for specialized domains
|
| 78 |
+
|
| 79 |
+
### Target Users
|
| 80 |
+
|
| 81 |
+
- ๐ Bangladeshi students applying to Indian universities
|
| 82 |
+
- ๐ข Educational consultancy firms
|
| 83 |
+
- ๐ซ University admission offices
|
| 84 |
+
- ๐ Academic researchers in NLP and education technology
|
| 85 |
+
|
| 86 |
+
---
|
| 87 |
+
|
| 88 |
+
## ๐ Training Details
|
| 89 |
+
|
| 90 |
+
### Dataset
|
| 91 |
+
|
| 92 |
+
**Dataset:** [millat/indian_university_guidance_for_bangladeshi_students](https://huggingface.co/datasets/millat/indian_university_guidance_for_bangladeshi_students)
|
| 93 |
+
|
| 94 |
+
- **Size:** 7,044 instruction-formatted Q&A pairs
|
| 95 |
+
- **Format:** Question-Answer with context and metadata
|
| 96 |
+
- **Quality:** Multi-stage pipeline with deduplication and validation
|
| 97 |
+
- **Coverage:** Comprehensive guidance across 8 major topics
|
| 98 |
+
- **Cultural Sensitivity:** Designed specifically for Bangladesh-India educational context
|
| 99 |
+
|
| 100 |
+
**Data Split:**
|
| 101 |
+
- Training: 90% (6,340 examples)
|
| 102 |
+
- Validation: 10% (704 examples)
|
| 103 |
+
|
| 104 |
+
### Training Configuration
|
| 105 |
+
|
| 106 |
+
```python
|
| 107 |
+
Training Parameters:
|
| 108 |
+
- Epochs: 3
|
| 109 |
+
- Batch Size: 2 per device
|
| 110 |
+
- Gradient Accumulation Steps: 8
|
| 111 |
+
- Effective Batch Size: 16
|
| 112 |
+
- Learning Rate: 2e-5 (cosine schedule)
|
| 113 |
+
- Warmup Steps: 100
|
| 114 |
+
- Max Sequence Length: 1024 tokens
|
| 115 |
+
- Optimizer: AdamW 8-bit
|
| 116 |
+
- Weight Decay: 0.01
|
| 117 |
+
|
| 118 |
+
LoRA Configuration:
|
| 119 |
+
- Rank (r): 16
|
| 120 |
+
- Alpha: 16
|
| 121 |
+
- Target Modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
|
| 122 |
+
- Dropout: 0
|
| 123 |
+
- Bias: None
|
| 124 |
+
|
| 125 |
+
Hardware:
|
| 126 |
+
- GPU: NVIDIA T4 (Google Colab)
|
| 127 |
+
- Training Time: ~45 minutes
|
| 128 |
+
- Speed: 2x faster with Unsloth optimizations
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
### Training Results
|
| 132 |
+
|
| 133 |
+
| Metric | Value | Assessment |
|
| 134 |
+
|--------|-------|------------|
|
| 135 |
+
| **Final Training Loss** | 0.593 | Excellent |
|
| 136 |
+
| **Validation Loss** | 0.614 | Excellent |
|
| 137 |
+
| **Perplexity** | 1.85 | Excellent |
|
| 138 |
+
| **Improvement vs Base** | 38% | Strong |
|
| 139 |
+
| **Trainable Parameters** | 83.9M (2.09%) | Efficient |
|
| 140 |
+
|
| 141 |
+
**Training Notebook:** [Google Colab](https://colab.research.google.com/drive/1rmH5p_PtlTlLaakc_Fmlb0jXxGvI3tAJ?usp=sharing)
|
| 142 |
+
|
| 143 |
+
---
|
| 144 |
+
|
| 145 |
+
## ๐ How to Use
|
| 146 |
+
|
| 147 |
+
### Installation
|
| 148 |
+
|
| 149 |
+
```bash
|
| 150 |
+
pip install unsloth transformers accelerate peft bitsandbytes
|
| 151 |
+
```
|
| 152 |
+
|
| 153 |
+
### Basic Inference
|
| 154 |
+
|
| 155 |
+
```python
|
| 156 |
+
from unsloth import FastLanguageModel
|
| 157 |
+
import torch
|
| 158 |
+
|
| 159 |
+
# Load model and tokenizer
|
| 160 |
+
model, tokenizer = FastLanguageModel.from_pretrained(
|
| 161 |
+
model_name="millat/gemma4b-indian-university-guide-16bit",
|
| 162 |
+
max_seq_length=1024,
|
| 163 |
+
dtype=None, # Auto-detect
|
| 164 |
+
load_in_4bit=True, # Use 4-bit quantization for efficiency
|
| 165 |
+
)
|
| 166 |
+
|
| 167 |
+
# Prepare for inference
|
| 168 |
+
FastLanguageModel.for_inference(model)
|
| 169 |
+
|
| 170 |
+
# Format your question
|
| 171 |
+
question = "What documents do I need to apply to Indian universities from Bangladesh?"
|
| 172 |
+
|
| 173 |
+
# Create prompt in Gemma3 format
|
| 174 |
+
prompt = f"<start_of_turn>user\n{question}<end_of_turn>\n<start_of_turn>model\n"
|
| 175 |
+
|
| 176 |
+
# Tokenize
|
| 177 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 178 |
+
|
| 179 |
+
# Generate response
|
| 180 |
+
outputs = model.generate(
|
| 181 |
+
**inputs,
|
| 182 |
+
max_new_tokens=256,
|
| 183 |
+
temperature=0.7,
|
| 184 |
+
top_p=0.9,
|
| 185 |
+
top_k=50,
|
| 186 |
+
repetition_penalty=1.2,
|
| 187 |
+
do_sample=True,
|
| 188 |
+
pad_token_id=tokenizer.eos_token_id,
|
| 189 |
+
eos_token_id=tokenizer.eos_token_id,
|
| 190 |
+
)
|
| 191 |
+
|
| 192 |
+
# Decode and print
|
| 193 |
+
response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
|
| 194 |
+
print(response)
|
| 195 |
+
```
|
| 196 |
+
|
| 197 |
+
### Advanced Usage with Streaming
|
| 198 |
+
|
| 199 |
+
```python
|
| 200 |
+
from transformers import TextStreamer
|
| 201 |
+
|
| 202 |
+
# Create streamer for real-time output
|
| 203 |
+
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
|
| 204 |
+
|
| 205 |
+
# Generate with streaming
|
| 206 |
+
outputs = model.generate(
|
| 207 |
+
**inputs,
|
| 208 |
+
max_new_tokens=256,
|
| 209 |
+
temperature=0.7,
|
| 210 |
+
top_p=0.9,
|
| 211 |
+
streamer=streamer, # Enable streaming
|
| 212 |
+
)
|
| 213 |
+
```
|
| 214 |
+
|
| 215 |
+
### Batch Inference
|
| 216 |
+
|
| 217 |
+
```python
|
| 218 |
+
questions = [
|
| 219 |
+
"Can I get a scholarship at Sharda University with a GPA of 3.5?",
|
| 220 |
+
"What is the admission process for Bangladeshi students?",
|
| 221 |
+
"Am I eligible for lateral entry with a Polytechnic diploma?"
|
| 222 |
+
]
|
| 223 |
+
|
| 224 |
+
for question in questions:
|
| 225 |
+
prompt = f"<start_of_turn>user\n{question}<end_of_turn>\n<start_of_turn>model\n"
|
| 226 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 227 |
+
|
| 228 |
+
outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.7)
|
| 229 |
+
response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
|
| 230 |
+
|
| 231 |
+
print(f"Q: {question}")
|
| 232 |
+
print(f"A: {response}\n")
|
| 233 |
+
```
|
| 234 |
+
|
| 235 |
+
### API Integration Example (Flask)
|
| 236 |
+
|
| 237 |
+
```python
|
| 238 |
+
from flask import Flask, request, jsonify
|
| 239 |
+
from unsloth import FastLanguageModel
|
| 240 |
+
|
| 241 |
+
app = Flask(__name__)
|
| 242 |
+
|
| 243 |
+
# Load model once at startup
|
| 244 |
+
model, tokenizer = FastLanguageModel.from_pretrained(
|
| 245 |
+
model_name="millat/gemma4b-indian-university-guide-16bit",
|
| 246 |
+
max_seq_length=1024,
|
| 247 |
+
load_in_4bit=True,
|
| 248 |
+
)
|
| 249 |
+
FastLanguageModel.for_inference(model)
|
| 250 |
+
|
| 251 |
+
@app.route('/ask', methods=['POST'])
|
| 252 |
+
def ask():
|
| 253 |
+
data = request.json
|
| 254 |
+
question = data.get('question', '')
|
| 255 |
+
|
| 256 |
+
prompt = f"<start_of_turn>user\n{question}<end_of_turn>\n<start_of_turn>model\n"
|
| 257 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 258 |
+
|
| 259 |
+
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)
|
| 260 |
+
response = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
|
| 261 |
+
|
| 262 |
+
return jsonify({'answer': response})
|
| 263 |
+
|
| 264 |
+
if __name__ == '__main__':
|
| 265 |
+
app.run(host='0.0.0.0', port=5000)
|
| 266 |
+
```
|
| 267 |
+
|
| 268 |
+
---
|
| 269 |
+
|
| 270 |
+
## ๐ Performance Evaluation
|
| 271 |
+
|
| 272 |
+
### Comprehensive Testing Results
|
| 273 |
+
|
| 274 |
+
The model underwent extensive evaluation across 5 dimensions:
|
| 275 |
+
|
| 276 |
+
| Test Category | Metric | Score | Grade |
|
| 277 |
+
|--------------|--------|-------|-------|
|
| 278 |
+
| **Factual Accuracy** | Correctness | 87.5% | A+ โญโญโญ |
|
| 279 |
+
| **Topic Coverage** | Domain Coverage | 100% | A+ โญโญโญ |
|
| 280 |
+
| **Consistency** | Response Stability | 80% | A โญโญ |
|
| 281 |
+
| **Response Quality** | Coherence & Length | High (ฯ=8.5) | A+ โญโญโญ |
|
| 282 |
+
| **Overall Performance** | Weighted Average | 93.5% | A+ โญโญโญ |
|
| 283 |
+
|
| 284 |
+
**Status:** โ
**PRODUCTION READY**
|
| 285 |
+
|
| 286 |
+
### Example Outputs
|
| 287 |
+
|
| 288 |
+
#### Example 1: Scholarship Query
|
| 289 |
+
|
| 290 |
+
**Input:**
|
| 291 |
+
```
|
| 292 |
+
Can I get a scholarship at Sharda University with a GPA of 3.5?
|
| 293 |
+
```
|
| 294 |
+
|
| 295 |
+
**Output:**
|
| 296 |
+
```
|
| 297 |
+
Yes, you are eligible for a 50% scholarship on tuition fees at Sharda University!
|
| 298 |
+
With a GPA of 3.5 out of 5.0 (equivalent to 70% or CGPA 7.0/10 in India), you
|
| 299 |
+
qualify for the 50% scholarship tier. This scholarship is available for eligible
|
| 300 |
+
engineering programs like B.Tech (which is equivalent to B.Sc. Engineering in
|
| 301 |
+
Bangladesh). To maintain the scholarship from the second year onwards, you must:
|
| 302 |
+
1) Pass all exams without any backlogs
|
| 303 |
+
2) Maintain at least 75% attendance
|
| 304 |
+
The scholarship covers 50% of your tuition fees throughout your program duration.
|
| 305 |
+
```
|
| 306 |
+
|
| 307 |
+
#### Example 2: Lateral Entry
|
| 308 |
+
|
| 309 |
+
**Input:**
|
| 310 |
+
```
|
| 311 |
+
Am I eligible for lateral entry with a Polytechnic diploma?
|
| 312 |
+
```
|
| 313 |
+
|
| 314 |
+
**Output:**
|
| 315 |
+
```
|
| 316 |
+
Yes, you are eligible for lateral entry into the second year of B.Tech/B.E.
|
| 317 |
+
programs in India with your Polytechnic Diploma from Bangladesh. Your 4-year
|
| 318 |
+
diploma after SSC is recognized for direct admission to the second year. Make
|
| 319 |
+
sure the Indian university's B.Tech program is AICTE-approved to ensure your
|
| 320 |
+
degree is recognized in Bangladesh. You'll need to provide your diploma
|
| 321 |
+
certificate, transcripts, and equivalence certificate from the Bangladesh
|
| 322 |
+
Technical Education Board (BTEB) for the admission process.
|
| 323 |
+
```
|
| 324 |
+
|
| 325 |
+
#### Example 3: Document Requirements
|
| 326 |
+
|
| 327 |
+
**Input:**
|
| 328 |
+
```
|
| 329 |
+
What documents do I need to apply to Indian universities from Bangladesh?
|
| 330 |
+
```
|
| 331 |
+
|
| 332 |
+
**Output:**
|
| 333 |
+
```
|
| 334 |
+
For applying to Indian universities from Bangladesh, you'll need:
|
| 335 |
+
|
| 336 |
+
1. Academic Documents:
|
| 337 |
+
- HSC Certificate and Mark Sheet
|
| 338 |
+
- SSC Certificate and Mark Sheet
|
| 339 |
+
- Academic transcripts for all years
|
| 340 |
+
|
| 341 |
+
2. Identification:
|
| 342 |
+
- Valid passport
|
| 343 |
+
- Recent passport-size photographs
|
| 344 |
+
|
| 345 |
+
3. Equivalence Certificate:
|
| 346 |
+
- From Bangladesh Ministry of Education or UGC
|
| 347 |
+
- Shows your qualifications are equivalent to Indian standards
|
| 348 |
+
|
| 349 |
+
4. Additional Documents:
|
| 350 |
+
- Transfer Certificate (TC) from your last institution
|
| 351 |
+
- Character Certificate
|
| 352 |
+
- Medical fitness certificate
|
| 353 |
+
- Gap certificate (if applicable)
|
| 354 |
+
|
| 355 |
+
All documents should be attested by the Bangladesh Ministry of Foreign Affairs
|
| 356 |
+
and the Indian High Commission in Dhaka for visa purposes.
|
| 357 |
+
```
|
| 358 |
+
|
| 359 |
+
---
|
| 360 |
+
|
| 361 |
+
## โ๏ธ Model Architecture
|
| 362 |
+
|
| 363 |
+
### Base Model: Gemma-3-4B-IT
|
| 364 |
+
|
| 365 |
+
- **Architecture:** Decoder-only Transformer
|
| 366 |
+
- **Attention:** Multi-head attention with rotary positional embeddings
|
| 367 |
+
- **Activation:** GeGLU
|
| 368 |
+
- **Normalization:** RMSNorm
|
| 369 |
+
- **Vocabulary Size:** 256,000 tokens
|
| 370 |
+
- **Hidden Size:** 2,560
|
| 371 |
+
- **Intermediate Size:** 15,360
|
| 372 |
+
- **Number of Layers:** 26
|
| 373 |
+
- **Attention Heads:** 16
|
| 374 |
+
- **Key-Value Heads:** 4 (Grouped-Query Attention)
|
| 375 |
+
|
| 376 |
+
### LoRA Adaptations
|
| 377 |
+
|
| 378 |
+
Fine-tuning was performed using QLoRA with the following adapter configuration:
|
| 379 |
+
|
| 380 |
+
```python
|
| 381 |
+
LoRA Config:
|
| 382 |
+
- Target Modules: [q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj]
|
| 383 |
+
- Rank (r): 16
|
| 384 |
+
- Alpha: 16
|
| 385 |
+
- Dropout: 0.0
|
| 386 |
+
- Task Type: Causal Language Modeling
|
| 387 |
+
- Trainable Parameters: 83,886,080 (2.09% of total)
|
| 388 |
+
- Total Parameters: 4,013,133,568
|
| 389 |
+
```
|
| 390 |
+
|
| 391 |
+
---
|
| 392 |
+
|
| 393 |
+
## ๐ก Prompt Format
|
| 394 |
+
|
| 395 |
+
The model is trained using the **Gemma3 Chat Template**:
|
| 396 |
+
|
| 397 |
+
```
|
| 398 |
+
<start_of_turn>user
|
| 399 |
+
{Your question here}<end_of_turn>
|
| 400 |
+
<start_of_turn>model
|
| 401 |
+
{Model's response}<end_of_turn>
|
| 402 |
+
```
|
| 403 |
+
|
| 404 |
+
**Important:** Always use this format for optimal performance. The tokenizer's `apply_chat_template()` method handles this automatically.
|
| 405 |
+
|
| 406 |
+
---
|
| 407 |
+
|
| 408 |
+
## ๐ง Technical Specifications
|
| 409 |
+
|
| 410 |
+
### Memory Requirements
|
| 411 |
+
|
| 412 |
+
| Precision | Memory Usage | Inference Speed |
|
| 413 |
+
|-----------|--------------|-----------------|
|
| 414 |
+
| 16-bit (BF16) | ~8 GB VRAM | Baseline |
|
| 415 |
+
| 8-bit | ~4 GB VRAM | 1.2x faster |
|
| 416 |
+
| 4-bit (NF4) | ~2.5 GB VRAM | 2x faster |
|
| 417 |
+
|
| 418 |
+
**Recommended:** Use 4-bit quantization for deployment (load_in_4bit=True)
|
| 419 |
+
|
| 420 |
+
### Generation Parameters
|
| 421 |
+
|
| 422 |
+
For optimal results, use these parameters:
|
| 423 |
+
|
| 424 |
+
```python
|
| 425 |
+
generation_config = {
|
| 426 |
+
"max_new_tokens": 200-256, # Adjust based on expected answer length
|
| 427 |
+
"temperature": 0.7, # 0.3 for factual, 0.7 for conversational
|
| 428 |
+
"top_p": 0.9, # Nucleus sampling
|
| 429 |
+
"top_k": 50, # Top-k sampling
|
| 430 |
+
"repetition_penalty": 1.2, # Prevent repetition
|
| 431 |
+
"no_repeat_ngram_size": 3, # Block repeated 3-grams
|
| 432 |
+
"do_sample": True, # Enable sampling
|
| 433 |
+
"early_stopping": True, # Stop at EOS token
|
| 434 |
+
}
|
| 435 |
+
```
|
| 436 |
+
|
| 437 |
+
---
|
| 438 |
+
|
| 439 |
+
## โ ๏ธ Limitations
|
| 440 |
+
|
| 441 |
+
### Known Limitations
|
| 442 |
+
|
| 443 |
+
1. **Temporal Knowledge Cutoff** - Information is based on data collected at a specific point in time (October 2025) and may become outdated as university policies change.
|
| 444 |
+
|
| 445 |
+
2. **Scope Limitation** - The model is specialized for Bangladeshi students applying to Indian universities. It may not generalize well to:
|
| 446 |
+
- Other countries' education systems
|
| 447 |
+
- General-purpose conversational tasks
|
| 448 |
+
- Non-educational domains
|
| 449 |
+
|
| 450 |
+
3. **Factual Accuracy** - While the model achieves 87.5% factual accuracy, always verify critical information (fees, deadlines, requirements) with official university sources.
|
| 451 |
+
|
| 452 |
+
4. **University Coverage** - The dataset focuses on major Indian universities accepting Bangladeshi students. Smaller or newer institutions may have limited coverage.
|
| 453 |
+
|
| 454 |
+
5. **Language** - The model operates in English only. It does not support Bengali/Bangla language queries.
|
| 455 |
+
|
| 456 |
+
6. **Hallucination Risk** - Like all LLMs, the model may occasionally generate plausible-sounding but incorrect information. Use with appropriate supervision.
|
| 457 |
+
|
| 458 |
+
### Ethical Considerations
|
| 459 |
+
|
| 460 |
+
- **Advisory Role Only** - This model should supplement, not replace, professional educational counseling.
|
| 461 |
+
- **Verification Required** - Students should verify all information with official university websites before making decisions.
|
| 462 |
+
- **Cultural Sensitivity** - The model is designed with cultural awareness but may not capture all nuances of individual circumstances.
|
| 463 |
+
- **Bias Awareness** - The model reflects the biases present in the training data and base model.
|
| 464 |
+
|
| 465 |
+
---
|
| 466 |
+
|
| 467 |
+
## ๐ Citation
|
| 468 |
+
|
| 469 |
+
If you use this model in your research or applications, please cite:
|
| 470 |
+
|
| 471 |
+
```bibtex
|
| 472 |
+
@misc{millat2025gemma4b_indian_university_guide,
|
| 473 |
+
author = {MD Millat Hosen and Md Moudud Ahmed Misil and Dr. Rohit Kumar Sachan},
|
| 474 |
+
title = {Gemma-3-4B Indian University Guide for Bangladeshi Students},
|
| 475 |
+
year = {2025},
|
| 476 |
+
publisher = {HuggingFace},
|
| 477 |
+
journal = {HuggingFace Model Hub},
|
| 478 |
+
howpublished = {\url{https://huggingface.co/millat/gemma4b-indian-university-guide-16bit}},
|
| 479 |
+
}
|
| 480 |
+
```
|
| 481 |
+
|
| 482 |
+
**Dataset Citation:**
|
| 483 |
+
```bibtex
|
| 484 |
+
@misc{md_millat_hosen_2025,
|
| 485 |
+
author = {MD Millat Hosen and Md Moudud Ahmed Misil and Dr. Rohit Kumar Sachan},
|
| 486 |
+
title = {indian_university_guidance_for_bangladeshi_students},
|
| 487 |
+
year = {2025},
|
| 488 |
+
url = {https://huggingface.co/datasets/millat/indian_university_guidance_for_bangladeshi_students},
|
| 489 |
+
doi = {10.57967/hf/6295},
|
| 490 |
+
publisher = {Hugging Face}
|
| 491 |
+
}
|
| 492 |
+
```
|
| 493 |
+
|
| 494 |
+
---
|
| 495 |
+
|
| 496 |
+
## ๐ค Contributing
|
| 497 |
+
|
| 498 |
+
We welcome contributions to improve this model! Areas for contribution:
|
| 499 |
+
|
| 500 |
+
- ๐ **Dataset Expansion** - Add more universities, update policies, expand coverage
|
| 501 |
+
- ๐งช **Evaluation** - Conduct additional testing and provide feedback
|
| 502 |
+
- ๐ **Bug Reports** - Report issues or incorrect responses
|
| 503 |
+
- ๐ **Documentation** - Improve usage guides and examples
|
| 504 |
+
- ๐ **Deployment** - Share deployment experiences and best practices
|
| 505 |
+
|
| 506 |
+
---
|
| 507 |
+
|
| 508 |
+
## ๐ Contact & Support
|
| 509 |
+
|
| 510 |
+
- **Model Author:** [MD Millat Hosen](https://huggingface.co/millat)
|
| 511 |
+
- **Issues:** Report on HuggingFace Model Hub
|
| 512 |
+
- **Updates:** Follow for model updates and improvements
|
| 513 |
+
|
| 514 |
+
---
|
| 515 |
+
|
| 516 |
+
## ๐ Acknowledgments
|
| 517 |
+
|
| 518 |
+
- **Google DeepMind** - For the excellent Gemma-3-4B base model
|
| 519 |
+
- **Unsloth AI** - For 2x faster training optimizations
|
| 520 |
+
- **HuggingFace** - For the Transformers library and model hosting
|
| 521 |
+
- **TRL Team** - For Supervised Fine-Tuning utilities
|
| 522 |
+
- **Research Supervisor** - Dr. Rohit Kumar Sachan
|
| 523 |
+
- **Team Member** - Md Moudud Ahmed Misil
|
| 524 |
+
|
| 525 |
+
---
|
| 526 |
+
|
| 527 |
+
## ๐ License
|
| 528 |
+
|
| 529 |
+
This model is released under the **Apache 2.0 License**, inherited from the base Gemma-3-4B model.
|
| 530 |
+
|
| 531 |
+
- โ
Commercial use allowed
|
| 532 |
+
- โ
Modification allowed
|
| 533 |
+
- โ
Distribution allowed
|
| 534 |
+
- โ
Private use allowed
|
| 535 |
+
- โ ๏ธ Must include license and copyright notice
|
| 536 |
+
- โ ๏ธ Must state changes made
|
| 537 |
+
|
| 538 |
+
---
|
| 539 |
+
|
| 540 |
+
## ๐ Related Resources
|
| 541 |
+
|
| 542 |
+
- ๐ **Dataset:** [indian_university_guidance_for_bangladeshi_students](https://huggingface.co/datasets/millat/indian_university_guidance_for_bangladeshi_students)
|
| 543 |
+
- ๐ค **Base Model:** [unsloth/gemma-3-4b-it](https://huggingface.co/unsloth/gemma-3-4b-it)
|
| 544 |
+
- ๐ **Training Notebook:** [Google Colab](https://colab.research.google.com/drive/1rmH5p_PtlTlLaakc_Fmlb0jXxGvI3tAJ?usp=sharing)
|
| 545 |
+
- ๐ง **Unsloth Library:** [GitHub](https://github.com/unslothai/unsloth)
|
| 546 |
+
- ๐ **Documentation:** [Unsloth Docs](https://docs.unsloth.ai/)
|
| 547 |
+
|
| 548 |
---
|
| 549 |
|
| 550 |
+
<div align="center">
|
| 551 |
+
|
| 552 |
+
**๐ Empowering Bangladeshi Students to Achieve Their Dreams in India ๐ง๐ฉ ๐ค ๐ฎ๐ณ**
|
| 553 |
|
| 554 |
+
*Built with โค๏ธ using Unsloth + HuggingFace*
|
|
|
|
|
|
|
| 555 |
|
| 556 |
+
[](https://huggingface.co/millat/gemma4b-indian-university-guide-16bit)
|
| 557 |
+
[](https://huggingface.co/datasets/millat/indian_university_guidance_for_bangladeshi_students)
|
| 558 |
+
[](https://colab.research.google.com/drive/1rmH5p_PtlTlLaakc_Fmlb0jXxGvI3tAJ?usp=sharing)
|
| 559 |
|
| 560 |
+
</div>
|