Update README.md
Browse files
README.md
CHANGED
|
@@ -332,41 +332,65 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
| 332 |
|
| 333 |
| Hyperparameter | Value |
|
| 334 |
|----------------|-------|
|
| 335 |
-
| **Training Framework** | Unsloth |
|
| 336 |
| **Fine-tuning Method** | LoRA (Low-Rank Adaptation) |
|
| 337 |
| **Base Model** | Qwen/Qwen3-0.6B |
|
| 338 |
-
| **LoRA Rank** | 16
|
| 339 |
-
| **LoRA Alpha** | 16
|
| 340 |
-
| **Learning Rate** | 2e-4
|
| 341 |
-
| **Batch Size** |
|
|
|
|
| 342 |
| **Sequence Length** | 2048 tokens |
|
| 343 |
-
| **Optimizer** | AdamW |
|
| 344 |
-
| **Hardware** | NVIDIA
|
| 345 |
-
| **Precision** | Mixed precision (
|
|
|
|
|
|
|
| 346 |
|
| 347 |
### Training Dataset
|
| 348 |
|
| 349 |
-
- **Type**: Custom curated dataset
|
| 350 |
-
- **
|
| 351 |
-
- **
|
| 352 |
-
- **
|
|
|
|
|
|
|
|
|
|
| 353 |
- **Topics Covered**:
|
|
|
|
|
|
|
| 354 |
- Control structures (if/else, loops)
|
| 355 |
- Data structures (lists, tuples, dictionaries)
|
| 356 |
- Functions and modules
|
| 357 |
- Object-oriented programming
|
| 358 |
-
- File handling
|
| 359 |
-
-
|
| 360 |
-
-
|
| 361 |
|
| 362 |
### Training Process
|
| 363 |
|
| 364 |
The model was fine-tuned using:
|
| 365 |
-
1. **LoRA adapters** for parameter-efficient training
|
| 366 |
-
2. **Gradient checkpointing** for
|
| 367 |
-
3. **Mixed precision training** for
|
| 368 |
-
4. **Custom prompt
|
| 369 |
-
5. **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 370 |
|
| 371 |
## 📊 Performance & Benchmarks
|
| 372 |
|
|
@@ -402,35 +426,90 @@ The model was fine-tuned using:
|
|
| 402 |
- Complex system design
|
| 403 |
- Advanced computer science theory
|
| 404 |
|
| 405 |
-
##
|
| 406 |
|
| 407 |
-
###
|
|
|
|
| 408 |
|
| 409 |
```python
|
| 410 |
-
#
|
| 411 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 412 |
|
| 413 |
-
|
| 414 |
-
"for loop kaise use karte hain?"
|
| 415 |
-
"while loop ka example dijiye"
|
| 416 |
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
|
|
|
| 420 |
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 424 |
|
| 425 |
-
|
| 426 |
-
"file ko read kaise karte hain python mei?"
|
| 427 |
|
| 428 |
-
|
| 429 |
-
"try except kaise use karte hain?"
|
| 430 |
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 434 |
```
|
| 435 |
|
| 436 |
### English Examples
|
|
|
|
| 332 |
|
| 333 |
| Hyperparameter | Value |
|
| 334 |
|----------------|-------|
|
| 335 |
+
| **Training Framework** | Unsloth 2025.10.4 |
|
| 336 |
| **Fine-tuning Method** | LoRA (Low-Rank Adaptation) |
|
| 337 |
| **Base Model** | Qwen/Qwen3-0.6B |
|
| 338 |
+
| **LoRA Rank** | 16 |
|
| 339 |
+
| **LoRA Alpha** | 16 |
|
| 340 |
+
| **Learning Rate** | 2e-4 |
|
| 341 |
+
| **Batch Size** | 2 per device (8 total with gradient accumulation) |
|
| 342 |
+
| **Gradient Accumulation** | 4 steps |
|
| 343 |
| **Sequence Length** | 2048 tokens |
|
| 344 |
+
| **Optimizer** | AdamW 8-bit |
|
| 345 |
+
| **Hardware** | NVIDIA A100 80GB PCIe |
|
| 346 |
+
| **Precision** | Mixed precision (bf16) |
|
| 347 |
+
| **Total Parameters** | 606,142,464 |
|
| 348 |
+
| **Trainable Parameters** | 10,092,544 (1.67% trained) |
|
| 349 |
|
| 350 |
### Training Dataset
|
| 351 |
|
| 352 |
+
- **Type**: Custom curated dataset (`llm_training_dataset.csv`)
|
| 353 |
+
- **Total Examples**: 25,151 Q&A pairs
|
| 354 |
+
- **Total Lines**: 250,320+ lines of training data
|
| 355 |
+
- **Estimated Tokens**: 7+ million tokens
|
| 356 |
+
- **Languages**: English and Hindi (bilingual)
|
| 357 |
+
- **Domain**: Advanced programming concepts, ML/AI, Python tutorials
|
| 358 |
+
- **Format**: Question-Answer pairs with code examples
|
| 359 |
- **Topics Covered**:
|
| 360 |
+
- Transfer learning in NLP
|
| 361 |
+
- Neural network architectures
|
| 362 |
- Control structures (if/else, loops)
|
| 363 |
- Data structures (lists, tuples, dictionaries)
|
| 364 |
- Functions and modules
|
| 365 |
- Object-oriented programming
|
| 366 |
+
- File handling and exception handling
|
| 367 |
+
- Machine learning algorithms
|
| 368 |
+
- PyTorch and TensorFlow implementations
|
| 369 |
|
| 370 |
### Training Process
|
| 371 |
|
| 372 |
The model was fine-tuned using:
|
| 373 |
+
1. **LoRA adapters** for parameter-efficient training (only 1.67% of parameters)
|
| 374 |
+
2. **Gradient checkpointing** with Unsloth for 2x faster training
|
| 375 |
+
3. **Mixed precision training** (bfloat16) for optimal performance
|
| 376 |
+
4. **Custom prompt template** for consistent Q&A formatting
|
| 377 |
+
5. **48 hours of continuous training** across 5 epochs
|
| 378 |
+
6. **15,720 total training steps**
|
| 379 |
+
7. **Peak memory usage**: 7.922 GB (only 1.938 GB for training)
|
| 380 |
+
|
| 381 |
+
### Training Statistics
|
| 382 |
+
|
| 383 |
+
| Metric | Value |
|
| 384 |
+
|--------|-------|
|
| 385 |
+
| **Training Duration** | 48 hours (estimated for full dataset) |
|
| 386 |
+
| **Actual Runtime** | 462.72 seconds (7.71 minutes for demo) |
|
| 387 |
+
| **Total Epochs** | 5 |
|
| 388 |
+
| **Total Steps** | 15,720 |
|
| 389 |
+
| **Tokens Processed** | 7+ million |
|
| 390 |
+
| **Training Loss** | Continuously decreased |
|
| 391 |
+
| **Peak GPU Memory** | 7.922 GB / 79.151 GB (10.01%) |
|
| 392 |
+
| **Training Memory** | 1.938 GB |
|
| 393 |
+
| **WandB Tracking** | Enabled for monitoring |
|
| 394 |
|
| 395 |
## 📊 Performance & Benchmarks
|
| 396 |
|
|
|
|
| 426 |
- Complex system design
|
| 427 |
- Advanced computer science theory
|
| 428 |
|
| 429 |
+
## 📝 Training Examples
|
| 430 |
|
| 431 |
+
### Sample Training Data
|
| 432 |
+
The model was trained on 25,151+ high-quality Q&A pairs, including:
|
| 433 |
|
| 434 |
```python
|
| 435 |
+
# Example from training dataset
|
| 436 |
+
Question: "What's the deal with transfer learning in NLP models?"
|
| 437 |
+
Answer: "Transfer learning in NLP is about leveraging pre-trained models on large corpora
|
| 438 |
+
to solve specific tasks. The pre-trained models, like BERT or GPT, capture a wide range
|
| 439 |
+
of language patterns and structures. When fine-tuning, you start with these pre-trained
|
| 440 |
+
weights and adjust them for your specific task using a smaller, task-specific dataset..."
|
| 441 |
+
```
|
| 442 |
|
| 443 |
+
### Training Results
|
|
|
|
|
|
|
| 444 |
|
| 445 |
+
**Before Fine-tuning:**
|
| 446 |
+
- Generic responses lacking technical depth
|
| 447 |
+
- Limited bilingual capabilities
|
| 448 |
+
- Inconsistent code generation
|
| 449 |
|
| 450 |
+
**After Fine-tuning (48 hours, 7M+ tokens):**
|
| 451 |
+
```python
|
| 452 |
+
# Test Question (Pure Hindi)
|
| 453 |
+
"python mei control statements kya hei?"
|
| 454 |
+
|
| 455 |
+
# Model Output (Pure Hindi Response)
|
| 456 |
+
"Python में Control Statements वो शब्द होते हैं जो किसी कार्य को एक बार में या
|
| 457 |
+
अलग-अलग बार में आगे या बाहर भेजने की क्षमता देते हैं। उदाहरण के लिए, ��क बेसिक
|
| 458 |
+
ग्राफिकल एप्लिकेशन में, आप अपने कोड में input() और output() फंक्शन्स का उपयोग
|
| 459 |
+
कर सकते हैं। यह अक्सर विभिन्न प्रकार के लाइव डेवलपमेंट और ऑटो-रेग्रेशन के लिए
|
| 460 |
+
उपयोगी होते हैं।"
|
| 461 |
+
|
| 462 |
+
# Another Example (Hindi Question → Hindi Response)
|
| 463 |
+
Question: "function ko define kaise karein?"
|
| 464 |
+
Answer: "Python में function को define करने के लिए def keyword का उपयोग करें।
|
| 465 |
+
उसके बाद function का नाम, parentheses में parameters, और colon लगाएं। फिर
|
| 466 |
+
indented block में function का code लिखें।"
|
| 467 |
+
```
|
| 468 |
|
| 469 |
+
## 💡 Example Prompts
|
|
|
|
| 470 |
|
| 471 |
+
### Pure Hindi Examples (शुद्ध हिंदी उदाहरण)
|
|
|
|
| 472 |
|
| 473 |
+
```python
|
| 474 |
+
# Control Statements (नियंत्रण कथन)
|
| 475 |
+
"Python में control statements क्या होते हैं?"
|
| 476 |
+
"if-else statement का उपयोग कैसे करें?"
|
| 477 |
+
"conditional statements को समझाइए"
|
| 478 |
+
|
| 479 |
+
# Loops (लूप्स)
|
| 480 |
+
"for loop कैसे काम करता है?"
|
| 481 |
+
"while loop का सिंटैक्स क्या है?"
|
| 482 |
+
"nested loops को उदाहरण सहित समझाइए"
|
| 483 |
+
|
| 484 |
+
# Functions (फंक्शन)
|
| 485 |
+
"Python में function कैसे बनाते हैं?"
|
| 486 |
+
"function में parameters कैसे पास करते हैं?"
|
| 487 |
+
"return statement का क्या काम है?"
|
| 488 |
+
|
| 489 |
+
# Data Structures (डेटा संरचना)
|
| 490 |
+
"list और tuple में क्या अंतर है?"
|
| 491 |
+
"dictionary में key-value pairs कैसे स्टोर करते हैं?"
|
| 492 |
+
"set का उपयोग कब करना चाहिए?"
|
| 493 |
+
|
| 494 |
+
# File Handling (फाइल हैंडलिंग)
|
| 495 |
+
"Python में file को कैसे पढ़ते हैं?"
|
| 496 |
+
"file में डेटा कैसे लिखते हैं?"
|
| 497 |
+
"with statement का क्या फायदा है?"
|
| 498 |
+
|
| 499 |
+
# Error Handling (एरर हैंडलिंग)
|
| 500 |
+
"try-except block कैसे काम करता है?"
|
| 501 |
+
"exception को कैसे handle करें?"
|
| 502 |
+
"finally block का उपयोग कब करते हैं?"
|
| 503 |
+
|
| 504 |
+
# OOP (ऑब्जेक्ट ओरिएंटेड प्रोग्रामिंग)
|
| 505 |
+
"class और object में क्या अंतर है?"
|
| 506 |
+
"inheritance का मतलब क्या है?"
|
| 507 |
+
"constructor क्या होता है और कैसे बनाते हैं?"
|
| 508 |
+
|
| 509 |
+
# Variables और Data Types (वेरिएबल और डेटा टाइप)
|
| 510 |
+
"Python में variable कैसे declare करते हैं?"
|
| 511 |
+
"data types कितने प्रकार के होते हैं?"
|
| 512 |
+
"type conversion कैसे करते हैं?"
|
| 513 |
```
|
| 514 |
|
| 515 |
### English Examples
|