help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
question-answering
/
examples
RSK World
question-answering
Question Answering Dataset - Question Answering + Reading Comprehension + SQuAD Format + NLP
examples
  • README.md2.4 KB
  • bert_example.py4.3 KB
  • gpt_example.py4.3 KB
  • transformers_example.py6 KB
json.goLICENSESidebarEnhanced.jssetup.cpython-313.pycsample_001.jsonREADME.md
LICENSE
Raw Download
Find: Go to:
/*
    Project: Question Answering Dataset
    Description: A dataset containing context passages, questions, and answers for training QA models and reading comprehension systems.
    Author: Molla Samser
    Website: https://rskworld.in
    Contact: help@rskworld.in
    Phone: +91 93305 39277
*/

MIT License

Copyright (c) 2025 RSK World (Molla Samser)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

32 lines•1.4 KB
text
examples/README.md
Raw Download

README.md

<!--
Project: Question Answering Dataset
Description: A dataset containing context passages, questions, and answers for training QA models and reading comprehension systems.
Author: Molla Samser
Website: https://rskworld.in
Contact: help@rskworld.in
Phone: +91 93305 39277
-->

# Question Answering Dataset - Code Examples

This directory contains example code for using the Question Answering Dataset with various transformer models.

## Examples

### 1. BERT Example (`bert_example.py`)

Demonstrates how to use BERT models for question answering:

```bash
python bert_example.py
```

**Features:**
- Loading SQuAD format dataset
- Using BERT tokenizer and model
- Using Hugging Face pipeline for easy inference
- Custom prediction function

### 2. GPT Example (`gpt_example.py`)

Demonstrates how to use GPT models for question answering:

```bash
python gpt_example.py
```

**Features:**
- Loading SQuAD format dataset
- Using GPT-2 tokenizer and model
- Generating answers with language models
- Prompt formatting for GPT

### 3. Transformers Example (`transformers_example.py`)

Comprehensive example using Hugging Face Transformers library:

```bash
python transformers_example.py
```

**Features:**
- Loading both SQuAD and CSV formats
- Using QA pipeline
- Using AutoModel and AutoTokenizer
- Dataset analysis and statistics
- Converting between formats

## Installation

Install required packages:

```bash
pip install transformers torch datasets pandas
```

For GPU support:

```bash
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
```

## Usage

1. Navigate to the examples directory:
```bash
cd examples
```

2. Run any example:
```bash
python bert_example.py
```

3. Modify the examples to use your own models or fine-tune on the dataset.

## Models Used

- **BERT**: `bert-base-uncased`
- **GPT-2**: `gpt2`
- **DistilBERT**: `distilbert-base-uncased-distilled-squad`

## Customization

You can modify the examples to:
- Use different pre-trained models
- Fine-tune models on the dataset
- Add custom preprocessing
- Implement custom training loops
- Evaluate model performance

## Contact

For questions or support:
- **Author**: Molla Samser
- **Website**: [https://rskworld.in](https://rskworld.in)
- **Email**: help@rskworld.in
- **Phone**: +91 93305 39277

🚀 Support RSK World

Subscribe to our YouTube channel for latest tutorials & updates!



Click subscribe & support our work ❤️

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer